Skip to content

Conversation

@fredrikekre
Copy link
Member

This patch changes how the changelog is written in order to support links in both the CHANGELOG.md as viewed on GitHub, and in the generated HTML. The changelog related code is moved into docs/changelog.jl which now has two purposes: i) generate the Documenter friendly markdown for the manual, and ii) generate links to add to the footer of the CHANGELOG.md file directly.

@fredrikekre
Copy link
Member Author

fredrikekre commented Jul 15, 2023

I was getting annoyed by the missing links when viewing the changelog directly on github. After this patch, entries in the changelog should be of the form [#XXX] instead of (#XXX). The list of links at the bottom of CHANGELOG.md can be updated by running eg

julia -L docs/changelog.jl -e 'write_link_footer(; changelog_inputfile = "CHANGELOG.md", repo = "JuliaDocs/Documenter.jl")'

(Perhaps we should have a makefile with things like this).

Copy link
Member

@mortenpi mortenpi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, although it would be good to get @odow's thoughts here as well. Having a Makefile to easily trigger this seems like a good idea though.

This patch changes how the changelog is written in order to support
links in both the CHANGELOG.md as viewed on GitHub, and in the generated
HTML. The changelog related code is moved into docs/changelog.jl which
now has two purposes: i) generate the Documenter friendly markdown for
the manual, and ii) generate links to add to the footer of the
CHANGELOG.md file directly. The latter can be triggered by 'make
changelog'.
@@ -0,0 +1,138 @@
# =================================================================================
# Utilities for managing CHANGELOG.md and generating a Documenter-friendly version
# =================================================================================
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems like this file could even be in src so it can be re-used by any project using Documenter?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be re-used, yes, but I lean towards this being in a separate package, so that it could be versioned independently and hopefully more rapidly than Documenter itself.

That said, we could still drop it into src/ if you want to re-use this for e.g. JuMP right away, and just not promise this as official API (but secretly promise to you that we won't drop it on the 1.0.x branch, for example)?

Copy link
Member

@mortenpi mortenpi Jul 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or, to be fair, if we generally agree that this should be a separate package, we could just copy-paste it into that new package now as is, and tag that as 0.1.0, and then iterate on that as needed.

@mortenpi mortenpi merged commit eaf11b9 into master Jul 19, 2023
@mortenpi mortenpi deleted the fe/readme-links branch July 19, 2023 06:09
@mortenpi
Copy link
Member

mortenpi commented Jul 19, 2023

I went ahead and merged this as is, so that we wouldn't have to deal with conflicts due to the formatting changes in the CHANGELOG. I don't think we have any disagreements about the new format. We can always shuffle the code around in a follow-up PR.

@mortenpi
Copy link
Member

Just used make changelog in #2187 and it's amazing, particularly when compared against the old way where you had to manage those references by hand (pre Oscar's changes) 🚀🚀🚀

@fredrikekre
Copy link
Member Author

FYI, I started working on https://github.com/JuliaDocs/Changelog.jl so we can maybe move to that once that is finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants