Skip to content

Commit

Permalink
upgrade to eleventy 3.0 w/ esm modules stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
ninjamuffin99 committed Nov 18, 2024
1 parent 73dd4df commit b6ac0ce
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
29 changes: 16 additions & 13 deletions .eleventy.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
const { EleventyRenderPlugin } = require("@11ty/eleventy");
const Image = require("@11ty/eleventy-img");
const Sharp = require("sharp");
const fs = require("fs");
const path = require("path");
const { EleventyHtmlBasePlugin } = require("@11ty/eleventy");
const hljs = require("highlight.js");
const markdownIt = require("markdown-it");
const markdownAnchor = require("markdown-it-anchor");

module.exports = function (eleventyConfig) {
import { RenderPlugin, HtmlBasePlugin } from "@11ty/eleventy";
import Image from "@11ty/eleventy-img";
import Sharp from "sharp";
import fs from "fs";
import path from "path";
import hljs from "highlight.js";
import markdownIt from "markdown-it";
import markdownAnchor from "markdown-it-anchor";
import UpgradeHelper from "@11ty/eleventy-upgrade-help";
const __dirname = path.resolve();



export default function (eleventyConfig) {
let options = {
html: true,
breaks: true,
Expand Down Expand Up @@ -41,8 +44,8 @@ module.exports = function (eleventyConfig) {
}),
);

eleventyConfig.addPlugin(EleventyRenderPlugin);
eleventyConfig.addPlugin(EleventyHtmlBasePlugin);
eleventyConfig.addPlugin(RenderPlugin);
eleventyConfig.addPlugin(HtmlBasePlugin);

eleventyConfig.addWatchTarget("./scss/");

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "haxeflixel.com",
"version": "0.2.0",
"description": "New DocPad project without using a skeleton",
"type": "module",
"repository": {
"type": "git",
"url": "https://github.com/HaxeFlixel/haxeflixel.com.git"
Expand Down Expand Up @@ -30,7 +31,7 @@
"fix:prettier": "prettier . --write"
},
"devDependencies": {
"@11ty/eleventy": "^2.0.1",
"@11ty/eleventy": "^3.0.0",
"@11ty/eleventy-img": "^4.0.2",
"@liquify/prettier-config": "^1.2.1",
"@shopify/prettier-plugin-liquid": "^1.4.4",
Expand Down

0 comments on commit b6ac0ce

Please sign in to comment.