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

Accessing context/index of MDC #2612

Open
chrisjansky opened this issue Apr 12, 2024 · 0 comments
Open

Accessing context/index of MDC #2612

chrisjansky opened this issue Apr 12, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@chrisjansky
Copy link

Hello,

I am wondering if I can somehow access a dynamic index/context/etc when inside a Markdown Component.

I am building an according FAQ section using radix-vue Accordion which I would like to populate with MDC like so:

::question
How do I pay?
#answer
You pay like this.
::

::question
How is VAT collected?
#answer
VAT is collected like this.
::

The problem is, radix-vue <Accordion> needs a dynamic value to key the items and set the default opened <AccordionItem>.

Something simple like ::question{:index=$doc.index} would therefore work just fine. Has someone implemented a similar feature?

Thanks for any pointers.

@chrisjansky chrisjansky added the enhancement New feature or request label Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant