Skip to content

πŸ“š The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.

346 B
Raw Blame
import type { MarkdownIt } from 'markdown-it';
import anchor from 'markdown-it-anchor';

export const anchorPlugin = (md: MarkdownIt) => {
  md.use(anchor, {
    level: [1, 2, 3, 4, 5, 6],
    permalink: anchor.permalink.ariaHidden({
      class: 'header-anchor',
      symbol: '#',
      space: true,
      placement: 'before',
    }),
  });
};