JasonYao / JasonYao.github.io

My personal site at jasonyao.com using Hugo
https://www.jasonyao.com
GNU General Public License v3.0
1 stars 0 forks source link
hugo

Personal Website | JasonYao.com

By Jason Yao.

if it's broken, it's all up to jebus now

This repo contains my personal site, which contains everything from articles and guides on technical subjects, to pseudo-philosophical ramblings on the mysteries of life, with a couple bio-hazards food recipes tossed in for variety.

Tools Used

TODO things to consider adding in later

Dependency Installation

brew install hugo

Usage

Local dev

Run dev site

# Runs on http://localhost:1313/.
hugo server -D

Create a new post

bin/new-post

# If you want to manually make a post, use this, but try
# to avoid since the helper script will generate posts with
# a timestamp prefix
hugo new posts/my-post-title.md

Viewing metadata

To view the metadata of the deployment (e.g. what's the current version of the site)

# In prod
curl https://www.jasonyao.com/metadata/deployment/index.json | jq '.'

# On local
curl localhost:1313/metadata/deployment/index.json | jq '.'

To view the metadata for all posts:

# In prod
curl https://www.jasonyao.com/posts/index.json | jq '.'

# On local
curl localhost:1313/posts/index.json | jq '.'

To view the metadata for a single post:

# Just add in a /index.json to the end of the post url, e.g. for prod
curl https://www.jasonyao.com/posts/2021/09/28/2021-tech-stack-migration-guide-domains/index.json | jq '.'

# On local
curl localhost:1313/posts/2021/09/28/2021-tech-stack-migration-guide-domains/index.json | jq '.'

To view the sitemap metadata:

# On prod
https://www.jasonyao.com/sitemap.xml

# On local
curl localhost:1313/sitemap.xml

Serving a world accessible version of local files via ngrok

# The --region=eu flag here is used to get around ngrok instances having issues,
# see https://github.com/inconshreveable/ngrok/issues/611#issuecomment-688796415
# for more information
ngrok http --region=eu 1313

Analytics

We use Google analytics here, which is spread out over 2 main consoles:

Notes

Commenting

To disable commenting on a specific post, just add comments: false to the post's front matter.

License

This repo is released under the GNU GPL v3 license, a copy of which may be found here.