Skip to content

Commit 00628a5

Browse files
authored
issue about sidebar.md not found (#11)
* issue about sidebar * release 1.2.0
1 parent d7380ff commit 00628a5

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,14 @@ If you want to paste images in markdown, welcome to use my other plugin:[md-past
5959

6060
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)
6161

62-
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.
63-
6462
## Release Notes
6563

64+
### 1.2.0
65+
66+
fix: issue
67+
68+
see more detail at https://github.com/dzylikecode/VSCodeExt-docsify-Preview/pull/11
69+
6670
### 1.1.0
6771

6872
- fix:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "docsify-preview",
33
"displayName": "docsify-Preview",
44
"description": "write docs easily with docsify",
5-
"version": "1.1.2",
5+
"version": "1.2.0",
66
"engines": {
77
"vscode": "^1.71.0"
88
},

src/server/httpServer.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ let httpServer = {
4343
if (fs.existsSync(filePath)) {
4444
response.sendFile(filePath);
4545
} else {
46+
response.status(404).send({
47+
error: {
48+
status: 404,
49+
message: "File not found: " + filePath,
50+
},
51+
});
4652
console.log("File not found: " + filePath);
4753
}
4854
});

0 commit comments

Comments
 (0)