Skip to content

Commit

Permalink
use remote emoji link; add nav dropdowns;
Browse files Browse the repository at this point in the history
  • Loading branch information
sharpchen committed Jun 25, 2024
1 parent e5b56ff commit e4d2f8e
Show file tree
Hide file tree
Showing 10 changed files with 173 additions and 431 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ jobs:
[ -d ./docs/.vitepress/dist ] && rm -rf ./docs/.vitepress/dist
pnpm docs:build # or npm run docs:build / yarn docs:build / bun run docs:build
touch docs/.vitepress/dist/.nojekyll
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
Expand Down
14 changes: 14 additions & 0 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { MermaidConfig } from 'mermaid';
import { defineConfig } from 'vitepress';
import { withMermaid } from 'vitepress-plugin-mermaid';
import { transformerTwoslash } from 'vitepress-plugin-twoslash';
import { DocumentName, documentService } from '../services/DocumentService';
import { sidebarService } from '../services/SidebarService';
import { themeService } from '../services/ThemeService';
type VitepressThemeType = Exclude<
Expand Down Expand Up @@ -34,6 +35,19 @@ const vitepressConfig = defineConfig({
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [
{
text: 'Documents',
items: Object.keys(documentService.documentInfo)
.filter((x): x is DocumentName => x !== 'Articles')
.map(key => ({
text: `${documentService.documentInfo[key].icon}${key}`,
link: documentService.tryGetIndexLinkOfDocument(key),
})),
},
{
text: 'Articles',
link: documentService.tryGetIndexLinkOfDocument('Articles'),
},
{ text: 'Home', link: '/' },
{ text: 'About', link: '../about.md' },
{ text: 'Contact', link: '../contact.md' },
Expand Down
Loading

0 comments on commit e4d2f8e

Please sign in to comment.