Readme.rst 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. Summary
  2. -------
  3. This plugin allows easy, variable length summaries directly embedded into the
  4. body of your articles. It introduces two new settings: ``SUMMARY_BEGIN_MARKER``
  5. and ``SUMMARY_END_MARKER``: strings which can be placed directly into an article
  6. to mark the beginning and end of a summary. When found, the standard
  7. ``SUMMARY_MAX_LENGTH`` setting will be ignored. The markers themselves will also
  8. be removed from your articles before they are published. The default values
  9. are ``<!-- PELICAN_BEGIN_SUMMARY -->`` and ``<!-- PELICAN_END_SUMMARY -->``.
  10. For example::
  11. Title: My super title
  12. Date: 2010-12-03 10:20
  13. Tags: thats, awesome
  14. Category: yeah
  15. Slug: my-super-post
  16. Author: Alexis Metaireau
  17. This is the content of my super blog post.
  18. <!-- PELICAN_END_SUMMARY -->
  19. and this content occurs after the summary.
  20. Here, the summary is taken to be the first line of the post. Because no
  21. beginning marker was found, it starts at the top of the body. It is possible
  22. to leave out the end marker instead, in which case the summary will start at the
  23. beginning marker and continue to the end of the body.
  24. reST example
  25. ~~~~~~~~~~~~
  26. Inserting the markers into a reStructuredText document makes use of the
  27. comment directive, because raw HTML is automatically escaped. The reST equivalent of the above Markdown example looks like this::
  28. My super title
  29. ##############
  30. :date: 2010-12-03 10:20
  31. :tags: thats, awesome
  32. :category: yeah
  33. :slug: my-super-post
  34. :author: Alexis Metaireau
  35. This is the content of my super blog post.
  36. .. PELICAN_END_SUMMARY
  37. and this content occurs after the summary.