Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/v-core9/v_sitemap
XML Sitemaps Generator.
https://github.com/v-core9/v_sitemap
async fs generator nodejs sitemap sitemap-generator sitemap-xml v-core9 v-file-system xml xml-sitemap-generator xml-sitemaps
Last synced: 2 days ago
JSON representation
XML Sitemaps Generator.
- Host: GitHub
- URL: https://github.com/v-core9/v_sitemap
- Owner: V-core9
- License: mit
- Created: 2022-01-03T15:24:22.000Z (almost 3 years ago)
- Default Branch: main_index
- Last Pushed: 2022-01-05T16:32:02.000Z (almost 3 years ago)
- Last Synced: 2024-10-06T11:36:29.240Z (about 1 month ago)
- Topics: async, fs, generator, nodejs, sitemap, sitemap-generator, sitemap-xml, v-core9, v-file-system, xml, xml-sitemap-generator, xml-sitemaps
- Language: JavaScript
- Homepage:
- Size: 47.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# v_sitemap
[🔥] WARNING : ALPHA DEVELOPMENT STATE [🔥]
## 00. Output Examples [from same array of items]:
![v_sitemap Output Examples](output.sample)
## 1. Installing:
npm i v_sitemap --save
## 2. Using:
const v_sitemap = require('.');
// Some Random Array to Use for demonstration purpose.
const DEMO_DATA = [
{
name: 'Home',
path: '/',
lastmod: '2019-01-01',
changefreq: 'yearly',
priority: 0.4,
},
{
name: 'About',
path: '/about',
lastmod: '2020-01-01',
changefreq: 'monthly',
priority: 0.6,
},{
name: 'Contact',
path: '/contact',
lastmod: '2021-01-01',
changefreq: 'daily',
priority: 0.9,
}
];const myMap = {
data: DEMO_DATA,
index: true,
output: "DEMO_DATA.xml"
};v_sitemap(myMap);
#
## 2.1. Listing of sitemaps [sitemapindex]
>That code will the produce this XML file:
https://v-core9.com/
https://v-core9.com/about
https://v-core9.com/contact
## 2.2. Single Sitemap [urlset]
> By Changing option in "myMap" constant from "index == true" to false...like this:const myMap = {
data: DEMO_DATA,
index: false,
output: "DEMO_DATA.SMAP.xml"
};v_sitemap(myMap);
>and instead of sitemapindex it will produce this XML file
https://v-core9.com/
2019-01-01
yearly
0.4
https://v-core9.com/about
2020-01-01
monthly
0.6
https://v-core9.com/contact
2021-01-01
daily
0.9
#
## 2.3. Styled sitemap
> By adding additional entry that is URL path to the file:const myStyledMap = {
data: DEMO_DATA,
index: true,
output: "sample.myStyledMap.xml",
stylesheet: "v-core9.com/style/XSL/sitemap.xsl"
};v_sitemap(myStyledMap);
## Sitemap Generation Options?
>### NOTICE:
>For now just check \_TEST\_ Directory & "sample.run.js" file for more info