How to use localePath()
in markdown files with MDC syntax
#1881
Unanswered
WolfgangDrescher
asked this question in
Q&A
Replies: 1 comment
-
Note that there is no need to use ::MdLink{:params='{"name": "blog-slug", "params": {"slug": "first-blog-post"}}'}
First blog post
:: I opened a PR to add this to the docs: #1882. Also I just learned about the YAML method to pass props: ::MdLink
---
params:
name: blog-slug
params:
slug: first-blog-post
---
First blog post
:: This could potentially solve my issue but it's quite verbose compared to the one-liner with regular, but non localized markdown links: Is there a ways to simplify this or even use |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is it possible to use the
localePath()
function from the@nuxtjs/i18n-edge
package inside of a markdown file? In page components I'm using the following snippet with a customHyperLink
component to create links to other pages:Is there a convenient way to use this custom component inside of a markdown file with nuxt content?
Is it possible to pass objects as props with MDC syntax? If yes something like this could be possible with a wrapper components for
HyperLink
:But like this the
MdLink
component will not get parsed and will be output as a string.The only way I found for this was with the options passed as a JSON string, but I'm sure there must be a better way?
I'd be happy to contribute to the docs with some infos about this when I find a good solutions for this.
#1663 is somewhat related.
Beta Was this translation helpful? Give feedback.
All reactions