Skip to content

Template repository with Hugo, Netlify and Netlify CMS

Notifications You must be signed in to change notification settings

demshy/hugo-template

 
 

Repository files navigation

Netlify Status

Hugo Template

Template project for sites built with Hugo, Decap, and Netlify

Installing

You need Hugo installed on your machine: https://gohugo.io/getting-started/quick-start/

This repository is set up to be developed with Visual Studio Code editor. Please install reccommended extensions listed in extensions.json

If this is your first time running the project, run

npm install and npx husky install

When you have that run one of these commands for local dev server:

hugo server or npm run dev

and open your local site on http://localhost:1313/

Development

We use BEM naming convention for CSS class names.

We follow the standard Javascript style.

Linters

There are 3 linters set up:

If quick fixes are possible, VS Code will fix them on save. A pre-commit git hook is also in place. It triggers all 3 linters on staged files, and if there are errors, it prevents the commit.

Deployment

To deploy to production, push to main branch

Development URL

There is no development URL out of the box. To create this environment, follow these steps:

  1. create branch develop
  2. Go to Netlify dashboard -> your site -> Settings -> Build & deploy -> Deploy contexts -> Edit settings
  3. Under Branch deploys select Let me add individual branches and add develop
  4. push some code to develop branch and see it on https://develop--hugo-template.netlify.app

Additional setup

These configurations are optional based on the demands of your project.

Configure Github Actions

See How to Configure Github Actions on a Site.

Configure Decap CMS + Netlify Identity

See How to enable Netlify Identity for Decap CMS on a site.

Enable Netlify Large Media

See (How to Enable Netlify Large Media on a Project)[https://github.com/poslovnimediji/knowledgebase/wiki/How-to-Enable-Netlify-Large-Media-on-a-Project]

Built With

About

Template repository with Hugo, Netlify and Netlify CMS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • SCSS 44.0%
  • HTML 34.3%
  • JavaScript 15.2%
  • Shell 6.5%