-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Generate simple .gitignore on init #111
Conversation
Travis can only build on nightly because of the unstable feature. |
First of all, thanks for doing this! There are a couple of issues with this though:
All in all, I think this requires a bit of work for very little gain. For now the only thing that has to be put in a In the future (after the rewrite) you will be able to set individual output paths for different renderers. Maybe it will be more useful then. What do you think? If you still want to work on this I would be happy to discuss it further to solve the remaining issues and help you with the implementation. |
I agree. (I'll add it to the README 😉)
Git can handle multiple I don't mind putting the extra effort to get this to work because my 1st priority this period is to learn Rust. I'm also using mdbook for my own project's documentation under version control and I assume more would like to do that too as it is described as "Like Gitbook but implemented in Rust". One course of action would be to 1. check for git, 2. make sure the Alternatively, we could check for git and display a helpful message like this:
What do you think? |
Good to know!
That is one possibility. I think the option I like the most is: When running With this strategy you don't have to check for a git folder, the user can choose for himself if he needs it or not. Does that sound like a good plan to you? |
👍 Just for reference, this is the possibility matrix I'm aiming for (and manually testing against):
Ok, I coded the last possibility but it's not something I can test as the |
Updated PR description & title to reflect latest code changes. |
Thanks for this! :) |
Thanks! 😄 |
Whoops! Looks like putting the I'll work on a fix. |
Ow yes, I forgot about that. The content of the destination folder is removed before every render to avoid having ghost files. I would put the .gitignore in the root folder and add a line with the destination path in it. That should do the job. |
Handles: https://github.com/azerupi/mdBook/issues/110
Generates a simple
.gitignore
file inside the book's destination folder with the following contents:It is intended to instruct git to ignore the auto-generated destination folder's contents.