I kept the document structure the same to see how markdown behaves to javascript expressions in curlybraces {}
and mdx syntax.
import Bar from "../../../mdxComponents/Bar.mjs";
{factorial(num) === 720 ? "export statements are active" : "export statements are disabled"}
Read in {readingTime}, written by {frontmatter.author}
Marked texts: text with yellow phrase, text with red phrase, text with green phrase, and text with blue phrase.
Some markdown content 👍
Alert Text Centered
Warning Text Aligned Right
All JSX syntax is omitted by the remark
parser in markdown.
All javascript statements in { }
are considered as just text in markdown.
The markdown syntax inside a block-level HTML
element like <p>
or <details>
doesn't work in markdown, but works in inline-level HTML
elements like <span>
.
The allowDangerousHtml
is set to true
by default in mdx-js/mdx
. If the file is markdown "md" format, html
elements are removed in case you don't use rehype-raw
plugin.
_The markdown list syntax also doesn't work !_
The remark plugin remark-toc
is one of the tool for creating TOC inline in the markdown files.
The remark-flexible-containers
can also make this kind of details
-summary
HTML elements.
typescript// prettier-ignorefunction Text(text: string) {console.log(text)}const text = "next-mdx-remote-client";Text(text);
diff// example for deletion and addition lines- { MDXRemote } from "next-mdx-remote";+ { MDXClient } from "next-mdx-remote-client";
export function factorial(factor) { if (factor <= 1) { return 1; } return factor * factorial(factor - 1); }
Autolink www.example.com and inline code
.
one tilde strikethrough or two tildes strikethrough
Here is deleted text and inserted text
Left Aligned Header | Right Aligned Header |
---|---|
Content Cell | Content Cell |
Content Cell | Content Cell |
"Authorize <GITHUB_USER>"
version of <operation>.<mount> <= 1.3.x
< 8ms (allowed one blank after "<")
escape opening curlybraces "{}"
Centering text and image is very easy !
blockquate markdown element
The
@import
is used to import style rules from other valid stylesheets.
export const num = 6;
A mix of markdown and HTML.