-
Notifications
You must be signed in to change notification settings - Fork 5
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
chore: refactor documentation generation #254
Merged
Merged
Conversation
This file contains 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
eliottness
force-pushed
the
romain.marcadier/rm-dead-code
branch
2 times, most recently
from
September 2, 2024 22:09
a195f8b
to
b7361ee
Compare
Move the HTML template fragments to the `generator` package in order to improve the lisibility of the join points & advice codebases. This allows using `html/template` templates instead of composing HTML into a buffer, then serializing it, and makes it easier to spot markup issues. One caveat with this approach is that since this HTML gets embedded into a markdown document, care has to be taken to ensure that nothing gets indented more than 4 spaces deep if it is preceded by a blank line, as this is the syntax for Markdown indented code blocks (which cannot be disbaled). Bonus features include: - Now rendering shorter names when referring to a single type, by showing only the package name instead of the entire import path (still available on hover, as it's the `title` attribute of an `<abrr>` tag) - Dropped a number of function options that were only used in unit tests
RomainMuller
force-pushed
the
romain.marcadier/doc-html-templates
branch
from
September 30, 2024 11:34
a691c02
to
e6cc720
Compare
eliottness
approved these changes
Oct 1, 2024
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 already reviewed most of it before you rebased it. LGTM 👍
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.
Move the HTML template fragments to the
generator
package in order to improve the lisibility of the join points & advice codebases.This allows using
html/template
templates instead of composing HTML into a buffer, then serializing it, and makes it easier to spot markup issues.One caveat with this approach is that since this HTML gets embedded into a markdown document, care has to be taken to ensure that nothing gets indented more than 4 spaces deep if it is preceded by a blank line, as this is the syntax for Markdown indented code blocks (which cannot be disbaled).
Bonus features include:
title
attribute of an<abrr>
tag)