Usage¶
The extension provides a recentupdate directive:
.. recentupdate:: [count]
[jinja template]
- count
The optional argument of directive is the count of recent “revisions” you want to show. Revision is a git commit which contains document changes.
If no count given, value of
⚙️recentupdate_countis used.- template
The optional content of directive is a jinja template for generating reStructuredText, in the template you can access Variables named {{ revisions }}.
Beside, You can use Builtin Filters and Filters provided by extensions.
If no template given, value of
⚙️recentupdate_templateis used.
Variables¶
All available variables:
{{ revisions }}¶
{{ revisions }} is an an array of revisions. The length of array is determined by the argument of recentupdate directive.
Here is the schema of array element:
- class recentupdate.Revision(message, author, date, addition, modification, deletion)¶
Revision represents a git commit which contains document changes.
- Parameters:
Filters¶
strftime¶
Convert a datetime.datetime to string in given format.
If no format given, use value of ⚙️recentupdate_date_format.
It is used in default template.
roles¶
Convert a list of string to list of reStructuredText roles.
{{ ['foo', 'bar'] | roles("doc") }} produces [':doc:`foo`', ':doc:`bar`'].
It is used in default template.