Skip to content

Commit 3fcebb2

Browse files
committed
fix(docs): Documenter docstring parse + Vitepress index frontmatter
1 parent 0670791 commit 3fcebb2

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

docs/src/.vitepress/config.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const settingsItems = [
3636
const codeItemsNav = [
3737
{ text: 'Sindbad', link: '/pages/code/api/Sindbad' },
3838
// TEM should land on the package/module docstring page
39-
{ text: 'SindbadTEM (TEM)', link: '/pages/code/api/SindbadTEM' },
39+
{ text: 'TEM', link: '/pages/code/api/SindbadTEM' },
4040
// Modules should land on an index page
4141
{ text: 'Modules', link: '/pages/code/api/modules/index' },
4242
// Extensions should land on the extensions index

docs/src/index.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
```@raw html
21
---
32
# https://vitepress.dev/reference/default-theme-home-page
43
layout: home
@@ -52,9 +51,6 @@ features:
5251
link: /pages/code/api/Sindbad
5352
details: Generated API documentation for the Sindbad / SindbadTEM codebase.
5453
---
55-
```
56-
57-
5854
## 🚧🚧 UNDER PREPARATION FOR RELEASE 🚧🚧
5955

6056
SINDBAD is being prepared for release with a manuscript, for which a preprint is available at

src/Types/Types.jl

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,6 @@ module Types
5959
false
6060
end
6161

62-
function _attach_binding_doc!(mod::Module, sym::Symbol, doc_txt::AbstractString, T::Type)
63-
b = Base.Docs.Binding(mod, sym)
64-
ds = Base.Docs.DocStr(Core.svec(String(doc_txt)), T, Dict{Symbol, Any}())
65-
Base.Docs.doc!(mod, b, ds)
66-
return nothing
67-
end
68-
6962
# ------------------------- SindbadTypes ------------------------------------------------------------
7063
include("LandTypes.jl")
7164
include("ArrayTypes.jl")
@@ -106,7 +99,10 @@ module Types
10699
sym = Symbol(nameof(st))
107100
if isdefined(@__MODULE__, sym) && !_binding_hasdoc(@__MODULE__, sym) && !_type_hasdoc(st)
108101
doc_txt = get_type_docstring(st, purpose_function=purpose)
109-
_attach_binding_doc!(@__MODULE__, sym, doc_txt, st)
102+
# Use `@doc` so the stored doc is the usual Markdown-based form that
103+
# Documenter expects, while still guarding with a Julia-1.10-safe
104+
# "has docs?" check above.
105+
@eval Base.Docs.@doc $doc_txt $sym
110106
end
111107
end
112108
_attach_type_docstrings!(st)

0 commit comments

Comments
 (0)