Update social tags

This commit is contained in:
Rico Sta. Cruz 2017-09-08 02:58:49 +08:00
parent 82dea2438c
commit d7f28d7be9
No known key found for this signature in database
GPG Key ID: CAAD38AE2962619A
5 changed files with 54 additions and 14 deletions

View File

@ -17,9 +17,9 @@
<meta content='{{ page.full_title }}' property='twitter:title'> <meta content='{{ page.full_title }}' property='twitter:title'>
<meta content='article' property='og:type'> <meta content='article' property='og:type'>
{% elsif page.title %} {% elsif page.title %}
<title>{{ page.title }} cheatsheet</title> <title>{% include values/title.html page=page %}</title>
<meta content='{{ page.title }}' property='og:title'> <meta content='{% include values/title.html page=page %}' property='og:title'>
<meta content='{{ page.title }}' property='twitter:title'> <meta content='{% include values/title.html page=page %}' property='twitter:title'>
<meta content='{{ page.og_type | default: "article" }}' property='og:type'> <meta content='{{ page.og_type | default: "article" }}' property='og:type'>
{% else %} {% else %}
<title>{{ site.title }}</title> <title>{{ site.title }}</title>
@ -32,6 +32,10 @@
{% if page.description %} {% if page.description %}
<meta content="{{ page.description }}" name="description"> <meta content="{{ page.description }}" name="description">
<meta content="{{ page.description }}" property="og:description"> <meta content="{{ page.description }}" property="og:description">
{% else %}
<meta content="{% include values/description.html page=page %}" name="description">
<meta content="{% include values/description.html page=page %}" property="og:description">
<meta content="{% include values/description.html page=page %}" property="twitter:description">
{% endif %} {% endif %}
{%comment%}<!-- canonical URL -->{%endcomment%} {%comment%}<!-- canonical URL -->{%endcomment%}

View File

@ -0,0 +1,5 @@
{%
if page.type == 'article'
%}A comprehensive cheatsheet for {{ page.title }}.{%
endif
%}

View File

@ -0,0 +1,7 @@
{%
if page.type == 'article'
%}{{ page.title }} cheatsheet {%
else
%}{{ page.title }}{%
endif
%}

View File

@ -113,39 +113,57 @@ See: [Configuration](http://jekyllrb.com/docs/configuration/)
Markup Markup
------ ------
{: .-three-column}
### Page variables ### Page variables
```html ```html
<title>{{ page.title }}</title> <title>
{{ page.title }}
</title>
``` ```
{: data-line="2"}
### Filters
```html ```html
<!-- Filters --> <p>
<p>{{ page.description | truncate_words: 20 }} {{ page.description | truncate_words: 20 }}
</p>
``` ```
{: data-line="2"}
### Loops ### Loops
{% for post in site.posts %} ```html
<a href="{{ post.url }}"> {% for post in site.posts %}
<h2>{{ post.title }} &mdash; {{ post.date | date_to_string }}</h2> <a href="{{ post.url }}">
</a> <h2>{{ post.title }}</h2>
{{ post.content }} <p>{{ post.date | date_to_string }}</h2>
{% endfor %} </a>
{% endfor %}
```
{: data-line="1,6"}
### Dates ### Dates
{{ page.date | date: "%b %d, %Y" }} ```html
{{ page.date | date: "%b %d, %Y" }}
```
### Conditionals ### Conditionals
```html ```html
{% if page.image.feature %} {% if page.image.feature %}
{% else if xyz %} ...
{% elsif xyz %}
...
{% else %} {% else %}
...
{% endif %} {% endif %}
``` ```
{: data-line="1,3,5,7 }
```html ```html
{% if page.category == 'React' %} {% if page.category == 'React' %}
@ -165,24 +183,29 @@ Markup
Thank you for your order! Thank you for your order!
{% endcase %} {% endcase %}
``` ```
{: data-line="1,2,4,6,8"}
### Includes (partials) ### Includes (partials)
``` ```
{% include header.html %} {% include header.html %}
``` ```
{: data-line="1"}
```html ```html
<!-- Including local vars --> <!-- Including local vars -->
{% include header.html page=page %} {% include header.html page=page %}
``` ```
{: data-line="2"}
### Comments ### Comments
```html ```html
{% comment %} {% comment %}
This is a comment!
{% endcomment %} {% endcomment %}
``` ```
{: data-line="1,3"}
## Variables ## Variables

View File

@ -1,6 +1,7 @@
--- ---
title: Makefile title: Makefile
hljs_languages: [makefile] hljs_languages: [makefile]
layout: 2017/sheet
--- ---
## Var assignment ## Var assignment