rehype-plugin-ssg

1.0.0 • Public • Published

rehype-plugin-ssg

Rehype plugin to render a document ahead of time. This plugin uses Puppeteer to render documents passed to it, allowing any client-side DOM changes to be added to your Rehype pipeline.

Installation

npm install rehype-plugin-ssg

Usage

import { unified } from "unified";
import rehypeParse from "rehype-parse";
import rehypeStringify from "rehype-stringify";
import rehypeFormat from "rehype-format";
import rehypeSSG from "rehype-plugin-ssg";

unified()
  .use(rehypeParse)
  .use(rehypeSSG)
  .use(rehypeFormat)
  .use(rehypeStringify)
  .process(file)
  .then((file) => {
    console.log(String(file));
  });

License

Copyright 2021 Kepler Sticka-Jones. Licensed MIT.

Package Sidebar

Install

npm i rehype-plugin-ssg

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

5.59 kB

Total Files

7

Last publish

Collaborators

  • keplersj