
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
sitemap-static
Advanced tools
Make a sitemap for a static website based on files on disk
npm install -g sitemap-static
Use in the root directory of the files on the site. This will only add
files with .html
extensions to the sitemap.
sitemap-static --prefix=http://foo.bar/foo/ . > sitemap.xml
var generateSitemap = require('sitemap-static');
var fs = require('fs');
var writer = fs.createWriteStream('/path/to/your/sitemap.xml');
generateSitemap(writer, {
findRoot: '.',
ignoreFile: '',
prefix: 'http://somesi.te/',
pretty: false
})
Added in v0.0.1 you can pass the name of a json file to load. File file needs to be in your current working directory and should be an array of file names (without the / at the front) that you want ignored. You can ignore entire directories by leaving off the .html. Example JSON:
[
"ignore-me.html",
"ignore-everything-in-me/"
]
Example Command:
sitemap-static --ignore-file=ignore.json --prefix=http://foo.bar/foo/ . > sitemap.xml
If you pass --pretty
to the CLI (or pretty: true
to the JS API), sitemap-static
will output pretty URLs rather than the whole path to each file. For example:
Not pretty | Pretty |
---|---|
http://www.example.com/index.html | http://www.example.com/ |
http://www.example.com/about.html | http://www.example.com/about |
http://www.example.com/author/index.html | http://www.example.com/author |
http://www.example.com/author/main.html | http://www.example.com/author/main |
Example Command:
sitemap-static --prefix=http://foo.bar/foo/ --pretty . > sitemap.xml
0.4.4 (2018-08-23)
<a name="0.4.3"></a>
FAQs
generate a sitemap for a static website
The npm package sitemap-static receives a total of 80 weekly downloads. As such, sitemap-static popularity was classified as not popular.
We found that sitemap-static demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.