Hugo Theme Luna screenshot

Hugo Theme Luna

Author Avatar Theme by Ice hazymoon
Updated: 23 Apr 2025
288 Stars

A simple, performance-first, SEO-friendly Hugo theme / 一个轻量,快速,SEO 友好的 Hugo 主题

Categories

Overview

The Luna theme is a versatile and customizable theme for websites built with Hugo. It offers a range of features including dynamic import of JS modules, support for LaTeX and KaTeX, custom themes and fonts, carousels, dark mode, image galleries, article encryption, multilingual support, and more. The theme is designed to be performant and includes options for lazy loading images, local search using flexsearch, and integration with Twitter and GitHub pages. Luna also provides easy installation and deployment options for GitHub Pages, Netlify, Vercel, and Cloudflare Pages.

Features

  • Dynamic import of JS modules
  • Support for LaTeX and KaTeX
  • Custom themes and fonts
  • Carousels
  • Dark mode
  • Image galleries
  • Article encryption
  • Multilingual support
  • Integration with Twitter and GitHub pages
  • Local search using flexsearch

Installation

To use the Luna theme, you will need the following requirements:

  • hugo-extended >= 0.104.0
  • NodeJs >= 16.0.0
  • postcss-cli (Install using npm install postcss-cli -g)

To install the theme, follow these steps:

  1. Copy the config.yaml file from the exampleSite directory to your site directory and modify its contents.
  2. Update the theme either manually or using git submodule.
  3. Deploy the website to your desired platform like GitHub Pages (refer to GitHub Actions), Netlify (refer to netlify.toml), Vercel (refer to vercel.json), or Cloudflare Pages (refer to environment variables, build command, and build output directory).

Summary

The Luna theme is a highly customizable and feature-rich theme for websites built with Hugo. It offers a range of features such as dynamic import of JS modules, support for LaTeX and KaTeX, custom themes and fonts, carousels, dark mode, image galleries, article encryption, multilingual support, and more. The theme is easy to install and provides options for deployment on various platforms like GitHub Pages, Netlify, Vercel, and Cloudflare Pages. With its performance optimizations and built-in functionality like local search and integration with external services, Luna is a powerful choice for creating modern and user-friendly websites.