docs.page icon indicating copy to clipboard operation
docs.page copied to clipboard

Feature: Use git tag instead of main branch for production docs.

Open schultek opened this issue 4 months ago • 1 comments

I semi-regularly have the case that I have unreleased changes on my main branch before releasing a new version of my package. During these periods (normally couple days to a few weeks) the production documentation is not reflecting the released package, because it already contains the updated docs for the new changes (which aren't release yet as said).

I don't want to change my workflow just for the documentation. It would be great to have some configuration to say what to show as the live production documentation as an alternative to only using the default branch. E.g. point it to a specific git tag, and then the main docs (at docs.page/myuser/myrepo or custom domain) would not load the source from the latest commit of the main branch, but instead from the commit of the configured tag. I could then always point it to the git tag of the latest release, and only update it after releasing a new version.

schultek avatar Aug 28 '25 20:08 schultek

Interesting - the challenge here is that we detect the ref to use by default via the URL, and if none is found we fire a GQL request off to the github API using the HEAD ref.

This all happens in a single request for performance, so to do what you suggested we'd first need to get the HEAD config file, then get the content for the page.

We could in theory support this on custom domains, by proxying the domain to a different ref - but this is managed internally at the moment...

Ehesp avatar Sep 04 '25 11:09 Ehesp