Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Gruntfile for working with Hugo
module.exports = function(grunt) {
shell: {
options: {
stdout: true
server: {
command: 'hugo server --theme=redlounge --buildDrafts --watch'
build: {
command: 'hugo -d build/ --theme=redlounge'
deploy: {
command: 'rsync -az --force --progress -e "ssh" build/'
open: {
devserver: {
path: 'http://localhost:1313'
live: {
path: ''
grunt.registerTask('dev', ['open:devserver', 'shell:server']);
grunt.registerTask('build', ['shell:build']);
grunt.registerTask('deploy', ['shell:build', 'shell:deploy', 'open:live']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment