Skip to content

Commit

Permalink
Merge pull request #1406 from quarto-dev/sync-1392-to-prerelease
Browse files Browse the repository at this point in the history
  • Loading branch information
cderv authored Oct 23, 2024
2 parents 150c3b4 + d6a5fc7 commit a0add88
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/authoring/includes.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ To include a file, add the `{{{< include >}}}` shortcode at the location in your

::: callout-important

Include shortcodes are equivalent to copying and pasting the text from the included file into the main file. This means that relative references (links, images, etc.) inside the included file resolve based on the directory of the main file not the included file.
Include shortcodes are equivalent to copying and pasting the text from the included file into the main file.
This means that relative references (links, images, other includes, etc.) inside the included file resolve based on the directory of the main file not the included file.
Use absolute (to the project root) paths for links, images, or other includes, in included files to ensure they resolve correctly, *e.g.*, `[A Figure Reused](/path/to/image.png)` or `{{< include /path/to/_file.qmd >}}`.

It also means that if the included file has a metadata block, that block will take effect in all included files. In most cases, having metadata blocks in an included file will cause unexpected behavior.

Expand Down Expand Up @@ -110,4 +112,4 @@ code span.in {
font-style: normal;
}
</style>
```
```

0 comments on commit a0add88

Please sign in to comment.