-
Notifications
You must be signed in to change notification settings - Fork 2
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
Plugin improvements #132
Plugin improvements #132
Conversation
dobarx
commented
Mar 22, 2024
- Improves plugin schema and allows to specify content location & invocation order from plugin level.
- TOC can now be placed anywhere inside document and it will be invoked last and content placed on top.
- FrontMatter now is rendered at the top of the markdown.
- Text calculates relative title size.
can both of these be configured? For the cases where TOC should render for a specific section (not the whole doc) and be placed in a specific location, instead just on the top of the doc. With apologies if some of this is covered, I haven't looked through the code yet! |
text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor dolore magna." | ||
} | ||
content text { | ||
text = "Sub title 3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these sub titles would be on the same level as Title 1
. They would be sub- titles if they would be inside the section that defines nesting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From specs it says:
If format_as is title and absolute_title_size is not set, the relative title size is calculated from the local context object that contains a document body (issue TBD) -- the multiplier for # for a Markdown title prefix is the number of title text seen previously in the document
So shouldn't it be lower level?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or do we need to calculate it based on section nesting instead of previous titles?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My apologies. I think I described it the wrong way there!
If we think of the template as a tree, the deeper you go down the branch, the smaller titles get. The nested sections would represent depth -- so the title should be calculated looking for previous titles up the branch to a root level
Ahh, so then I should turn off content placement at top for it and keep original one? As for the scope it should be based on |
Fixes:
|
Fixes:
|