1.0.0 • Published 2 years ago

rehype-plugin-ssg v1.0.0

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

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.