Skip to content

Instantly share code, notes, and snippets.

@zachleat
Created August 29, 2019 16:43
Show Gist options
  • Select an option

  • Save zachleat/5b5ae0ddadbeba6169f18e5b4aa58a66 to your computer and use it in GitHub Desktop.

Select an option

Save zachleat/5b5ae0ddadbeba6169f18e5b4aa58a66 to your computer and use it in GitHub Desktop.
Using Eleventy Programmatically
const Eleventy = require("@11ty/eleventy");
(async function() {
let inst = new Eleventy();
await inst.init();
await inst.write();
})();
@ki9us
Copy link

ki9us commented Dec 15, 2021

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