A Hugo theme forked from early version of hugo-notepadium.

[WIP] The project and readme is still working in progress! You can contact me if you have any question.

Request Hugo Version: 0.68.0+


Different from original notepadium theme:

  • grid layout (Can I use grid?)
  • tags cloud
  • toc
  • preconnect and prefetch for resourses
  • inline critical css
  • hugo modules
  • archive page
  • light & dark theme toggle button
  • search in site (powered by stork) How to use it?
  • more useful Hugo shortcodes
    • tips blocks(alert messages)
    • plist for simple table in markdown

Other features

  • Logo
  • Navigation items
  • Syntax highlighting
  • Math supporting
  • Pagination with large number of pages supporting
  • Light & Dark
  • Custom CSS supporting
  • Custom JS supporting
  • Custom header right items supporting

Get start

There are two ways to use this theme for Hugo site.

Option 1

Use Hugo modules. Hugo Modules is powered by Go Modules. If you have installed Go, this option is recommended. More details can be found in Hugo Docs

  1. Initialize the hugo module system in your site root:
hugo mod init<your_user>/<your_project>
  1. Import the theme in your config.toml:
    path = ""

Option 2

Use git submodule.

  1. Add theme repository as git submodule
git submodule add themes/hugo-notepadium-mod
  1. Set theme in your config.toml
theme = "hugo-notepadium-mod"

Configure theme

Almost everything can be configured in the config.toml file of your site. If you want to modify the theme, you could go to Customize theme

There is an example config.toml:

baseURL = ""
title = "Hugo-notepadium-mod"
copyright = "©2021 hugo-notepadium-mod"

languageCode = "zh-cn"
hasCJKLanguage = true
defaultContentLanguage = "zh-cn"

enableRobotsTXT = true
paginate = 7  # The number of articles in per page
enableEmoji = true

# Enable Disqus
#disqusShortname = "XXX"

# Google Analytics
#googleAnalytics = "UA-123-45"

    path = ""  # Use module to use this theme

# Deploy with --minify command to minify assets
# Need Hugo version v0.68.0+
  disableCSS = false
  disableHTML = false
  disableJS = false
  disableJSON = false
  disableSVG = false
  disableXML = false
  minifyOutput = true
      keepCSS2 = true
      precision = 1
      keepComments = false
      keepConditionalComments = true
      keepDefaultAttrVals = true
      keepDocumentTags = true
      keepEndTags = true
      keepQuotes = false
      keepWhitespace = false
      keepVarNames = false
      precision = 1
      precision = 0
      precision = 1
      keepWhitespace = false

# Configure chroma highlight
# Reference
codeFences = true
guessSyntax = true
noClasses = true
style = "dracula"

unsafe = true  # enable raw HTML in Markdown

    endLevel = 3
    ordered = false
    startLevel = 2

  post = "/:year/:month/:title/"

    name = "理头张"  # Change to your name

author = "理头张"
description = "littlezhang's blog"
style = "auto"  # default: auto. light: light theme, dark: dark theme, auto: based on system.
logo = ""
slogan = ""
#license = "<a rel=license href=><img alt=Creative Commons License style=border-width:0 src= /></a><br />This work is licensed under a <a rel=license href=>Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>."

# If you use custom css files, declare them here
css = ["css/fonts.css", "css/custom.css"]

enable = false  # En/Disable comments globally, default: false. You can always enable comments on per page.

enable = false # load math globally, default: false. You can always enable math on per page.
use = "katex"  # builtin: "katex", "mathjax".  default: "katex"

showCategories = false       # /categories/
showTags = false             # /tags/

# You can add taxonomies in there, then link new pages in [[params.nav.custom]]
# Reference
  category = "categories"
  tag = "tags"

title = "Index"
url = "/"

title = "Tags"
url = "/tags/"

title = "Archives"
url = "/archives/"

title = "About"
url = "/about/"

Update theme

If you installed the theme by Hugo module

hugo mod get -u  # This will update all modules
hugo mod get -u  # This will update current theme

If you installed the theme by git submodule, first go to the theme directory, then git pull

cd themes/hugo-notepadium-mod && git pull