Skip to content
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

Introduce SemanticVersioningProcessor #6

Merged
merged 1 commit into from
Jun 9, 2023
Merged

Introduce SemanticVersioningProcessor #6

merged 1 commit into from
Jun 9, 2023

Conversation

muellerzr
Copy link
Owner

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's config.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:

- docs/
  - version_1
      - index.qmd
      - page_1.qmd
  - version_2
      - index.qmd
      - page_2.qmd

And lastly in your _quarto.yml you must set the sidebar to be built from auto:

website:
  sidebar:
    contents: 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:

  • Actually add the semantic versioning selector to the sidebar.
  • Write an extensively thorough usage guide on using this sidebar.

Repository owner deleted a comment from review-notebook-app bot Jun 8, 2023
@muellerzr muellerzr merged commit 8641b6d into main Jun 9, 2023
@muellerzr muellerzr deleted the sidebar.js branch June 9, 2023 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant