公開日:

How to write markdown

markdown Sample !

This is some bold and italics text.

This is a list in markdown:

Checkout my React component:

logo

GFM

Autolink literals

www.example.com, https://example.com, and [email protected].

Footnote

A note1

Strikethrough

one or two tildes.

Table

abcd

Tasklist

改行

改行テスト 1
改行テスト 2

改行テスト 3

改行テスト 4

改行テスト 5

syntax highlight

using Rehype Pretty Code.

ex:

next.config.mjs
// ts title="next.config.mjs" showLineNumbers {21,5-8} "const"
 
import fs from "node:fs";
import nextMDX from "@next/mdx";
import rehypePrettyCode from "rehype-pretty-code";
 
/** @type {import('rehype-pretty-code').Options} */
const options = {
  // See Options section below.
};
 
const withMDX = nextMDX({
  extension: /\.mdx?$/,
  options: {
    remarkPlugins: [],
    rehypePlugins: [[rehypePrettyCode, options]],
  },
});
 
/** @type {import('next').NextConfig} */
const nextConfig = { reactStrictMode: true };
 
export default withMDX(nextConfig);

脚注

  1. Big note.