From b1ac34ed12359a921b7ac3d98d34a3de1aced5ee Mon Sep 17 00:00:00 2001 From: Luke Morris Date: Wed, 5 Mar 2025 18:10:22 -0500 Subject: [PATCH] Set up DocumenterCitations --- docs/Project.toml | 1 + docs/make.jl | 18 +++++++++++------- docs/src/documenter.bib | 9 +++++++++ 3 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 docs/src/documenter.bib diff --git a/docs/Project.toml b/docs/Project.toml index f26c9b1..6e832c3 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,4 +1,5 @@ [deps] AlgebraicTemplate = "b66562e1-fa90-4e8b-9505-c909188fab76" Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" +DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244" Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306" diff --git a/docs/make.jl b/docs/make.jl index 862f5f7..d062a66 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,4 +1,5 @@ using Documenter +using DocumenterCitations using Literate const literate_dir = joinpath(@__DIR__, "literate") @@ -32,6 +33,10 @@ if !no_literate end end +bib = CitationBibliography( + joinpath(@__DIR__, "src", "documenter.bib"); + style=:numeric) + @info "Building Documenter.jl docs" makedocs( modules=[AlgebraicTemplate], @@ -42,15 +47,14 @@ makedocs( pages=Any[ "AlgebraicTemplate.jl"=>"index.md", "Examples"=>Any[ - "generated/literate_example.md", - ], - "Library Reference"=>"api.md", - ] -) + "generated/literate_example.md",], + "Library Reference"=>"api.md",], + plugins=[bib]) + @info "Deploying docs" deploydocs( target="build", repo="github.com/AlgebraicJulia/AlgebraicTemplate.jl.git", - branch="gh-pages" -) + branch="gh-pages") + diff --git a/docs/src/documenter.bib b/docs/src/documenter.bib new file mode 100644 index 0000000..a783ca8 --- /dev/null +++ b/docs/src/documenter.bib @@ -0,0 +1,9 @@ + +@article{glen_flow_1958, + title = {The flow law of ice: {A} discussion of the assumptions made in glacier theory, their experimental foundations and consequences}, + volume = {47}, + journal = {IASH Publ}, + author = {Glen, JW}, + year = {1958}, + pages = {171--183}, +}