Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
@elderjs/plugin-sitemap
Advanced tools
Readme
Easily generate a sitemap for your Elder.js website.
By default it will build a sitemap when you build your Elder.js site.
This sitemap will include a sub-sitemap for each route.
Currently there is a hard limit of 50,000 urls per sub-sitemap.
npm install --save @elderjs/plugin-sitemap
Once installed, open your elder.config.js
and configure the plugin by adding @elderjs/plugin-sitemap
to your plugin object.
plugins: {
'@elderjs/plugin-sitemap': {
origin: '', // the https://yourdomain.com
exclude: [], // an array of permalinks or permalink prefixes. So you can do ['500'] and it will match /500**
routeDetails: {}, // set custom priority and change freq if not it falls back to default
lastUpdate: {}, // configurable last update for each route type.
},
}
plugins: {
'@elderjs/plugin-sitemap': {
origin: '', // the https://yourdomain.com
exclude: [], // an array of permalinks or permalink prefixes. So you can do ['500'] and it will match /500**
routeDetails: {
home: {
priority: 1.0,
changefreq: 'monthly',
},
blog: {
priority: 0.8,
changfreq: 'monthly',
}
}, // set custom priority and change freq if not it falls back to default
lastUpdate: { // configurable last update for each route type.
home: '2020-01-01',
blog: async ({ query, request }) => {
// receives the query prop from hooks. This allows you to hit your db or api or anything else configured on your query object.
// return a date object.
return new Date(Date.now());
}
},
},
}
For example excluding 'green' route
exclude: ['green'],
would excude all routes starting with 'green', also 'greenland' and 'green-eggs'
'green' route could be explicitly excluded with
exclude: ['green/'],
Also nested routes or specific slugs of route could be excluded with
exclude: ['green/', 'greenland/polar-bear'],
FAQs
Easily generate a sitemap for your Elder.js powered website.
The npm package @elderjs/plugin-sitemap receives a total of 124 weekly downloads. As such, @elderjs/plugin-sitemap popularity was classified as not popular.
We found that @elderjs/plugin-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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.