Skip to content
chadah edited this page Feb 3, 2023 · 3 revisions

# Welcome to the BABC - BLOG wiki!

Intro

  • We'll be using yml/yaml format for all examples down below, I recommend using yml over toml as it is easier to read.

  • You can find any YML to TOML converters if necessary.


Assets (js/css)

The following is enabled by default


Default Theme light/dark/auto

params:
    # defaultTheme: light
    # defaultTheme: dark
    defaultTheme: auto # to switch between dark or light according to browser theme

Theme Switch Toggle (enabled by default)

Shows icon besides title of page to change theme

To disable it :

disableThemeToggle: true

You 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

Since the link generated is a regular HTML anchor tag <a href=...>, you can also use other URL schemas like mailto://, e.g. URL: "mailto://mail@example.com?subject=Suggesting changes for "


Other Posts suggestion below a post

Adds a Previous / Next post suggestion under a single post

params:
    ShowPostNavLinks: true

Code Copy Button

Adds a copy button in code block to copy the code it contains

params:
    ShowCodeCopyButtons: true

Multiple Authors

To 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"]

Comments

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: true

read more about this hugo-comments


AccessKeys

c - ToC Open/Close
g - Go To Top
h - Home (according to current lang)
t - Theme toggle
/ - Jumps to search page if in menu

What's AccessKeys ?


Enhanced SEO

Enabled only when env: production


Multilingual Support


Misc

Scroll-Bar themed (by default)

Smooth Scroll between in-page links (by default)

Scroll-to-Top Button (by default)

Displays a Scroll-to-Top button in right-bottom corner

Google Analytics integration

Syntax highlighting

RSS feeds