-
-
Save zachleat/5b5ae0ddadbeba6169f18e5b4aa58a66 to your computer and use it in GitHub Desktop.
Using Eleventy Programmatically
This file contains hidden or 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
| const Eleventy = require("@11ty/eleventy"); | |
| (async function() { | |
| let inst = new Eleventy(); | |
| await inst.init(); | |
| await inst.write(); | |
| })(); |
Author
Thanks. This does work:
const Eleventy = require("@11ty/eleventy");
(async function() {
let inst = new Eleventy(".", "./_site");
await inst.init();
await inst.write();
})();
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I’m don’t remember the context of this gist but 11ty/eleventy#1629 (comment) might be a better bet. Couple of things:
new Eleventy(input, output);are required