|
1 | | -const { DateTime } = require("luxon"); |
2 | | -const minifyXML = require("minify-xml"); |
3 | | -const markdownIt = require("markdown-it"); |
4 | | -const markdownItMathjax = require("markdown-it-mathjax3"); |
5 | | -const markdownItAnchor = require("markdown-it-anchor"); |
6 | | -const yaml = require("js-yaml"); |
7 | | - |
8 | | -const pluginRss = require("@11ty/eleventy-plugin-rss"); |
9 | | -const pluginSyntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight"); |
10 | | -const pluginBundle = require("@11ty/eleventy-plugin-bundle"); |
11 | | -const pluginNavigation = require("@11ty/eleventy-navigation"); |
12 | | -const { EleventyHtmlBasePlugin } = require("@11ty/eleventy"); |
13 | | - |
14 | | -const pluginDrafts = require("./eleventy.config.drafts.js"); |
15 | | -const pluginImages = require("./eleventy.config.images.js"); |
| 1 | +import { DateTime } from "luxon"; |
| 2 | +import minifyXML from "minify-xml"; |
| 3 | +import markdownIt from "markdown-it"; |
| 4 | +import markdownItMathjax from "markdown-it-mathjax3"; |
| 5 | +import markdownItAnchor from "markdown-it-anchor"; |
| 6 | +import yaml from "js-yaml"; |
| 7 | + |
| 8 | +import pluginRss from "@11ty/eleventy-plugin-rss"; |
| 9 | +import pluginSyntaxHighlight from "@11ty/eleventy-plugin-syntaxhighlight"; |
| 10 | +import pluginNavigation from "@11ty/eleventy-navigation"; |
| 11 | +import { EleventyHtmlBasePlugin } from "@11ty/eleventy"; |
| 12 | + |
| 13 | +import pluginDrafts from "./eleventy.config.drafts.mjs"; |
| 14 | +import pluginImages from "./eleventy.config.images.mjs"; |
16 | 15 |
|
17 | 16 | const addTargetBlankToExternalLinks = (md) => { |
18 | 17 | const defaultRender = |
@@ -40,7 +39,7 @@ const md = markdownIt({ |
40 | 39 | typographer: true, |
41 | 40 | }).use(addTargetBlankToExternalLinks); |
42 | 41 |
|
43 | | -module.exports = function (eleventyConfig) { |
| 42 | +export default function (eleventyConfig) { |
44 | 43 | eleventyConfig.setServerOptions({ |
45 | 44 | showAllHosts: true, |
46 | 45 | }); |
@@ -69,7 +68,9 @@ module.exports = function (eleventyConfig) { |
69 | 68 | }); |
70 | 69 | eleventyConfig.addPlugin(pluginNavigation); |
71 | 70 | eleventyConfig.addPlugin(EleventyHtmlBasePlugin); |
72 | | - eleventyConfig.addPlugin(pluginBundle); |
| 71 | + |
| 72 | + eleventyConfig.addBundle("css"); |
| 73 | + eleventyConfig.addBundle("js"); |
73 | 74 |
|
74 | 75 | eleventyConfig.addDataExtension("yml", (contents) => yaml.load(contents)); |
75 | 76 |
|
@@ -200,4 +201,4 @@ module.exports = function (eleventyConfig) { |
200 | 201 | // folder name and does **not** affect where things go in the output folder. |
201 | 202 | pathPrefix: "/", |
202 | 203 | }; |
203 | | -}; |
| 204 | +} |
0 commit comments