Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
strapi-plugin-sitemap
Advanced tools
Every public website should have a sitemap.xml to increase SEO. A website where the content is managed by Strapi should be no different. With this plugin you can generate a sitemap server side, which allows you to customize it based on your data structure in Strapi.
This plugin uses the UID field type to fetch URLs, and therefor expects a Strapi version of 3.0.0-beta.19.3
or higher.
Use npm
or yarn
to install and build the plugin.
yarn add strapi-plugin-sitemap
yarn build
yarn develop
Before you can generate the sitemap you need to specify what you want to be in it. In the admin section of the plugin you can add 'Collection entries' and 'Custom entries' to the sitemap. With collection entries you can add all URLs of a collection or single type, with custom entries you can add URLs which are not managed by Strapi. Also make sure to set the hostname
of your website.
After saving the settings and generating the sitemap, it will be written in the /public
folder of your Strapi project, making it available at http://localhost:1337/sitemap.xml
.
Add the sitemap.xml
to the .gitignore
of your project.
Make sure the sitemap is always up-to-date. You can either add a cron job, or create a lifecycle method to run the createSitemap()
service.
// Generate the sitemap every 12 hours
'0 */12 * * *': () => {
strapi.plugins.sitemap.services.sitemap.createSitemap();
},
Give a star if this project helped you.
FAQs
Generate a highly customizable sitemap XML in Strapi CMS.
The npm package strapi-plugin-sitemap receives a total of 2,314 weekly downloads. As such, strapi-plugin-sitemap popularity was classified as popular.
We found that strapi-plugin-sitemap demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.