move configuration from flags to config
This commit is contained in:
parent
6a83b98b0c
commit
585a098243
2 changed files with 4 additions and 4 deletions
|
|
@ -6,6 +6,10 @@ import { feedPlugin } from "@11ty/eleventy-plugin-rss";
|
|||
import { IdAttributePlugin } from "@11ty/eleventy";
|
||||
|
||||
export default function (eleventyConfig) {
|
||||
eleventyConfig.setInputDirectory("site-src");
|
||||
eleventyConfig.setLayoutsDirectory("layout");
|
||||
eleventyConfig.setTemplateFormats(["mdx", "njk"]);
|
||||
|
||||
eleventyConfig.addExtension("mdx", {
|
||||
compile: async (str, inputPath) => {
|
||||
const { default: mdxContent } = await evaluate(str, {
|
||||
|
|
@ -30,7 +34,5 @@ export default function (eleventyConfig) {
|
|||
eleventyConfig.addPassthroughCopy("site-src/*.png");
|
||||
eleventyConfig.addPassthroughCopy("site-src/**/*.html");
|
||||
|
||||
eleventyConfig.setLayoutsDirectory("layout");
|
||||
|
||||
eleventyConfig.addGlobalData("layout", "page.njk");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,13 +8,11 @@
|
|||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
self-pkgs = self.packages.${system};
|
||||
|
||||
default-flags = ["--formats=mdx" "--input=site-src"];
|
||||
eleventy-shortcut = { name, args ? [] }: pkgs.writeShellApplication {
|
||||
inherit name;
|
||||
|
||||
text = ''
|
||||
npx @11ty/eleventy \
|
||||
${pkgs.lib.escapeShellArgs default-flags} \
|
||||
${pkgs.lib.escapeShellArgs args} \
|
||||
"$@"
|
||||
'';
|
||||
|
|
|
|||
Loading…
Reference in a new issue