### Bug description

I have a custom format that includes some boilerplate stuff that I'd rather just pop into ancillary `.qmd` files and include in the template. I can use, for example, `{{< include _footer.qmd >}}` in my `template.qmd` and then add to my `_extension.yml`:

```yaml
contributes:
  formats:
    html:
      format-resources:
        - _footer.qmd
```

And `_footer.qmd` is correctly added to the extension subfolder when I `quarto use template`. However, the include resolves to the document folder, not the actual location the `_footer.qmd` was copied to in `_extensions/[extension name]/_footer.qmd`.

Although that might be expected considering where the include is copied to (the extension subfolder), other resources that are bundled, like extension stylesheets that are marked under the `css` key, are correctly resolved relative to the extension subfolder rather than the document.

Here's a repro extension:

```
_extensions/
  ext-bundle-qmd/
    _extension.yml
    _footer.qmd
template.qmd
```

`template.qmd`:

````
---
title: Untitled
format:
  ext-bundle-qmd-html: default
author: James Goldie
date: last-modified
---

## Introduction

*TODO* Create an example file that demonstrates the formatting and features of your format.

This format includes a nice little extra bit that is included in a separate file!

{{< include _footer.qmd >}}
````

`_extension.yml`:

```yaml
title: Ext-bundle-qmd
author: James Goldie
version: 1.0.0
quarto-required: ">=1.3.0"
contributes:
  formats:
    html:
      theme: yeti
      format-resources:
        - _footer.qmd
```

`_footer.qmd`:

```
The footer includes some other nice things!
```

**Quarto version:** 1.3.21
**OS:** macOS 12.6.1

### Checklist

- [X] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [X] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
2022-12-01T04:01:37Z
jimjam-slam
bug
closed
Relative paths for includes bundled with extensions are not resolved correctly
https://github.com/quarto-dev/quarto-cli/issues/3531