mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
support inline summary specification
update documentation change summary cutoff to a plugin remove backup file fix 3.2 tests update summary plugin initialization and documentation update documentation fix documentation formatting
This commit is contained in:
parent
557f1cc956
commit
3f4406dd6b
5 changed files with 171 additions and 18 deletions
|
|
@ -111,6 +111,7 @@ The following plugins are currently included with Pelican:
|
|||
* `HTML tags for reStructuredText`_ ``pelican.plugins.html_rst_directive``
|
||||
* `Related posts`_ ``pelican.plugins.related_posts``
|
||||
* `Sitemap`_ ``pelican.plugins.sitemap``
|
||||
* `Summary`_ ``pelican.plugins.summary``
|
||||
|
||||
Ideas for plugins that haven't been written yet:
|
||||
|
||||
|
|
@ -371,3 +372,34 @@ Here is an example configuration (it's also the default settings):
|
|||
'pages': 'monthly'
|
||||
}
|
||||
}
|
||||
|
||||
.. _plugin-summary:
|
||||
|
||||
Summary
|
||||
-------------
|
||||
|
||||
This plugin allows easy, variable length summaries directly embedded into the
|
||||
body of your articles. It introduces two new settings: ``SUMMARY_BEGIN_MARKER``
|
||||
and ``SUMMARY_END_MARKER``: strings which can be placed directly into an article
|
||||
to mark the beginning and end of a summary. When found, the standard
|
||||
``SUMMARY_MAX_LENGTH`` setting will be ignored. The markers themselves will also
|
||||
be removed from your articles before they are published. The default values
|
||||
are ``<!-- PELICAN_BEGIN_SUMMARY -->`` and ``<!-- PELICAN_END_SUMMARY -->``.
|
||||
For example::
|
||||
|
||||
Title: My super title
|
||||
Date: 2010-12-03 10:20
|
||||
Tags: thats, awesome
|
||||
Category: yeah
|
||||
Slug: my-super-post
|
||||
Author: Alexis Metaireau
|
||||
|
||||
This is the content of my super blog post.
|
||||
<!-- PELICAN_END_SUMMARY -->
|
||||
and this content occurs after the summary.
|
||||
|
||||
Here, the summary is taken to be the first line of the post. Because no
|
||||
beginning marker was found, it starts at the top of the body. It is possible
|
||||
to leave out the end marker instead, in which case the summary will start at the
|
||||
beginning marker and continue to the end of the body.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue