Reputation: 1225
I'd like to include the readme.md file in the index of a quarto book (so I do not need to duplicate content).
According to these instructions in the official documentation, that should be possible.
This is my current structure:
/folders
...
_quarto.yml
index.qmd
README.md
...
This is my index.qmd file:
# Preface {.unnumbered}
This is a Quarto book.
{{< include README.md >}}
Regretfully, the readme file is not included. Instead, {{< include README.md >}} is printed as a text.
EDIT:
I have created this github project:https://github.com/ccamara/quarto-book-test . You can see the outputs here: https://ccamara.github.io/quarto-book-test/
This is what I've done so far:
quarto create-project mybook --type book
README.md
file in the project's rootindex.md
(in the project's root) and added {{< include README.md >}}
quarto preview
WARNING: Shortcode include is not recognized.
index.md
does not render README.md
contents, instead it displays the include shortcode as a regular text (see screnshot below).Upvotes: 2
Views: 976
Reputation: 1966
I can't reproduce, unfortunately. I recreated your example, and got this:
This happens in quarto preview
and quarto render
both. What version and OS are you running? Can you run this and report the result? Thanks.
$ quarto --version
Upvotes: 2