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

Add warning for outdated docs #1577

Merged
merged 17 commits into from
Jun 9, 2021
Merged

Add warning for outdated docs #1577

merged 17 commits into from
Jun 9, 2021

Conversation

pfitzseb
Copy link
Member

@pfitzseb pfitzseb commented May 18, 2021

Fixes #1449 (and #1302).

image

This obviously only works for newly generated docs. For already generated old documentation package authors can manually run a script like https://gist.github.com/pfitzseb/4b910449e21b51fed4b4a2a7c20912ff to add the necessary elements.

Oh, and because I was wondering about whether adding a noindex meta tag dynamically actually prevents Google from indexing the page: Yes, apparently it does.

Edit by @mortenpi: fix #1302 x-ref

@fredrikekre
Copy link
Member

fredrikekre commented May 18, 2021

Oh, and because I was wondering about whether adding a noindex meta tag dynamically actually prevents Google from indexing the page: Yes, apparently it does.

#1302 (comment) :D ( so I guess it also fixes that issue).

@mortenpi mortenpi added Format: HTML Related to the default HTML output Type: Feature labels May 19, 2021
@mortenpi mortenpi added this to the 0.27.0 milestone May 19, 2021
Copy link
Member

@mortenpi mortenpi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The approach LGTM, just a few small nitpicks.

src/Documents.jl Outdated Show resolved Hide resolved
src/Writers/HTMLWriter.jl Outdated Show resolved Hide resolved
src/Writers/HTMLWriter.jl Show resolved Hide resolved
src/Writers/HTMLWriter.jl Outdated Show resolved Hide resolved
@mortenpi
Copy link
Member

For already generated old documentation package authors can manually run a script like https://gist.github.com/pfitzseb/4b910449e21b51fed4b4a2a7c20912ff to add the necessary elements.

You wouldn't be willing to turn this into a function and put it into DocumenterTools by any chance?

@pfitzseb
Copy link
Member Author

Ok, just pushed a commit that cleans up the JS/CSS side of this. The overlay is now rendered as an admonition and respects themes:
image
image

Co-authored-by: Morten Piibeleht <[email protected]>
@pfitzseb
Copy link
Member Author

Ok, this is good to go from my end. Review comments are addressed.

You wouldn't be willing to turn this into a function and put it into DocumenterTools by any chance?

That makes a lot of sense :) I totally forgot about that package.

src/Writers/HTMLWriter.jl Outdated Show resolved Hide resolved
@pfitzseb
Copy link
Member Author

Ok, this should be good to go.

Note that I've referenced JuliaDocs/DocumenterTools.jl#51 in the docs, so that needs to be merged and tagged first, I think.

@pfitzseb pfitzseb requested a review from mortenpi May 31, 2021 11:03
Copy link
Member

@mortenpi mortenpi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay, but LGTM. Thanks a lot for iterating on this @pfitzseb!

src/Writers/HTMLWriter.jl Outdated Show resolved Hide resolved
src/Documenter.jl Outdated Show resolved Hide resolved
src/Writers/HTMLWriter.jl Show resolved Hide resolved
@pfitzseb
Copy link
Member Author

pfitzseb commented Jun 9, 2021

Alright, let's get this merged?

@mortenpi mortenpi merged commit 1545a1c into master Jun 9, 2021
@mortenpi mortenpi deleted the sp/warn-outdated branch June 9, 2021 23:10
@mortenpi
Copy link
Member

mortenpi commented Jun 9, 2021

Thanks again @pfitzseb and @fredrikekre! And sorry it took a while to get merged -- I am a bit short on time right now.

@pfitzseb: I think it would be good to ANN this on Discourse, since sooner the people switch over to 0.27 the better for the ecosystem. Would you be willing to post something by any chance once we get 0.27 out? This is the only really major thing on master (that has been merged), so I don't think we need to advertise any of the other stuff that much.

@pfitzseb
Copy link
Member Author

Sure, I can do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Format: HTML Related to the default HTML output Type: Feature
Projects
None yet
3 participants