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.
I suggest that a useful addition to the tag helper library would be a reference site, where it is possible to see both the rendered HTML component alongside the code (tag helpers) used to generate it.
Upstream publishes a review app with components shown/listed on one page, with an index linking to each one in isolation. For example: https://govuk-frontend-pr-5574.herokuapp.com/components . This shows only the rendered component and HTML, not tag-helpers.
Similarly, the design system site itself shows component examples: https://design-system.service.gov.uk/components/ . This includes the rendered component and HTML/nunjucks code, not tag-helpers.
The GitHub repo has some
*.md
files which are able to be viewed on GitHub: https://github.com/gunndabad/govuk-frontend-aspnetcore/tree/main/docs/components . These include screenshots of the rendered component (i.e., not HTML) and hard-coded examples of the tag-helpers (note: not guaranteed to be consistent with the samples project and the screenshot).This draft PR is a stepping stone towards a reference site, introducing a similar index page.
Before I run too far with it, is this kind of docs site something that would be welcomed?
Notes:
wget
or similar to pull a copy of the generated HTML pages and host that static HTML on GitHub Pages?docs/
directoryScreenshot: