1.0.6 • Published 2 years ago

@nhvu95/scully-plugin-scroll2section v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

scully-plugin-scroll2section

The scully-plugin-scroll2section is a postProcessByHtml plugin for Scully that help <a> tag can route and scroll to a section in current static site.

For example:

  • 📦 Usage(#usage)

This plugin helps usage above scroll to the ## Usage bellow

📦 Installation

To install this plugin with npm run

$ npm install @nhvu95/scully-plugin-scroll2section --save-dev

peerDependencies is required:

$ npm install @types/jsdom --save-dev

Usage

Add plugin to scully.*.config.ts config

import { getScrollToSection } from "@nhvu95/scully-plugin-scroll2section";

const ScrollToSection = getScrollToSection();

export const config: ScullyConfig = {
    projectRoot: "./src",
    projectName: "portfolio",
    distFolder: "./dist/portfolio/browser",
    outDir: "./dist/static",
    routes: {
        "/blog/:slug": {
            type: "contentFolder",
            slug: {
                folder: "./blog",
            },
            postRenderers: [ScrollToSection],
        },
    },
};
1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago