Parameters and Customization

Contents â–¾

This comprehensive guide covers all configurable parameters for customizing your site’s appearance, behavior, and content display options.


Theme Features

The Sans theme provides optional features that can be enabled or disabled according to your requirements. Configure these settings in hugo.toml:

TOML
1
2
3
4
[theme]
  showDarkModeToggle = true
  showSearchIcon = true
  showGoToTop = true
ParameterDefaultDescription
showDarkModeToggletrueDisplays toggle button for switching between light and dark themes
showSearchIcontrueShows search functionality icon in navigation
showGoToToptrueDisplays scroll-to-top button for improved navigation
Table: Theme Feature Toggles

Note: Search functionality configuration is covered in detail in the Search Documentation.


Typography Configuration

Site-Wide Font Settings

Customize the typography for your entire site by specifying font families in hugo.toml:

TOML
1
2
[fonts]
  siteFont = 'sans-serif, Monotype Corsiva'
ParameterFormatExample
siteFontComma-separated font names'Roboto, Arial, sans-serif'
Table: Font Configuration

Font Stack Guidelines:


Table of Contents

Configuration Overview

The table of contents (TOC) provides document navigation and can be customized through several parameters in hugo.toml:

TOML
1
2
3
4
5
6
7
8
9
[toc]
  numberingInTOC = false
  numberingInPost = true

[markup]
  [markup.tableOfContents]
    endLevel = 5
    ordered = false
    startLevel = 2

TOC Parameters

ParameterTypeDescription
numberingInTOCbooleanEnables hierarchical numbering in TOC (e.g., 1, 1.1, 1.1.1)
numberingInPostbooleanApplies same numbering directly to headings in post content
startLevelintegerMinimum heading level to include (2 = h2/##)
endLevelintegerMaximum heading level to include (5 = h5/#####)
orderedbooleanEnables restarted numbering at each level
Table: Table of Contents Configuration

Hierarchical Numbering Example

When numberingInTOC = true, the TOC displays with continuous hierarchical numbering:

TEXT
1
2
3
4
5
6
7
8
9
Contents â–¼

1. MANY COLUMNS
├── 1.1. FOOTNOTES
│   ├── 1.1.1. Abcd
│   │   └── 1.1.1.1. foot
│   └── 1.1.2. FOOTnotes 2
└── 1.2. HELLLO
    └── 1.2.1. Main Footnotes

Ordered Numbering Example

When ordered = true in markup settings, numbering restarts at each level:

TEXT
1
2
3
4
5
6
7
8
9
Contents â–¼

1. MANY COLUMNS
├── 2. FOOTNOTES
│   ├── 1. Abcd
│   │   └── 1. foot
│   └── 2. FOOTnotes 2
└── 3. HELLLO
    └── 1. Main Footnotes

Enabling TOC in Posts

By default, the table of contents is disabled for individual posts. To enable it, add the following to the post’s front matter:

YAML
1
toc = true

Important Considerations

Parameter Conflict: The numberingInTOC and ordered parameters serve different numbering systems and should not both be enabled simultaneously. Choose one approach:


Post Display Configuration

Control the metadata and information displayed with each post through the [posts] section:

TOML
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
[posts]
  readingSpeed = 212
  showDate = true
  showWordCount = true
  showAuthors = true
  showTags = true
  showCategories = true
  showReadingTime = true
  dateFormat = "2 Jan 2006"
  showTagCloud = false
  showCategoryCloud = false
  showAuthorCloud = false

Post Parameters Reference

ParameterTypeDescription
readingSpeedintegerWords per minute for reading time calculation (default: 212)
showDatebooleanDisplays publication date
showWordCountbooleanShows total word count
showAuthorsbooleanDisplays author attribution
showTagsbooleanShows associated tags
showCategoriesbooleanDisplays post categories
showReadingTimebooleanShows estimated reading duration
dateFormatstringDate formatting specification (Go time format)
showTagCloudbooleanDisplays tag cloud in sidebar (large screens only)
showCategoryCloudbooleanShows category cloud in sidebar (large screens only)
showAuthorCloudbooleanDisplays author cloud in sidebar (large screens only)
Table: Post Display Parameters

Reading Speed Calibration

The readingSpeed parameter determines reading time estimation:

Taxonomy Clouds

Taxonomy clouds (tags, categories, authors) appear in the sidebar on large screens, providing quick navigation to related content. These are automatically hidden on smaller viewports for optimal mobile experience.


Section List Configuration

Configure how content is displayed on list pages (archives, category pages, etc.):

TOML
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
[sections]
  showDate = true
  showTags = false
  showCategories = false
  showAuthors = false
  showCoverImage = false
  showSummary = true
  showReadMore = false
  summaryLength = 500
  dateFormat = "2006-01-02"

Section Parameters Reference

ParameterTypeDescription
showDatebooleanDisplays publication date for each post
showTagsbooleanShows tags for each post in list
showCategoriesbooleanDisplays categories for each post
showAuthorsbooleanShows author attribution
showCoverImagebooleanDisplays post cover images in list view
showSummarybooleanShows post summary/excerpt
showReadMorebooleanDisplays "Read More" link
summaryLengthintegerMaximum character count for summaries (not word count)
dateFormatstringDate formatting for list pages
Table: Section List Display Parameters

Important: The summaryLength value specifies character count, not word count. Adjust accordingly for desired summary length.


About Page Configuration

Control social media link visibility on the About page:

TOML
1
2
[about]
  showSocialLinksPage = true
ParameterDefaultDescription
showSocialLinksPagetrueControls display of social media links on About page
Table: About Page Settings

Social media links are configured in the [social] section as described in the Homepage Configuration guide.


RSS Feed Configuration

Enable or disable RSS feed functionality and its associated icon:

TOML
1
2
[rss]
  showRSS = false
ParameterDefaultDescription
showRSSfalseDisplays RSS icon in footer linking to site's XML feed
Table: RSS Configuration

When enabled, an RSS icon appears in the footer, providing users access to your site’s RSS feed for content syndication.


Code Highlighting

Configure syntax highlighting for code blocks with extensive customization options:

TOML
1
2
3
4
5
[markup]
  [markup.highlight]
    style = "monokai"
    lineNos = true
    lineNumbersInTable = true

Syntax Highlighting Parameters

ParameterOptionsDescription
styleVarious themesColor scheme for syntax highlighting (e.g., monokai, dracula, github)
lineNosbooleanEnables line numbers for code blocks
lineNumbersInTablebooleanRenders line numbers using HTML tables for better copying
Table: Code Highlighting Configuration

Available Highlight Styles

Mathematical Expression Support

The configuration also enables passthrough for mathematical expressions:

TOML
1
2
3
4
5
[markup.goldmark.extensions.passthrough]
  enable = true
  [markup.goldmark.extensions.passthrough.delimiters]
    block = [['\[', '\]'], ['$$', '$$']]
    inline = [['\(', '\)']]

This allows LaTeX-style mathematical notation in your content using delimiters like $$...$$ for block equations and \(...\) for inline expressions.


Pagination Settings

Control content pagination for list pages and blog-style homepages:

TOML
1
2
3
4
[pagination]
  disableAliases = false
  pagerSize = 4
  path = 'page'

Pagination Parameters

ParameterTypeDescription
disableAliasesbooleanControls creation of pagination aliases
pagerSizeintegerNumber of posts displayed per page (minimum: 1)
pathstringURL segment for pagination (e.g., /page/2/, /page/3/)
Table: Pagination Configuration