Skip to content

Commit

Permalink
docs: resolve live site path issue (#97)
Browse files Browse the repository at this point in the history
- resolve live site path issue
- update 11ty to 2.0.0-canary.16
  • Loading branch information
markmichon committed Nov 2, 2022
1 parent 34e6e26 commit c35ea98
Show file tree
Hide file tree
Showing 3 changed files with 496 additions and 2,834 deletions.
43 changes: 25 additions & 18 deletions docs/.eleventy.js
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",
},
}
}
};
});
Loading

0 comments on commit c35ea98

Please sign in to comment.