It’s so easy!
All you have to do is know everything about Hugo and the various ways it can be abused!
Fork us
On github, create a fork of https://github.com/SysManSquad/sysmansquadblogdev
, replace the URL below with the correct URL for your fork:
Be sure and run the git commands below before running a hugo server or it will cause you all kinds of trouble.
This will download the site code and theme to your computer.
Use Hugo to preview your work
If you want to see your post in Hugo before submitting you’ll need Hugo installed. Follow these steps:
As an administrator, in powershell:
This installs the chocolatey software manager and the hugo server to your machine.
To Launch Website Locally
Run this command from the root of your sysmansquadblogdev folder, replacing the path below
|
|
Hugo will give you a URL to use to view the site as you make changes. Open this link in your browser and leave Hugo running in the background.
Adding an author
Add the author json file
- From the main repo, under data/authors, copy an existing json file and name it the same as the stub you’ll use in your post files
- Adjust the existing fields to match your information
name
is either your legal first name, full name, or your handlestub
is a lowercase, no spaces word you’ll use in the metadata of your postrole
is “Contributor” in almost every casedisplay
is “true”bio
is a short line of text you’d like to use for introducing yourself to strangers- The social section typically will include linkedin, but it supports a couple of other options that I can’t remember offhand
Create the author folder
- Copy an existing folder under
authors/
, rename it to match your stub and replaceavatar.png
with your own. - Edit index.md and change the title to match your stub
Create your first post (or second, or whatever - I’m not your mom)
- Create a folder under content/posts with the format
YYYY-MM-DD-a-few-words-from-the-title
- Create an
index.md
file with this content at the top, followed by normal markdown syntax:
- The author must be a case sensitive match for the stub you chose
Conclusion
Super easy right?
Aaron Glenn Admin/Mentor
Aaron is a Sr. Systems Administrator from Tulsa, specializing in Microsoft technologies, with an emphasis on powershell.