From 2e43537d69660c78a43d0f2ca1f735b4fb1e24fc Mon Sep 17 00:00:00 2001 From: webofceco Date: Fri, 23 Aug 2024 20:33:37 -0400 Subject: [PATCH] fix docs --- docs/genfiles.jl | 3 +-- docs/make.jl | 12 +++++------- docs/mkdocs.yml | 15 ++++++++++----- docs/src/reference.md | 22 ++++++++++++++++++++++ 4 files changed, 38 insertions(+), 14 deletions(-) create mode 100644 docs/src/reference.md diff --git a/docs/genfiles.jl b/docs/genfiles.jl index fb1c085..a19d31e 100644 --- a/docs/genfiles.jl +++ b/docs/genfiles.jl @@ -1,5 +1,4 @@ -using Documenter, DocumenterMarkdown -using Literate +using Documenter, DocumenterMarkdown, Literate get_example_path(p) = joinpath(@__DIR__, ".", "examples", p) OUTPUT = joinpath(@__DIR__, "src", "examples", "generated") diff --git a/docs/make.jl b/docs/make.jl index add2afc..0e932e0 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,15 +1,13 @@ -using Documenter, DocumenterMarkdown -using HTTR +using Documenter, DocumenterMarkdown, HTTR include("genfiles.jl") DocTestMeta = quote using HTTR end - DocMeta.setdocmeta!(HTTR, :DocTestSetup, DocTestMeta; recursive=true) -makedocs( +Documenter.makedocs( modules=[HTTR], clean=true, doctest=false, @@ -26,12 +24,12 @@ makedocs( # :footnote, :meta_block, :missing_docs, :setup_block ], checkdocs=:all, - format=Markdown(), + format=DocumenterMarkdown.Markdown(), draft=false, build=joinpath(@__DIR__, "docs") ) -deploydocs( +Documenter.deploydocs( devurl="latest", repo="https://github.com/TidierOrg/HTTR.jl", push_preview=true, @@ -48,7 +46,7 @@ deploydocs( "jinja2", "mkdocs-video" ), - make=() -> run(`mkdocs build`), + make=() -> Base.run(`mkdocs build`), target="site", devbranch="main" ) \ No newline at end of file diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 09947b6..e133fe1 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -1,7 +1,6 @@ - theme: name: material - logo: assets/logo.png + #logo: assets/logo.png features: - content.code.copy # - announce.dismiss @@ -31,7 +30,7 @@ theme: - media: "(prefers-color-scheme: light)" scheme: default primary: crimson - accent: cyan + accent: teal toggle: icon: material/weather-sunny name: Switch to dark mode @@ -40,7 +39,7 @@ theme: - media: "(prefers-color-scheme: dark)" scheme: slate primary: crimson - accent: cyan + accent: teal toggle: icon: material/weather-night name: Switch to light mode @@ -82,6 +81,11 @@ extra_css: - stylesheets/custom.css - assets/Documenter.css +extra_javascript: + - javascripts/mathjax.js + - https://polyfill.io/v3/polyfill.min.js?features=es6 + - https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js + markdown_extensions: - tables - admonition @@ -111,4 +115,5 @@ plugins: # - mknotebooks # Jupyter notebooks #- mkdocs-video nav: - - "Home": "index.md" \ No newline at end of file + - "Home": "index.md" + - "Reference" : "reference.md" \ No newline at end of file diff --git a/docs/src/reference.md b/docs/src/reference.md new file mode 100644 index 0000000..6426e1f --- /dev/null +++ b/docs/src/reference.md @@ -0,0 +1,22 @@ +```@meta +DocTestSetup = quote +using HTTR +end +``` +## Index +```@index +Modules = [HTTR] +Private = false +``` + +## Reference - Exported functions +```@autodocs +Modules = [HTTR] +Private = false +``` + +## Reference - Internal functions +```@autodocs +Modules = [HTTR] +Public = false +``` \ No newline at end of file