diff options
| author | davidtsadler <davidtsadler@googlemail.com> | 2011-12-29 21:18:44 +0000 |
|---|---|---|
| committer | davidtsadler <davidtsadler@googlemail.com> | 2011-12-29 21:18:44 +0000 |
| commit | 4f363292ad67daa9f1b009ed6453567894157257 (patch) | |
| tree | c3059b902f10ae4fcd164e78aad4c56bcbcdfd99 | |
| parent | 315bebe5be8e77a312f6aaa04d36b691eb5cf10a (diff) | |
Control recent posts on the main index page via the configuration file.
| -rw-r--r-- | _config.yml.example | 3 | ||||
| -rw-r--r-- | _site_build/index.html | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/_config.yml.example b/_config.yml.example index b457be3..89bd20f 100644 --- a/_config.yml.example +++ b/_config.yml.example @@ -18,7 +18,8 @@ author: #twitter: # Git hub name. #github: - +# Controls the number of recent posts shown on the main index page. +max_recent_posts: 10 # *************************** diff --git a/_site_build/index.html b/_site_build/index.html index 98b8e02..c454726 100644 --- a/_site_build/index.html +++ b/_site_build/index.html @@ -3,7 +3,7 @@ layout: default title: Home --- <section id="excerpts"> -{% for post in site.posts %} +{% for post in site.posts limit:site.max_recent_posts %} {% include post_excerpt.html %} {% endfor %} </section> |
