Parameters and Customization
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:
| |
| Parameter | Default | Description |
|---|---|---|
| showDarkModeToggle | true | Displays toggle button for switching between light and dark themes |
| showSearchIcon | true | Shows search functionality icon in navigation |
| showGoToTop | true | Displays scroll-to-top button for improved navigation |
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:
| |
| Parameter | Format | Example |
|---|---|---|
| siteFont | Comma-separated font names | 'Roboto, Arial, sans-serif' |
Font Stack Guidelines:
- List fonts in order of preference
- Include web-safe fallback fonts
- Separate multiple fonts with commas
- Enclose font names with spaces in quotes
Table of Contents
Configuration Overview
The table of contents (TOC) provides document navigation and can be customized through several parameters in hugo.toml:
| |
TOC Parameters
| Parameter | Type | Description |
|---|---|---|
| numberingInTOC | boolean | Enables hierarchical numbering in TOC (e.g., 1, 1.1, 1.1.1) |
| numberingInPost | boolean | Applies same numbering directly to headings in post content |
| startLevel | integer | Minimum heading level to include (2 = h2/##) |
| endLevel | integer | Maximum heading level to include (5 = h5/#####) |
| ordered | boolean | Enables restarted numbering at each level |
Hierarchical Numbering Example
When numberingInTOC = true, the TOC displays with continuous hierarchical numbering:
| |
Ordered Numbering Example
When ordered = true in markup settings, numbering restarts at each level:
| |
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:
| |
Important Considerations
Parameter Conflict: The numberingInTOC and ordered parameters serve different numbering systems and should not both be enabled simultaneously. Choose one approach:
- Use
numberingInTOC = truefor continuous hierarchical numbering - Use
ordered = truefor restarted numbering at each level
Post Display Configuration
Control the metadata and information displayed with each post through the [posts] section:
| |
Post Parameters Reference
| Parameter | Type | Description |
|---|---|---|
| readingSpeed | integer | Words per minute for reading time calculation (default: 212) |
| showDate | boolean | Displays publication date |
| showWordCount | boolean | Shows total word count |
| showAuthors | boolean | Displays author attribution |
| showTags | boolean | Shows associated tags |
| showCategories | boolean | Displays post categories |
| showReadingTime | boolean | Shows estimated reading duration |
| dateFormat | string | Date formatting specification (Go time format) |
| showTagCloud | boolean | Displays tag cloud in sidebar (large screens only) |
| showCategoryCloud | boolean | Shows category cloud in sidebar (large screens only) |
| showAuthorCloud | boolean | Displays author cloud in sidebar (large screens only) |
Reading Speed Calibration
The readingSpeed parameter determines reading time estimation:
- Default value: 212 words per minute (average adult reading speed)
- Adjust based on content: Technical content may require lower values (150-180)
- Language considerations: Non-English content may have different optimal values
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.):
| |
Section Parameters Reference
| Parameter | Type | Description |
|---|---|---|
| showDate | boolean | Displays publication date for each post |
| showTags | boolean | Shows tags for each post in list |
| showCategories | boolean | Displays categories for each post |
| showAuthors | boolean | Shows author attribution |
| showCoverImage | boolean | Displays post cover images in list view |
| showSummary | boolean | Shows post summary/excerpt |
| showReadMore | boolean | Displays "Read More" link |
| summaryLength | integer | Maximum character count for summaries (not word count) |
| dateFormat | string | Date formatting for list pages |
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:
| |
| Parameter | Default | Description |
|---|---|---|
| showSocialLinksPage | true | Controls display of social media links on About page |
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:
| |
| Parameter | Default | Description |
|---|---|---|
| showRSS | false | Displays RSS icon in footer linking to site's XML feed |
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:
| |
Syntax Highlighting Parameters
| Parameter | Options | Description |
|---|---|---|
| style | Various themes | Color scheme for syntax highlighting (e.g., monokai, dracula, github) |
| lineNos | boolean | Enables line numbers for code blocks |
| lineNumbersInTable | boolean | Renders line numbers using HTML tables for better copying |
Available Highlight Styles
| Style Name | Appearance | Best For |
|---|---|---|
| monokai | Dark with vibrant colors | Dark mode sites |
| dracula | Purple and pink tones | Dark mode, modern aesthetic |
| github | Light with subtle colors | Light mode, documentation |
| solarized-dark | Muted dark palette | Reduced eye strain |
| nord | Cool blue tones | Dark mode, minimalist |
Mathematical Expression Support
The configuration also enables passthrough for mathematical expressions:
| |
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:
| |
Pagination Parameters
| Parameter | Type | Description |
|---|---|---|
| disableAliases | boolean | Controls creation of pagination aliases |
| pagerSize | integer | Number of posts displayed per page (minimum: 1) |
| path | string | URL segment for pagination (e.g., /page/2/, /page/3/) |