diff --git a/_includes/meta.html b/_includes/meta.html index 37e481ac8..626f58d37 100644 --- a/_includes/meta.html +++ b/_includes/meta.html @@ -17,9 +17,9 @@ {% elsif page.title %} -{{ page.title }} cheatsheet - - +{% include values/title.html page=page %} + + {% else %} {{ site.title }} @@ -32,6 +32,10 @@ {% if page.description %} +{% else %} + + + {% endif %} {%comment%}{%endcomment%} diff --git a/_includes/values/description.html b/_includes/values/description.html new file mode 100644 index 000000000..a3e5f802e --- /dev/null +++ b/_includes/values/description.html @@ -0,0 +1,5 @@ +{% + if page.type == 'article' +%}A comprehensive cheatsheet for {{ page.title }}.{% + endif +%} diff --git a/_includes/values/title.html b/_includes/values/title.html new file mode 100644 index 000000000..ebd08d712 --- /dev/null +++ b/_includes/values/title.html @@ -0,0 +1,7 @@ +{% + if page.type == 'article' +%}{{ page.title }} cheatsheet {% + else +%}{{ page.title }}{% + endif +%} diff --git a/jekyll.md b/jekyll.md index 604e59307..5cf8187cc 100644 --- a/jekyll.md +++ b/jekyll.md @@ -113,39 +113,57 @@ See: [Configuration](http://jekyllrb.com/docs/configuration/) Markup ------ +{: .-three-column} ### Page variables ```html -{{ page.title }} + + {{ page.title }} + ``` +{: data-line="2"} + + +### Filters ```html - -

{{ page.description | truncate_words: 20 }} +

+ {{ page.description | truncate_words: 20 }} +

``` +{: data-line="2"} ### Loops - {% for post in site.posts %} - -

{{ post.title }} — {{ post.date | date_to_string }}

-
- {{ post.content }} - {% endfor %} +```html +{% for post in site.posts %} + +

{{ post.title }}

+

{{ post.date | date_to_string }} + +{% endfor %} +``` +{: data-line="1,6"} ### Dates - {{ page.date | date: "%b %d, %Y" }} +```html +{{ page.date | date: "%b %d, %Y" }} +``` ### Conditionals ```html {% if page.image.feature %} -{% else if xyz %} + ... +{% elsif xyz %} + ... {% else %} + ... {% endif %} ``` +{: data-line="1,3,5,7 } ```html {% if page.category == 'React' %} @@ -165,24 +183,29 @@ Markup Thank you for your order! {% endcase %} ``` +{: data-line="1,2,4,6,8"} ### Includes (partials) ``` {% include header.html %} ``` +{: data-line="1"} ```html {% include header.html page=page %} ``` +{: data-line="2"} ### Comments ```html {% comment %} + This is a comment! {% endcomment %} ``` +{: data-line="1,3"} ## Variables diff --git a/makefile.md b/makefile.md index e7d9fae2f..1eea16207 100644 --- a/makefile.md +++ b/makefile.md @@ -1,6 +1,7 @@ --- title: Makefile hljs_languages: [makefile] +layout: 2017/sheet --- ## Var assignment