Skip to content

Commit

Permalink
feat(site): introduce dev option
Browse files Browse the repository at this point in the history
  • Loading branch information
baka-gourd committed Sep 2, 2024
1 parent 3a090a7 commit e959f50
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
12 changes: 6 additions & 6 deletions docs/.vitepress/config/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ export const en = defineConfigWithTheme<CleanRoomConfig>({
});

function nav(): DefaultTheme.NavItem[] {
return [
{ text: "Home", link: "/" },
{ text: "Wiki", link: "/wiki/" },
// { text: "Guide", link: "/guide/" },
{ text: "GroovyScript", link: "/groovy-script/" },
];
let nav: DefaultTheme.NavItem[] = [];
nav.push({ text: "Home", link: "/" });
nav.push({ text: "Wiki", link: "/wiki/" });
if(process.env.ENVIRONMENT === 'development') nav.push({ text: "Guide", link: "/guide/" });
nav.push({ text: "GroovyScript", link: "/groovy-script/" });
return nav;
}

function wikiSidebar(): DefaultTheme.SidebarItem[] {
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"version": "1.0.0",
"description": "",
"scripts": {
"dev": "vitepress dev docs",
"build": "vitepress build docs",
"dev": "cross-env ENVIRONMENT=development vitepress dev docs",
"build": "cross-env ENVIRONMENT=production vitepress build docs",
"preview": "vitepress preview docs"
},
"keywords": [],
Expand All @@ -29,6 +29,7 @@
"dependencies": {
"@formkit/auto-animate": "^0.8.2",
"@vueuse/core": "^10.11.1",
"cross-env": "^7.0.3",
"vue": "^3.4.37"
}
}

0 comments on commit e959f50

Please sign in to comment.