Skip to content

issue about sidebar.md not found #11

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

Merged
merged 2 commits into from
Oct 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,14 @@ If you want to paste images in markdown, welcome to use my other plugin:[md-past

I have fixed all the issues I met. If you find any issues, please report them to [issue](https://github.com/dzylikecode/VSCodeExt-docsify-Preview/issues)

The scroll will be in the wrong position when you save the markdown file if the current markdown file can't be found in the sidebar. I find the reason is that Docsify won't execute the function `hook.ready` if the Markdown file is not in the sidebar. So you'd better add the markdown file to the sidebar first before writing the Markdown file with joy.

## Release Notes

### 1.2.0

fix: issue

see more detail at https://github.com/dzylikecode/VSCodeExt-docsify-Preview/pull/11

### 1.1.0

- fix:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "docsify-preview",
"displayName": "docsify-Preview",
"description": "write docs easily with docsify",
"version": "1.1.2",
"version": "1.2.0",
"engines": {
"vscode": "^1.71.0"
},
Expand Down
6 changes: 6 additions & 0 deletions src/server/httpServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ let httpServer = {
if (fs.existsSync(filePath)) {
response.sendFile(filePath);
} else {
response.status(404).send({
error: {
status: 404,
message: "File not found: " + filePath,
},
});
console.log("File not found: " + filePath);
}
});
Expand Down