Setting up Eureka

2022-02-06
2 min read

Hugo Themes | Eureka

Getting Started

Preview

Use the following command to preview the project in the browser:

hugo server

http://localhost:1313/docs/log/log/

Drafts will not be deployed by Hugo, so you need to set the draft property of the content header to false or use hugo server -D to preview the website. If you are not familiar with the basic usage of Hugo or want to know more about Hugo, you can refer to Hugo Basic Usage.

Add Content

After installing Eureka, you can start adding content to the website.

  • You can manually create files and add information in the content folder.
  • At the same time, you can also use hugo new to complete the above content for you.

Add a default type of content to the project:

hugo new posts/hello-world.md

This will help you generate a file with the following content in the content/post folder.

This will help you generate a file with the following content in the content/post folder.

post
---
title: Hello World
description:
toc: true
authors: []
tags: []
categories: []
series: []
date: '2020-10-20T10:30:48+08:00'
lastmod: '2020-10-20T10:30:48+08:00'
featuredImage: ''
draft: false
---

Eureka also provides you with other types of templates, you can specify the type with -k KIND:

hugo new -k authors authors/new-author

This will generate author-type content in the content/authors folder. For all content types provided by Eureka, please refer to archetypes.

Generate Site

To generate a site, you need to:

hugo

Similar to hugo server, hugo will not generate draft content. The generated web page is located in the public folder.