Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documenter not finding dynamic documentation #2454

Open
mnemnion opened this issue Feb 19, 2024 · 4 comments
Open

Documenter not finding dynamic documentation #2454

mnemnion opened this issue Feb 19, 2024 · 4 comments

Comments

@mnemnion
Copy link

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.

@mnemnion
Copy link
Author

Related: #2455

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

@goerz
Copy link
Member

goerz commented Feb 19, 2024

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.

@mnemnion
Copy link
Author

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.

@goerz
Copy link
Member

goerz commented Feb 19, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants