v9 switches to ESM
This commit is contained in:
parent
d78b03ae1d
commit
6d64bd2813
@ -1,4 +1,4 @@
|
||||
module.exports = {
|
||||
export default {
|
||||
title: "Eleventy Base Blog v8",
|
||||
url: "https://example.com/",
|
||||
language: "en",
|
||||
|
@ -1,4 +1,4 @@
|
||||
module.exports = {
|
||||
export default {
|
||||
tags: [
|
||||
"posts"
|
||||
],
|
||||
|
@ -1,3 +1,3 @@
|
||||
module.exports = {
|
||||
export default {
|
||||
eleventyExcludeFromCollections: true
|
||||
}
|
||||
|
@ -24,10 +24,9 @@ function eleventyComputedExcludeFromCollections() {
|
||||
}
|
||||
};
|
||||
|
||||
module.exports.eleventyComputedPermalink = eleventyComputedPermalink;
|
||||
module.exports.eleventyComputedExcludeFromCollections = eleventyComputedExcludeFromCollections;
|
||||
export { eleventyComputedPermalink, eleventyComputedExcludeFromCollections };
|
||||
|
||||
module.exports = eleventyConfig => {
|
||||
export default function(eleventyConfig) {
|
||||
eleventyConfig.addGlobalData("eleventyComputed.permalink", eleventyComputedPermalink);
|
||||
eleventyConfig.addGlobalData("eleventyComputed.eleventyExcludeFromCollections", eleventyComputedExcludeFromCollections);
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
const path = require("path");
|
||||
const eleventyImage = require("@11ty/eleventy-img");
|
||||
import path from "path";
|
||||
import eleventyImage from "@11ty/eleventy-img";
|
||||
|
||||
module.exports = eleventyConfig => {
|
||||
export default function(eleventyConfig) {
|
||||
function relativeToInputPath(inputPath, relativeFilePath) {
|
||||
let split = inputPath.split("/");
|
||||
split.pop();
|
||||
|
@ -1,16 +1,18 @@
|
||||
const { DateTime } = require("luxon");
|
||||
const markdownItAnchor = require("markdown-it-anchor");
|
||||
import { DateTime } from "luxon";
|
||||
import markdownItAnchor from "markdown-it-anchor";
|
||||
|
||||
const pluginRss = require("@11ty/eleventy-plugin-rss");
|
||||
const pluginSyntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight");
|
||||
const pluginBundle = require("@11ty/eleventy-plugin-bundle");
|
||||
const pluginNavigation = require("@11ty/eleventy-navigation");
|
||||
const { EleventyHtmlBasePlugin } = require("@11ty/eleventy");
|
||||
import pluginRss from "@11ty/eleventy-plugin-rss";
|
||||
import pluginSyntaxHighlight from "@11ty/eleventy-plugin-syntaxhighlight";
|
||||
import pluginBundle from "@11ty/eleventy-plugin-bundle";
|
||||
import pluginNavigation from "@11ty/eleventy-navigation";
|
||||
|
||||
const pluginDrafts = require("./eleventy.config.drafts.js");
|
||||
const pluginImages = require("./eleventy.config.images.js");
|
||||
import pluginDrafts from "./eleventy.config.drafts.js";
|
||||
import pluginImages from "./eleventy.config.images.js";
|
||||
|
||||
/** @param {import("@11ty/eleventy").UserConfig} eleventyConfig */
|
||||
export default async function(eleventyConfig) {
|
||||
const { EleventyHtmlBasePlugin } = await import("@11ty/eleventy");
|
||||
|
||||
module.exports = function(eleventyConfig) {
|
||||
// Copy the contents of the `public` folder to the output folder
|
||||
// For example, `./public/css/` ends up in `_site/css/`
|
||||
eleventyConfig.addPassthroughCopy({
|
||||
|
@ -1,7 +1,8 @@
|
||||
{
|
||||
"name": "eleventy-base-blog",
|
||||
"version": "8.0.0",
|
||||
"version": "9.0.0",
|
||||
"description": "A starter repository for a blog web site using the Eleventy site generator.",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "npx @11ty/eleventy",
|
||||
"build-ghpages": "npx @11ty/eleventy --pathprefix=/eleventy-base-blog/",
|
||||
|
Loading…
Reference in New Issue
Block a user