Information Technology Grimoire

Version .0.0.1

IT Notes from various projects because I forget, and hopefully they help you too.

Hugo New Project Creation

Create a New Hugo Project

I keep all of my sites in a specific directory, so I change to that directory and start the process. Assume you wanted to create a project and have all of the files in the test.grimoire folder.

hugo new site test.grimoire
cd test.grimoire

Starting Server

The default port is 1313 on your localhost http://localhost:1313, but you can specify the port. This is the actual command I use to start my local server:

hugo server --noHTTPCache --disableFastRender --port=13111 

You could also run 2 instances of hugo at the same time, on different ports this way.

Get Started Editing

You can start copying files into /content and /static and depending on your theme, if you installed one, the content should just appear as long as the hugo server is running.

Hugo Themes

You probably want to look at hugo themes next.

Building Static Files

If you run the hugo command without any options, while in the root of your hugo projec, it will build all of the static files you need. You can then upload the “public” folder to your server and it’s an instant website, static.

Free Way to Host

Uploading your static files from public is not what we recommend. We connect our hugo project to github and then connect github to netlify so I have a site that I edit locally, then upload the markdown and other files to github. Netlify scoops up the raw info, and builds on their servers. From there, they serve it on a CDN. This way I have free hosting.

This has the added benefit of revision control on the source files, backed up on github.

Local Wiki Variant

If you do not ever upload your public folder, or do not connect netlify to your github account, and make your github account private, you can still view the local copy. I use a variation like this for my local, private wiki and still get a github revision control.