Update documentation and config example for excerpt support
This commit is contained in:
parent
11e234f9e9
commit
d0178a7b0b
4 changed files with 5 additions and 1 deletions
|
@ -102,6 +102,7 @@ title: foo
|
||||||
tags: bar, baz
|
tags: bar, baz
|
||||||
date: yyyy-mm-dd hh:mm:ss
|
date: yyyy-mm-dd hh:mm:ss
|
||||||
format: html (for raw html) or md (for markdown)
|
format: html (for raw html) or md (for markdown)
|
||||||
|
excerpt: Can also be extracted from content (see :excerpt-sep config param)
|
||||||
;;;;;
|
;;;;;
|
||||||
your post
|
your post
|
||||||
```
|
```
|
||||||
|
|
|
@ -24,6 +24,7 @@ It is usually recommend to start from the [example config][ex_config] and pare d
|
||||||
There are also many *optional* config parameters such as:
|
There are also many *optional* config parameters such as:
|
||||||
* `:charset` => to set HTML attributes for international characters, default: "UTF-8"
|
* `:charset` => to set HTML attributes for international characters, default: "UTF-8"
|
||||||
* `:feeds` => to generate RSS and Atom feeds for certain tagged content
|
* `:feeds` => to generate RSS and Atom feeds for certain tagged content
|
||||||
|
* `:excerpt-sep` => to set the separator for excerpt in content, default: `<!--more-->`
|
||||||
* `:lang` => to set HTML attributes indicating the site language, default: "en"
|
* `:lang` => to set HTML attributes indicating the site language, default: "en"
|
||||||
* `:license` => to override the displayed content license, the default is CC-BY-SA
|
* `:license` => to override the displayed content license, the default is CC-BY-SA
|
||||||
* `:page-ext` => to set the suffix of generated files, default: "html"
|
* `:page-ext` => to set the suffix of generated files, default: "html"
|
||||||
|
|
|
@ -167,6 +167,7 @@ The variable that should be available to all templates is:
|
||||||
- `date`, the date of posting
|
- `date`, the date of posting
|
||||||
- `text`, the HTML of the post's body
|
- `text`, the HTML of the post's body
|
||||||
- `title`, the title of the post
|
- `title`, the title of the post
|
||||||
|
- `excerpt`, the excerpt of the post, same as `text` by default
|
||||||
|
|
||||||
### Step 4. Include the content
|
### Step 4. Include the content
|
||||||
|
|
||||||
|
@ -193,7 +194,7 @@ A simple `index.tmpl` looks like this:
|
||||||
{template index}
|
{template index}
|
||||||
{foreach $obj in $index.content}
|
{foreach $obj in $index.content}
|
||||||
<h1>{$object.title}</h1>
|
<h1>{$object.title}</h1>
|
||||||
{$object.text |noAutoescape}
|
{$object.excerpt |noAutoescape}
|
||||||
{/foreach}
|
{/foreach}
|
||||||
{/template}
|
{/template}
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
(:author "Brit Butler"
|
(:author "Brit Butler"
|
||||||
:deploy-dir "/home/git/blog/"
|
:deploy-dir "/home/git/blog/"
|
||||||
:domain "http://blog.redlinernotes.com"
|
:domain "http://blog.redlinernotes.com"
|
||||||
|
:excerpt-sep "<!--more-->"
|
||||||
:feeds ("lisp")
|
:feeds ("lisp")
|
||||||
:plugins ((analytics :tracking-code "foo")
|
:plugins ((analytics :tracking-code "foo")
|
||||||
(disqus :shortname "my-site-name")
|
(disqus :shortname "my-site-name")
|
||||||
|
|
Loading…
Add table
Reference in a new issue