Basic git flow with Hugo

Posted by Mark

This is a basic Git and Hugo flow, arguably there is always the discussion on the use of git pull rather than fetch and merge. However lets keep it straight forward.

  1. Ensure you are in the correct directory in Terminal within Visual Studio Code
  2. Run ‘git pull’ to refresh local repository
  3. Add new content either by adding the file in the Content/Post directory or via Hugo. Images go in the static/img directory (tidy up file names and filesizes). Make sure your filename for the new page ends in .md
  4. To preview your new page run ‘hugo serve’ this runs the site on localhost
  5. Once happy run git status to view pending changes
  6. Either add the changes one by one using ‘git add [filename]’ or ‘git add –all’ (thats 2 dashes before all)
  7. Commit the changes using ‘git commit -m “some descriptive text”’
  8. Push the changes to remote git repository using ‘git push’

Basic MarkDown syntax guide

Basic MarkDown Syntax