Skip to content

GetRemote: failed to resolve media file woff, woff2 when upgrading to Docsy v0.13 → v0.12. #2420

@jrjohnson91

Description

@jrjohnson91

Environment

  • Version of Docsy you are using: v0.13
  • How are you using Docsy? As a:
    • Hugo module
    • NPM module
    • Git submodule
    • Other:
  • Version of Hugo you are using (output of hugo version): hugo v0.152.2-6abdacad3f3fe944ea42177844469139e81feda6+extended linux/amd64 BuildDate=2025-10-24T15:31:49Z VendorInfo=gohugoio
  • OS:
    • Linux
    • macOS
    • Windows
    • Other:

Problem:

I am receiving the error GetRemote: failed to resolve media type for remote resoure when trying to get “https://unpkg.com/katex@latest/dist/fonts/KaTeX_***.woff” files after upgrading to Docsy v0.13 from v0.12.

Steps:

  1. Create a container with the following packages:

    sh-5.2# node --version
    v24.6.0
    sh-5.2# hugo version
    hugo v0.152.2-6abdacad3f3fe944ea42177844469139e81feda6+extended linux/amd64 BuildDate=2025-10-24T15:31:49Z VendorInfo=gohugoio
    sh-5.2# go version
    go version go1.25.3 (Red Hat 1.25.3-1.el10_1) linux/amd64
  2. Copy src files

    # hugo.toml` 
    baseURL = 'https://compositepy.pages.boeing.com/site-hugo'
    languageCode = 'en-us'
    title = 'CompositePy Docs'
    
    enableRobotsTXT = true
    
    # Will give values to .Lastmod etc.
    enableGitInfo = true
    
    # Language settings
    contentDir = "content/en"
    defaultContentLanguage = "en"
    defaultContentLanguageInSubdir = false
    # Useful when translating.
    enableMissingTranslationPlaceholders = true
    
    [markup]
      [markup.highlight]
        style = "monokailight"
        noClasses = false
      [markup.goldmark]
        [markup.goldmark.renderer]
          unsafe = true
        [markup.goldmark.extensions] # https://www.docsy.dev/docs/adding-content/diagrams-and-formulae/
          [markup.goldmark.extensions.passthrough]
            enable = true
            [markup.goldmark.extensions.passthrough.delimiters]
              block = [['\[', '\]'], ['$$', '$$']]
              inline = [['\(', '\)']]
    
    # Comment out this section to disable the "Print entire section" feature
    # See https://www.docsy.dev/docs/adding-content/print/
    [outputs]
    section = [ "HTML", "RSS"]
    
    # Everything below this are Site Params
    
    [taxonomies]
    # you can change these or add your own
    # see also params.taxonomy towards the end of this file.
    tag = "tags"
    category = "categories"
    
    [params]
      copyright = "The Boeing Company"
      privacy_policy = "https://www.boeing.com/privacy-and-cookie-policy"
    
      # Repository configuration (URLs for in-page links to opening issues and suggesting changes)
      github_repo = "https://git.web.boeing.com/compositepy/site-hugo"
      github_branch = "main"
      # An optional link to a related project repo. For example, the sibling repository where your product code lives.
      github_project_repo = "https://git.web.boeing.com/compositepy"
    
      # Enable Lunr.js offline search
      offlineSearch = true
    
      # User interface configuration
      [params.ui]
      # Enable to show the side bar menu in its compact state.
      sidebar_menu_compact = false
      #  Set to true to disable breadcrumb navigation.
      breadcrumb_disable = false
      #  Set to true to hide the sidebar search box (the top nav search box will still be displayed if search is enabled)
      sidebar_search_disable = false
      #  Set to false if you don't want to display a logo (/assets/icons/logo.svg) in the top nav bar
      navbar_logo = true
      # Set to true to disable the About link in the site footer
      footer_about_enable = true
      # Show light and dark menu
      showLightDarkModeMenu = true
    
      # Enable KATEX site wide  
      [params.katex]
        enable = true 
    
    ###############################################################################
    # Hugo Module
    ###############################################################################
    
    [module]
      proxy = 'sres.web.boeing.com/artifactory/api/go/go-virtual'
      [module.hugoVersion]
        extended = true
        min = "0.152.2"
      [[module.imports]]
        path = 'github.com/google/docsy'
        disable = false
    // go.mod
    module git.web.boeing.com/joshua.r.johnson/site-hugo
    
    go 1.25.3
    
    require github.com/google/docsy v0.13.0 // indirect
    // go.sum
    github.com/FortAwesome/Font-Awesome v0.0.0-20241216213156-af620534bfc3/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
    github.com/google/docsy v0.13.0 h1:Y1oy5SmQ0ikJJsvkuefEVZMj0MTXLmVfpXbt7Ytc7rc=
    github.com/google/docsy v0.13.0/go.mod h1:1Fj1W1O3esZh7IBQ8XAYtxtg10udBXuGI89+LUQc1AU=
    github.com/twbs/bootstrap v5.3.8+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
  3. npm install

  4. hugo server

Output:

sh-5.2# hugo server
hugo: downloading modules …
hugo: collected modules in 5623 msWatching for changes in /src/{archetypes,assets,content,layouts,package.json}
Watching for config changes in /src/hugo.toml, /src/go.mod
Start building sites …
hugo v0.152.2-6abdacad3f3fe944ea42177844469139e81feda6+extended linux/amd64 BuildDate=2025-10-24T15:31:49Z VendorInfo=gohugoio

ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_AMS-Regular.woff".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_Caligraphic-Bold.woff".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_Caligraphic-Regular.woff".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_Fraktur-Bold.woff".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_Fraktur-Regular.woff".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_Main-Bold.woff".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_Main-BoldItalic.woff".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_Main-Italic.woff".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_Main-Regular.woff".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_Math-BoldItalic.woff".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_Math-Italic.woff".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_SansSerif-Bold.woff".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_SansSerif-Italic.woff".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_SansSerif-Regular.woff".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_Script-Regular.woff".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_Size1-Regular.woff".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_Size2-Regular.woff".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_Size3-Regular.woff".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_Size4-Regular.woff".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_Typewriter-Regular.woff".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_AMS-Regular.woff2".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_Caligraphic-Bold.woff2".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_Caligraphic-Regular.woff2".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_Fraktur-Bold.woff2".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_Fraktur-Regular.woff2".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_Main-Bold.woff2".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_Main-BoldItalic.woff2".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_Main-Italic.woff2".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_Main-Regular.woff2".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_Math-BoldItalic.woff2".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_Math-Italic.woff2".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_SansSerif-Bold.woff2".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_SansSerif-Italic.woff2".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_SansSerif-Regular.woff2".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_Script-Regular.woff2".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_Size1-Regular.woff2".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_Size2-Regular.woff2".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_Size3-Regular.woff2".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_Size4-Regular.woff2".
ERROR Could not retrieve KaTeX font file from CDN. Reason: template: _partials/scripts/katex.html:41:24: executing "_partials/scripts/katex.html" at <resources.GetRemote>: error calling GetRemote: failed to resolve media type for remote resource "https://unpkg.com/katex@latest/dist/fonts/KaTeX_Typewriter-Regular.woff2".
Built in 10037 ms
Error: error building site: logged 40 error(s)

Solution:

  1. Adding the following to config.toml based on this issue.

    [mediaTypes.'font/woff']
      delimiter = '.'
      suffixes = ['woff']
    
    [mediaTypes.'font/woff2']
      delimiter = '.'
      suffixes = ['woff2']

Hugo discourse issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions