💥 Upgrading to FixIt V1

Contents

This guide walks you through upgrading from FixIt v0.x to v1.0. The v1 release introduces significant breaking changes to configuration structure, custom assets, and more. Read on to ensure a smooth upgrade.

Prerequisites

Before upgrading, make sure your environment meets the following requirements:

RequirementMinimum Version
Hugo0.161.0 (Extended)
Dart Sass1.99.0
Node.js22
FixItv1.0.0

Note

Dart Sass must be installed separately — the build will fail if it is not available.

Configuration: camelCase to snake_case

The most impactful change in v1 is that all keys under [params] have been renamed from camelCase to snake_case. Hugo’s own configuration keys (e.g. [menu], [markup], etc.) are not affected.

hugo.toml
1
2
3
4
[params]
defaultTheme = "auto"
dateFormat = "2006-01-02"
enablePWA = true

Deprecation Detection

The theme includes a built-in deprecation detection system. When you build your site with old camelCase keys, Hugo will emit warnings like:

1
2
[FixIt] deprecation warnings (v1.0.0):
- params.defaultTheme is deprecated, use params.default_theme instead

These warnings point you directly to the new key names, making migration straightforward.

Common Top-Level Key Renames

Old (v0.x)New (v1)
defaultThemedefault_theme
dateFormatdate_format
withSiteTitlewith_site_title
disableThemeInjectdisable_theme_inject
titleDelimitertitle_delimiter
indexWithSubtitleindex_with_subtitle
enableTranslationMergeenable_translation_merge
capitalizeTitlescapitalize_titles
summaryPlainifysummary_plainify
tagCloudtag_cloud
postChatpost_chat
postSummarypost_summary
gitInfogit_info
backToTopback_to_top
readingProgressreading_progress
githubCornergithub_corner
recentlyUpdatedrecently_updated
jsonViewerjson_viewer
customPartialscustom_partials
taskListtask_list
repoVersionrepo_version

Nested Key Renames

Sub-sections also follow the snake_case convention. For example:

hugo.toml
1
2
3
4
5
6
7
[params.search]
contentLength = 200
absoluteUrl = true

[params.search.algolia]
appId = "xxx"
searchKey = "xxx"

Other commonly affected nested sections:

SectionOld KeysNew Keys
[params.header]desktopMode, mobileModedesktop_mode, mobile_mode
[params.footer]siteTimesite_time
[params.footer.powered]hugoLogo, themeLogohugo_logo, theme_logo
[params.home.profile]avatarUrl, gravatarEmail, avatarMenu, onlyFirstPageavatar_url, gravatar_email, avatar_menu, only_first_page
[params.home.posts]imagePreviewimage_preview
[params.breadcrumb]showHomeshow_home
[params.navigation]inSectionin_section
[params.watermark]rowSpacing, colSpacing, fontSize, fontFamilyrow_spacing, col_spacing, font_size, font_family
[params.busuanzi]siteViews, pageViewssite_views, page_views
[params.mermaid]securityLevel, fontFamily, layoutLoaderssecurity_level, font_family, layout_loaders
[params.math.katex]copyTex, throwOnError, errorColorcopy_tex, throw_on_error, error_color
[params.math.mathjax.options]enableMenu, skipHtmlTags, ignoreHtmlClassenable_menu, skip_html_tags, ignore_html_class

Config Structure: [params.page] Eliminated

The entire [params.page] section has been flattened into [params]. All page-level parameters that were previously nested under [params.page] now live directly under [params]. They can still be overridden per-page via front matter.

hugo.toml
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
[params.page]
lightgallery = true
wordCount = true
readingTime = true

[params.page.toc]
enable = true

[params.page.comment]
# ...

Page-Level Key Migration

Old ([params.page])New ([params])
authorAvatarauthor_avatar
hiddenFromHomePagehidden_from_home_page
hiddenFromSearchhidden_from_search
hiddenFromRelatedhidden_from_related
hiddenFromFeedhidden_from_feed
twemojitwemoji
lightgallerylightgallery
rubyruby
fractionfraction
fontawesomefontawesome
licenselicense
pageStylepage_style
autoBookmarkauto_bookmark
showLastmodshow_lastmod
wordCountword_count
readingTimereading_time
endFlagend_flag
instantPageinstant_page
collectionListcollection_list
collectionNavigationcollection_navigation
editUrledit_url
sourceUrlsource_url

Sub-Sections Moved to [params] Level

Old (v0.x)New (v1)
[params.page.toc][params.toc]
[params.page.expirationReminder][params.expiration_reminder]
[params.page.heading][params.heading]
[params.page.math][params.math]
[params.page.mapbox][params.mapbox]
[params.page.reward][params.reward]
[params.page.share][params.share]
[params.page.comment][params.comment]
[params.page.library][params.library]
[params.page.seo][params.seo]
Old (v0.x [params.page])New (v1 [params.post_link])
linkToMarkdownmarkdown
linkToSourcesource
linkToEditedit
linkToReportreport
linkToVscodeeditor (string, default "vscode")

PWA Config Restructured

Old (v0.x)New (v1)
[params] enablePWA[params.app] pwa
[params.app] title[params.app] name
[params.app] noFavicon[params.app] no_favicon
[params.app] svgFavicon[params.app] svg_favicon
[params.app] iconColor[params.app] mask_color
[params.app] tileColor[params.app] tile_color
[params.app.themeColor][params.app.theme_color]

Other Structural Moves

  • params.externalIcon has moved to [params.link] external_icon (now defaults to true)
  • [params.link] is now a page-level section (can be overridden per-page via front matter)
  • [params.image], [params.codeblock], [params.json_viewer], [params.filetree] are now page-level sections

Custom Styles and Scripts

The custom asset file paths have changed. Legacy paths are no longer loaded automatically.

Old FileNew File
assets/css/_custom.scssassets/scss/custom.scss
assets/css/_override.scssRemoved — use [params.appearance] instead
assets/css/_variables.scssassets/scss/_variables.scss
assets/js/_custom.jsassets/js/custom.ts or assets/js/custom.js

Tip

The theme ships with example files (assets/scss/custom.scss.example and assets/js/custom.ts.example) that demonstrate the new patterns. Refer to them for guidance.

SCSS Architecture Changes

The SCSS architecture has been restructured into per-layout bundles under assets/scss/:

  • assets/scss/core/ — core styles (layouts, maps, mixins)
  • assets/scss/pages/ — per-page-type styles
  • assets/scss/widgets/ — widget styles

The SCSS function prefix has changed from fixit- to fi-. If you use any theme SCSS functions or mixins in your custom styles, update the references accordingly.

The new custom.scss uses @use instead of @import:

assets/scss/custom.scss
1
@use "core/mixins" as *;

[params.appearance] — Config-Driven Style Customization

The new [params.appearance] section allows you to customize SCSS variables directly in your Hugo config, replacing the old assets/css/_override.scss approach.

hugo.toml
1
2
3
4
5
[params.appearance]
global_font_family = "Custom Font, sans-serif"
global_background_color = "#ffffff"
global_background_color_dark = "#1a1a1a"
code_font_family = "Fira Code, monospace"

Each variable supports light and dark mode variants using the _dark suffix. This covers colors, fonts, sizes, and more across the entire theme. See the default hugo.toml for the full list of available variables.

Front Matter Changes

Old (v0.x)New (v1)
link_guard: truelink.guard: true (nested map)

The subtitle, featured_image, featured_image_preview, repost, weight, and message fields are now front-matter-only parameters (no longer configurable in hugo.toml).

Content Encryption

If you use the content encryption feature, the system has been completely rewritten:

  • Removed legacy Base64 obfuscation layer
  • New standalone package @hugo-fixit/encrypt with AES-256-GCM encryption
  • Removed vendored crypto-js and xxhash-wasm dependencies

To use encryption in v1, add the encrypt command to your build pipeline:

1
npx @hugo-fixit/encrypt

Layout Partials Path Change

If you reference theme partials in custom code, update the paths:

Old PathNew Path
layouts/_partials/layouts/layouts/_partials/base/

For example, layouts/_partials/layouts/header.html is now layouts/_partials/base/header.html.

Hugo Config Updates

  • languageCode in site config is deprecated; use locale instead (Hugo v0.158.0+)
  • .Language.LanguageName is deprecated; use .Language.Label (Hugo v0.158.0+)
  • [params.dev].debug has been removed; debug mode is now auto-detected from the Hugo environment

Quick Upgrade Checklist

  • Update Hugo to >= 0.161.0 (Extended)
  • Install Dart Sass >= 1.99.0
  • Update FixIt theme and related theme components to the latest version
  • Rename all camelCase config keys to snake_case
  • Flatten [params.page] — move all keys and sub-sections up to [params]
  • Consolidate linkTo* params into [params.post_link]
  • Move enablePWA to [params.app].pwa and restructure [params.app]
  • Move externalIcon to [params.link].external_icon
  • Move assets/css/_custom.scss to assets/scss/custom.scss
  • Replace assets/css/_override.scss with [params.appearance] config
  • Move assets/css/_variables.scss to assets/scss/_variables.scss
  • Move assets/js/_custom.js to assets/js/custom.ts or assets/js/custom.js
  • Update front matter: link_guard to link.guard
  • Update custom partials paths from layouts/_partials/layouts/ to layouts/_partials/base/
  • If using encryption: add npx @hugo-fixit/encrypt to your build pipeline
  • Update languageCode to locale in language config

Tip

The deprecation detection system will guide you through most of these changes. Build your site and check the Hugo warnings for specific migration hints.

If you run into issues during the upgrade, feel free to ask for help in the GitHub Discussions.


Related Content

Buy me a coffee
Lruihao AlipayAlipay
Lruihao WeChat PayWeChat Pay

Update Available

A new version of this site is available.