3.2.3 • Published 3 years ago

helmet-static v3.2.3

Weekly downloads
3
License
MIT
Repository
github
Last release
3 years ago

helmet-static

Create a static index.html for your sub pages with rendered helmet attributes

How

Add a helmet-static.js to your root (or provide the config file path with -c <path to config file>), and at a minimum provide it the routes to process.

The default config is below and you can overide any of it by exporting it from your helmet-static.js file

{
    "basePath": "./dist",
    "rootDocument": "index.html",
    "port": 3001,
    "rootUrl": "http://localhost:${port}",
    "waitTime": 200,
    "navigationTimeout": 30000,
    "includeExternal": false,
    "allowedExternalDomains": [],
    "routes": ["/"],
    "headless": true
}

Example

Your build command will become

<your usual build commands> && helmet-static

If your config is

{
    "routes": ["/foo", "/bar", "/bar/stuff"]
}

You will end up with an output of

/dist
  --> /foo
    --> index.html
  --> /bar
    --> index.html
    --> /stuff
      --> index.html
3.2.3

3 years ago

3.2.1

4 years ago

3.2.0

4 years ago

3.1.0

4 years ago

3.0.1

4 years ago

3.0.0

5 years ago

2.2.0

5 years ago

2.1.0

5 years ago

2.0.0

6 years ago

1.0.3

6 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago