Colors — an MDX file

Colors!

This is an MDX file, which means it can contain markdown.

The codeblock below is highlighted during build time with shiki, using my VSCode theme Karma and with the help of remark and rehype plugins.

This is a "normal" link

An MDX Title component with Colors!

This is an internal link with a custom MDX component
TS
1const htmlEscapes = {
2 "&": "&",
3 "<": "&lt;",
4 ">": "&gt;",
5 // eslint-disable-next-line quotes
6 '"': "&quot;",
7 "'": "&#39;",
8} as const;
9
10function escapeHtml(html: string) {
11 return html.replace(
12 /[&<>"']/g,
13 (chr) => htmlEscapes[chr as keyof typeof htmlEscapes]
14 );
15}
Share via Twitter
👀

No views yet. Wait what, How? 🤔