sectionize()

見出しのグループを `<section>` 要素でラップします。

import { sectionize } from "@unifast/node";

シグネチャ

function sectionize(): UnifastPlugin

パラメータ

なし。

使い方

import { compile, sectionize } from "@unifast/node";

const md = `# Introduction

Some introductory text.

## Getting Started

Instructions for getting started.

## Configuration

Configuration details here.`;

const result = compile(md, {
  plugins: [sectionize()],
});
// Each heading and its following content are wrapped in a <section> element

使用例

見出しのセクション化