diff --git a/Project.toml b/Project.toml index f3199ab..47e0726 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "DocumenterPages" uuid = "3b6f6c89-491e-49ab-a70c-af796c43d097" authors = ["Anshul Singhvi and contributors"] -version = "0.1.0-DEV" +version = "0.1.0" [deps] AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" diff --git a/src/pagenode.jl b/src/pagenode.jl index dde616e..b2dad8a 100644 --- a/src/pagenode.jl +++ b/src/pagenode.jl @@ -1,4 +1,29 @@ +""" + PageNode(input; visible, collapsed) + PageNode(this_page, children; visible, collapsed) +Creates a `PageNode` object, which may have some children. + +`input` can be anything that `pages` accepts in `Documenter.makedocs`, +for example a string, a pair of strings, a vector of strings or pairs, or any combination thereof. + +You can also specify details for the toplevel page and its children separately in the two-argument constructor. + +## Examples + +```julia +PageNode("index.md") +``` + +```julia +PageNode("Home" => "index.md") +``` + +```julia +PageNode(["index.md", "gallery.md"]) +``` + +""" struct PageNode # page contents page::Union{String, Nothing}