Recently Written · git

coleslaw

Emacs mode for the "Coleslaw" site generator written in Common Lisp.

git clone https://github.com/equwal/coleslaw

Log | Files | Refs


commit d0178a7b0b6eb54b902bd17ca64236790ab5cd49
Alfredo Beaumont <alfredo.beaumont@gmail.com>
2017-03-22 18:53:24 +0100

Update documentation and config example for excerpt support

 README.md                   | 1 +
 docs/config.md              | 1 +
 docs/themes.md              | 3 ++-
 examples/example.coleslawrc | 1 +
 4 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 158a695..c80836c 100644
--- a/README.md
+++ b/README.md
@@ -102,6 +102,7 @@ title: foo
 tags: bar, baz
 date: yyyy-mm-dd hh:mm:ss
 format: html (for raw html) or md (for markdown)
+excerpt: Can also be extracted from content (see :excerpt-sep config param)
 ;;;;;
 your post
 ```
diff --git a/docs/config.md b/docs/config.md
index 5814c57..b149f53 100644
--- a/docs/config.md
+++ b/docs/config.md
@@ -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:
 * `:charset`       => to set HTML attributes for international characters, default: "UTF-8"
 * `: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"
 * `:license`       => to override the displayed content license, the default is CC-BY-SA
 * `:page-ext`      => to set the suffix of generated files, default: "html"
diff --git a/docs/themes.md b/docs/themes.md
index 178dc93..7a26809 100644
--- a/docs/themes.md
+++ b/docs/themes.md
@@ -167,6 +167,7 @@ The variable that should be available to all templates is:
    - `date`, the date of posting
    - `text`, the HTML of the post's body
    - `title`, the title of the post
+   - `excerpt`, the excerpt of the post, same as `text` by default
 
 ### Step 4. Include the content
 
@@ -193,7 +194,7 @@ A simple `index.tmpl` looks like this:
 {template index}
 {foreach $obj in $index.content}
 <h1>{$object.title}</h1>
-  {$object.text |noAutoescape}
+  {$object.excerpt |noAutoescape}
 {/foreach}
 {/template}
 ```
diff --git a/examples/example.coleslawrc b/examples/example.coleslawrc
index 25d0f3f..fb45205 100644
--- a/examples/example.coleslawrc
+++ b/examples/example.coleslawrc
@@ -1,6 +1,7 @@
 (:author "Brit Butler"
  :deploy-dir "/home/git/blog/"
  :domain "http://blog.redlinernotes.com"
+ :excerpt-sep "<!--more-->"
  :feeds ("lisp")
  :plugins ((analytics :tracking-code "foo")
            (disqus :shortname "my-site-name")