Dates and versions of Technotes & Design Documents can now be set from the Git context

If you’re an author of technotes or reStructuredText-based design documents, you’ll be happy to know that the revision date and version metadata fields can now be automatically obtained from Git metadata. Previously, you were required to manually manage the last_revised and version fields in metadata.yaml.

You can realize this change immediately in your projects by commenting out the last_revised and version fields from metadata.yaml in your technote repo and push the update to GitHub/LSST the Docs. The revision date will be rendered from the Git commit timestamp and the version will be based on the Git branch name.

The lsst-technote-bootstrap project has been updated to use this behaviour by default.

You can still manually set last_revised and version by providing a value for those fields. This might be useful, for example, in released versions of a technote, or when porting ‘historical’ documents. The metadata.yaml template also includes contextual documentation on this feature.

If you’re working locally, you can get these benefits by upgrading documenteer to at least v0.1.9: pip install -U documenteer.


2 Likes