feat: update to eleventy v3 (#487)

Reviewed-on: https://codeberg.org/Codeberg/Documentation/pulls/487
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
This commit is contained in:
Gusted 2024-11-27 03:12:21 +00:00 committed by Gusted
parent 87c587f7bc
commit bee5b68554
3 changed files with 536 additions and 637 deletions

View file

@ -1,15 +1,14 @@
const navigationPlugin = require('@11ty/eleventy-navigation');
const syntaxHighlightingPlugin = require('@11ty/eleventy-plugin-syntaxhighlight');
const markdownIt = require('markdown-it');
const tableOfContentsPlugin = require('@uncenter/eleventy-plugin-toc');
const markdownItClass = require('@toycode/markdown-it-class');
const markdownItAnchor = require('markdown-it-anchor');
const library = require('@fortawesome/fontawesome-svg-core').library;
const icon = require('@fortawesome/fontawesome-svg-core').icon;
const fas = require('@fortawesome/free-solid-svg-icons').fas;
const { execSync } = require('child_process');
import navigationPlugin from '@11ty/eleventy-navigation';
import syntaxHighlightingPlugin from '@11ty/eleventy-plugin-syntaxhighlight';
import markdownIt from 'markdown-it';
import tableOfContentsPlugin from '@uncenter/eleventy-plugin-toc';
import markdownItClass from '@toycode/markdown-it-class';
import markdownItAnchor from 'markdown-it-anchor';
import { library, icon } from '@fortawesome/fontawesome-svg-core';
import { fas } from '@fortawesome/free-solid-svg-icons';
import { execSync } from 'child_process';
module.exports = function (eleventyConfig) {
export default function (eleventyConfig) {
eleventyConfig.addPlugin(navigationPlugin);
eleventyConfig.addPlugin(syntaxHighlightingPlugin);
@ -76,10 +75,10 @@ module.exports = function (eleventyConfig) {
eleventyConfig.on('eleventy.after', () => {
execSync(`npx pagefind`, { encoding: 'utf-8' });
});
}
return {
dir: {
input: 'content',
},
};
export const config = {
dir: {
input: 'content',
},
};

View file

@ -9,13 +9,14 @@
"serve": "eleventy --serve"
},
"devDependencies": {
"@11ty/eleventy": "^2.0.1",
"@11ty/eleventy": "^3.0.0",
"@11ty/eleventy-navigation": "^0.3.5",
"@11ty/eleventy-plugin-syntaxhighlight": "^5.0.0",
"@fortawesome/fontawesome-svg-core": "^6.4.0",
"@fortawesome/free-solid-svg-icons": "^6.4.0",
"@toycode/markdown-it-class": "^1.2.4",
"@uncenter/eleventy-plugin-toc": "^1.0.3",
"markdown-it": "^14.1.0",
"markdown-it-anchor": "^9.0.0",
"pagefind": "^1.0.4"
}

File diff suppressed because it is too large Load diff