Skip to content

Instantly share code, notes, and snippets.

@onezerodigits
Last active January 15, 2018 04:17
Show Gist options
  • Save onezerodigits/03c61613663bc1b9eae9cff30f80675b to your computer and use it in GitHub Desktop.
Save onezerodigits/03c61613663bc1b9eae9cff30f80675b to your computer and use it in GitHub Desktop.
Really simple asset management with Eleventy
Add a folder called _assets/ to put all the files you'll reference (use subfolders if you like).
Setup npm with "npm init" if you don't already have a package.json and add the scripts section in the other file of this gist.
Run "npm start" to both copy over the assets and start up eleventy (re-run if you add assets).
{
"scripts": {
"start": "mkdir -p _site/ && cp -R _assets _site/ && eleventy --watch"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment