Tips and automation scripts for blogging with Jekyll and Minimal Mistakes.
Create a sub-module in your blog repo under the _scripts directory.
Run the scripts from the root of your blog repo, _scripts/_<command>
. They will print out an example usage line.
_absolutify_links.sh
to make link absolute so that they display well emails_check_fixmes.sh
to grep all FIXME comments that might be left in the files_check_links.sh
to grep for all bad links (ex: relative, or local only)_grep_tweets.sh
greps a post for bold sentences that could be tweeted_new_post.sh
creates a new post skeleton_preview.sh
runs a local server to see local changes_word_count.rb
Computes the number of words in a postHere are common reminders and fixes.
[comment]: # (this is a comment)
See https://stackoverflow.com/questions/4823468/comments-in-markdown for the explanation
bundle install
_scripts/_preview.sh
and check that the website is availableGems need to be updated regularly:
brew upgrade rbenv ruby-build
rbenv install --list
rbenv install xxx
Update .ruby-version
bundle update
Test with _scripts/_preview.sh
and _scripts/_local_preview.sh
Here is the template I am using :
{% assign figure_path="/imgs/...todo.jpg" | absolute_url %}
{% assign figure_alt="TODO" %}
{% capture figure_caption %}
TODO markdown
{% endcapture %}
{% include figure image_path=figure_path alt=figure_alt caption=figure_caption %}
{% assign figure_path="/imgs/...todo.jpg" | absolute_url %}
{% assign figure_alt="TODO" %}
{% capture figure_caption %}
By [Philippe Bourgau]({{site.url}}), under [CC BY-SA 4.0](http://creativecommons.org/licenses/by-sa/4.0/), [high resolution image]({{site.url}}{{site.baseurl}}/imgs/...todo.jpg)
{% endcapture %}
{% include figure image_path=figure_path alt=figure_alt caption=figure_caption %}
exiftool -tagsFromFile CC_Attribution-ShareAlike_4.0_International.xmp xxx1.jpg xxx2.jpg...
From https://www.christiankonline.com/twitter-retweet-link-tutorial/
[Retweet this image](https://twitter.com/intent/retweet?tweet_id=\<TWEET_ID\>)
This can be useful to generate tweets or variations for Recurpost.
_scripts/_grep_tweets.sh POST_FILE_PATH
This dump usually needs further editing.
TODO:
Just run the following command:
find _posts -type f -and -name "*.markdown" -exec bundle exec ruby _word_count.rb {} \; > tmp/word_counts.csv
You'll need the following pre-requisites: