Nice to see people wanting to contribute their own trucs! 👌
Follow the examples in the post section, and create your own post. Donc forget to add tags and a nice summary.
Writing your tips and tricks here might lead to share your truc to social media/slack. And adding a cover to give the potential reader some illustrated context would be a good practise.
To do so, add an image
attribute, in your article, pointing to the cover asset:
---
title: My super cool title
summary: "A summary that makes potential readers a sneek peak of the truc."
image: /assets/2018-01-01-your-slugified-super-cool-title.png/cover/a-descriptive-title.png
tags:
- Nice tag 1
- Nice tag 2
- Not so nice tag 1
---
See the Illustrate section, you might want to use a nice code preview as a cover if you lack inspiration.
You can use markdown code blocks to add some nice code, but you can also use Carbon.
Generate your PNG code snippet, put it in the assets and add it to your post like so:
{:.center} ![Inline]({{ "/assets/${YOUR_POST_BASE_NAME}/${YOUR_ASSET_FILENAME}" | absolute_url }})
Before using Carbon to generate code snippet images, ask yourself this question:
Will the user be tempted to copy/paste my code snippet?
If the answer is yes: do not use Carbon 😉
Create a folder dedicated to your post to keep things a bit structured.
For example:
The article in _posts/2018-02-13-ouvrir-une-issue-github-depuis-le-code.md
will get this asset structure:
├── assets
│ ├── 2018-02-13-ouvrir-une-issue-github-depuis-le-code
│ │ ├── cover
│ │ │ └── a-nicely-names-cover.png
│ │ ├── some-asset-nicely-named.png
│ │ ├── and-another-one.png
│ │ └── contextual-menu.png
│ ├── ...
Copy/paste (and maybe adapt) the following:
# Install brew (optional) 🔄
/usr/bin/ruby -e "$(curl -fsSL \
https://raw.githubusercontent.com/Homebrew/install/master/install \
)"
# Install ruby (bundler depends on a specific path 😞)
brew install ruby
# Install jekyll ⚙
gem install jekyll
# Run jekyll 🙌
jekyll serve