Skip to content

Prevent mdBook from recursively copying all files in src to dest #2246

Open
@spmadden

Description

@spmadden

Problem

In a large multi-module mono-repository, it doesn't always make sense to have your book documentation locked into a single folder/book module. Each module should be able to contribute it's own set of markdown files to the common "book".

I can get 90% of the way there by putting a book.toml and SUMMARY.md file at the root of the repository, and setting src = '.' in book.toml. However, this then copies the entire repository to the output/dest directory, which is obviously inadvisable.

Proposed Solution

Until we get some of the other PRs closed with better relative & absolute links support (which will solve my problem a better way), recommend adding a flag to disable the recursive file copy in the HTML renderer at https://github.com/rust-lang/mdBook/blob/master/src/renderer/html_handlebars/hbs_renderer.rs#L631 , which will give me the final behavior I'm looking for.

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: Enhancement or feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions