Documenter.jl - Removing unwanted versions of generated documentation in 2024

Backstory

I made a tagging mistake that I unwisely pushed up anyway, and now there’s documentation for a non-existent version of my (unregistered) library.

There is no v1.2, and I’m thinking of getting rid of v1.0 too, because I’m thinking of doing the initial registration at v0.9.0, because there’s quite a bit of unfinished work.

How do I get rid of the unwanted versions?

I found a similar thread to this one from 2018, but its advice no longer seems valid. It says to edit versions.jl in the gh-pages branch, but there’s only versions.js and its contents look like this:

var DOC_VERSIONS = [
  "dev",
];
var DOCUMENTER_NEWEST = "dev";
var DOCUMENTER_STABLE = "dev";

I think the old thread is still accurate – versions.js vs versions.jl is probably a typo.

Minimal steps:

  • Delete the folder for the bad version on the gh-pages branch (this folder in your case).
  • Rerun a documentation build job (e.g. just restart the latest build from the main branch). This will update the symlinks for stable and v1 and regenerate the versions.js file.
1 Like

You know what else I forgot to do? I forgot to pull down all the changes the github-actions had been making. After a git pull, versions.js looks like:

var DOC_VERSIONS = [
  "stable",
  "v1.2",
  "v1.0",
  "dev",
];
var DOCUMENTER_NEWEST = "v1.2";
var DOCUMENTER_STABLE = "stable";

I’m going to try your advice out right now and hope for the best.

Update: It worked.

Thanks, @fredrikekre.