-
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.
chore: basic doc setup completed (#6)
- Loading branch information
Showing
16 changed files
with
134 additions
and
463 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
layout: ./base.vto | ||
page_css: apps.css | ||
--- | ||
<div class="apps"> | ||
<header class="apps-body"> | ||
<div class="apps-content"> | ||
{{ content |> md }} | ||
</div> | ||
</header> | ||
</div> |
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 |
---|---|---|
|
@@ -44,24 +44,13 @@ | |
{{ /if }} | ||
|
||
<script src="/main.js" type="module"></script> | ||
|
||
<link | ||
rel="stylesheet" | ||
href="https://cdn.jsdelivr.net/npm/@docsearch/[email protected]/dist/style.css" | ||
integrity="sha256-brWyd+lKlaU/B5Lhqd/FUXyZQu4rVmbFRsP2E8S2CLw=" | ||
crossorigin="anonymous"> | ||
</head> | ||
<body> | ||
{{ include "templates/navbar.vto" }} | ||
<div> | ||
{{ content }} | ||
</div> | ||
{{ include "templates/footer.vto" }} | ||
|
||
<script | ||
src="https://cdn.jsdelivr.net/npm/@docsearch/[email protected]/dist/umd/index.js" | ||
integrity="sha256-7XYP2JLQrbyOqBKrAn8sT3l8PG/v2j6C3A5EyBDp9to=" | ||
crossorigin="anonymous" defer></script> | ||
|
||
<script type="text/javascript"> | ||
window.addEventListener('DOMContentLoaded', () => { | ||
|
@@ -74,15 +63,6 @@ | |
mediaMatch(mediaQuery).addEventListener("change", (event) => { | ||
storeTheme(event.matches); | ||
}); | ||
|
||
docsearch({ | ||
appId: "O7U42EOTRQ", | ||
apiKey: "bcb89a19824e0100724bc16011dea6f8", | ||
indexName: "oifc", | ||
container: document.getElementById("search"), | ||
debug: false | ||
}); | ||
}, false); | ||
</script> | ||
</body> | ||
</html> |
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,6 +1,9 @@ | ||
{ | ||
"imports": { | ||
"@std/fs": "jsr:@std/fs@^1.0.2", | ||
"@std/path": "jsr:@std/path@^1.0.3", | ||
"@mdit/plugin-alert": "npm:@mdit/plugin-alert@^0.13.1", | ||
"empathic": "npm:empathic@^1.0.0", | ||
"lume/": "https://deno.land/x/[email protected]/", | ||
"lume_markdown_plugins/": "https://deno.land/x/[email protected]/", | ||
"vento/": "https://deno.land/x/[email protected]/" | ||
|
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { existsSync, expandGlob } from "@std/fs"; | ||
import { join, parse } from "@std/path"; | ||
import { appsNS, getRoot } from "../utils.ts"; | ||
|
||
const root = getRoot() | ||
const docPath = join('docs', 'doc') | ||
|
||
for await (const file of await Array.fromAsync(expandGlob("**/*.md", { | ||
root: join(root, appsNS), | ||
exclude: ["**/node_modules/**"], | ||
includeDirs: false | ||
}))) { | ||
const { path } = file; | ||
const { dir } = parse(path) | ||
const dist = !dir.includes(appsNS) ? join(root, docPath, appsNS) : dir.replace(appsNS, join(docPath, appsNS)) | ||
if (!existsSync(dist)) await Deno.mkdir(dist, { recursive: true }) | ||
await Deno.copyFile(path, join(dist, 'index.md')) | ||
} | ||
console.log("Copied and renamed markdown file") |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { dirname, resolve } from "@std/path"; | ||
import { up } from 'npm:empathic/find'; | ||
|
||
export const appsNS = 'apps' | ||
export const getRoot = () => { | ||
const cwd = resolve(Deno.cwd()) | ||
return dirname(up("LICENSE", { cwd }) || cwd) | ||
} |
Oops, something went wrong.