-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Features
- Assets (js/css)
- Default Theme light/dark/auto
- Theme Switch Toggle (enabled by default)
- Archives Layout
- Regular Mode (default-mode)
- Home-Info Mode
- Profile Mode
- Search
- Draft Page indication
- Post Cover Image
- Share Buttons on post
- Show post reading time
- Show Table of Contents (Toc) on blog post
- Multiple Authors
- Comments
- AccessKeys
- Enhanced SEO
- Multilingual Support
- Misc
View demo here
-
We'll be using
yml/yamlformat for all examples down below, I recommend usingymlovertomlas it is easier to read. -
You can find any YML to TOML converters if necessary.
The following is enabled by default
- minification - makes the assets size smallest as possible.
- bundling - bundles all the styles in one single asset
- fingerprint/intergity check.
params:
# defaultTheme: light
# defaultTheme: dark
defaultTheme: auto # to switch between dark or light according to browser themeShows icon besides title of page to change theme
To disable it :
disableThemeToggle: trueYou can refer following table for better understanding...
defaultTheme |
disableThemeToggle |
checks local storage? | checks system theme? | Info |
|---|---|---|---|---|
auto |
true | No | Yes | only system theme |
| false | Yes (if not->2) | Yes (2) | switch present | |
dark |
true | No | No | force dark only |
| false | Yes | No | switch present | |
light |
true | No | No | force light only |
| false | Yes | No | switch present |
Create a page with archive.md in content directory with following content
---
title: "Archive" # in any language you want
layout: "archives" # is necessary
url: "/archive"
summary: "archive"
---
Note: Archives Layout does not support Multilingual Month Translations.
ex: archives.md


Use 1st entry as some Information
add following to config file
params:
homeInfoParams:
Title: Hi there wave
Content: Can be Info, links, about...
socialIcons: # optional
- name: "<platform>"
url: "<link>"
- name: "<platform 2>"
url: "<link2>"ex. config.yml#L106

Shows Index/Home page as Full Page with Social Links and Image
add following to config file
params:
profileMode:
enabled: true
title: "<Title>" # optional default will be site title
imageUrl: "<image link>" # optional
imageTitle: "<title of image as alt>" # optional
imageWidth: 120 # custom size
imageHeight: 120 # custom size
buttons:
- name: Archive
url: "/archive"
- name: Github
url: "https://github.com/"
socialIcons: # optional
- name: "<platform>"
url: "<link>"
- name: "<platform 2>"
url: "<link2>"Add the following to site config, config.yml
outputs:
home:
- HTML
- RSS
- JSON # is necessaryCreate a page with search.md in content directory with following content
---
title: "Search" # in any language you want
layout: "search" # is necessary
# url: "/archive"
summary: "search"
---
For Multilingual use search.<lang>.md ex. search.es.md.
Note: Search will work only on current language, user is currently on !
Customizing Fusejs Options
Refer https://fusejs.io/api/options.html for Options, Add those as shown below.
params:
fuseOpts:
isCaseSensitive: false
shouldSort: true
location: 0
distance: 1000
threshold: 0.4
minMatchCharLength: 0
keys: ["title", "permalink", "summary", "content"]ex: search.md
adds [draft] mark to indicate draft pages.
In post's page-variables add :
cover:
image: "<image path/url>"
# can also paste direct link from external site
# ex. https://i.ibb.co/K0HVPBd/paper-mod-profilemode.png
alt: "<alt text>"
caption: "<text>"
relative: false # To use relative path for cover image, used in hugo Page-bundlesWhen you include images in the Page Bundle, multiple sizes of the image will automatically be provided using the HTML5 srcset field.
To reduce generation time and size of the site, you can disable this feature using
params:
cover:
responsiveImages: falseTo enable hyperlinks to the full image size on post pages, use
params:
cover:
linkFullImages: trueDisplays Share Buttons at Bottom of each post
to show share buttons add
params:
ShowShareButtons: trueDisplays Reading Time (the estimated time, in minutes, it takes to read the content.)
To show reading time add
Params:
ShowReadingTime: trueDisplays ToC on blog-pages
To show ToC add following to page-variables
ShowToc: trueTo keep Toc Open by default on a post add following to page-variables:
TocOpen: trueTo Use multiple authors for a post, in post-variables:
---
author: ["Me", "You"]
---
To use Multiple Authors Site-wide, in config.yml:
params:
author: ["Me", "You"]to add comments, create a html file
layouts/partials/comments.html
and paste code provided by your comments provider
also in config add this
params:
comments: trueread more about this hugo-comments
c - ToC Open/Close
g - Go To Top
h - Home (according to current lang)
t - Theme toggle
/ - Jumps to search page if in menu
Enabled only when env: production
-
Twitter Cards Support
-
Open-Graph support
Displays a Scroll-to-Top button in right-bottom corner