Skip to content

Commit

Permalink
Do not write inventory if Documenter can do it
Browse files Browse the repository at this point in the history
Just skip writing the inventory if the function
`Documenter.HTMLWriter.write_inventory` exists, indicating that
the installed version of Documenter can write inventories itself.

For compatibility with
JuliaDocs/Documenter.jl#2424
  • Loading branch information
goerz committed Jan 27, 2024
1 parent ba82203 commit 46d363e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "DocumenterInterLinks"
uuid = "d12716ef-a0f6-4df4-a9f1-a5a34e75c656"
authors = ["Michael Goerz <mail@michaelgoerz.net>"]
version = "0.2.4"
version = "0.2.4+dev"

[deps]
CodecZlib = "944b1d66-785c-5afd-91f1-9de20f533193"
Expand Down
8 changes: 6 additions & 2 deletions src/write_inventory.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,12 @@ function Selectors.matcher(::Type{WriteInventory}, doc::Documenter.Document)
end

function Selectors.runner(::Type{WriteInventory}, doc::Documenter.Document)
@info "WriteInventory: writing `objects.inv` and `inventory.toml.gz` file."
write_inventory(doc)
if isdefined(Documenter.HTMLWriter, :write_inventory)
@debug "Skip writing inventories in DocumenterInterLinks: handled by Documenter"
else
@info "WriteInventory: writing `objects.inv` and `inventory.toml.gz` file."
write_inventory(doc)
end
end


Expand Down

0 comments on commit 46d363e

Please sign in to comment.