You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to build a MyST plugin which allows you to curate pages/sections of a book into new ToCs, which could be used as syllabi, or sub-books.
This is different from collecting pages with the same tag, as you have the order and nesting of a ToC.
My current idea is to have a directive, where the body uses the same format at the ToC defined in myst.yml, like,
as when you use the {toc} directive.
To make this consistent with other ToCs and avoid duplication, it would be great to use functions/transformations in the MyST packages which do this.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to build a MyST plugin which allows you to curate pages/sections of a book into new ToCs, which could be used as syllabi, or sub-books.
This is different from collecting pages with the same tag, as you have the order and nesting of a ToC.
My current idea is to have a directive, where the body uses the same format at the ToC defined in
myst.yml
, like,which will end up in AST something like,
as when you use the
{toc}
directive.To make this consistent with other ToCs and avoid duplication, it would be great to use functions/transformations in the MyST packages which do this.
I haven't found quite what I'm looking for.
The
{toc}
directive and transformation don't let you write a ToC explicitly.I found a ToC validations function which is helpful.
However, what I think is the function to process the
toc
item inmyst.yml
looks like it takes arguments about the project.Is there a function like
structured_data -> ToC_AST
in MyST?Maybe there is a better way to go about this?
Beta Was this translation helpful? Give feedback.
All reactions