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 VS Code theme Karma and with the help of remark and rehype plugins.

This is a "normal" link

And now this is code, and some code

Table of Contents

Unordered list

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

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

This is a "normal" link

  • Item 1
  • Item 2
  • Item 3

Ordered list

  1. Item 1
  2. Item 2
  3. Item 3

An MDX Title component with Colors!

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

Last updated: August 25, 2021Unpublished

👀

Getting view count

Sign up for my newsletter!

I curate links keeping up with the JavaScript, React and webdev world. Join 245 others!
May include mechanical keyboards.

No spam, unsubscribe anytime :)
You can also view previous issues, and subscribe via RSS!