Config folder

Per the hugo documenation I set up a config folder the following way:

└── _default
    ├── hugo.yaml
    └── params.yaml

but that only applied the config for my hugo.yaml, but my params.yaml which contains the params config is not being applied. I use the LoveIt theme, any help would be greatly appreciated.

Thank you

Have you tried this configuration?

└── _default
    ├── config.yaml
    └── params.yaml

Despite the fact that Hugo had changed the name of the main of the config file (Configure Hugo | Hugo) you can try to rename your hugo.yaml to config.yaml.

By the way if you can share your code (on a Git repository) it will be easier to help you.

Hey thanks for your response, yes I just tried your suggestion:

└── _default
    ├── config.yaml
    └── params.yaml

but that did not work either, I welcome more suggestions. thanks again

Please post the content of the file.

the content of my params.yaml is listed below, but keep in mind that when I move that content into my hugo.yaml, it works so I assume the syntax is fine:

  # site default theme ["auto", "light", "dark"]
  defaultTheme: "auto"
  # public git repo URL only then enableGitInfo is true
  gitRepo: ""
  fingerprint: ""
  dateFormat: "2006-01-02"
  # website title for Open Graph and Twitter Cards
  title: "My site"
  # website description for RSS, SEO, Open Graph and Twitter Cards
  description: "This is me Michael"
  # website images for Open Graph and Twitter Cards
  images: []

  # Header config
    # desktop header mode ["fixed", "normal", "auto"]
    desktopMode: "fixed"
    # mobile header mode ["fixed", "normal", "auto"]
    mobileMode: "auto"
    # Header title config
      # URL of the LOGO
      logo: ""
      # title name
      name: Michael
      # you can add extra information before the name (HTML format is supported), such as icons
      pre: ""
      # you can add extra information after the name (HTML format is supported), such as icons
      post: ""
      # whether to use typeit animation for title name
      typeit: false

  # Footer config
  # 页面底部信息配置
    enable: true
    # Custom content (HTML format is supported)
    # 自定义内容 (支持 HTML 格式)
    custom: ""
    # whether to show Hugo and theme info
    # 是否显示 Hugo 和主题信息
    hugo: true
    # whether to show copyright info
    # 是否显示版权信息
    copyright: true
    # whether to show the author
    # 是否显示作者
    author: true
    # site creation time
    # 网站创立年份
    since: 2022
    # ICP info only in China (HTML format is supported)
    # ICP 备案信息,仅在中国使用 (支持 HTML 格式)
    icp: ""
    # license info (HTML format is supported)
    # 许可协议信息 (支持 HTML 格式)
    license: ""

  # Section (all posts) page config
  # Section (所有文章) 页面配置
    # special amount of posts in each section page
    # section 页面每页显示文章数量
    paginate: 20
    # date format (month and day)
    # 日期格式 (月和日)
    dateFormat: "01-02"
    # amount of RSS pages
    # RSS 文章数目
    rss: 10

  # List (category or tag) page config
  # List (目录或标签) 页面配置
    # special amount of posts in each list page
    # list 页面每页显示文章数量
    paginate: 20
    # date format (month and day)
    # 日期格式 (月和日)
    dateFormat: "01-02"
    # amount of RSS pages
    # RSS 文章数目
    rss: 10

# home page config
    rss: 10
      enable: true
      gravatarEmail: ""
      avatarURL: "/images/pullup1.png"
      title: ""
      subtitle: "This is Michael's Blog"
      typeit: true
      social: true
      disclaimer: ""
      enable: true
      paginate: 6
      defaultHiddenFromHomePage: false

  # social config
    GitHub: ""
    Linkedin: ""
    Twitter: "xxxx"
    Instagram: "xxxx"
    Facebook: "xxxx"
    Telegram: "xxxx"
    Medium: ""
    Gitlab: ""
    Email: ""
└── _default/
    ├── hugo.yaml
    └── params.yaml

Works for me using your content above.

{{ warnf "%s" site.Params.header.desktopMode }} --> fixed

If you need further assistance you’ll need to share your repo.

ok thanks, here is my repo:

I kept the config structure above and params.yaml is not implemented when structured this way

The params.yaml that you pasted above does not match the file in your repository.

Remove the “params:” bit at the top of your file.


Thank you so much jmooring, that was a thorn in my foot and now it is gone.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.