/thomjiji.github.io

Personal website.

Primary LanguageCSS

Publishing Process

  1. After making any changes (such as adding new posts, adjusting styles, etc.), first perform a commit.

    git commit -m ""
  2. Next, build the entire site with the new changes. The static site will be built into the docs/ directory (for the GitHub page). Hugo default is public/.

    hugo -D

    -D flag means build with drafts.

  3. Finally, commit once more to upload the built static site to GitHub.

    git commit -m "build"

Serve localhost

hugo server -D

Add new post

hugo new posts/new_post.md

Clean up before rebuild

Hugo will not automatically clean up static site in the docs/ directory for you, so every time you rebuild, the new content will be mixed with the old content. Although it rarely causes conflicts, it is better to run before rebuilding: rm -rf docs/* — with cautious!

See this issue: 'hugo clean'

Link to post itself

Use the post's slug:

[Link to post]({{< ref "/posts/post-slug/" >}})

[Link to post](/posts/post-slug/)

Link to a specific heading or paragraph

## My Header {#my-header}

Some paragraph here. {#custom-para}
[Header](/posts/post/#my-header)

[Paragraph](/posts/post/#custom-para)