-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docs - load all markdown file.
- Loading branch information
vhtmui_5600g
committed
Nov 20, 2024
1 parent
0c2bcca
commit ea7b585
Showing
11 changed files
with
42 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
/** @type {import('./$types').PageServerLoad} */ | ||
export async function load({parent}) { | ||
const {dir}= await parent(); | ||
return {}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,4 @@ | |
<title>Docs</title> | ||
</svelte:head> | ||
|
||
{#each data.dir as dir } | ||
<p>{dir}</p> | ||
{/each} | ||
|
6 changes: 3 additions & 3 deletions
6
src/routes/docs/doc/+page.server.js → src/routes/docs/[doc]/+page.server.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { readFile } from 'node:fs/promises'; | ||
/** @type {import('./$types').PageServerLoad} */ | ||
export async function load({ parent, cookies }) { | ||
export async function load({ parent, params }) { | ||
// get content | ||
const { mdContent } = await parent(); | ||
|
||
const h1 = await readFile('./src/routes/docs/doc/a.txt','utf8'); | ||
const content = mdContent.get(params.doc); | ||
|
||
return { mdContent ,h1}; | ||
return { content }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters