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

Support release-based documentation #4

Open
muellerzr opened this issue Jun 8, 2023 · 3 comments
Open

Support release-based documentation #4

muellerzr opened this issue Jun 8, 2023 · 3 comments

Comments

@muellerzr
Copy link
Owner

muellerzr commented Jun 8, 2023

Have the docs/ directory store versioned documentation for each release number and main.

Should only be seen on the gh-pages branch.

How huggingface does it: https://huggingface.co/datasets/hf-doc-build/doc-build/tree/main/accelerate

  • _versions.yml which points to a release tag
  • Each release tag is stored as a .zip file which can be loaded in (we can just checkout the branch tag or use PyGitHub)
  • Versioned documentation get saved in /docs/{version_num}
  • simlink for the latest release to not require {version_num}
  • Should be a command, but checked in the config.yaml for semantic_documentation: {truthy}

HF HTML to look from:

<select class="form-input mr-1 !mt-0 !w-20 rounded !border border-gray-200 p-1 text-xs uppercase dark:!text-gray-400">
<option value="0">main</option>
<option value="1">v0.20.0 (stable)</option>
<option value="2">v0.19.0</option>
<option value="3">v0.18.0</option>
<option value="4">v0.17.0/v0.17.1</option>
<option value="5">v0.16.0</option>
</select>

Until v0.1.0 we'll let all v0.0.x be rendered separately, then combined as true semantic versions once the API is stable enough.

Should be placed on the left sidebar, above the page URLs

image

@muellerzr
Copy link
Owner Author

Update post some hacking this morning, it can be done and will probably be the solution I go with: quarto-dev/quarto-cli#5851 (comment)

Just need to create a version-selector and have its behavior fully mimic HF's

@muellerzr
Copy link
Owner Author

Approach: check out each branch, cp their docs folder, save to a new folder called {branchname}, and then combine them all together and push to the gh-pages. Should probably also check to see what versions are missing from it to avoid excess copy/paste. Should only be for 0.x.0

@muellerzr
Copy link
Owner Author

Forever on the backburner until the course gets done and codenotes v2 is finished, just so I can get that started/going :) If someone wants to pick this up feel free, it however is just a util in a scripts folder outside the main lib, since it relies all on stuff not needed directly in quarto

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

No branches or pull requests

1 participant