A starter kit for creating a homepage static website with Hugo framework. You can use it as a starting point for development different kinds of page templates, which are allowed in the Hugo (e.g. for a static blog). Please see the Hugo documentation for more info.
For managing the assets (css
, javascript
, etc) this template is using a Brunch building tool. It's fast tool, simple to configure and expand.
Please note At the current moment this project probably can have some incompatible package cases related to the Brunch building tool (as this tool and its plugins weren't actively maintained by developers at least half of year). In general this boilerplate is working, but in some partial cases you need to find the solutions if you will customize it for fit your needs.
Feel free to expand the abilities of this template to fit your requirements. Also please note by using this project you understand the implications and guarantees of the MIT license.
Before start you already need to have these applications on aboard:
Install all dependencies by running this command inside a project folder:
$ npm install
Build assets with Brunch and Hugo, start a development server:
$ npm start
The application will be available at the http://localhost:3333
link in your browser.
All changes in the src/
and site/
folders will be synced and displayed in browser automatically.
To build the application for production use this command:
$ npm run build
All created files will be available in the public/
folder of project.
To build the application like for production, but with some restrictions use the command:
$ npm run preview
A website will be generated by applying almost all production features, except:
- all draft pages are included;
- the Google Analytics code is absent on the pages;
- all pages have the rules for prevent of indexing by search engines if you deploy website on a hosting for the testing reasons;
- the
robots.txt
file has a rule for prevent of indexing a whole website.
All above restrictions will be applied for the development mode also, except the assets (js
, css
) optimization and minification.
You can find the files of website in the public/
folder as always.
Your markdown file (in content/
folder) needs to be not a draft for including its content into a website template. Change the draft
value to false
inside a certain page for publishing its content:
draft: false
All website pages contain the noindex
and nofollow
values in the meta tags when website was generated in the development or preview mode. Also the Google Analytics is absent on a page and the robots.txt
file has an option for prevention of indexing by search engines.
When you will be ready to share your website with a world please run the build of application in the production mode.
You can move the generated website from the public/
folder to on any type of a hosting provider for the static files. One of an option for the simplest and fastest deploying your site is using the Netlify service. Besides the Netlify provide a great service with a lot of features for free and your website will never slow down the speed of loading for a webpage when deliver it to your users. The instructions for the deploying to Netlify below.
- Push your clone to your own GitHub repository.
- Create a new site on Netlify and link the repository.
Now Netlify will build and deploy your site whenever you push to git.
You can also click this button:
MIT © Sergey Furtak