mithril.js
mithril.js copied to clipboard
We have two change logs
We currently have
- https://github.com/MithrilJS/mithril.js/blob/next/docs/changelog.md, the legacy, hand-curated change log used to generate the docs Web site, and
- https://github.com/MithrilJS/mithril.js/blob/next/docs/recent-changes.md, which is generated by pr-release, but not propagated to the site.
From now on, it would seem reasonable to rely on the automated logs. If pr-release is flexible enough, we could tell it to update changelog.md
. If it isn't we can move the old entries to recent-changes.md
and special-case that file in the build-docs script to put its content in https://mithril.js.org/changelog.html.
Edit, actually, https://mithril.js.org/recent-changes.html is live, but not linked to from anywere.
Yep the default behaviour is to write to docs/changelog.md and it simply prepends to the existing file. The path is specified in the merge yml link
--changelog ./docs/recent-changes.md
Needs to change to:
--changelog ./changelog.md
I'll try and find time for a PR soon, but if not, that is all that needs to change.
@JAForbes I would love to do this (easy) task.
Sure! It is probably a bit more involved than just moving the content of recent-changes.md
to changelog.md
and updating the configuration, because...
- The title structure is incompatible (I'd modify the old ones to match what PR-release does)
- The old change log has a TOC (which is nice, but not mandatory...
If you want to try and generate one, you can have a look at https://github.com/compose-regexp/compose-regexp.js/blob/main/scripts/build-toc.js which should work with few modifications. The script currently replaces the TOC in the middle of the page, but it should instead move it back at the top after pr-release
prepends its changes.
const tocMatcher = sequence(lookBehind('<!-- START toc -->\n'), /[^]*?/, lookAhead('<!-- END toc -->'))
should become
const tocMatcher = /<!-- START toc -->[^]*?<!-- END toc -->/
You can add the corresponding tags around the TOC at the start of the file, and tweak build-toc
to move the TOC rather than replacing it.
(note that I'm fine not having a TOC there)
In changelog.md is the date of release mentioned as well. In recent-changes.md this information missing. Would it be possible to add the date of the release automatically?