mirror of
https://github.com/veggiemonk/awesome-docker.git
synced 2025-04-19 07:28:05 +02:00
Table is production ready
This commit is contained in:
parent
c7b93e9431
commit
c852e15b99
8 changed files with 247 additions and 245 deletions
25
build.js
25
build.js
|
@ -2,6 +2,7 @@ const fs = require('fs');
|
|||
const showdown = require('showdown');
|
||||
const cheerio = require('cheerio');
|
||||
const Parcel = require('parcel-bundler');
|
||||
const sm = require('sitemap');
|
||||
|
||||
process.env.NODE_ENV = 'production';
|
||||
|
||||
|
@ -63,7 +64,29 @@ const bundle = (dest = destination) => {
|
|||
})
|
||||
.bundle()
|
||||
.then(() => {
|
||||
fs.copyFileSync('website/sitemap.xml', 'dist/sitemap.xml');
|
||||
// Creates a sitemap object given the input configuration with URLs
|
||||
const sitemap = sm.createSitemap({
|
||||
hostname: 'https://awesome-docker.netlify.com/',
|
||||
cacheTime: 6000000, // 600 sec (10 min) cache purge period
|
||||
urls: [
|
||||
{
|
||||
url: '/',
|
||||
changefreq: 'daily',
|
||||
priority: 0.8,
|
||||
lastmodrealtime: true,
|
||||
lastmodfile: 'dist/index.html',
|
||||
},
|
||||
{
|
||||
url: '/table.html',
|
||||
changefreq: 'weekly',
|
||||
priority: 0.8,
|
||||
lastmodrealtime: true,
|
||||
lastmodfile: 'dist/table.html',
|
||||
},
|
||||
],
|
||||
});
|
||||
fs.writeFileSync('dist/sitemap.xml', sitemap.toString());
|
||||
// fs.copyFileSync('website/sitemap.xml', 'dist/sitemap.xml');
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue