Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
sveltekit-static-sitemap
Advanced tools
Generate sitemap at buildtime for SvelteKit applications with prerendered routes. Works with any adapter.
Generates a sitemap.xml
for your page during build. Works by wrapping your existing adapter and writing the sitemap together with the static assets. Currently only prerendered pages will be discovered be included.
Install the package:
npm i -D sveltekit-static-sitemap
Use it in your svelte.config.js
:
import { sitemapWrapAdapter } from "sveltekit-static-sitemap";
const config = {
kit: {
adapter: sitemapWrapAdapter(adapter()),
},
};
export default config;
You can override the default properties for each page, add new pages and set properties on a per page basis:
sitemapWrapAdapter(adapter(), {
// These are the default options for every `<url>` in the sitemap
defaults: {
lastmod: new Date().toISOString(),
priority: 0.5,
chengefreq: "weekly",
},
pages: {
"/": {
// Other values are inherited from default
priority: 1,
},
// Pages which are prerendred by SvelteKit are automatically included
// Other pages can be defined as well
"/dynamic/page": {}, // Will inherit default values
},
});
See the documentation for the sitemapWrapAdapter
function.
Unlike other sitemap generators for SvelteKit, sveltekit-static-sitemap
:
This is posible by wrapping the existing SvelteKit adapter for you project and patching the writePrerendered
function of the SvelteKit Builder
object. This function usually writes static assets and prerendered pages to the correct location for your Adapter. This patched version does the same, but generates the sitemap and pretends it was one of the static assets all along.
Only prerendered pages are included in the sitemap automatically, because these are the only pages we can reliably extract from the Builder
.
FAQs
Generate sitemap at buildtime for SvelteKit applications with prerendered routes. Works with any adapter.
The npm package sveltekit-static-sitemap receives a total of 5 weekly downloads. As such, sveltekit-static-sitemap popularity was classified as not popular.
We found that sveltekit-static-sitemap 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
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.