Skip to content

Latest commit

History

History
137 lines (92 loc) 路 2.83 KB

index.mdx

File metadata and controls

137 lines (92 loc) 路 2.83 KB

import { Callout } from 'nextra/components'

Quick Start

I assume you have already been browsed Hugo Docs, 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 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/ for more details.

Social Comments

Dream now use Disqus 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/ 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鈥檛 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.