Skip to content

Commit

Permalink
🧱 Move db/ pages to ortfo/db/docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ewen-lbh committed Apr 22, 2024
1 parent 93739a3 commit c38d932
Show file tree
Hide file tree
Showing 39 changed files with 22 additions and 2,442 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,4 @@ public/*.schema.json
public/v*/*.schema.json
public/latest/*.schema.json
schemas/
db/
31 changes: 18 additions & 13 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { DefaultTheme, defineConfig, HeadConfig } from "vitepress"
import footnote from "markdown-it-footnote"
import deflists from "markdown-it-deflist"
import { faviconHead } from "./favicon"
import subcommand from "../db/commands/[subcommand].paths"
import { seoTags } from "./seo"
import { readdirSync } from "node:fs"

const ortfodbSidebar = [
{
Expand Down Expand Up @@ -140,16 +140,15 @@ const ortfodbSidebar = [
collapsed: true,
items: [
{ text: "Global options", link: "/db/commands/global-options" },
...subcommand
.paths()
.filter(
({ params: { subcommand } }) =>
!["README", "global-options"].includes(subcommand)
)
.map(({ params: { subcommand } }) => ({
text: subcommand.replace("-", " "),
link: `/db/commands/${subcommand}`,
})),
...readdirSync("db/commands")
.map((file) => {
const name = file.replace(/\.md$/, "")
return {
text: `ortfodb ${name.replace(/-/g, " ")}`,
link: `/db/commands/${name}`,
}
})
.filter(({ link }) => link !== "/db/commands/global-options"),
],
},

Expand Down Expand Up @@ -188,7 +187,7 @@ export default defineConfig({
lang: "en-US",
title: "ortfo",
description: "Make & manage your own homemade portfolio easily",
srcExclude: ["**/README.md", "ortfodb/**/*.md"],
srcExclude: ["**/README.md", "ortfodb/**/*.md", "ortfodb/docs/"],
head: [
[
"link",
Expand Down Expand Up @@ -232,7 +231,13 @@ export default defineConfig({
},
},
editLink: {
pattern: "https://github.com/ortfo/website/edit/main/:path",
pattern: ({ filePath }) =>
filePath.startsWith("db/")
? `https://github.com/ortfo/db/edit/main/docs/${filePath.replace(
/^db\//,
""
)}`
: `https://github.com/ortfo/website/edit/main/${filePath}`,
},
logo: {
dark: "/logo-dark.svg",
Expand Down
106 changes: 0 additions & 106 deletions db/building.md

This file was deleted.

Empty file removed db/caching.md
Empty file.
5 changes: 0 additions & 5 deletions db/changelog.data.js

This file was deleted.

11 changes: 0 additions & 11 deletions db/changelog.md

This file was deleted.

70 changes: 0 additions & 70 deletions db/client-libraries-versions.js

This file was deleted.

18 changes: 0 additions & 18 deletions db/client-libraries.data.js

This file was deleted.

Loading

0 comments on commit c38d932

Please sign in to comment.