question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remark-directive not working

See original GitHub issue

@nuxt/content: 1.9.0 Nuxt-edge: latest remark-directive: 1.0.1

Wondering if anyone has remark-directive working with the Content module. I used to use remark-container but that’s broken now with the latest version of Remark. Saw on the list of plugins that remark-directive was a reasonable replacement, went ahead and installed it - but it doesn’t appear to be working at all.

This:

:::div{.premise}
Greed leads to destruction.
:::

Gets you just a simple “div”:

<div>
  <p>Greed leads to destruction.</p>
</div>

when you would expect:

<div class="premise">
  <p>Greed leads to destruction.</p>
</div>

nuxt.config.js is:

  content: {
    markdown: {
      remarkPlugins: ['remark-directive']
    }
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
adamdehavencommented, Feb 27, 2021

Would be great if the nuxt content docs actually showed how to implement a remark plugin…

0reactions
farnabazcommented, May 31, 2022

MDC syntax is superset of remark-directive and fully supported in Content v2. Check the docs https://content.nuxtjs.org/guide/writing/mdc

Content v1 will not get update for unified 10, consider migrating to v2

Read more comments on GitHub >

github_iconTop Results From Across the Web

Doesn't work with `react-markdown` 6 · Issue #3 - GitHub
After that remark-directive stopped working. The previously available leafDirective renderer/component stopped being called.
Read more >
remark-directive - npm
Start using remark-directive in your project by running `npm i remark-directive`. There are 56 other projects in the npm registry using ...
Read more >
remark-directive examples - CodeSandbox
Remark Directive Examples. Learn how to use remark-directive by viewing and forking example apps that make use of remark-directive on CodeSandbox.
Read more >
microflash/remark-callout-directives - NPM Package Overview
This package is a unified (remark) plugin to add support for callouts and admonitions using the directives. It depends on remark-directive ...
Read more >
remark-gfm/readme.md - UNPKG
The CDN for remark-gfm. ... 71, works in relation to a certain GitHub repo in comments, issues, PRs, and ... 361, — support...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found