Docs: Add a way to skip some doc stuff #39747
Open
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.
Description
Add a
⚠️ Remove the doc example before merging.
{{ skip (.*) }}{{ /skip }}
tags to our example to change the displayed code from the executed code.I couldn't think about it using native Hugo template (
{{ if }}
, etc.) so I tried to reproduce as mush as possible the syntax.It might be far from ideal but we could merge a first version and upgrade it with time and experiment.
Once this is merged (or equivalent) I'll update all Bootstrap examples to avoid dupe code, uniformize a bit more the documentation and add Stackblitz to all those new examples..
Should it be mentioned somewhere to help contributors discovering this feature ?
Can you think about a better approach to help with this issue ?
Motivation & Context
In context of #38933.
Avoid dupe code.
Help people maintaining only one version of each example and keep the doc tidier.
Type of changes
Checklist
npm run lint
)Live previews
Related issues
#38933.