Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Hugo-md: Can't render layouts without floats #12676

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
edavidaja opened this issue May 4, 2025 · 2 comments
Open

Hugo-md: Can't render layouts without floats #12676

edavidaja opened this issue May 4, 2025 · 2 comments
Assignees
Labels
bug Something isn't working hugo
Milestone

Comments

@edavidaja
Copy link

Bug description

Doing as told:

❯ quarto preview reprex.qmd
pandoc
  to: >-
    markdown_strict+raw_html+all_symbols_escapable+backtick_code_blocks+fenced_code_blocks+space_in_atx_header+intraword_underscores+lists_without_preceding_blankline+shortcut_reference_links+autolink_bare_uris+emoji+footnotes+gfm_auto_identifiers+pipe_tables+strikeout+task_lists+tex_math_dollars+yaml_metadata_block+definition_lists+smart
  output-file: reprex.md
  standalone: true
  default-image-extension: png
  wrap: preserve
  variables: {}

FATAL (C:\Users\edavi\scoop\apps\quarto-prerelease\current\share\filters\main.lua:23868) An error occurred:
Can't render layouts without floats
This is a quarto bug. Please consider filing a bug report at https://github.com/quarto-dev/quarto-cli/issues
Error running filter C:\Users\edavi\scoop\apps\quarto-prerelease\current\share\filters\main.lua:
...op\apps\quarto-prerelease\current\share\filters\main.lua:1217: FATAL QUARTO ERROR
stack traceback:
        ...op\apps\quarto-prerelease\current\share\filters\main.lua:2635: in function 'fatal'
        ...op\apps\quarto-prerelease\current\share\filters\main.lua:2203: in function 'fail'
        ...op\apps\quarto-prerelease\current\share\filters\main.lua:2195: in function 'fail_and_ask_for_bug_report'
        ...op\apps\quarto-prerelease\current\share\filters\main.lua:23868: in field 'render'
        ...op\apps\quarto-prerelease\current\share\filters\main.lua:1217: in local 'filter_fn'
        ...op\apps\quarto-prerelease\current\share\filters\main.lua:653: in function <...op\apps\quarto-prerelease\current\share\filters\main.lua:643>
        (...tail calls...)
        ...rrent\share\pandoc\datadir\..\..\filters\modules/jog.lua:34: in upvalue 'run_filter_function'
        ...rrent\share\pandoc\datadir\..\..\filters\modules/jog.lua:223: in function <...rrent\share\pandoc\datadir\..\..\filters\modules/jog.lua:202>
        (...tail calls...)
        [C]: in function 'pandoc.List.map'
        ...rrent\share\pandoc\datadir\..\..\filters\modules/jog.lua:125: in upvalue 'recurse'
        ...rrent\share\pandoc\datadir\..\..\filters\modules/jog.lua:222: in local 'jogger'
        ...rrent\share\pandoc\datadir\..\..\filters\modules/jog.lua:171: in upvalue 'recurse'
        ...rrent\share\pandoc\datadir\..\..\filters\modules/jog.lua:222: in function <...rrent\share\pandoc\datadir\..\..\filters\modules/jog.lua:202>
        (...tail calls...)
        ...op\apps\quarto-prerelease\current\share\filters\main.lua:572: in function <...op\apps\quarto-prerelease\current\share\filters\main.lua:550>
        (...tail calls...)
        ...op\apps\quarto-prerelease\current\share\filters\main.lua:1318: in local 'callback'
        ...op\apps\quarto-prerelease\current\share\filters\main.lua:1336: in upvalue 'run_emulated_filter_chain'
        ...op\apps\quarto-prerelease\current\share\filters\main.lua:1372: in function <...op\apps\quarto-prerelease\current\share\filters\main.lua:1369>

Steps to reproduce

---
format: hugo-md
---

::: {layout-ncol="2"}
{{< placeholder 600 400 >}}
{{< placeholder 600 400 >}}
{{< placeholder 600 400 >}}
{{< placeholder 600 400 >}}
:::

Actual behavior

Render fails and requests bug report

Expected behavior

Document should render

Your environment

Windows Terminal
Windows 11 Pro

Quarto check output

Quarto 1.8.1
[>] Checking environment information...
      Quarto cache location: C:\Users\edavi\AppData\Local\quarto
[>] Checking versions of quarto binary dependencies...
      Pandoc version 3.6.3: OK
      NOTE: Dart Sass version 1.87.0 does not strictly match 1.85.1 and strict checking is enabled. Please use 1.85.1.
      Deno version 1.46.3: OK
      Typst version 0.13.0: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
      Version: 1.8.1
      Path: C:\Users\edavi\scoop\apps\quarto-prerelease\current\bin
      CodePage: 1252

[>] Checking tools....................OK
      TinyTeX: v2022.08
      Chromium: (not installed)

[>] Checking LaTeX....................OK
      Using: TinyTex
      Path: C:\Users\edavi\AppData\Roaming\TinyTeX\bin\win32\
      Version: 2022

[>] Checking Chrome Headless....................OK
      Using: Chrome found on system
      Path: C:\Program Files\Google\Chrome\Application\chrome.exe
      Source: Windows Registry

[>] Checking basic markdown render....OK

[>] Checking Python 3 installation....(None)

      Unable to locate an installed version of Python 3.
      Install Python 3 from https://www.python.org/downloads/

[>] Checking R installation...........OK
      Version: 4.5.0
      Path: C:/Users/edavi/scoop/apps/r/current
      LibPaths:
        - C:/Users/edavi/Documents/projects/edavidaja.com/content/posts/goruck-dc/renv/library/windows/R-4.5/x86_64-w64-mingw32
        - C:/Users/edavi/AppData/Local/R/cache/R/renv/sandbox/windows/R-4.5/x86_64-w64-mingw32/e26d703a
      knitr: 1.50
      rmarkdown: 2.29

[>] Checking Knitr engine render......OK
@edavidaja edavidaja added the bug Something isn't working label May 4, 2025
@mcanouil mcanouil added the hugo label May 4, 2025
@cscheid cscheid self-assigned this May 5, 2025
@cscheid cscheid added this to the v1.8 milestone May 5, 2025
@cscheid
Copy link
Collaborator

cscheid commented May 5, 2025

We should have a better error message here, but I don't know that we can resolve this issue properly.

The problem is that layout specifications are necessarily related to the output format, and when Quarto outputs to markdown, that indicates also a request to not resolve output formats. What would you expect the output to be here?

@cderv
Copy link
Collaborator

cderv commented May 5, 2025

In general, I would have thought that when a feature is not supported for a format, we would either warn and do nothing specific, or just do nothing.

Which means

---
format: hugo-md
---

::: {layout-ncol="2"}
{{< placeholder 600 400 >}}
{{< placeholder 600 400 >}}
{{< placeholder 600 400 >}}
{{< placeholder 600 400 >}}
:::

would be the same as

---
format: hugo-md
---

{{< placeholder 600 400 >}}
{{< placeholder 600 400 >}}
{{< placeholder 600 400 >}}
{{< placeholder 600 400 >}}

I don't know if that is the best, but I think I would aim to never remove content in output unless explicitly stated (e.g. when-format or unless-format), but would drop some feature when we know this is not supported (like layout-nol in hugo-md or more generally markdown derived output.)

Or completely error - but this would be really hard to support multi format in general

format: 
  html: default
  hugo-md: default

(it would require duplicated content and using condition div I guess)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hugo
Projects
None yet
Development

No branches or pull requests

4 participants