Skip to content

Commit

Permalink
Merge pull request #4088 from systeminit/fix-docs-Ensure-docs-works-w…
Browse files Browse the repository at this point in the history
…ith-DEV_HOST-and-DEV_PORT

fix(docs): Ensure docs works with DEV_HOST and DEV_PORT
  • Loading branch information
stack72 authored Jul 4, 2024
2 parents e1f33fe + f006f2a commit 4a5b4bc
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 26 deletions.
2 changes: 2 additions & 0 deletions app/docs/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DEV_HOST=localhost
DEV_PORT=5173
2 changes: 1 addition & 1 deletion app/docs/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ load(

pnpm_task_binary(
name = "dev",
command = "docs:dev",
command = "dev",
srcs = glob(["src/**/*"]),
path = "app/docs",
deps = [
Expand Down
6 changes: 5 additions & 1 deletion app/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"version": "0.0.0",
"type": "module",
"scripts": {
"docs:dev": "vitepress dev src"
"dev": "pnpm run start",
"start": "vitepress dev src"
},
"devDependencies": {
"@si/eslint-config": "workspace:*",
Expand All @@ -16,5 +17,8 @@
},
"volta": {
"extends": "../../package.json"
},
"dependencies": {
"dotenv": "^16.0.3"
}
}
53 changes: 29 additions & 24 deletions app/docs/src/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
import { defineConfig } from "vitepress";
import dotenv from "dotenv";

async function load() {
return defineConfig({
title: "System Initiative Docs",
description: "Description goes here",
markdown: {
theme: {
light: "github-light",
dark: "github-dark",
},
dotenv.config();

export default defineConfig({
title: "System Initiative Docs",
description: "Description goes here",
markdown: {
theme: {
light: "github-light",
dark: "github-dark",
},
cleanUrls: true,
themeConfig: {
nav: [
{ text: "Home", link: "/" },
{ text: "Tutorials", link: "/tutorials/" },
{ text: "Reference Docs", link: "/reference/" },
{ text: "Changelog", link: "/changelog/" },
],
search: {
provider: "local",
},
},
cleanUrls: true,
themeConfig: {
nav: [
{ text: "Home", link: "/" },
{ text: "Tutorials", link: "/tutorials/" },
{ text: "Reference Docs", link: "/reference/" },
{ text: "Changelog", link: "/changelog/" },
],
search: {
provider: "local",
},
});
}

export default load();
},
vite: {
server: {
host: process.env.DEV_HOST,
port: parseInt(process.env.DEV_PORT!, 10),
},
},
});
4 changes: 4 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4a5b4bc

Please sign in to comment.