Configure FixIt

Find out how to configure your Hugo FixIt site.
Configuration File
Hugo has some global configuration settings, which are beyond the scope of this article.
Before starting configuration, it is recommended that you execute the following command to copy the default hugo.toml of theme to your project:
|  |  | 
For advanced use, you can also split your configuration by environment, root configuration key, and language instead of a single site configuration file.
More details can be found in the Configure Hugo page.
Menu Configuration
Hugo has a simple yet powerful menu system.
According to the interface provided by Hugo, FixIt theme only realizes some functions, it is enough to meet the needs of most people and make users easier to use.
The following is a complete menu item configuration:
In consideration of practicability and typesetting, the FixIt theme only supports two-tier nested menus, which can be configured through the parent field in the menu configuration.
The parent item of a menu item should be the identifier of another menu item, and the identifier should be unique in the menu.
In addition, you can also add content to the menu through the front matter of the configuration page (i.e. the .md-file).
Here is a yaml example:
|  |  | 
Theme Configuration
In addition to Hugo global configuration, FixIt provides some theme configuration via the root configuration keys params.
A simple example:
|  |  | 
All theme configuration settings are as follows:
Version
string The FixIt theme version. e.g. 0.2.X, 0.2.15, v0.2.15 etc.
Description
string The site description for SEO.
Keywords
string array The site keywords for SEO.
DefaultTheme
string The site default theme. Default is auto. The configuration value for defaultTheme can be one of:
- light
- light style for FixIt
- dark
- dark style for FixIt
- auto
- automatically switch between light and dark styles based on the user’s system preference
Fingerprint
string Which hash function used for SRI, when empty, no SRI is used. The configuration value for fingerprint can be one of sha256, sha384, sha512, md5.
DateFormat
string The date format for the site. Default is 2006-01-02.
Images
string array Website images for Open Graph and Twitter Cards.
EnablePWA
bool Enable PWA. Default is false.
ExternalIcon
bool Whether to add external Icon for external links automatically. Default is false.
NavigationReverse
bool Whether to reverse the order of the navigation menu. Default is false.
WithSiteTitle
bool Whether to add site title to the title of every page. Default is true. Remember to set up your site title in hugo.toml (e.g. title = "title")
TitleDelimiter
string Title delimiter when the site title is be added to the title of every page. Default is -.
IndexWithSubtitle
bool Whether to add site subtitle to the title of index page. Default is false. Remember to set up your site subtitle by params.header.subtitle.name.
DisableThemeInject
bool FixIt will, by default, inject a theme meta tag in the HTML head on the home page only. You can turn it off, but we would really appreciate if you don’t, as this is a good way to watch FixIt’s popularity on the rise. Default is false.
Author
map The author Configuration.
|  |  | 
- name
- stringThe author’s name.
- stringThe author’s email.
- link
- stringThe author’s link.
- avatar
- stringThe author’s avatar.
GitInfo
map The Git repository information (only then enableGitInfo is true).
|  |  | 
- repo
- stringThe public Git repository URL. e.g.- https://github.com/hugo-fixit/docs
- branch
- stringThe public Git repository branch. Default is- main.
- dir
- stringThe content directory path relative to the root of the repository.
- issueTpl
- stringThe issue template for reporting issue of the posts. Available template params:- {title},- {URL},- {sourceURL}.
App
map The App icon Configuration.
|  |  | 
- title
- stringOptional site title override for the app when added to an iOS home screen or Android launcher.
- noFavicon
- boolWhether to omit favicon resource links. Default is- false.
- svgFavicon
- stringModern SVG favicon to use in place of older style- .pngand- .icofiles.
- iconColor
- stringSafari mask icon color. Default is- #5bbad5.
- tileColor
- stringWindows v8-10 tile color. Default is- #da532c.
- themeColor
- mapAndroid browser theme color.
- light: stringThe light theme color. Default is#f8f8f8.
- dark: stringThe dark theme color. Default is#252627.
Search
map The Search Configuration.
|  |  | 
- enable
- boolWhether to enable search. Default is- false.
- type
- stringThe type of search engine. The configuration value for- typecan be one of- algolia,- fuse. Default is- fuse.
- contentLength
- intThe max index length of the chunked content. Default is- 4000.
- placeholder
- stringThe placeholder of the search bar. Default is- "".
- maxResultLength
- intThe max number of results length. Default is- 10.
- snippetLength
- intThe snippet length of the result. Default is- 30.
- highlightTag
- stringThe HTML tag name of the highlight part in results. Default is- em.
- absoluteURL
- boolWhether to use the absolute URL based on the baseURL in search index. Default is- false.
- algolia
- mapThe Algolia Configuration.
- index: stringThe Algolia index.
- appID: stringThe Algolia appID.
- searchKey: stringThe Algolia searchKey.
- fuse
- mapThe Fuse Configuration.
- isCaseSensitive: boolWhether the search is case sensitive. Default isfalse.
- minMatchCharLength: intThe minimum number of characters that must be matched before a result is considered a match. Default is2.
- findAllMatches: boolWhether to find all matches. Default isfalse.
- location: intThe location. Default is0.
- threshold: floatThe threshold. Default is0.3.
- distance: intThe distance. Default is100.
- ignoreLocation: boolWhether to ignore location. Default isfalse.
- useExtendedSearch: boolWhether to use extended search. Default isfalse.
- ignoreFieldNorm: boolWhether to ignore field norm. Default isfalse.
Based on algolia or Fuse.js, searching is supported in FixIt theme.
In order to generate index.json for searching, add JSON output file type to the home of the outputs part in your site configuration.
|  |  | 
Header
map The Header Configuration.
|  |  | 
- desktopMode
- stringDesktop header mode. The configuration value for- desktopModecan be one of- sticky,- normal,- auto. Default is- sticky.
- mobileMode
- stringMobile header mode. The configuration value for- mobileModecan be one of- sticky,- normal,- auto. Default is- auto.
- title
- mapThe Header title Configuration.
- logo: stringURL of the LOGO.
- name: stringTitle name.
- pre: stringYou can add extra information before the name (HTML format is supported), such as icons.
- post: stringYou can add extra information after the name (HTML format is supported), such as icons.
- typeit: boolWhether to use typeit animation for title name. Default isfalse.
- name: stringSubtitle name.
- typeit: boolWhether to use typeit animation for subtitle name. Default isfalse.
Breadcrumb
map The Breadcrumb Configuration.
|  |  | 
- enable
- boolWhether to enable breadcrumb. Default is- false.
- sticky
- boolWhether to make the breadcrumb sticky. Default is- false.
- showHome
- boolWhether to show the home link in the breadcrumb. Default is- false.
Footer
map The Footer Configuration.
|  |  | 
- enable
- boolWhether to enable footer. Default is- true.
- copyright
- boolWhether to show copyright info. Default is- true.
- author
- boolWhether to show the author. Default is- true.
- since
- intSite creation year.
- gov
- stringPublic network security only in China (HTML format is supported).
- icp
- stringICP info only in China (HTML format is supported).
- license
- stringLicense info (HTML format is supported).
- powered
- mapThe Footer powered Configuration.
- enable: boolWhether to show Hugo and theme info. Default istrue.
- hugoLogo: boolWhether to show Hugo logo. Default istrue.
- themeLogo: boolWhether to show theme logo. Default istrue.
- enable: boolWhether to show site creation time. Default isfalse.
- animate: boolWhether to animate the site creation time. Default istrue.
- icon: stringThe icon of the site creation time. Default isfa-solid fa-heartbeat.
- pre: stringYou can add extra information before the value (HTML format is supported).
- value: stringThe value of the site creation time. e.g.2021-12-18T16:15:22+08:00.
- powered: intThe order of the powered line. Default is0.
- copyright: intThe order of the copyright line. Default is0.
- statistics: intThe order of the statistics line. Default is0.
- visitor: intThe order of the visitor line. Default is0.
- beian: intThe order of the beian line. Default is0.
The order value can be one of first, 0, 1, 2, 3, 4, 5, last.
Archives
map The Archives page Configuration.
|  |  | 
- paginate
- intSpecial amount of posts in each archives page. Default is- 20.
- dateFormat
- stringDate format (month and day). Default is- 01-02.
Section
map The Section page Configuration.
|  |  | 
- paginate
- intSpecial amount of posts in each section page. Default is- 20.
- dateFormat
- stringDate format (month and day). Default is- 01-02.
- rss
- intAmount of RSS pages. Default is- 10.
- recentlyUpdated
- mapThe Recently Updated posts Configuration.
- enable: boolWhether to enable recently updated posts. Default isfalse.
- rss: boolWhether to enable recently updated posts in RSS. Default isfalse.
- days: intThe days of recently updated posts. Default is30.
- maxCount: intThe max count of recently updated posts. Default is10.
List
map The List (category or tag) page Configuration.
|  |  | 
- paginate
- intSpecial amount of posts in each list page. Default is- 20.
- dateFormat
- stringDate format (month and day). Default is- 01-02.
- rss
- intAmount of RSS pages. Default is- 10.
Tagcloud
map The TagCloud Configuration for tags page.
|  |  | 
- enable
- boolWhether to enable tagcloud. Default is- false.
- min
- intMinimum font size in px. Default is- 14.
- max
- intMaximum font size in px. Default is- 32.
- peakCount
- intMaximum count of posts per tag. Default is- 10.
- orderby
- stringOrder of tags. The configuration value for- orderbycan be one of- name,- count. Default is- name.
Home
map The Home page Configuration.
|  |  | 
- rss
- intAmount of RSS pages. Default is- 10.
- profile
- mapThe Home page profile Configuration.
- enable: boolWhether to enable home page profile. Default isfalse.
- gravatarEmail: stringGravatar Email for preferred avatar in home page.
- avatarURL: stringURL of avatar shown in home page.
- avatarMenu: stringIdentifier of avatar menu link.
- title: stringTitle shown in home page (HTML format is supported).
- subtitle: stringSubtitle shown in home page.
- typeit: boolWhether to use typeit animation for subtitle. Default istrue.
- social: boolWhether to show social links. Default istrue.
- disclaimer: stringDisclaimer (HTML format is supported).
- posts
- mapThe Home page posts Configuration.
- enable: boolWhether to enable home page posts. Default istrue.
- paginate: intSpecial amount of posts in each home posts page. Default is6.
Social
map Social Configuration about the author.
The default data of all supported social links is located in themes/FixIt/assets/data/social.yaml,
which is you can refer to.
You can directly set your ID to get a default social link and its icon:
|  |  | 
The social link generated is https://mastodon.technology/@xxxx.
Or You can set more options through a object:
|  |  | 
Typeit
map TypeIt Configuration.
|  |  | 
- speed
- intTyping speed between each step (measured in milliseconds). Default is- 100.
- cursorSpeed
- intBlinking speed of the cursor (measured in milliseconds). Default is- 1000.
- cursorChar
- stringCharacter used for the cursor (HTML format is supported). Default is- |.
- duration
- intCursor duration after typing finishing (measured in milliseconds,- -1means unlimited). Default is- -1.
- loop
- boolWhether your strings will continuously loop after completing. Default is- false.
Mermaid
map Mermaid Configuration.
|  |  | 
- themes
- string array(2)Themes for Mermaid. See Mermaid Themes for available values.
Pangu
map PanguJS Configuration.
|  |  | 
- enable
- boolWhether to enable PanguJS. Default is- false.
- selector
- stringThe selector of PanguJS. Default is- article.
Watermark
map Watermark Configuration. See Watermark for more information.
|  |  | 
Ibruce
map Busuanzi count Configuration.
|  |  | 
- enable
- boolWhether to enable Busuanzi count. Default is- false.
- enablePost
- boolWhether to enable Busuanzi count in post meta. Default is- false.
Verification
map Site verification code Configuration for Google/Bing/Yandex/Pinterest/Baidu/360/Sogou.
|  |  | 
Seo
map Site SEO Configuration.
|  |  | 
- image
- stringImage URL.
- thumbnailUrl
- stringThumbnail URL.
Analytics
map Analytics Configuration.
|  |  | 
- enable
- boolWhether to enable analytics. Default is- false.
- mapGoogle Analytics Configuration.
- id: stringGoogle Analytics ID.
- anonymizeIP: boolWhether to anonymize IP. Default istrue.
- fathom
- mapFathom Analytics Configuration.
- id: stringFathom Analytics ID.
- server: stringServer URL for your tracker if you’re self hosting.
Cookieconsent
map Cookie consent Configuration.
|  |  | 
- enable
- boolWhether to enable cookie consent. Default is- true.
- content
- mapCookie consent content Configuration.
- message: stringThe message of cookie consent.
- dismiss: stringThe dismiss of cookie consent.
- link: stringThe link of cookie consent.
Cdn
map CDN Configuration for third-party library files.
|  |  | 
- data
- stringCDN data file name, disabled by default. The data file is located in- themes/FixIt/assets/data/cdn/directory. You can store your own data files in the same path under your project:- assets/data/cdn/. The configuration value for- datacan be one of- jsdelivr.yml,- unpkg.yml, etc.
Compatibility
map Compatibility Configuration.
|  |  | 
- polyfill
- boolWhether to use Polyfill.io to be compatible with older browsers. Default is- false.
- objectFit
- boolWhether to use object-fit-images to be compatible with older browsers. Default is- false.
GithubCorner
map GitHub banner in the top-right or top-left corner.
|  |  | 
- enable
- boolWhether to enable GitHub banner. Default is- false.
- permalink
- stringThe URL of the GitHub repository. e.g.- https://github.com/hugo-fixit/FixIt
- title
- stringThe title of the GitHub banner.
- position
- stringThe position of the GitHub banner. The configuration value for- positioncan be one of- left,- right. Default is- right.
Gravatar
map Gravatar Configuration.
|  |  | 
- enable
- boolWhether to enable Gravatar. Default is- false.
 Depends on the author’s email, if the author’s email is not set, the local avatar will be used.
- host
- stringGravatar host. e.g.- www.gravatar.com,- cravatar.cnetc. Default is- www.gravatar.com.
- style
- stringGravatar style. The configuration value for- stylecan be one of- mp,- identicon,- monsterid,- wavatar,- retro,- blank,- robohash. Default is- "".
BackToTop
map Back to top Configuration.
|  |  | 
- enable
- boolWhether to enable back to top. Default is- true.
- scrollpercent
- boolScroll percent label in b2t button. Default is- false.
ReadingProgress
map Reading progress bar Configuration.
|  |  | 
- enable
- boolWhether to enable reading progress bar. Default is- false.
- start
- stringThe start position of reading progress bar. The configuration value for- startcan be one of- left,- right. Default is- left.
- position
- stringThe position of reading progress bar. The configuration value for- positioncan be one of- top,- bottom. Default is- top.
- reversed
- boolWhether to reverse the reading progress bar. Default is- false.
- light
- stringThe light color of reading progress bar. Default is- "".
- dark
- stringThe dark color of reading progress bar. Default is- "".
- height
- stringThe height of reading progress bar. Default is- 2px.
Pace
map Progress bar in the top during page loading, based on Pace.js.
|  |  | 
- enable
- boolWhether to enable pace. Default is- false.
- color
- stringThe color of pace. All available colors:- black,- blue,- green,- orange,- pink,- purple,- red,- silver,- white,- yellow. Default is- blue.
- theme
- stringThe theme of pace. All available themes:- barber-shop,- big-counter,- bounce,- center-atom,- center-circle,- center-radar,- center-simple,- corner-indicator,- fill-left,- flash,- flat-top,- loading-bar,- mac-osx,- material,- minimal. Default is- minimal.
Dev
map Developer options.
Select the scope named public_repo to generate personal access token, Configure with environment variable HUGO_PARAMS_GHTOKEN=xxx, see https://gohugo.io/functions/os/getenv/#examples.
|  |  | 
- enable
- boolWhether to enable developer options. Default is- false.
- c4u
- boolWhether to check for updates. Default is- false.
- mDevtools
- mapMobile Devtools Configuration.
- enable: boolWhether to enable mobile devtools. Default isfalse.
- type: stringThe type of mobile devtools. The configuration value fortypecan be one ofvConsole,eruda. Default isvConsole.
Page
map The configuration of each page.
|  |  | 
Markup Configuration
Configure rendering of markup to HTML via the root configuration keys markup.
This section only records some necessary configuration for the FixIt theme. For more details, see the Configure markup page.
|  |  | 
Custom Output Formats
Hugo can output content in multiple formats. The FixIt theme takes advantage of this feature. In order to fully configure the theme, configure the following options into hugo.toml.
More details about the configuration of output formats can be found in the Custom output formats page.
Favicon Generation
It is recommended to put your own favicons, browserconfig.xml and site.webmanifest files into the /static directory.
- android-chrome-192x192.png
- android-chrome-512x512.png
- apple-touch-icon.png
- browserconfig.xml
- favicon-32x32.png
- favicon-16x16.png
- favicon.ico
- mstile-150x150.png
- safari-pinned-tab.svg
They’re easily created via https://realfavicongenerator.net/.
Related Content
 Alipay
Alipay WeChat Pay
WeChat Pay
