summaryrefslogtreecommitdiffstats
path: root/docs/manual/post-excerpts-and-images.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/manual/post-excerpts-and-images.rst')
-rw-r--r--docs/manual/post-excerpts-and-images.rst44
1 files changed, 44 insertions, 0 deletions
diff --git a/docs/manual/post-excerpts-and-images.rst b/docs/manual/post-excerpts-and-images.rst
new file mode 100644
index 0000000..68cd106
--- /dev/null
+++ b/docs/manual/post-excerpts-and-images.rst
@@ -0,0 +1,44 @@
+Post Excerpts and Images
+========================
+
+.. post:: May 12, 2014
+ :tags: directive
+ :category: Manual
+ :location: Pittsburgh
+ :author: Ahmet
+ :exclude:
+ :image: 2
+
+ This post describes how to choose an excerpt and an image image for a post to be displayed in archive pages.
+
+Excerpts
+--------
+
+ABlog, by default, uses first paragraph of the document as post excerpt.
+Default number of paragraphs to use in excerpts is controlled via :confval:`post_auto_excerpt` configuration variable.
+This option can be overwritten using ``:excerpt:`` option in :rst:dir:`post` directive.
+
+Alternatively, you can provide some content in a post directive as follows::
+
+ .. post:: Apr 15, 2014
+
+ This is all of the excerpt for this post.
+
+This content is going to be used as excerpt in archive pages.
+Furthermore, if you do not want the excerpt to be included in the post, you can use ``:exclude:`` option as follows::
+
+ .. post:: Apr 15, 2014
+ :exclude:
+
+ This is all of the excerpt for this post.
+ It will be displayed in archive pages and excluded from the post page.
+
+Images
+------
+
+Let's first include a local and a non-local image in this post.
+
+.. image:: /_static/ablog.png
+.. image:: https://www.python.org/static/community_logos/python-logo.png
+
+To link the second one of these, we add ``:image: 2`` option in :rst:dir:`post` directive.