Skip to content

Commit 6fa934a

Browse files
author
Christopher Doris
committed
document a hack
1 parent cee59ba commit 6fa934a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

docs/make.jl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
using Documenter, PythonCall, Markdown
22

3+
# This is a bit of a hack to let us insert documentation blocks with custom content.
4+
# It means we can document Python things directly in the documentation source, and they
5+
# are searchable.
6+
#
7+
# It's a hack because of the `doccat` overload, requiring a special kind of "signature"
8+
# to embed the information we want.
9+
#
10+
# The first line is of the form "name - category", the rest is Markdown documentation.
11+
# For example:
12+
# ```@customdoc
13+
# foo - Function
14+
# Documentation for `foo`.
15+
# ```
316
struct CustomCat{cat} end
417
Documenter.Utilities.doccat(::Base.Docs.Binding, ::Type{CustomCat{cat}}) where {cat} = string(cat)
518
struct CustomDocBlocks <: Documenter.Expanders.ExpanderPipeline end

0 commit comments

Comments
 (0)