A compilation of notes for making my personal website.

Outline

2 repos:

  1. One to hold hugo website config and markdown files
  2. One to hold staic content, GitHub pages

Making a new post

hugo new [name of post]

To view and host the website locally

hugo server

Then view it at localhost:1313

Building the actual website

hugo -t [name of theme]
cd public/
git add .
git commit -m "[message]"
git push

Content creation

Embedding an image using the static directory

https://stackoverflow.com/questions/71501256/how-to-insert-an-image-in-my-post-on-hugo

Put all images in the static/ directory then reference the image file with a leading slash ![image](/image.png)

Note: haven’t tried this way yet

Embedding an image using sub directories

https://github.com/gohugoio/hugo/issues/1240#issuecomment-753077529

Use sub directories to hold the markdown file and any related resources

  1. Create a directory post/here
  2. Move existing markdown file to post/here and rename it index.md
  3. Create a sub directory post/here/images and move images there
  4. Reference the image as ![image](images/image.png)