JuliaDocs / Documenter.jl

A documentation generator for Julia.

Home Page:https://documenter.juliadocs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Documenter not finding dynamic documentation

mnemnion opened this issue · comments

I have some dynamic documentation attached to each value of an enum, and I wanted to generate the @docs block using an @eval block.

That didn't work, for what looks like two reasons. I'll file the other issue and attach it here.

I'm using Docs.getdoc(::MyEnum) to return markdown objects from a Dict, documenting each of the enums. This works in the REPL, but Documenter isn't finding the documentation associated with the enum names.

Related: #2455

May not related-related, but they both turned up trying to do one thing.

I haven't totally wrapped my head around this, but it sounds like maybe something you want to do in your make.jl file? Documenter will use the docstrings as it sees them, so if you want some sort of dynamic docstring, generate that docstring before the call to makedocs.

Dynamic docstring as in Docs.getdoc.

It works in the REPL, ? MyPackage.AnEnumValue produces the docstring. Documenter should be able to use that mechanism to retrieve the same information, in principle.

Yup, I can confirm Documenter isn't picking up the dynamics docstring: https://github.com/goerz-testing/2024-02_DocumenterDynamicDocStringTest

This is a bug, plain and simple. I'm not sure there's really any way for you to work around this with some kind of @eval block or the like.