Compare commits
No commits in common. 'main' and 'v0.1.0' have entirely different histories.
Before Width: | Height: | Size: 41 KiB |
@ -1,16 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Data"
|
|
||||||
media:
|
|
||||||
src: '_images/dog-tired.webp'
|
|
||||||
---
|
|
||||||
## Normcore cold-pressed ramps DSA
|
|
||||||
|
|
||||||
Normcore cold-pressed ramps DSA yes plz hot chicken green juice succulents leggings messenger bag truffaut iceland pabst ethical godard. Semiotics air plant marfa, drinking vinegar authentic iceland pug fit cloud bread cronut kickstarter glossier crucifix tumeric. Chicharrones polaroid flexitarian, seitan lumbersexual viral fam master cleanse four dollar toast scenester. Succulents poutine vegan keffiyeh meh, health goth DIY tattooed. Praxis roof party celiac chartreuse banjo butcher you probably haven't heard of them schlitz beard. Ethical tattooed kinfolk, cliche vegan messenger bag mukbang dreamcatcher cloud bread farm-to-table gatekeep trust fund.
|
|
||||||
|
|
||||||
## Palo santo leggings normcore aesthetic
|
|
||||||
|
|
||||||
bicycle rights sartorial godard slow-carb thundercats art party cray JOMO. Truffaut four dollar toast hoodie pour-over. Fanny pack iPhone jean shorts tote bag, master cleanse succulents tbh fixie gatekeep pok pok letterpress cornhole. Dreamcatcher tattooed hot chicken gatekeep, glossier salvia 8-bit cred. Fit lomo chillwave cold-pressed humblebrag narwhal. Meggings edison bulb fanny pack irony af pug pok pok whatever vexillologist vibecession cred butcher trust fund chia.
|
|
||||||
|
|
||||||
## Bitters kale chips chambray activated charcoal
|
|
||||||
|
|
||||||
wolf keffiyeh hell of selfies. Wolf readymade shoreditch flexitarian venmo single-origin coffee, knausgaard fit actually street art cold-pressed iPhone gatekeep. Migas bruh adaptogen semiotics marfa pickled yuccie. Locavore normcore lomo, shoreditch fashion axe actually glossier iPhone photo booth blue bottle DIY XOXO williamsburg. Pinterest whatever taxidermy, kale chips prism XOXO schlitz twee tote bag woke swag. Wayfarers fashion axe heirloom humblebrag synth. Whatever succulents PBR&B, pop-up enamel pin echo park tonx stumptown taiyaki.
|
|
Before Width: | Height: | Size: 2.3 MiB |
@ -1,14 +0,0 @@
|
|||||||
---
|
|
||||||
title: "health goth DIY tattooed"
|
|
||||||
---
|
|
||||||
## Normcore cold-pressed ramps DSA
|
|
||||||
|
|
||||||
Normcore cold-pressed ramps DSA yes plz hot chicken green juice succulents leggings messenger bag truffaut iceland pabst ethical godard. Semiotics air plant marfa, drinking vinegar authentic iceland pug fit cloud bread cronut kickstarter glossier crucifix tumeric. Chicharrones polaroid flexitarian, seitan lumbersexual viral fam master cleanse four dollar toast scenester. Succulents poutine vegan keffiyeh meh, health goth DIY tattooed. Praxis roof party celiac chartreuse banjo butcher you probably haven't heard of them schlitz beard. Ethical tattooed kinfolk, cliche vegan messenger bag mukbang dreamcatcher cloud bread farm-to-table gatekeep trust fund.
|
|
||||||
|
|
||||||
## Palo santo leggings normcore aesthetic
|
|
||||||
|
|
||||||
bicycle rights sartorial godard slow-carb thundercats art party cray JOMO. Truffaut four dollar toast hoodie pour-over. Fanny pack iPhone jean shorts tote bag, master cleanse succulents tbh fixie gatekeep pok pok letterpress cornhole. Dreamcatcher tattooed hot chicken gatekeep, glossier salvia 8-bit cred. Fit lomo chillwave cold-pressed humblebrag narwhal. Meggings edison bulb fanny pack irony af pug pok pok whatever vexillologist vibecession cred butcher trust fund chia.
|
|
||||||
|
|
||||||
## Bitters kale chips chambray activated charcoal
|
|
||||||
|
|
||||||
wolf keffiyeh hell of selfies. Wolf readymade shoreditch flexitarian venmo single-origin coffee, knausgaard fit actually street art cold-pressed iPhone gatekeep. Migas bruh adaptogen semiotics marfa pickled yuccie. Locavore normcore lomo, shoreditch fashion axe actually glossier iPhone photo booth blue bottle DIY XOXO williamsburg. Pinterest whatever taxidermy, kale chips prism XOXO schlitz twee tote bag woke swag. Wayfarers fashion axe heirloom humblebrag synth. Whatever succulents PBR&B, pop-up enamel pin echo park tonx stumptown taiyaki.
|
|
@ -1,14 +0,0 @@
|
|||||||
---
|
|
||||||
title: "health goth DIY tattooed"
|
|
||||||
---
|
|
||||||
## Normcore cold-pressed ramps DSA
|
|
||||||
|
|
||||||
Normcore cold-pressed ramps DSA yes plz hot chicken green juice succulents leggings messenger bag truffaut iceland pabst ethical godard. Semiotics air plant marfa, drinking vinegar authentic iceland pug fit cloud bread cronut kickstarter glossier crucifix tumeric. Chicharrones polaroid flexitarian, seitan lumbersexual viral fam master cleanse four dollar toast scenester. Succulents poutine vegan keffiyeh meh, health goth DIY tattooed. Praxis roof party celiac chartreuse banjo butcher you probably haven't heard of them schlitz beard. Ethical tattooed kinfolk, cliche vegan messenger bag mukbang dreamcatcher cloud bread farm-to-table gatekeep trust fund.
|
|
||||||
|
|
||||||
## Palo santo leggings normcore aesthetic
|
|
||||||
|
|
||||||
bicycle rights sartorial godard slow-carb thundercats art party cray JOMO. Truffaut four dollar toast hoodie pour-over. Fanny pack iPhone jean shorts tote bag, master cleanse succulents tbh fixie gatekeep pok pok letterpress cornhole. Dreamcatcher tattooed hot chicken gatekeep, glossier salvia 8-bit cred. Fit lomo chillwave cold-pressed humblebrag narwhal. Meggings edison bulb fanny pack irony af pug pok pok whatever vexillologist vibecession cred butcher trust fund chia.
|
|
||||||
|
|
||||||
## Bitters kale chips chambray activated charcoal
|
|
||||||
|
|
||||||
wolf keffiyeh hell of selfies. Wolf readymade shoreditch flexitarian venmo single-origin coffee, knausgaard fit actually street art cold-pressed iPhone gatekeep. Migas bruh adaptogen semiotics marfa pickled yuccie. Locavore normcore lomo, shoreditch fashion axe actually glossier iPhone photo booth blue bottle DIY XOXO williamsburg. Pinterest whatever taxidermy, kale chips prism XOXO schlitz twee tote bag woke swag. Wayfarers fashion axe heirloom humblebrag synth. Whatever succulents PBR&B, pop-up enamel pin echo park tonx stumptown taiyaki.
|
|
@ -1,14 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Data"
|
|
||||||
---
|
|
||||||
## Normcore cold-pressed ramps DSA
|
|
||||||
|
|
||||||
Normcore cold-pressed ramps DSA yes plz hot chicken green juice succulents leggings messenger bag truffaut iceland pabst ethical godard. Semiotics air plant marfa, drinking vinegar authentic iceland pug fit cloud bread cronut kickstarter glossier crucifix tumeric. Chicharrones polaroid flexitarian, seitan lumbersexual viral fam master cleanse four dollar toast scenester. Succulents poutine vegan keffiyeh meh, health goth DIY tattooed. Praxis roof party celiac chartreuse banjo butcher you probably haven't heard of them schlitz beard. Ethical tattooed kinfolk, cliche vegan messenger bag mukbang dreamcatcher cloud bread farm-to-table gatekeep trust fund.
|
|
||||||
|
|
||||||
## Palo santo leggings normcore aesthetic
|
|
||||||
|
|
||||||
bicycle rights sartorial godard slow-carb thundercats art party cray JOMO. Truffaut four dollar toast hoodie pour-over. Fanny pack iPhone jean shorts tote bag, master cleanse succulents tbh fixie gatekeep pok pok letterpress cornhole. Dreamcatcher tattooed hot chicken gatekeep, glossier salvia 8-bit cred. Fit lomo chillwave cold-pressed humblebrag narwhal. Meggings edison bulb fanny pack irony af pug pok pok whatever vexillologist vibecession cred butcher trust fund chia.
|
|
||||||
|
|
||||||
## Bitters kale chips chambray activated charcoal
|
|
||||||
|
|
||||||
wolf keffiyeh hell of selfies. Wolf readymade shoreditch flexitarian venmo single-origin coffee, knausgaard fit actually street art cold-pressed iPhone gatekeep. Migas bruh adaptogen semiotics marfa pickled yuccie. Locavore normcore lomo, shoreditch fashion axe actually glossier iPhone photo booth blue bottle DIY XOXO williamsburg. Pinterest whatever taxidermy, kale chips prism XOXO schlitz twee tote bag woke swag. Wayfarers fashion axe heirloom humblebrag synth. Whatever succulents PBR&B, pop-up enamel pin echo park tonx stumptown taiyaki.
|
|
Before Width: | Height: | Size: 1.5 MiB |
@ -1,24 +0,0 @@
|
|||||||
---
|
|
||||||
title: "blog"
|
|
||||||
view: "page.njk"
|
|
||||||
meta:
|
|
||||||
description: "DSA yes plz hot chicken green juice"
|
|
||||||
media:
|
|
||||||
src:
|
|
||||||
src: '_images/dog.jpg'
|
|
||||||
sizes:
|
|
||||||
- width: 300
|
|
||||||
- width: 500
|
|
||||||
height: 100
|
|
||||||
---
|
|
||||||
## Normcore cold-pressed ramps DSA
|
|
||||||
|
|
||||||
Normcore cold-pressed ramps DSA yes plz hot chicken green juice succulents leggings messenger bag truffaut iceland pabst ethical godard. Semiotics air plant marfa, drinking vinegar authentic iceland pug fit cloud bread cronut kickstarter glossier crucifix tumeric. Chicharrones polaroid flexitarian, seitan lumbersexual viral fam master cleanse four dollar toast scenester. Succulents poutine vegan keffiyeh meh, health goth DIY tattooed. Praxis roof party celiac chartreuse banjo butcher you probably haven't heard of them schlitz beard. Ethical tattooed kinfolk, cliche vegan messenger bag mukbang dreamcatcher cloud bread farm-to-table gatekeep trust fund.
|
|
||||||
|
|
||||||
## Palo santo leggings normcore aesthetic
|
|
||||||
|
|
||||||
bicycle rights sartorial godard slow-carb thundercats art party cray JOMO. Truffaut four dollar toast hoodie pour-over. Fanny pack iPhone jean shorts tote bag, master cleanse succulents tbh fixie gatekeep pok pok letterpress cornhole. Dreamcatcher tattooed hot chicken gatekeep, glossier salvia 8-bit cred. Fit lomo chillwave cold-pressed humblebrag narwhal. Meggings edison bulb fanny pack irony af pug pok pok whatever vexillologist vibecession cred butcher trust fund chia.
|
|
||||||
|
|
||||||
## Bitters kale chips chambray activated charcoal
|
|
||||||
|
|
||||||
wolf keffiyeh hell of selfies. Wolf readymade shoreditch flexitarian venmo single-origin coffee, knausgaard fit actually street art cold-pressed iPhone gatekeep. Migas bruh adaptogen semiotics marfa pickled yuccie. Locavore normcore lomo, shoreditch fashion axe actually glossier iPhone photo booth blue bottle DIY XOXO williamsburg. Pinterest whatever taxidermy, kale chips prism XOXO schlitz twee tote bag woke swag. Wayfarers fashion axe heirloom humblebrag synth. Whatever succulents PBR&B, pop-up enamel pin echo park tonx stumptown taiyaki.
|
|
@ -1,10 +1,8 @@
|
|||||||
---
|
---
|
||||||
title: "article"
|
title: "health goth DIY tattooed"
|
||||||
view: "article.njk"
|
view: "page.njk"
|
||||||
meta:
|
meta:
|
||||||
description: "DSA yes plz hot chicken green juice"
|
description: "DSA yes plz hot chicken green juice"
|
||||||
media:
|
|
||||||
src: '_images/dog.jpg'
|
|
||||||
---
|
---
|
||||||
## Normcore cold-pressed ramps DSA
|
## Normcore cold-pressed ramps DSA
|
||||||
|
|
@ -1,27 +0,0 @@
|
|||||||
---
|
|
||||||
title: "health goth DIY tattooed"
|
|
||||||
view: "page.njk"
|
|
||||||
meta:
|
|
||||||
description: "DSA yes plz hot chicken green juice"
|
|
||||||
robots: "noindex"
|
|
||||||
media:
|
|
||||||
src:
|
|
||||||
src: '_images/dog.jpg'
|
|
||||||
sizes:
|
|
||||||
- width: 300
|
|
||||||
- width: 500
|
|
||||||
height: 100
|
|
||||||
---
|
|
||||||
## Normcore cold-pressed ramps DSA
|
|
||||||
|
|
||||||
Normcore cold-pressed ramps DSA yes plz hot chicken green juice succulents leggings messenger bag truffaut iceland pabst ethical godard. Semiotics air plant marfa, drinking vinegar authentic iceland pug fit cloud bread cronut kickstarter glossier crucifix tumeric. Chicharrones polaroid flexitarian, seitan lumbersexual viral fam master cleanse four dollar toast scenester. Succulents poutine vegan keffiyeh meh, health goth DIY tattooed. Praxis roof party celiac chartreuse banjo butcher you probably haven't heard of them schlitz beard. Ethical tattooed kinfolk, cliche vegan messenger bag mukbang dreamcatcher cloud bread farm-to-table gatekeep trust fund.
|
|
||||||
|
|
||||||
## Palo santo leggings normcore aesthetic
|
|
||||||
|
|
||||||
bicycle rights sartorial godard slow-carb thundercats art party cray JOMO. Truffaut four dollar toast hoodie pour-over. Fanny pack iPhone jean shorts tote bag, master cleanse succulents tbh fixie gatekeep pok pok letterpress cornhole. Dreamcatcher tattooed hot chicken gatekeep, glossier salvia 8-bit cred. Fit lomo chillwave cold-pressed humblebrag narwhal. Meggings edison bulb fanny pack irony af pug pok pok whatever vexillologist vibecession cred butcher trust fund chia.
|
|
||||||
|
|
||||||
## Bitters kale chips chambray activated charcoal
|
|
||||||
|
|
||||||
wolf keffiyeh hell of selfies. Wolf readymade shoreditch flexitarian venmo single-origin coffee, knausgaard fit actually street art cold-pressed iPhone gatekeep. Migas bruh adaptogen semiotics marfa pickled yuccie. Locavore normcore lomo, shoreditch fashion axe actually glossier iPhone photo booth blue bottle DIY XOXO williamsburg. Pinterest whatever taxidermy, kale chips prism XOXO schlitz twee tote bag woke swag. Wayfarers fashion axe heirloom humblebrag synth. Whatever succulents PBR&B, pop-up enamel pin echo park tonx stumptown taiyaki.
|
|
||||||
|
|
||||||
![_images/dog.jpg](_images/dog.jpg)
|
|
@ -1,4 +0,0 @@
|
|||||||
title: "Test"
|
|
||||||
language: "de"
|
|
||||||
domain: "test.lan"
|
|
||||||
https: true
|
|
@ -1,112 +0,0 @@
|
|||||||
const { marked } = require('marked')
|
|
||||||
|
|
||||||
const configStore = require('./../config.js')
|
|
||||||
const Media = require('./../factories/media.js')
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
// copy from @marked/src/helpers.js, no export possible
|
|
||||||
function cleanUrl(sanitize, base, href) {
|
|
||||||
if (sanitize) {
|
|
||||||
|
|
||||||
let prot
|
|
||||||
|
|
||||||
try {
|
|
||||||
prot = decodeURIComponent(unescape(href))
|
|
||||||
.replace(nonWordAndColonTest, '')
|
|
||||||
.toLowerCase()
|
|
||||||
} catch (e) {
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
|
|
||||||
if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0 || prot.indexOf('data:') === 0) {
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (base && !originIndependentUrl.test(href)) {
|
|
||||||
href = resolveUrl(base, href)
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
href = encodeURI(href).replace(/%25/g, '%')
|
|
||||||
} catch (e) {
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
|
|
||||||
return href
|
|
||||||
}
|
|
||||||
|
|
||||||
const renderer = {
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param {string} href
|
|
||||||
* @param {string} title
|
|
||||||
* @param {string} text
|
|
||||||
*/
|
|
||||||
link(href, title, text) {
|
|
||||||
|
|
||||||
href = cleanUrl(this.options.sanitize, this.options.baseUrl, href)
|
|
||||||
|
|
||||||
if (href === null) {
|
|
||||||
return text
|
|
||||||
}
|
|
||||||
|
|
||||||
let out = '<a href="' + href + '"'
|
|
||||||
|
|
||||||
if (title) {
|
|
||||||
out += ' title="' + title + '"'
|
|
||||||
}
|
|
||||||
|
|
||||||
// check if url is external and add target
|
|
||||||
if (href.match(/^(http|https):\/\//)) {
|
|
||||||
out += ' target="_blank" rel="noopener" '
|
|
||||||
}
|
|
||||||
|
|
||||||
out += '>' + text + '</a>'
|
|
||||||
|
|
||||||
return out
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param {string} href
|
|
||||||
* @param {string} title
|
|
||||||
* @param {string} text
|
|
||||||
*/
|
|
||||||
image(href, title, text) {
|
|
||||||
|
|
||||||
href = cleanUrl(this.options.sanitize, this.options.baseUrl, href)
|
|
||||||
|
|
||||||
if (href === null) {
|
|
||||||
return text
|
|
||||||
}
|
|
||||||
|
|
||||||
// check if href for image is relative
|
|
||||||
if (!href.match(/^(http|https):\/\//)) {
|
|
||||||
const markedDirPath = configStore.get('markedDirPath')
|
|
||||||
|
|
||||||
// check if dirPath are exists from options
|
|
||||||
if (markedDirPath || markedDirPath === '') {
|
|
||||||
const media = new Media(markedDirPath)
|
|
||||||
href = media.resolve(href)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let out = `<img src="${href}" alt="${text}"`
|
|
||||||
|
|
||||||
if (title) {
|
|
||||||
out += ` title="${title}"`
|
|
||||||
}
|
|
||||||
|
|
||||||
out += this.options.xhtml ? '/>' : '>'
|
|
||||||
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = renderer
|
|
@ -1,98 +0,0 @@
|
|||||||
const { assert } = require('chai')
|
|
||||||
const fs = require('fs')
|
|
||||||
|
|
||||||
const PagesQuery = require('./../src/queries/pages.js')
|
|
||||||
const configStore = require('./../src/config.js')
|
|
||||||
|
|
||||||
describe('Page /index.md', function () {
|
|
||||||
|
|
||||||
configStore.set('source', './ressources')
|
|
||||||
configStore.set('destination', './dist')
|
|
||||||
|
|
||||||
const query = new PagesQuery('./ressources');
|
|
||||||
const results = query.find()
|
|
||||||
|
|
||||||
const page = results[2]
|
|
||||||
|
|
||||||
it('fields is Object', function() {
|
|
||||||
assert.isObject(page)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('fields has Blocks', function() {
|
|
||||||
assert.equal(page.blocks.block.length, 2)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('path', function() {
|
|
||||||
assert.equal(page.path, '/index.html')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('permalink', function() {
|
|
||||||
assert.equal(page.permalink, '')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('parsed content contains image', () => {
|
|
||||||
assert.match(page.content, /<img src="\/assets\/88c010ea\/4ca9b5f5\/6024c57d\/05899fae\/a33d9a45\/dog.webp" alt="_images\/dog.jpg">/)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
describe('Page /blog/index.md', function () {
|
|
||||||
|
|
||||||
configStore.set('source', './ressources')
|
|
||||||
configStore.set('destination', './dist')
|
|
||||||
|
|
||||||
const query = new PagesQuery('./ressources');
|
|
||||||
const results = query.find()
|
|
||||||
|
|
||||||
const page = results[1]
|
|
||||||
|
|
||||||
it('fields is object', function() {
|
|
||||||
assert.isObject(page)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('fields has Blocks', function() {
|
|
||||||
assert.equal(page.blocks.block.length, 2)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('path', function() {
|
|
||||||
assert.equal(page.path, '/blog/index.html')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('permalink', function() {
|
|
||||||
assert.equal(page.permalink, '/blog')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('fields has media src', function() {
|
|
||||||
assert.deepEqual(page.media.src, {
|
|
||||||
"300": "/assets/a6c45d17/11bf0a4e/a2b1d75d/dc85ca56/71c63294/dog300.webp",
|
|
||||||
"500x100": "/assets/a6c45d17/11bf0a4e/a2b1d75d/dc85ca56/71c63294/dog500x100.webp",
|
|
||||||
"full": "/assets/a6c45d17/11bf0a4e/a2b1d75d/dc85ca56/71c63294/dog.webp"
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
describe('Page /blog/article.md', function () {
|
|
||||||
|
|
||||||
configStore.set('source', './ressources')
|
|
||||||
configStore.set('destination', './dist')
|
|
||||||
|
|
||||||
const query = new PagesQuery('./ressources');
|
|
||||||
const results = query.find()
|
|
||||||
|
|
||||||
const page = results[0]
|
|
||||||
|
|
||||||
it('fields is object', function() {
|
|
||||||
assert.isObject(page)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('path', function() {
|
|
||||||
assert.equal(page.path, '/blog/article.html')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('permalink', function() {
|
|
||||||
assert.equal(page.permalink, '/blog/article')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('fields has media src', function() {
|
|
||||||
assert.equal(page.media.src, '/assets/a6c45d17/11bf0a4e/a2b1d75d/dc85ca56/71c63294/dog.webp')
|
|
||||||
})
|
|
||||||
})
|
|
@ -1,34 +0,0 @@
|
|||||||
const { assert } = require('chai')
|
|
||||||
const fs = require('fs')
|
|
||||||
|
|
||||||
const PagesQuery = require('./../src/queries/pages.js')
|
|
||||||
const configStore = require('./../src/config.js')
|
|
||||||
const parseYamlFile = require('./../src/parsers/yaml.js')
|
|
||||||
const Sitemap = require('./../src/factories/sitemap.js')
|
|
||||||
|
|
||||||
describe('Sitemap', function () {
|
|
||||||
|
|
||||||
configStore.set('source', './ressources')
|
|
||||||
configStore.set('destination', './dist')
|
|
||||||
|
|
||||||
const file = fs.readFileSync('./ressources/site.yml', 'utf8')
|
|
||||||
const siteConfig = parseYamlFile(file)
|
|
||||||
|
|
||||||
const query = new PagesQuery('./ressources')
|
|
||||||
const results = query.find()
|
|
||||||
|
|
||||||
const sitemap = new Sitemap(siteConfig)
|
|
||||||
|
|
||||||
results.forEach((page) => {
|
|
||||||
sitemap.addPage(page)
|
|
||||||
})
|
|
||||||
|
|
||||||
// check results
|
|
||||||
it('loc-tag with url', function() {
|
|
||||||
assert.match(sitemap.getXmlAsString(), /<loc>https:\/\/test.lan\/blog\/article<\/loc>/)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('loc-tag has robotos:noindex and has missing', function() {
|
|
||||||
assert.notMatch(sitemap.getXmlAsString(), /<loc>https:\/\/test.lan\/<\/loc>/)
|
|
||||||
})
|
|
||||||
})
|
|
Loading…
Reference in new issue