Skip to content

Commit

Permalink
feat(docs): add new variables for templates
Browse files Browse the repository at this point in the history
  • Loading branch information
sparanoid committed Dec 17, 2015
1 parent 68a2071 commit 5a48662
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions _app/_posts/note/2014-06-09-creating-themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,66 @@ This allow your user to be able to use Google Analytics for their site, tracking
{% raw %}{{ amsf_google_analytics }}{% endraw %}
```

### Post Published Time

This allow you to get the published time of current post.

Template:

```html
<meta property="article:published_time" content="{% raw %}{{ amsf_page_pubdate | date_to_xmlschema }}{% endraw %}">
```

Output:

```html
<meta property="article:published_time" content="2014-01-01T00:00:00+08:00">
```

### Post Modified Time

This allow you to get the modified time of current post.

Template:

```html
<meta property="article:modified_time" content="{% raw %}{{ amsf_page_update | date_to_xmlschema }}{% endraw %}">
```

Output:

```html
<meta property="article:modified_time" content="2014-01-03T03:17:49+08:00">
```

### Post Reading Time

This allow you to show average reading time of current post.

Template:

```html
Reading time: {% raw %}{{ amsf_page_reading_time | strip }}{% endraw %}
```

Output:

```md
# Less than 200 words
Reading time: Less than 1 min
# Around 200 words
Reading time: 1 min
# More than 200 words
Reading time: 34 mins
# More than 1 hour
Reading time: 1 hr
Reading time: 1 hr 1 min
Reading time: 3 hrs 20 mins
```

## Publishing Themes

You really like your custom design and wanna show it off to the world? Cool, you can create (pack) you own theme by the following command:
Expand Down

0 comments on commit 5a48662

Please sign in to comment.