Skip to content

Feature: suppress copying files by configuration #1156

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
FrankHB opened this issue Mar 3, 2020 · 5 comments
Open

Feature: suppress copying files by configuration #1156

FrankHB opened this issue Mar 3, 2020 · 5 comments
Labels
A-Configuration Area: Configuration

Comments

@FrankHB
Copy link
Contributor

FrankHB commented Mar 3, 2020

I find no options to ignore specific files to be built. Similar problems for watch/serve commands were mentioned in #831, and the improvement of the [build] configuration was also suggested there. But I think this is still a different issue better to be tracked separately.

A workaround to this problem is to specify src to a subdirectory. This can work, but far from perfect. It is not pleasant for transition from a repository of documents (consisting of plenty of .md files in the root directory) already checked in, as moving the files from the root to the subdirectory leads to much noise in the VCS history.

(Moreover, relying on .gitignore is problematic. What if there is only .hgignore, for example?)

@FrankHB
Copy link
Contributor Author

FrankHB commented Mar 3, 2020

To be more specific, Butbucket serves the project wikis as Mercurial repositories, but the Markdown features are limited. So, I decide to rearrange the documents in some other forms (hopefully with HTML output). However, at least the original .md documents still work without any changes online. If mdbook does not copy files (like my local .hg directory) by default, I can just start to work by simply adding book.toml and SUMMARY.md. This is not possible without some dirty hacks, and the workaround mentioned above does not work well because it breaks the file layout and I have to edit some internal links to make sure it can still work as a wiki. Currently I work it around by symbolic links in a separate src directory out of the tree, which is still a bit annoying for maintenance.

@FrankHB
Copy link
Contributor Author

FrankHB commented Mar 3, 2020

Since the default behavior may be expected, I wish the configuration opt-in. This should not break any existing usage.

@ehuss ehuss added the A-Configuration Area: Configuration label Apr 21, 2020
@tv42
Copy link

tv42 commented May 25, 2021

I would love to use src = "." and not have unnecessary things like my build script or .gitignore copied into the output directory.

This repository contains very little else than the markdown files, I want them to be front and center, not in a subdirectory.

@Bergmann89
Copy link

Any updates on this issue? Would love to have this feature too! :)

@sanmai-NL
Copy link

sanmai-NL commented Mar 1, 2024

Can this be closed in favor of the more elaborated duplicate #1187?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Configuration Area: Configuration
Projects
None yet
Development

No branches or pull requests

5 participants