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='article' property='og:type'>
{% elsif page.title %}
<title>{{ page.title }} cheatsheet</title>
<meta content='{{ page.title }}' property='og:title'>
<meta content='{{ page.title }}' property='twitter:title'>
<title>{% include values/title.html page=page %}</title>
<meta content='{% include values/title.html page=page %}' property='og:title'>
<meta content='{% include values/title.html page=page %}' property='twitter:title'>
<meta content='{{ page.og_type | default: "article" }}' property='og:type'>
{% else %}
<title>{{ site.title }}</title>
@ -32,6 +32,10 @@
{% if page.description %}
<meta content="{{ page.description }}" name="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 %}
{%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
------
{: .-three-column}
### Page variables
```html
<title>{{ page.title }}</title>
<title>
{{ page.title }}
</title>
```
{: data-line="2"}
### Filters
```html
<!-- Filters -->
<p>{{ page.description | truncate_words: 20 }}
<p>
{{ page.description | truncate_words: 20 }}
</p>
```
{: data-line="2"}
### Loops
{% for post in site.posts %}
<a href="{{ post.url }}">
<h2>{{ post.title }} &mdash; {{ post.date | date_to_string }}</h2>
</a>
{{ post.content }}
{% endfor %}
```html
{% for post in site.posts %}
<a href="{{ post.url }}">
<h2>{{ post.title }}</h2>
<p>{{ post.date | date_to_string }}</h2>
</a>
{% 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
<!-- Including local vars -->
{% include header.html page=page %}
```
{: data-line="2"}
### Comments
```html
{% comment %}
This is a comment!
{% endcomment %}
```
{: data-line="1,3"}
## Variables

View File

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