Skip to content

Commit

Permalink
Add warning for outdated docs (JuliaDocs#1577)
Browse files Browse the repository at this point in the history
  • Loading branch information
pfitzseb authored and Andrey Oskin committed Jun 23, 2021
1 parent f5e309e commit 655df60
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,7 @@
[github-1559]: https://github.com/JuliaDocs/Documenter.jl/pull/1559
[github-1561]: https://github.com/JuliaDocs/Documenter.jl/issues/1561
[github-1567]: https://github.com/JuliaDocs/Documenter.jl/pull/1567
<<<<<<< HEAD
[github-1568]: https://github.com/JuliaDocs/Documenter.jl/issues/1568
[github-1569]: https://github.com/JuliaDocs/Documenter.jl/pull/1569
[github-1577]: https://github.com/JuliaDocs/Documenter.jl/pull/1577
Expand All @@ -829,6 +830,9 @@
[github-1596]: https://github.com/JuliaDocs/Documenter.jl/pull/1596
[github-1602]: https://github.com/JuliaDocs/Documenter.jl/issues/1602
[github-1604]: https://github.com/JuliaDocs/Documenter.jl/pull/1604
=======
[github-1577]: https://github.com/JuliaDocs/Documenter.jl/pull/1577
>>>>>>> Add warning for outdated docs (#1577)

[julia-38079]: https://github.com/JuliaLang/julia/issues/38079
[julia-39841]: https://github.com/JuliaLang/julia/pull/39841
Expand Down
7 changes: 7 additions & 0 deletions src/Writers/HTMLWriter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -923,6 +923,13 @@ function warning_script(src, ctx)
return Tag(Symbol("#RAW#"))("")
end

function warning_script(src, ctx)
if ctx.settings.warn_outdated
return Tag(:script)[Symbol(OUTDATED_VERSION_ATTR), :src => relhref(src, ctx.warner_js)]()
end
return Tag(Symbol("#RAW#"))("")
end

function canonical_link_element(canonical_link, src)
@tags link
if canonical_link === nothing
Expand Down

0 comments on commit 655df60

Please sign in to comment.