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

範例

標題區段