Onion screenshot

Onion

Author Avatar Theme by Arty2
Updated: 14 Feb 2025
18 Stars

An experimental Hugo theme.

Categories

Overview

The Onion theme is an experimental theme designed for the Hugo static site generator. It is currently under construction and may experience major breaking changes between versions. The theme follows several design principles, including being plug-and-play, using progressive enhancement with vanilla JavaScript libraries, providing graceful degradation for older browsers, and being multilingual and mobile-first. It also respects the user’s system preferences for light/dark themes and reduced motion. Privacy is also a key consideration, with no cookies required. The theme offers extensive display options for posts, detailed metadata display, and various additional features such as sidenotes, a “gadget” column, customizable CSS and JavaScript, and social media integration.

Features

  • Extensive display options for posts
  • Detailed and extensible page and post metadata display
  • Automatic Table of Contents for lengthy posts
  • Sidenotes (marginalia)
  • “Gadget” column with various features
  • Abbreviations and external links display tooltips
  • Themable with CSS variables
  • Three font options
  • Lazy menus
  • “Hero” and listing images
  • Additional post types: preformatted
  • Full content RSS feed
  • Archives template grouped by year
  • Privacy-first social sharing
  • Syntax highlighting
  • Customizable CSS and JavaScript per page
  • Social media icons in footer
  • Open Graph and Twitter metadata
  • Image gallery
  • Disqus comments
  • Google Analytics integration
  • Microformats friendly

Installation

To install the Onion theme, follow these steps:

  1. Download the latest version of the theme from the official repository.
  2. Navigate to your Hugo project’s root directory.
  3. Create a new folder called themes if it doesn’t already exist.
  4. Extract the downloaded theme folder into the themes directory.
  5. Open your site’s config.yaml file.
  6. Add the following line to the file: theme: onion.
  7. Save the file and run your Hugo server.

Summary

The Onion theme for the Hugo static site generator is an experimental theme that offers extensive features and customization options. It follows various design principles, with a focus on plug-and-play functionality, progressive enhancement, and privacy by design. The theme is still under development and may undergo major changes between versions. Overall, it provides a modern and versatile design for static sites.