Repository navigation
fix: stop linking to source when source.enabled is false - #404
Merged
Merged
Conversation
Constant reference pages already show `NAME: annotation = value` straight from the renderer. The post-render step that tried to add the same line looked for a bare-name paragraph the renderer no longer produces, so it never changed a page. Remove that step along with the metadata it read: the build no longer extracts constant values or writes `_constant_values.json`, and the post-render script no longer loads `_object_types.json`, which only that step used. The rendered reference pages are unchanged.
Class and module reference pages separate inline members with a solid rule after the summary table and a dotted rule between members. These rules were inserted into the HTML after rendering; the stylesheet now draws them instead, with the same colours, opacity and spacing, so the pages look the same in light and dark mode. The rules now also appear between the members of a nested class, which the old insertion skipped. A stylesheet rule for member indentation that never matched any rendered element is removed.
The renderer builds source links and inventory roles straight from the package, so two files the build wrote for the old post-render script had no remaining reader: the source-link map, and the object-type map whose only use was the build-time estimate. Stop writing both, and drop the "Generate source links" step from the build log. The build-time estimate now counts the entries in the previous build's `objects.inv` instead. Like before, it reflects the last build, because the estimate is printed before this build resolves the package.
API reference pages showed "Source" links to GitHub whenever the project had a repository URL, even with `source.enabled: false`. The renderer links to source only when it knows the repository URL, so the build now withholds that URL when source links are disabled.
📚 Preview this PR's docs locallyFetch the just-built site and open it in your browser: # this exact build
great-docs preview --run 39773127438
# or always the latest build for this PR
great-docs preview --pr 404Auth & tips
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR makes
source.enabled: falseremove the "Source" links from API reference pages again. Since the current renderer became the default, it linked to GitHub whenever the project had a repository URL, so sites that had turned source links off still showed them.It also retires the last pieces of the old post-render pipeline that the renderer has made redundant. The build no longer writes
_source_links.json,_object_types.jsonor_constant_values.json, and the "Generate source links" step is gone from the build log. The rules between class and module members are drawn by the stylesheet instead of being inserted into the HTML, and they now also appear between the members of a nested class. Otherwise the rendered pages are unchanged.