-
Notifications
You must be signed in to change notification settings - Fork 484
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
Add Banner for "This is for unreleased docs" #2382
Comments
This seems reasonable. We actually have that for the Julia docs (https://docs.julialang.org/en/v1.11-dev/), although I am not immediately sure if that's accidental due to the slightly different URL scheme, or we inject it somehow. |
Hey there @mortenpi! How can I help with this issue? |
Regarding this issue, it seems like there's a GET request to |
As a breadcrumb, the code that handles the outdated warning lives here: https://github.com/JuliaDocs/Documenter.jl/blob/master/assets/html/warner.js |
So, would anything need to be added or changed really? People could just essentially use this script to add the outdated/experimental warning banner right? But I assume this is very much specific to the documentation site? |
The logic in Documenter.jl/assets/html/warner.js Lines 13 to 16 in 8395fe5
We could make that regex just more permissive somehow, but IIRC we allow both |
Rather than the regex testing for it being a version number we could change it to only add the banner to versions ending with Do you have any idea how the juliadocs site tags versions as outdated? Like in https://docs.julialang.org/en/v1.4/ I can't seem to figure it out |
That's the regex.
The One option would be to add some JS variable to communicate this. In Documenter.jl/src/deploydocs.jl Lines 412 to 418 in 346c622
we generate the Documenter.jl/src/html/HTMLWriter.jl Lines 1598 to 1606 in 346c622
|
I see, the siteinfo.js file is used to create metadata for the JS to be able to decide things, namely in this case setting:
I'll look into ways to fix this, it certainly makes sense to add some JS variables that act as flags to enable/disable it |
as of #1577
Documentor displays a banner for if the docs are for an out-dated page.
A lot of links exist in the wild (especially for older packages) that go to
/latest
, so search engines often pick up on this./latest
might be docs for an unreleased version of the packages, or I think even preview builds for open PRs.It would be nice to display a similar banner on these packages that offers a link to latest stable release.
@aoanla suggested this on JuliaCollections/DataStructures.jl#885 (comment)
The text was updated successfully, but these errors were encountered: