1.0.1 • Published 10 months ago

@svelte-put/preprocess-auto-slug v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

@svelte-put/preprocess-auto-slug

npm.badge bundlephobia.badge docs.badge

Svelte preprocessor for adding id and anchor to nodes

svelte-put

This package is part of the @svelte-put family. For contributing guideline and more, refer to its readme.

Usage & Documentation

See the dedicated documentation page here.

Quick Start

<!-- input -->
<h2>Quick start</h2>
// config
import autoSlug from '@svelte-put/preprocess-auto-slug';

/** @type {import('@sveltejs/kit').Config} */
const config = {
  preprocess: [autoSlug()],
};

export default config;
<!-- output -->
<h2 id="quick-start">
  <a href="#quick-start" aria-hidden="true" tabindex="-1">#</a>
  Quick Start
</h2>

Changelog