Creating a blog with static websites is very easy.
This is particularly easy if you are familiar with markdown and use tools like Obsidian. All you need to do is leverage a tool like DigitalOcean to deploy a Hugo template.
With this template, a foundation for a blog is available for you to modify yourself.
Let’s do it!
Getting up to Speed with Hugo
- Find a theme.
hugo new site <name-of-site>
cd <name-of-site>
git submodule add --depth=1 https://github.com/{GITHUB_THEME_USER}/{GITHUB_THEME}.git themes/{GITHUB_THEME}
- Example:
git submodule add --depth=1 https://github.com/adityatelange/hugo-PaperMod.git themes/PaperMod
- Example:
- Ensure that you have updated the parameters of your
config.toml
theme = PaperMod
- Run the app
hugo server
Push to Git
# Create a new repository on the command line
touch README.md
git init
git add README.md
git commit -m "init commit"
git remote add origin https://github.com/{user}/{repository}.git
git push -u origin main
# Push an existing repository from the command line
git remote add origin https://github.com/{user}/{repository}.git
git push -u origin main
Add A Post
- Run the command:
hugo new post/<name-of-post>.md
- Open in Obsidian
- Write your post!
- Push to Git
Leverage DigitalOcean to Deploy
- Create or sign into a DigitalOcean account
- Navigate to Manage ➡️ Apps ➡️ Create App
- Select your Github Provider
- Select the repository
- DigitalOcean will automatically recognize the app is a Hugo app
- Select Next ➡️ Skip to Review
- Ensure the Routes value is
/
- Select Create Resources
- The app will now deploy to a DigitalOcean Url
Conclusion
With that, we can have an easy, markdown-driven blog that is completely free.