@notiz/scully-plugin-fouc

0.3.0 • Public • Published

scully-plugin-fouc

npm version

scully-plugin-fouc is a postRenderer plugin for Scully to prevent flash of unstyled content.

📦 Installation

To install this plugin with npm run

$ npm install @notiz/scully-plugin-fouc --save-dev

Usage

Add the plugin to the defaultPostRenderers in your scully.config:

require("@notiz/scully-plugin-fouc");

exports.config = {
  projectRoot: "./src/app",
  defaultPostRenderers: ["fouc"],
  routes: {}
};

If you want to use the plugin for a specific route do:

require('@notiz/scully-plugin-fouc');

exports.config = {
  ...
  routes: {
    '/blog/:slug': {
      type: 'contentFolder',
      slug: {
        folder: './content/blog'
      },
      postRenderers: ['fouc']
    }
  }
  ...
};

Readme

Keywords

Package Sidebar

Install

npm i @notiz/scully-plugin-fouc

Weekly Downloads

25

Version

0.3.0

License

MIT

Unpacked Size

2.86 kB

Total Files

4

Last publish

Collaborators

  • garygrossgarten
  • marcjulian