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
Viewing/Editing summary.md deletes all my files #2323
Comments
Can you clarify exactly what files were removed (what were their paths)? What does mdbook doesn't ever delete anything except the output directory called |
Yes, I can try.
So the first time it happened, I had created the MD file I was working on
in src/ myself on a file called chapter8.md, forgetting that summary.md
would make it for me, so when I updated summary.md, a new page was created
(with a title at the top), deleting the one I had, PLUS all of the MD pages
after that page listed in summary.MD.
Today, all I did was open summary.md, and all of my 300+ files suddenly
became "U"s and showed as deleted in "Staged Changes". I was able to revert
to the last commit and it was ok after that.
Of course now, I just tried adding a new page on summary.md and it worked
perfectly. I'm in office hours for the JS course tonight, but I'll go look
tomorrow and see what I notice in the other branches from when it all went
wrong the first time....See what other details I can provide.
Here's the TOML file:
[book]
authors = ["Erika Lee"]
language = "en"
multilingual = false
src = "src"
title = "I365 JavaScript"
…On Thu, Feb 22, 2024 at 8:59 PM Eric Huss ***@***.***> wrote:
Can you clarify exactly what files were removed (what were their paths)?
What does book.toml contain?
mdbook doesn't ever delete anything except the output directory called
book by default.
—
Reply to this email directly, view it on GitHub
<#2323 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFNJ75ZPU25M3NTXQHWLV3YU7ZYLAVCNFSM6AAAAABDV6JMDSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRQGYZTGNRUHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Hi Eric,
I think I have a better idea of what is happening. Using mdbook within
VSCode and I'm using VSCode's Source Control panel to commit and sync.
Not sure always what the trigger for this is, but it's been so far this
week (A) do some task: (1) added a new file from the Finder, (2) modified
only the .gitignore and (3) moved example files into a folder in src/
(which maybe I'm not supposed to do, but that's been working), and (4)
accidentally typed in Terminal while it was running. But it feels very
random and it doesn't happen EVERY time I have the book running and make a
change to a page. If I can narrow that part down, I'll send more details.
And then (B) run *mdbook serve --open*. That's when everything I've been
working on *gets set to Untracked*. It doesn't happen when I haven't made
changes and run mdbook. And it doesn't happen every time I make changes and
then run the book. [Screenshot to show what this looks like]
And then because I want to commit what I've been working on, I do so, and
if I'm time strapped and don't notice this has happened, and I "Sync" so
the students will see the new pages, it deletes all the pages because it
untracks them, removes them from the repo and then updates my local repo to
match. I can go back to old commits, but I've still lost a lot each time
this was happening. I at least now know what to look for and not Sync until
I have to and only after a commit only for that step.
Now that I know this untracking is happening, when I see the green 'U'
files, I'm running *git reset HEAD .* and that's working to put everything
back in tracking mode.
…-e-
On Thu, Feb 22, 2024 at 9:26 PM Erika Biga Lee ***@***.***>
wrote:
Yes, I can try.
So the first time it happened, I had created the MD file I was working on
in src/ myself on a file called chapter8.md, forgetting that summary.md
would make it for me, so when I updated summary.md, a new page was created
(with a title at the top), deleting the one I had, PLUS all of the MD pages
after that page listed in summary.MD.
Today, all I did was open summary.md, and all of my 300+ files suddenly
became "U"s and showed as deleted in "Staged Changes". I was able to revert
to the last commit and it was ok after that.
Of course now, I just tried adding a new page on summary.md and it worked
perfectly. I'm in office hours for the JS course tonight, but I'll go look
tomorrow and see what I notice in the other branches from when it all went
wrong the first time....See what other details I can provide.
Here's the TOML file:
[book]
authors = ["Erika Lee"]
language = "en"
multilingual = false
src = "src"
title = "I365 JavaScript"
On Thu, Feb 22, 2024 at 8:59 PM Eric Huss ***@***.***>
wrote:
> Can you clarify exactly what files were removed (what were their paths)?
> What does book.toml contain?
>
> mdbook doesn't ever delete anything except the output directory called
> book by default.
>
> —
> Reply to this email directly, view it on GitHub
> <#2323 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAFNJ75ZPU25M3NTXQHWLV3YU7ZYLAVCNFSM6AAAAABDV6JMDSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRQGYZTGNRUHE>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
Weird, I read this issue a couple days ago and I think I just saw the same behavior. I'm pretty sure it's a VS Code issue, or rather possibly an issue with a Markdown plugin. @ebigalee do you happen to use Markdown All in One? |
No, I don’t though that looks like a great extension. I haven’t had so much markdown to write that I’ve gone looking for help with it. More now that I’m writing books in mdbook.BUT - seems to be fixed? And I’ve come to think you are right. It’s a VS Code problem. I’m still seeing the issue, because if you view the source control panel, it will show like 300 changes, then suddenly they are gone and it’s just the updates one would expect. And really this week, maybe it hasn’t even been doing that. All is okay now. I’ve even convinced other faculty members at IU to try it for their courses too. Erika LeeOn Apr 4, 2024, at 9:15 PM, josh rotenberg ***@***.***> wrote:
Weird, I read this issue a couple days ago and I think I just saw the same behavior. I'm pretty sure it's a VS Code issue, or rather possibly an issue with a Markdown plugin. @ebigalee do you happen to use Markdown All in One?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Problem
When I at, first set up my book, I updated summary.md and it made the pages for me. Later, I sometimes did that, sometimes made the page and then made a choice about whether to include it. (I don't know if that is relevant) But regardless, I'm at a point where I need to add new pages and when I click on summary.md in VSCode and open the file, even if I don't edit it, it marks all of my pages as uncommited and deletes the content.
Steps
Possible Solution(s)
No response
Notes
It's possible that this is only an issue if running: mdbook serve --open but I'm not sure and I'm scared to go back and try this. I'm in the middle of the semester trying to use this as a way to provide a course reference / workbook and I don't want to lose anything else. The first time it happened, it deleted all the MD files I have made under src that were impacted by me reordering summary.md and created new files that only had the title. It deleted my versions with all my work, even though most of those, perhaps all of those files were originally created by adding to summary.md in the first place. Please help.
Version
The text was updated successfully, but these errors were encountered: