This website was created using the Hugo static site generator.
These are the steps I followed to create a GitHub repository and setup my website using Hugo:
-
From a macOS terminal I installed Hugo using Homebrew and then setup a basic Hugo website with my fork of the beautifulhugo theme by running:
brew install hugo hugo new site jvincent-website cd jvincent-website git init git-secrets --install git submodule add https://github.com/jvincentnz/beautifulhugo.git themes/beautifulhugo
-
Create a
.gitignore
file to have the following content:# macOS Internals .DS_Store # Website content generated by Hugo build /public # Hugo Build Lock file .hugo_build.lock
-
Create a
README.md
file to describe the GitHub repository. -
Create a
LICENSE.txt
file for the GitHub repository. -
Edit the
config.toml
file to have the following content:baseURL = "https://jeremyvincent.com/" languageCode = "en" title = "Jeremy Vincent's Website" theme = "beautifulhugo" pygmentsUseClasses = true pygmentsCodeFences = true pygmentsCodefencesGuessSyntax = true #pygmentsStyle = "monokai" #pygmentsUseClassic = true #pygmentOptions = "linenos=inline" #disqusShortname = "XXX" #googleAnalytics = "XXX" enableGitInfo = true [Params] commit = "https://github.com/jvincentnz/jvincent-website/tree/" # homeTitle = "Beautiful Hugo Theme" # Set a different text for the header on the home page # subtitle = "Build a beautiful and simple website in minutes" mainSections = ["post","posts"] # logo = "img/avatar-icon.png" # Expecting square dimensions # favicon = "img/favicon.ico" # dateFormat = "January 1, 2020" # commit = false rss = true # comments = true readingTime = true wordCount = true useHLJS = false socialShare = true # delayDisqus = true showRelatedPosts = true # hideAuthor = true # gcse = "012345678901234567890:abcdefghijk" # Get your code from google.com/cse. Make sure to go to "Look and Feel" and change Layout to "Full Width" and Theme to "Classic" [Author] name = "Jeremy Vincent" website = "https://jeremyvincent.com/" email = "jeremy.vincent@gmail.com" facebook = "jeremy.vincent.129794" github = "jvincentnz" #gitlab = "username" #bitbucket = "username" twitter = "jvincentnz" linkedin = "vincentjeremy" [permalinks] posts = "/:year/:month/:title/"
-
Run the following from a macOS terminal to Generate Syntax Highlighter CSS for Chroma using Hugo with the
monokai
style:mkdir static/css hugo gen chromastyles --style=monokai > static/css/syntax.css
-
Create the first post by running the following from a macOS terminal:
hugo new posts/my-first-post.md
-
Edit
posts/my-first-post.md
with your first post content using a Markdown editor! -
Test your new static website on your local computer by running the following from the macOS terminal to start the Hugo webserver with draft content enabled:
hugo server -D
-
And then browse to
http://localhost:1313/
in your web browser. -
After you have finished testing your website, press
Control-C
to stop the Hugo webserver. -
Update the
draft: true
field in your first postposts/my-first-post.md
file to bedraft: false
so it will be published when runninghugo
without the draft content enabled option:--- title: "My First Post" date: 2020-04-11T15:01:31+12:00 draft: false ---
-
Commit your website content to your GitHub repository by running the following from the macOS terminal:
git add . git commit -m "Initial commit" git remote add origin https://github.com/jvincentnz/jvincent-website.git git push -u origin master
-
Create the static website content in the
public/
directory by running the following from the macOS terminal:
NOTE: Only content marked non-draft will be generated.hugo
-
Now you can publish your static website from the
public/
directory to your S3 website enabled bucket.