sectionize()

Schließt Gruppen von Überschriften in `<section>`-Elemente ein.

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

Signatur

function sectionize(): UnifastPlugin

Parameter

Keine.

Verwendung

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

Beispiele

Abschnitte aus Überschriften