Reusable, custom snippets to keep content in sync
Pre-condition: You must create your snippet file in the snippets
directory.
Any page in the snippets
directory will be treated as a snippet and will not
be rendered into a standalone page. If you want to create a standalone page
from the snippet, import the snippet into another file and call it as a
component.
The content that you want to reuse must be inside the snippets
directory in
order for the import to work.
MDX does not compile inside the body of an arrow function. Stick to HTML syntax when you can or use a default export if you need to use MDX.
Reusable, custom snippets to keep content in sync
Pre-condition: You must create your snippet file in the snippets
directory.
Any page in the snippets
directory will be treated as a snippet and will not
be rendered into a standalone page. If you want to create a standalone page
from the snippet, import the snippet into another file and call it as a
component.
The content that you want to reuse must be inside the snippets
directory in
order for the import to work.
MDX does not compile inside the body of an arrow function. Stick to HTML syntax when you can or use a default export if you need to use MDX.