Skip to content

Quarto Preview Fails on Windows (os error 123) Due to Hugo Shortcode in _quarto.yml #99

@KomatiBhavaniSankar

Description

@KomatiBhavaniSankar

❗ Quarto Preview Fails on Windows (os error 123) Due to Hugo Shortcode in _quarto.yml

Description

Running quarto preview on Windows results in a fatal error because Quarto tries to interpret a Hugo shortcode inside _quarto.yml as a file path, which is invalid on Windows. This causes Windows to throw:

ERROR: The filename, directory name, or volume label syntax is incorrect. (os error 123)

Exact Error Output

ERROR: The filename, directory name, or volume label syntax is incorrect. (os error 123): 
stat '[{{< fa heart >}} Support GRASS]({{< var grass.support >}}){.btn .btn-outline-support .btn role="button" align="center"}'
Image

Cause

The _quarto.yml file contains Hugo-style shortcodes, which Quarto does not support:

margin-header: |
  [{{< fa heart >}} Support GRASS]({{< var grass.support >}}){.btn .btn-outline-support .btn role="button" align="center"}

Quarto attempts to process this value and passes it to the filesystem stat() call.
Windows interprets this as an invalid path and throws os error 123.

Impact

This issue specifically affects Windows users.
Windows contributors are unable to run quarto preview, which prevents them from testing or building documentation locally.

Steps to Reproduce

  1. Clone the repository on Windows

  2. Run:

    quarto preview
  3. The build fails with the error above.


Suggested Fix

Replace Hugo syntax ({{< >}}) with Quarto-compatible HTML or FontAwesome syntax.

Example fix:

margin-header: |
  [<i class="fa fa-heart"></i> Support GRASS](https://numfocus.org/donate-to-grass){.btn .btn-outline-support align="center"}

Expected Behavior (After Fix)

After applying the fix:

  • Quarto should preview the website normally across all operating systems (Windows, macOS, Linux).
  • Unsupported icon or shortcode syntax should no longer break the build.
  • Windows contributors should be able to work on documentation without errors.

Environment

  • OS: Windows 10 / Windows 11
  • Command: quarto preview
  • Affected file: _quarto.yml

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions