Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
vite-plugin-pages-sitemap
Advanced tools
vite-plugin-pages based sitemap generator
🚨Important Notes🚨
You must use vite-plugin-pages routes generation to use this plugin. If you are not working with vite-plugin-pages, i recommend to use vite-plugin-sitemap.
Install:
npm install -D vite-plugin-pages
npm install -D vite-plugin-pages-sitemap
npm install vue-router@next
Add to your vite.config.js
:
import Pages from 'vite-plugin-pages'
import generateSitemap from 'vite-plugin-pages-sitemap'
export default {
plugins: [
// ...
Pages({
onRoutesGenerated: routes => (generateSitemap({ routes })),
}),
],
}
To generate dynamic routes, you can add them manually:
export default {
plugins: [
// ...
Pages({
onRoutesGenerated: async (routes) => {
const users = await api.get('/users')
const dynamicRoutes = users.map(user => `/users/${user.name}`)
generateSitemap({ routes: [...routes, ...dynamicRoutes] })
},
}),
],
}
You can find a working example in example folder.
{ defaultLanguage?: string, languages: string[] }
undefined
Add i18n support defining alternate links. defaultLanguage will use this language with / and languages with /language
string
'http://localhost/'
Base URI.
Route[] or/and string[]
[]
Generated routes from vite-plugin-pages or/and strings as paths (ex: ['/user/1', '/user/2']) for manual dynamic routes.
string[]
[]
Excluded routes for sitemap.
string
'sitemap'
File name.
string
'public'
Destination path.
string
'daily'
Change frequency option for sitemap.
number
1
Priority option for sitemap.
Date
new Date()
Last modification option for sitemap.
boolean
false
Converts XML into a human readable format
boolean
false
Is Nuxt.js style route naming.
boolean
true
Allow robots crawl (in robots.txt file).
MIT License © 2022 jbaubree
FAQs
vite-plugin-pages based sitemap generator
The npm package vite-plugin-pages-sitemap receives a total of 837 weekly downloads. As such, vite-plugin-pages-sitemap popularity was classified as not popular.
We found that vite-plugin-pages-sitemap demonstrated a healthy version release cadence and project activity because the last version was released less than 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.