diff --git a/.eleventy.js b/.eleventy.js index b86c02a..47698e8 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -4,6 +4,8 @@ const svgContents = require('eleventy-plugin-svg-contents') const faviconPlugin = require('eleventy-favicon') module.exports = (eleventyConfig) => { + eleventyConfig.setUseGitIgnore(false) + eleventyConfig.addPlugin(cagovBuildSystem, { processors: { rollup: { @@ -27,6 +29,10 @@ module.exports = (eleventyConfig) => { destination: './dist' }) + eleventyConfig.addCollection('notes', function (collectionApi) { + return collectionApi.getFilteredByGlob('src/notes/**/*.md') + }) + return { dir: { input: 'src', diff --git a/src/data/permalink.js b/src/data/permalink.js new file mode 100644 index 0000000..f6b439d --- /dev/null +++ b/src/data/permalink.js @@ -0,0 +1 @@ +module.exports = false diff --git a/src/pages/index.11tydata.js b/src/pages/index.11tydata.js new file mode 100644 index 0000000..07597eb --- /dev/null +++ b/src/pages/index.11tydata.js @@ -0,0 +1,5 @@ +module.exports = { + layout: 'base.njk', + + permalink: '/index.html' +} diff --git a/src/pages/index.njk b/src/pages/index.njk index 44973cf..cc605c2 100644 --- a/src/pages/index.njk +++ b/src/pages/index.njk @@ -1,7 +1,3 @@ ---- -permalink: '/' -layout: 'base.njk' ----
{{ '/src/images/logo.svg' | svgContents("max-h-24 block w-[50vw]") | safe }} diff --git a/src/pages/note.11tydata.js b/src/pages/note.11tydata.js new file mode 100644 index 0000000..83463b5 --- /dev/null +++ b/src/pages/note.11tydata.js @@ -0,0 +1,11 @@ +module.exports = { + layout: 'base.njk', + + pagination: { + data: 'collections.notes', + size: 1, + alias: 'note' + }, + + permalink: '/{{note.filePathStem}}.html' +} diff --git a/src/pages/note.njk b/src/pages/note.njk new file mode 100644 index 0000000..4a53070 --- /dev/null +++ b/src/pages/note.njk @@ -0,0 +1 @@ +{{ note.templateContent | safe }} \ No newline at end of file