Introduce SemanticVersioningProcessor
#6
Merged
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.
Introduce
SemanticVersioningProcessor
What does this add?
Introduces the core of a new processor designed around enabling semantic versioning of documentation easily in Quarto.
Who is it for?
Helps #4
Why is it needed?
As this project is taking much inspiration from the Hugging Face docs (see here), one aspect these docs have is the ability to do semantic versioning based on the minor version. This PR sets up the sidebar to be able to deal with different versions, concluded after this discussion.
TODO still: generate a selection sidebar and introduce a Usage Guide. For now though in projects this will still semantically build the sidebar to whatever version is used
What parts of the API does this impact?
User-facing:
Adds a new
SemanticVersioningParser
class that can be enabled in the project'sconfig.yaml
Basic Usage Example(s):
To enable in the yaml:
documentation_source: nbs output_folder: docs processors: [ nbquarto.processors.:AutoDocProcessor, + nbquarto.processors:SemanticVersioningProcessor, ] processor_args: AutoDocProcessor: repo_owner: muellerzr repo_name: nbquarto
From here your directory structure when building the docs should be as follows:
And lastly in your
_quarto.yml
you must set the sidebar to be built from auto:When would I use it, and when wouldn't I?
When you want to enable users to view prior versions of your documentation.
Does a similar feature exist? If so, why is this better?
There is no good semantic versioning solution present in Quarto
Anticipated maintenance burden?
This is still the first third(?) of this implementation. Still to do in prior PRs: