sectionize()

Enveloppe les groupes de titres dans des éléments `<section>`.

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

Signature

function sectionize(): UnifastPlugin

Paramètres

Aucun.

Utilisation

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

Exemples

Sections de titres