
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
sitemap-xmls
Advanced tools
a high-level sitemap-generating framework that makes creating sitemap XML files easy.
sitemap-xmls
is a high-level sitemap-generating framework that makes creating sitemap XML files easy.
npm install sitemap-xmls --save
const smXml = require('sitemap-xmls');
const sitemapXml = new smXml('demo', 'https://demo.com/sitemap/',{
releasePath: './release/'
});
// add a sitemap with type of 'apps'
sitemapXml.addSitemapType('apps', 'monthly', 0.8);
sitemapXml.addLine('apps', 'https://demo.com/apps-demo-1.html');
sitemapXml.addLine('apps', 'https://demo.com/apps-demo-2.html');
sitemapXml.addLine('apps', 'https://demo.com/apps-demo-3.html', {
lastmod: '2018-10-01',
changefreq: 'daily',
priority: 0.6
});
// important: don't forget the 'end()'
sitemapXml.end('apps');
// add another sitemap with type of 'topics'
sitemapXml.addSitemapType('topics', 'daily', 0.9);
sitemapXml.addLine('topics', 'https://demo.com/topics-demo-1.html');
sitemapXml.addLine('topics', 'https://demo.com/topics-demo-2.html');
sitemapXml.addLine('topics', 'https://demo.com/topics-demo-3.html');
// important: don't forget the 'end()'
sitemapXml.end('topics');
// finally, generate the index file
sitemapXml.createIndex();
after that, it will generator sitemap just like in ./release/demo/
:
demo/index.json
demo/index.xml
demo/apps_10000.xml.gz
demo/topics_10000.xml.gz
【demo/index.json】
{"index":"demo/index.xml","files":["demo/apps_10000.xml.gz","demo/topics_10000.xml.gz"]}
【demo/index.xml】
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<sitemap>
<loc>https://demo.com/sitemap/demo/apps_10000.xml.gz</loc>
<loc>https://demo.com/sitemap/demo/topics_10000.xml.gz</loc>
</sitemap>
</sitemapindex>
【demo/apps_10000.xml.gz】
<?xml version="1.0" encoding="UTF-8"?><urlset>
<url>
<loc>https://demo.com/apps-demo-1.html</loc>
<lastmod>2018-07-18</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://demo.com/apps-demo-2.html</loc>
<lastmod>2018-07-18</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://demo.com/apps-demo-3.html</loc>
<lastmod>2018-10-01</lastmod>
<changefreq>daily</changefreq>
<priority>0.6</priority>
</url>
</urlset>
【demo/topics_10000.xml.gz】
<?xml version="1.0" encoding="UTF-8"?><urlset>
<url>
<loc>https://demo.com/topics-demo-1.html</loc>
<lastmod>2018-07-18</lastmod>
<changefreq>daily</changefreq>
<priority>0.9</priority>
</url>
<url>
<loc>https://demo.com/topics-demo-2.html</loc>
<lastmod>2018-07-18</lastmod>
<changefreq>daily</changefreq>
<priority>0.9</priority>
</url>
<url>
<loc>https://demo.com/topics-demo-3.html</loc>
<lastmod>2018-07-18</lastmod>
<changefreq>daily</changefreq>
<priority>0.9</priority>
</url>
</urlset>
0.0 ~ 1.0
<mobile:mobile type="mobile"/> :移动网页
<mobile:mobile type="pc,mobile"/>:自适应网页
<mobile:mobile type="htmladapt"/>:代码适配
无该上述 mobile
标签表示为PC网页。
FAQs
a high-level sitemap-generating framework that makes creating sitemap XML files easy.
The npm package sitemap-xmls receives a total of 0 weekly downloads. As such, sitemap-xmls popularity was classified as not popular.
We found that sitemap-xmls 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.