TOC should render statically analyzable embedded expressions in headings (esp. imported partials) #9772
Labels
difficulty: advanced
Issues that are complex, e.g. large scoping for long-term maintainability.
domain: markdown
Related to Markdown parsing or syntax
feature
This is not a bug or issue with Docusausus, per se. It is a feature request for the future.
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
If a prop is passed to a partial Markdown file, then the ToC displays
{props.propname}
, instead of the actual value.As @slorber pointed out in #9684, this is a known limitaion that stems from that even in non-partial files headings don't support expressions.
While having expressions in non-partial headings is a feature, that would be nice for completeness, it's probably not too practical. On the other hand, having expressions in headings of partials can be very useful.
Reproducible demo
No response
Steps to reproduce
Expected behavior
The ToC shows the value passed to the partial
Actual behavior
The ToC shows
{props.propname}
Your environment
No response
Self-service
The text was updated successfully, but these errors were encountered: