
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.
metalsmith-sitemap
Advanced tools
A metalsmith plugin for generating a sitemap
This plugin allows you to generate a sitemap.xml from your source files. By default it looks for any .html
files and processes them with sitemap.js.
$ npm install metalsmith-sitemap
Configuration in metalsmith.json
:
{
"plugins": {
"metalsmith-sitemap": {
"hostname": "http://www.website.com"
}
}
}
You can pass options to metalsmith-sitemap
with the Javascript API or CLI. The options are:
required
The hostname used for generating the urls.
optional
default: weekly
Change the default changefreq.
optional
default: '**/*.html'
A multimatch pattern. Only files that match this pattern will be included in the sitemap. Can be a string or an array of strings.
optional
default: '0.5'
Change the default priority.
optional
default: 'sitemap.xml'
Change the output file for the sitemap.
optional
Add a lastmodified date to the sitemap. Should be a Date object and can be passed through the Javascript API or the frontmatter.
optional
default: false
Will remove extensions from the urls in the sitemap. Useful when you're rewriting urls.
optional
default: false
Will replace any paths ending in index.html
with ''
. Useful when you're using metalsmith-permalinks.
optional
default: lastmod
Allows you to choose which property to use as the last modified string. This accepts nested properties in dot notation via loadsh.get.
optional
default: canonical
Allows you to choose which property to use as the canonical url in the frontmatter. This accepts nested properties in dot notation via loadsh.get.
Some values can also be set on a file-to-file basis from a file's frontmatter, the options are:
canonical
: will override the filename used to generate the url. The path is relative to the hostname.changefreq
: will override any other settings for changefreq
for the current file.lastmod
: will override any other settings for lastmod
for the current file.priority
: will override any other settings for priority
for the current file.private
: will exclude the file from the sitemap when set to true.For example:
---
canonical: 'different'
changefreq: always
lastmod: 2014-12-01
priority: 1.0
private: true
---
<!-- index.html -->
MIT
FAQs
A metalsmith plugin for generating a sitemap.xml file.
The npm package metalsmith-sitemap receives a total of 550 weekly downloads. As such, metalsmith-sitemap popularity was classified as not popular.
We found that metalsmith-sitemap demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.