mirror of
https://github.com/danog/sass-site.git
synced 2024-11-30 04:29:17 +01:00
231bc2b807
* main: Fix remaining blog issues First round of blog review. addressed style review comments sort out permalinks sort out permalinks Remove extra console log add author and date to individual blogs add blog.11tydate.yml file truncate html and date filters more blog edits components all working, need author and date subtitle
50 lines
1.6 KiB
JavaScript
50 lines
1.6 KiB
JavaScript
'use strict';
|
|
|
|
const { EleventyRenderPlugin } = require('@11ty/eleventy');
|
|
const syntaxHighlight = require('@11ty/eleventy-plugin-syntaxhighlight');
|
|
const yaml = require('js-yaml');
|
|
|
|
const componentsPlugin =
|
|
require('./source/helpers/components/index.ts').default;
|
|
const datesPlugin = require('./source/helpers/dates.ts').default;
|
|
const { liquidEngine, markdownEngine } = require('./source/helpers/engines.ts');
|
|
const pagesPlugin = require('./source/helpers/pages.ts').default;
|
|
const typePlugin = require('./source/helpers/type.ts').default;
|
|
|
|
/** @param {import('@11ty/eleventy').UserConfig} eleventyConfig */
|
|
module.exports = (eleventyConfig) => {
|
|
eleventyConfig.addPassthroughCopy('source/assets/dist');
|
|
eleventyConfig.addPassthroughCopy('source/assets/img');
|
|
eleventyConfig.addPassthroughCopy('source/favicon.ico');
|
|
|
|
eleventyConfig.setUseGitIgnore(false);
|
|
eleventyConfig.watchIgnores.add('source/_data/versionCache.json');
|
|
|
|
eleventyConfig.setLibrary('liquid', liquidEngine);
|
|
eleventyConfig.setLibrary('md', markdownEngine);
|
|
eleventyConfig.addDataExtension('yml, yaml', (contents) =>
|
|
yaml.load(contents),
|
|
);
|
|
|
|
// register filters and shortcodes
|
|
eleventyConfig.addPlugin(componentsPlugin);
|
|
eleventyConfig.addPlugin(datesPlugin);
|
|
eleventyConfig.addPlugin(pagesPlugin);
|
|
eleventyConfig.addPlugin(typePlugin);
|
|
|
|
// other plugins
|
|
eleventyConfig.addPlugin(EleventyRenderPlugin);
|
|
eleventyConfig.addPlugin(syntaxHighlight);
|
|
|
|
eleventyConfig.setQuietMode(true);
|
|
|
|
// settings
|
|
return {
|
|
dir: {
|
|
input: 'source',
|
|
includes: '_includes',
|
|
layouts: '_layouts',
|
|
},
|
|
};
|
|
};
|