-
Notifications
You must be signed in to change notification settings - Fork 383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use changelogs/release.yaml
for the version number source everywhere
#3310
Conversation
Previously both the top banner of the site and the top paragraph on the changelog page would pull the current version number of the spec from config.toml. This commit changes the source of truth to changelogs/release.yaml, which is already used to determine the current version of the spec on other parts of the changelogs page. This also means one less thing to change when doing a release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really familiar with this templating system, whatever it is - but it looks plausible, as long as you've tested it :)
The thought occurs to me: if the Or should we move the unstable flag into In short, why the inconsistency? |
Oh right - I should've mentioned. It's hugo's own templating system. Looks quite similar to jinja2. https://gohugo.io/templates/introduction/
The historical context is in #2992 (note that we switched from individual It would certainly be easier in templates to pull a parameter from the config than parsing yaml files everywhere, so perhaps we should move the date and time into |
@richvdh I've updated things to use the information in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm otherwise. Presumably this necessitates a change to #3295?
Co-authored-by: Richard van der Hoff <[email protected]>
Yep! Hope you don't mind if I do so via a rebase... |
#3310) Co-authored-by: Richard van der Hoff <[email protected]>
#3310) Co-authored-by: Richard van der Hoff <[email protected]>
Currently both the top banner of the site and the top paragraph on the Changelogs page pull the current version number of the spec from
config.toml
, i.e:https://github.com/matrix-org/matrix-doc/blob/6c6aa0b3d6eb6edc65c68ad78072a6733998969b/layouts/shortcodes/changelog/changelog-description.html#L8-L15
Note the
{{ .Site.Params.version.number }}
bit.However, we already have a method of specifying the version number of a release build of the spec:
changelogs/release.yaml
:https://github.com/matrix-org/matrix-doc/blob/6c6aa0b3d6eb6edc65c68ad78072a6733998969b/layouts/shortcodes/changelog/changelog-changes.html#L1-L16
This commit changes the site banner and Changelogs page to use
tag
inchangelogs/release.yaml
for the version number of the spec, instead of having two different ways to do things. Note that if we're building an unstable version of the spec, thenchangelogs/release.yaml
is never read from.