Skip to content

Shawn-Summer/hugo-theme-DaLEX

Repository files navigation

简体中文 | English

Hugo Theme DaLEX

Build License Stars Last Commit Hugo Version

Dark and Light EXtreme (DaLEX) is a minimalist theme designed for Hugo, emphasizing clear typography and an extremely simple style. It supports light/dark mode, KaTeX mathematical formulas, local search, table of contents navigation, and multilingual switching. Example website: demo.

XMinimal Screenshot

✨ Features

  • 🌓 Switch between dark and light modes
  • 📝 Clear and readable typography
  • 📚 Table of Contents
  • 🔍 Local search support
  • 🌐 Multilingual switching
  • 📐 KaTeX mathematical formula rendering
  • ⚡ Fast loading and streamlined code
  • 🎨 Easy to customize

🚀 Quick Start

Create a blog with the theme of DaLEX from scratch:

hugo new site mysite
cd mysite
rm -rf hugo.toml
git init
git submodule add https://github.com/Shawn-Summer/hugo-theme-DaLEX.git themes/DaLEX
cp -a  themes/DaLEX/exampleSite/. content/
mv content/hugo.yaml .
hugo server

🚂 Theme Switching

params:
  mode: "auto"  # theme mode: light, dark, or auto
  • Dark mode:

dark mode1 dark mode2

  • Light mode:

light mode1 light mode2

When mode: "auto", the theme will automatically adjust according to the browser's theme.

📦 KaTeX Formula Rendering

Enable KaTeX:

params:
  enableKatex = true

🔎 Table of Contents and Search

params:
  toc: true # whether to add table of contents
  fastsearch: true # whether to enable search bar

📜 License

Licensed under the MIT License, feel free to use and modify.