Quick Start

Quick Start

⚠️

Since Hugo Theme Dream 3.0 has been released, 2.x is no longer maintained.

You can still find the 2.x code in the v2 branch (opens in a new tab).

I assume you have already been browsed Hugo Docs (opens in a new tab), if you want to use this theme, the docs will help you to understand the configurations.

First, add i18n Support

Open hugo.toml and write:

defaultContentLanguage = "en"

View the i18n folder for more details.

Website Analytics

Dream support Google Analytics (opens in a new tab) for website analytics.

In hugo.toml, set:

[services]
[services.googleAnalytics]
ID = '...'
 
⚠️

You may have used googleAnalytics = "..." before. This is deprecated in Hugo 0.120.0.

Please upgrade to the new configuration. See https://gohugo.io/methods/site/googleanalytics/ (opens in a new tab) for more details.

Social Comments

Dream now use Disqus (opens in a new tab) for social comments.

In hugo.toml, set:

[services]
[services.disqus]
shortname = "..."
⚠️

You may have used disqusShortname = "..." before. This is deprecated in Hugo 0.120.0.

Please upgrade to the new configuration. See https://gohugo.io/methods/site/disqusshortname/ (opens in a new tab) for more details.

Add "About Me"

Type in your terminal:

hugo new about/me.md

Write somethings about you:

---
title: About Me
---
 
Hi, my name is Yue Yang.
 
This is my blog.

Then create an index.md in the about folder and put below contents into it:

---
headless: true
---

Finally, click the button on the top left corner of the page. You will see what you just wrote.

OK, write a post for your blog

All of your posts must in the content/posts folder.

You can generate it by:

hugo new posts/articleTitle.md

By default, the new md file's template will contain:

---
title: {{ replace .TranslationBaseName "-" " " | title }}
date: {{ .Date }}
lastmod: {{ .Date }}
author: Author Name
# avatar: /img/author.jpg
# authorlink: https://author.site
cover: /img/cover.jpg
categories:
  - category1
tags:
  - tag1
  - tag2
draft: true
---
 
Cut out summary from your post content here.
 
<!--more-->
 
The remaining content of your post.

You only need to change author, cover, categories and tags fields, the others will generate automatically.

  • author: Your name
  • cover: Current post's image, for quick start, now you can delete this line, because the theme has been placed some default images for posts.
  • categories and tags: if you haven’t thought about it, you can ignore them for now.

At last, remove draft: true and run hugo to generate your site.

If your want to have a preview in editing, run:

hugo server -D

in your blog folder, the -D represent to build draft posts.

End

View more details and configurations on the left sidebar.