Skip to content

metra/hugo-notepadium

 
 

Repository files navigation

hugo-notepadium Netlify Status

Request Hugo Version: 0.60.0+

a fast and focus on reading Hugo theme, 100% JavaScript-free.

Features

  • Logo and slogan
  • Navigation items
  • Syntanx highlighting
  • Math supporting
  • Comments by Disqus
  • CC License
  • Builtin Source Code Pro font for code
  • Pagination with large number of pages supporting
  • DarkMode supporting

Preview the exampleSite:

git clone https://github.com/cntrump/hugo-notepadium.git hugo-notepadium
cd hugo-notepadium/exampleSite
hugo server --themesDir ../..

Quick Start

git submodule add https://github.com/cntrump/hugo-notepadium.git themes/hugo-notepadium

Example config.toml:

baseURL = "https://example.com"
title = "Notepadium"
theme = "hugo-notepadium"
copyright = "©2019 Notepadium."

languageCode = "zh-cn"
hasCJKLanguage = true

enableRobotsTXT = true

# Enable Disqus
# disqusShortname = "XXX"

[markup.highlight]
codeFences = true
noClasses = false

[markup.goldmark.renderer]
unsafe = true  # enable raw HTML in Markdown

[params]
logo = ""  # if you have a logo png
slogan = "100% JavaScript-free"
license = ""  # CC License

[params.math]
enable = false  # optional: true, false. Enable globally, default: false, you can always enable math on per page.
use = "katex"  # option: "katex", "mathjax". default: "katex"

[params.syntax]
use = "none"  # builtin: "prismjs", "hljs". "none" means Chroma
theme = "dracula"
darkTheme = "xcode-dark"  # apply this theme in dark mode
webFonts = true  # builtin: 'Source Code Pro'

[params.nav]
showCategories = true       # /categories/
showTags = true             # /tags/

# custom navigation items

[[params.nav.custom]]
title = "About"
url = "/about"

[[params.nav.custom]]
title = "Hugo"
url = "https://gohugo.io/"

Logo and Slogan

[params]
logo = "/img/logo.png"
slogan = "code my life ~"

Navigation items

[params.nav]
showCategories = true       # /categories/
showTags = true             # /tags/

# custom items

[[params.nav.custom]]
title = "iOS"
url = "/tags/ios"

[[params.nav.custom]]
title = "Hugo"
url = "https://gohugo.io/"

Syntax highlighting:

# enable JS highlight
[params.syntax]
use = "hljs"  # 1. prismjs 2. hljs 3. none
theme = "dracula"
darkTheme = "xcode-dark"  # apply this theme in dark mode
webFonts = true  # use builtin font: Source Code Pro

Math

[params.math]
enable = true  # true means globally, or on a per page set "math = true"
use = "katex"  # "mathjax" or "katex"

Example

When $a \ne 0$, there are two solutions to \(ax^2 + bx + c = 0\) and they are
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$

Comments

Setup Disqus shortname in config.toml:

# disqus
disqusShortname = "XXX"  # your short name

By default, comments is disabled for all posts.

You can enable comments like below:

+++
title = "..."
date = 2019-12-08
...
comments = true
+++

...

Pagination

Support large number of pages

Thanks

Note

For Hugo 0.62.0+ users

![](01.png) render as inline <img>, like as Github's style

![](01.png " ") render as block <img>, like as <figure> tag style.

About

a fast gohugo theme, 100% JavaScript-free.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 59.7%
  • CSS 38.8%
  • HTML 1.5%