Quick Start - Get Hugonews Up and Running
Let’s get started.
Installation
Navigate to the root of your Hugo project. Then, pull in Hugonews as a git submodule:
git submodule add https://github.com/hugmouse/hugonews.git themes/hugonews
Next, tell Hugo to use Hugonews. Open your config.toml
(or hugo.toml
) and add this line:
theme = "hugonews"
Basic Configuration: Menus
Want to add more sections to navigation menu? Head to the menu.main
section in your config.toml
and add your new
sections. For example:
[[menus.main]]
name = 'News'
pageRef = '/'
weight = 10
[[menus.main]]
name = 'Posts'
pageRef = '/posts'
weight = 20
[[menus.main]]
name = 'Tags'
pageRef = '/tags'
weight = 30
Adjust the name
, pageRef
(the path to your content), and weight
(for ordering) to fit your site’s structure.
Adding a Description to a Section Page
Let’s say you’ve got a “Posts” section in the menu. To add a brief description that appears on its page, create a file
named _index.md
inside your content/posts/
directory. Then, add your content like this:
+++
title = 'Posts'
date = 2023-01-01T08:30:00-07:00
draft = false
+++
This is the posts page!
That’s the essentials to get Hugonews running! Explore the theme’s structure and Hugo’s documentation for more advanced customizations.