All Projects → csuarez → hugo-gulp-template

csuarez / hugo-gulp-template

Licence: other
Enhanced template for Hugo projects

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to hugo-gulp-template

Hugo theme pickles
Modern, Simple and beautiful Hugo theme
Stars: ✭ 168 (+500%)
Mutual labels:  gulp, static-site-generator, hugo
trailing-slash-guide
Understand and fix your static website trailing slash issues!
Stars: ✭ 255 (+810.71%)
Mutual labels:  static-site-generator, hugo
tomanistor.com
Personal portfolio website and blog created with Hugo
Stars: ✭ 14 (-50%)
Mutual labels:  gulp, hugo
hugo-minimalist-theme
Port of Raphael Riegger's Minimalistic Ghost theme to Hugo.
Stars: ✭ 25 (-10.71%)
Mutual labels:  static-site-generator, hugo
hugofy-vscode
Hugofy is a plugin for Visual Studio Code to make life easier to use Hugo static site generator
Stars: ✭ 27 (-3.57%)
Mutual labels:  static-site-generator, hugo
persian-hugo
Persian is a box design personal blog theme based on Bootstrap and powered by Hugo. It is very responsive and perfectly fits on any sized screen device.
Stars: ✭ 32 (+14.29%)
Mutual labels:  static-site-generator, hugo
timer-hugo
Timer is a personal portfolio theme powered by Hugo. It also can be use as a landing page theme.
Stars: ✭ 123 (+339.29%)
Mutual labels:  static-site-generator, hugo
twenty-twenty-hugo
Twenty Twenty Hugo is forked from WordPress Twenty Twenty theme. It's fully functional like the WordPress theme.
Stars: ✭ 48 (+71.43%)
Mutual labels:  static-site-generator, hugo
HugoStructuredData
Collection of structured data snippets in Google preferred JSON-LD format, with support for Hugo
Stars: ✭ 33 (+17.86%)
Mutual labels:  hugo, hugo-boilerplate
hugo-initio
Hugo Theme port of Initio bootstrap template by GetTemplate
Stars: ✭ 58 (+107.14%)
Mutual labels:  static-site-generator, hugo
electron-angular-ngrx
An Angular (6x) Electron seed featuring @angular/cli, @ngrx/platform, and Typescript. Complete with HMR workflow
Stars: ✭ 39 (+39.29%)
Mutual labels:  gulp, livereload
contentful-hugo
A CLI tool that pulls data from Contentful and turns it into markdown files for Hugo and other static site generators. It also includes an express server that can be used for local development and content previews
Stars: ✭ 31 (+10.71%)
Mutual labels:  static-site-generator, hugo
neofeed-theme
A personal feed for Neocities, GitHub Pages, or anywhere else, built with Hugo. #IndieWeb friendly and all yours. It's better than Twitter.
Stars: ✭ 62 (+121.43%)
Mutual labels:  static-site-generator, hugo
bymattlee-11ty-starter
A starter boilerplate powered by 11ty, Sanity, Gulp, Tailwind CSS, rollup.js, Alpine.js and Highway.
Stars: ✭ 27 (-3.57%)
Mutual labels:  gulp, static-site-generator
liva-hugo
Liva is a personal blog template powered by Hugo.
Stars: ✭ 192 (+585.71%)
Mutual labels:  static-site-generator, hugo
contentful-export
Extract Contentful to Hugo
Stars: ✭ 22 (-21.43%)
Mutual labels:  static-site-generator, hugo
generator-veams
Scaffold modern frontend web apps or web pages with a static site generator (Assemble or Mangony), Grunt and/or Gulp, Sass and Bower. Use modern frameworks like Bourbon, Bootstrap or Foundation and structure your JavaScript with ES Harmony support.
Stars: ✭ 45 (+60.71%)
Mutual labels:  gulp, static-site-generator
hugy
Hugy is an Electron desktop app acting as a GUI for the Hugo static site generator.
Stars: ✭ 44 (+57.14%)
Mutual labels:  static-site-generator, hugo
potato-dark
Dark and elegant blog theme for goHugo static site generator.
Stars: ✭ 21 (-25%)
Mutual labels:  static-site-generator, hugo
navigator-hugo
Navigator Business theme powered by Hugo. It also could be used for a personal portfolio.
Stars: ✭ 133 (+375%)
Mutual labels:  static-site-generator, hugo

hugo-gulp-template

What is this?

This is a template for Hugo projects. Hugo includes a CLI that serves to build projects, but it is a little bit limited when you want to compile and process your assets. This template enhances the standard Hugo workflow adding the following features:

  • Compilation of SCSS source code.
  • Minification for scripts, stylesheets and HTML code.
  • Uglification for scripts.
  • Addition of hashes to assets for cache-busting.
  • Optimization of images.
  • Server with LiveReload support.
  • Better management of the configuration, with separated environments.

How to install it?

First of all, you need to have installed hugo, npm and gulp. In order to use it, you have to install its dependencies, by executing the following command in the template root folder:

$ npm install

And that's all!

About the folder structure

This template adds two additional folders to an Hugo project:

  • /stylesheets: Where you have to put your SCSS files. After the web building, the compiled files will be in /public/css.

  • /scripts: Where you have to put your Javascript files. After the web building, the compiled files will be in /public/js.

How to build the web

In the root folder you have to execute:

$ gulp build

This will generate the web, compile the SCSS code, minify all the code, optimize the images, uglify the Javascript and prepare the names of the assets for cache-busting and replace them in the HTML code. The result will be in the /public folder as a normal Hugo project.

How to run the server

In the root folder you have to execute:

$ gulp serve

This will run a server in the 6789 port, with LiveReload support. Every time when the web or the assets change, the web will be rebuilt and reloaded in your browser.

How to configure the project

By default, Hugo only uses one configuration file (config.toml) to define parameters like the base URL. When you are working in a real project, this parameters will be different between your development and your production environment. In order to manage this, this templates introduces two different configuration file: config.dev.toml and config.prod.toml.

This templates provides two commandos to swap between the production and the development configurations. To change to the development configuration:

$ gulp config-dev

To change to the production configuration:

$ gulp config-prod

By default, the server will use the development file always. It is strongly recommended to execute config-prod before the generation of a web which will be deployed in a production environment.

LICENSE

Copyright (c) 2016 César Suárez Ortega

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].