diff --git a/History.markdown b/History.markdown index 8dbe1ccf..6e9f8041 100644 --- a/History.markdown +++ b/History.markdown @@ -6,6 +6,7 @@ ### Bug Fixes ### Site Enhancements + * Add docs for post excerpt (#1072) * Add docs for gist tag (#1072) ### Development Fixes diff --git a/site/docs/posts.md b/site/docs/posts.md index 2eaa1566..9ad420d2 100644 --- a/site/docs/posts.md +++ b/site/docs/posts.md @@ -113,6 +113,28 @@ Of course, you have full control over how (and where) you display your posts, and how you structure your site. You should read more about [how templates work](../templates) with Jekyll if you want to know more. +## Post excerpts + +Posts automatically take the first block of text, from the beginning of the content +to the first occurrence of `excerpt_separator`, and sets it as the `post.excerpt`. +Take the above example of an index of posts for example. Maybe you want to include +a little hint about the post's content by adding the first paragraph of each of your +posts: + +{% highlight html %} + +{% endhighlight %} + +If you don't like the automatically-generated post excerpt, it can be overridden by adding +`excerpt` to your post's YAML front-matter. + ## Highlighting code snippets Jekyll also has built-in support for syntax highlighting of code snippets using