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

version history #14

Open
tavareshugo opened this issue Dec 14, 2023 · 2 comments
Open

version history #14

tavareshugo opened this issue Dec 14, 2023 · 2 comments

Comments

@tavareshugo
Copy link
Collaborator

For courses where we want to keep history.

Running some tests with a mixture of github actions and gh releases.

Can try adding this automatically into the _quarto.yml:

    left:
      - text: "Version"
        icon: clock-history
        menu: 
          - text: "2023-01-01"
          - text: "2023-02-01"
@TomSmithCGAT
Copy link

Just to check, this would be to maintain the previous course websites in (near) perpetuity? If so, that would be ace!

@tavareshugo
Copy link
Collaborator Author

Note to self for when I get back into this.

If we have a directory in gh-pages with previous versions (let's say the directory is called archive), then it should be possible to:

  • git checkout gh-pages archive --> to copy the archive folder from the gh-pages branch into the main. This will avoid having to re-render those past versions or download them from releases.
  • need to figure out a way to include the archive into the navbar (see below)
    • might need to add resources: "archive" to copy the whole archive folder, as mentioned here.
  • quarto render --> to render a fresh version of the website into _site, including the navbar and archive folder.

Injecting the archive links into the navbar is not completely trivial.

  • We want the dropdown to be the same for all versions. I.e. a version from the past should still show all the versions (including current) in the dropdown.
  • The relative path to each version's index.html will vary depending on whether we're on the current or past version, which is a bit of a pain.

There are some discussions about this on the quarto repo (search for "quarto version selector in navbar").
One of the suggestions is to use pre-render scripts to create the custom drop down, I guess?

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

2 participants