Skip to content

feat: Re-add recentupdate directive#9

Merged
SilverRainZ merged 1 commit into
masterfrom
feat/recentupdate-directive
Jun 19, 2026
Merged

feat: Re-add recentupdate directive#9
SilverRainZ merged 1 commit into
masterfrom
feat/recentupdate-directive

Conversation

@SilverRainZ

Copy link
Copy Markdown
Member

Summary

  • Add recentupdate directive using BaseContextDirective from sphinxnotes-render
  • Extract collect_revisions() shared helper for directive and extra context
  • Restore recentupdate_template config value as default template when directive body is empty

Directive Usage

.. recentupdate:: [count]
   :self:
   :paths:
      docs/changelog.rst

   custom jinja template
  • Argument count: optional, defaults to recentupdate_count config
  • Option :self:: only revisions affecting current document
  • Option :paths:: git pathspecs, one per line
  • Body: Jinja template with revisions context, falls back to recentupdate_template

Co-authored-by: MiMoCode mimo@xiaomi.com

@SilverRainZ SilverRainZ changed the title feat: Add recentupdate directive feat: Re-dd recentupdate directive Jun 19, 2026
@SilverRainZ SilverRainZ force-pushed the feat/recentupdate-directive branch 2 times, most recently from 793f245 to 2c4701a Compare June 19, 2026 14:47
@SilverRainZ SilverRainZ changed the title feat: Re-dd recentupdate directive feat: Re-add recentupdate directive Jun 19, 2026
Co-authored-by: MiMoCode <mimo@xiaomi.com>
@SilverRainZ SilverRainZ force-pushed the feat/recentupdate-directive branch from fa33005 to d103476 Compare June 19, 2026 15:35
@SilverRainZ SilverRainZ merged commit b302247 into master Jun 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant