How This Blog Come Into Place

Posted on Mar 29, 2024
tl;dr: yet another blog setup guide

What if you need a blog

  • my choice is HUGO
    • write blog(s) at local
      • brew install hugo or else, smoke test hugo version
      • find a place to init your blog hugo new site ${your_blog_name}, then cd into it
      • let Git be in charge of your blog history git init
      • create .gitignore and add public which built content stored within
      • find a theme you like, I like archie and download it
        • git submodule add https://github.com/athul/archie.git themes/archie
      • touch hugo.toml to config: see
        • theme echo "theme = 'archie'" >> hugo.toml
        • light & dark mode
        • subtitle of your blog
        • blabla …
      • checkout our blog at local hugo server
      • all blogs stored in “content/posts” directory
        • create blog with date comes in place via cli hugo new content posts/${name-for-your-post}.md with date
        • write down your thought
    • upload to Github
      • create a Github repo, matching against ${your_GH_name}.github.io
      • push to Github
        • git remote add origin git@github.com:${your_GH_name}/${your_GH_name}.github.io.git
        • git branch -M main
        • git push -u origin main
      • add workflow
        • goto https://github.com/${your_GH_name}/${your_GH_name}.github.io/settings/pages’s Build and deployment section, select source as Github Actions
      • create .github/workflows/hugo.yaml with content from hosting & deploy on Github’s Step 6
      • commit hugo.yaml with msg “add workflow”
    • add disqus
      • find your Disqus shortname at https://${your_disqus_account}.disqus.com/admin/settings/general/
      • add disqusShortname = ${yourDisqusShortname} to hugo.toml

references

comments powered by Disqus