Skip to content

include shortcode ignores project absolute path ("/") when called from a file inside a "_folder". #968

@phy-che

Description

@phy-che

Bug description

Hi,

Steps to reproduce

My folder structure:
_lessons
_exercises
articles

In "articles" I have several includes like:
{{< include "/_lessons/lesson1.qmd" >}}
{{< include "/_exercise/exercise1.qmd" >}}

This works like a charm. Include files are perfectly found.

BUT...

Problem: include does not work when I call them from a file inside "_lessons".
Example: in file _lessons/lesson2.qmd:
{{< include "/_exercise/exercise1.qmd" >}}

Actual behavior

The compiler/interpreter understand that the path is "_lessons/_exercise/exercise1.qmd" although I use "/" sign in the path. Therefore the file is not found.

This only happens in includes called inside files inside _folders.
Something related to the _folders makes this root path crashes and be ignored.

Expected behavior

I expect that the compiler understand that "/" inside include shortcode (wherever it is, even in "_folders") is understood as the project root.

Your environment

OS: Ubuntu 24.04
VsCode: 1.116.0
Quarto v: 1.9.37

Quarto 1.9.37
[✓] Checking environment information...
Quarto cache location: /home/chema/.cache/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.8.3: OK
Dart Sass version 1.87.0: OK
Deno version 2.4.5: OK
Typst version 0.14.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.9.37
Path: /opt/quarto/bin

[✓] Checking tools....................OK
TinyTeX: (not installed)
Chromium: (not installed)
Chrome Headless Shell: (not installed)
VeraPDF: (not installed)

[✓] Checking LaTeX....................OK
Using: Installation From Path
Path: /usr/bin
Version: 2023

[✓] Checking Chrome Headless....................OK
Using: Chrome found on system
Path: /usr/bin/google-chrome
Source: PATH

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

[✓] Checking R installation...........(None)

  Unable to locate an installed version of R.
  Install R from https://cloud.r-project.org/

[✓] Checking Python 3 installation....OK
Version: 3.12.3
Path: /home/chema/WORKSPACE/quarto/web_phy-che_privada/.venv/bin/python
Jupyter: 5.9.1
Kernels: python3, web_phy-che_privada

[✓] Checking Jupyter engine render....OK

[✓] Checking Julia installation...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions