-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: resolve live site path issue (#97)
- resolve live site path issue - update 11ty to 2.0.0-canary.16
- Loading branch information
1 parent
34e6e26
commit c35ea98
Showing
3 changed files
with
496 additions
and
2,834 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,34 @@ | ||
const syntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight") | ||
const yaml = require("js-yaml") | ||
const markdownIt = require("markdown-it") | ||
const markdownItEmoji = require("markdown-it-emoji") | ||
const now = String(Date.now()) | ||
const syntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight"); | ||
const { EleventyHtmlBasePlugin } = require("@11ty/eleventy"); | ||
const yaml = require("js-yaml"); | ||
const markdownIt = require("markdown-it"); | ||
const markdownItEmoji = require("markdown-it-emoji"); | ||
const now = String(Date.now()); | ||
|
||
module.exports = function (eleventyConfig) { | ||
eleventyConfig.addWatchTarget("./_src/styles/tailwind.config.js") | ||
eleventyConfig.addWatchTarget("./_src/styles/tailwind.css") | ||
eleventyConfig.addPassthroughCopy("assets/img") | ||
eleventyConfig.addPassthroughCopy("assets/fonts") | ||
eleventyConfig.addPassthroughCopy({ "./_tmp/style.css": "./style.css" }) | ||
eleventyConfig.addDataExtension("yaml", (contents) => yaml.load(contents)) | ||
const pathPrefix = (module.exports = function (eleventyConfig) { | ||
eleventyConfig.addWatchTarget("./_src/styles/tailwind.config.js"); | ||
eleventyConfig.addWatchTarget("./_src/styles/tailwind.css"); | ||
eleventyConfig.addPassthroughCopy("assets/img"); | ||
eleventyConfig.addPassthroughCopy("assets/fonts"); | ||
eleventyConfig.addPassthroughCopy({ "./_tmp/style.css": "./style.css" }); | ||
eleventyConfig.addDataExtension("yaml", (contents) => yaml.load(contents)); | ||
eleventyConfig.addShortcode("version", function () { | ||
return now | ||
}) | ||
return now; | ||
}); | ||
|
||
eleventyConfig.addPlugin(syntaxHighlight) | ||
eleventyConfig.setLibrary("md", markdownIt({html: true}).use(markdownItEmoji)) | ||
eleventyConfig.addPlugin(EleventyHtmlBasePlugin, { | ||
baseHref: process.env.ELEVENTY_PRODUCTION ? "/curio/" : "/", | ||
}); | ||
eleventyConfig.addPlugin(syntaxHighlight); | ||
eleventyConfig.setLibrary( | ||
"md", | ||
markdownIt({ html: true }).use(markdownItEmoji) | ||
); | ||
|
||
return { | ||
dir: { | ||
includes: "_src/_includes", | ||
output: "_site", | ||
}, | ||
} | ||
} | ||
}; | ||
}); |
Oops, something went wrong.