Overview
Ananke is a theme for Hugo, a framework for building websites. The purpose of this theme is to provide a solid starting point for Hugo sites with basic features, while also incorporating best practices for performance, accessibility, and rapid development.
Features
- Responsive design
- Accessibility features
- Contact form
- Custom robots.txt file that changes values based on environment
- Internal templates for meta data, Google Analytics, and Disqus or Commento comments
- RSS discovery
- Table of Contents (must declare toc: true in post parameter)
- Stackbit configuration
- Examples of Hugo features or functions:
- Pagination (internal template)
- Taxonomies
- Archetypes
- Custom shortcode
- Related content
- Hugo built-in menu
- i18n with HUGO_ENV
- First and last sorts
- Site Language
- Conditional statements
- Greater than or equal to (ge) comparisons
- Use of Site.Params.mainSections to avoid hard-coding section names
Installation
As a Hugo Module (recommended)
- Check if Go is installed on your machine by running:
go version
. If Go is not installed, download it from the official Go website. - In your project’s root directory, initiate the Hugo module system if you haven’t already:
hugo mod init
. - Add the theme’s repository to your config.toml file:
[module] [[module.imports]] path = "github.com/theNewDynamic/gohugo-theme-ananke"
- Run
hugo mod get -u
to download the theme.
As Git Submodule
- Inside the folder of your Hugo site, run the following command:
git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke
- Update your config.toml file to include:
theme = "ananke"
.
For more detailed information, refer to the official setup guide of Hugo.
Summary
Ananke is a Hugo theme designed to provide a solid foundation for building websites. It incorporates best practices for performance, accessibility, and rapid development. The theme offers a range of features, including responsive design, accessibility enhancements, a contact form, pre-built templates for meta data, Google Analytics, and comments, and support for various Hugo features and functions. Installation can be done as a Hugo Module or as a Git Submodule, depending on your preference.