Skip to content

Trying to include files but in other directories--is this possible? #2114

Closed
@joelouthan

Description

@joelouthan

Question

In mdbook, here is my structure:

src/
 |-bibliography/
            |- biblio-sources.md
 |-confession-1689/
            |-1689-00-intro.md

In 1689-00-intro.md, I want to use {{#include}} to biblio-sources.md

When I do {{#include /bibliography/biblio-sources.md}}, I get this

2023-07-06 08:21:26 [ERROR] (mdbook::preprocess::links): Error updating "{{#include /bibliography/biblio-sources.md}}", Could not read file for link {{#include /bibliography/biblio-sources.md}} (/bibliography/biblio-sources.md)
2023-07-06 08:21:26 [WARN] (mdbook::preprocess::links): Caused By: No such file or directory (os error 2)

I can use ../bibliography but that breaks the image src inside of the file.

Is this even possible with {{#include}}?

Thank you.

Version

mdbook v0.4.30

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-questionCategory: A question on how to do something

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions