Contents

Build Your Own Blog Website in 10 Minutes

Series - Blog Tutorial

Hugo is one of the most popular open-source static site generators. Users can quickly build their own websites using Hugo.

On a Mac, you can use the following command to install Hugo:

brew install hugo

install

After installation, you can check if it’s installed properly using hugo version: hugo_version

Once Hugo is installed, you can use it to create your own blog website. Use hugo new site my-blog to create a site named my-blog. new-blog-site After running this command, a directory named my-blog will be created in the current directory. Then, navigate into that directory and initialize it with git.

cd my-blog
git init

After creating the website, you need to choose a theme. There are many themes available for selection: hugo themes Here, I am choosing the hugo-theme-even theme. At this point, it needs to be added as a submodule under themes/even.

git submodule add https://github.com/olOwOlo/hugo-theme-even.git themes/even

pick-theme After that, copy themes/even/exampleSite/config.toml to the current directory and overwrite hugo.toml

cp themes/even/exampleSite/config.toml hugo.toml

2.4 Create a Blog Post

Once the theme is configured, you can create your own blog post. Use hugo new content/content/post/my-first-post.md to create a blog post. You can see that a new md file will appear under content/post/ after executing this command. my-first-blog

Once the previous configurations are done, you can start a Hugo server using hugo server. Click the link to access the blog website address. At this point, you will notice that the previously created blog does not appear; the reason is that the blog created earlier is set as draft, and it will not be displayed in hugo server mode. To show it, you need to use hugo server -D.

With this, you can complete the setup of your blog website.

  • Log in to GitHub and create a new repository (e.g., heyjude-blog).
  • Add the local repository as a remote:
git remote add origin https://github.com/yourusername/myblog.git
git push

This way, you can save your blog to GitHub.

Reference Links

  1. https://gohugo.io/getting-started/quick-start/
  2. https://github.com/olOwOlo/hugo-theme-even
  3. https://medium.com/@magstherdev/hugo-in-10-minutes-2dc4ac70ee11

Related Content