By Jason Yao.
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.
brew install hugo
Run dev site
# Runs on http://localhost:1313/.
hugo server -D
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
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
# 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
We use Google analytics here, which is spread out over 2 main consoles:
To disable commenting on a specific post,
just add comments: false
to the post's
front matter.
This repo is released under the GNU GPL v3 license, a copy of which may be found here.