Skip to content

Instantly share code, notes, and snippets.

@mattstratton
Last active January 5, 2017 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattstratton/0ab5025e2aac6f2e257217435cf2b0c0 to your computer and use it in GitHub Desktop.
Save mattstratton/0ab5025e2aac6f2e257217435cf2b0c0 to your computer and use it in GitHub Desktop.
Wacky gulp asset pipeline using hugo and netlify and contributors without npm and gulp

Criteria

Be able to process the assets for a hugo based website using gulp, and serve them via Netlify. Contributors to the content of this site cannot be assumed to have anything installed locally besides the hugo binary.

Proposed Approach

File structure of main repo

.
+-- content
+-- data
+-- static
+-- themes
+-- gulpfile.js
+-- package.json

Local development process

Contributors will work with the local repo setup as usual, and pay no attention to the gulpfile or package.json files. They will use the hugo server -w setting as usual for local testing.

Build Pipeline

A build script will be set for Netlify that will do the following things:

  • build the static files to public as usual using the hugo command
  • run gulp tasks against all the generated files in the public directory but with an output of dist The output directory for Netlify will be dist

Please comment on this gist with anything you see that looks like I am missing something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment