angular-statisfy
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

Angular statisfy

npm version Build Status License

This library renders your application, strips the script tags, and returns the static HTML for a given URL. The generated HTML can be used to serve spiders and crawlers in order to improve SEO.

Originally made for Angular but works for any single page applications or website.

Install

Install the library using yarn add angular-statisfy.

Usage

The default usage of statisfy can be found in the code below.

import {launch} from 'puppeteer';

import {generateStaticHtml} from './generate-static';

(async () => {
    const browser = await launch({
        args: ['--no-sandbox'],
    });

    const html = await generateStaticHtml('https://bookingworldspeakers.com', browser);

    await browser.close();
})().catch(console.error);

Package Sidebar

Install

npm i angular-statisfy

Weekly Downloads

2

Version

2.0.0

License

MIT

Unpacked Size

12.9 kB

Total Files

19

Last publish

Collaborators

  • -waylander-