taika.ext.excerpt
– Documents excerpts¶
This extensions creates a excerpt for the documents based on it’s content.
Event¶
This extension is subscribed to the “doc-post-read” event.
Frontmatter¶
-
excerpt_separator
(str)¶ Use this separator instead of the global separator defined in the configuration.
Configuration¶
excerpt_separator: <!-- read-more -->
-
excerpt_separator
(str) Default:
None
A string that will be used as excerpt separator. Default to
None
so no excerpt will be generated.
Process¶
- Check for the frontmatter option, otherwise use the global or the default separator.
- If separator is None, the first
<p>
tag is retrieved if existent. - If the first
<p>
tag is not found,\n\n
(double line separator) is used as separator. - If separator is something, the text before that separator is retrieved if existent.
- The
excerpt
is inserted into the document so it will be accessible.