Skip to content

Commit 1af3832

Browse files
committed
main
1 parent c923983 commit 1af3832

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

docs/data/Features.data.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const loader = {
1515
};
1616

1717
export default loader;
18+
1819
type FeatureCompose = {
1920
features: Feature[];
2021
articleFeature: Feature[];

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ image:
1010
alt: sharpchen
1111
---
1212

13+
<VPHero name="Article" />
1314
<VPFeatures :features="articleFeature" />
1415
<VPHero name="Skill" />
1516
<VPFeatures :features="features" />

docs/services/DocumentService.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ export const skillDocMap = {
1212
Articles: { icon: '📰', description: 'Regular articles' },
1313
Avalonia: { icon: '😱', description: 'AvaloniaUI' },
1414
Docker: { icon: '🐳', description: '' },
15-
Git: { icon: '😸', description: 'Git mastery' },
16-
JavaScript: { icon: '😅', description: 'Not funny' },
15+
Git: { icon: '🐙', description: 'Git mastery' },
16+
JavaScript: { icon: '😅', description: '' },
1717
// SQL: { icon: '🦭', description: '' },
1818
TypeScript: { icon: '🤯', description: 'Type wizard I will become...' },
1919
// VBA: { icon: '💩', description: 'VBA for excel' },
@@ -24,10 +24,10 @@ export const skillDocMap = {
2424
// description: 'Make your own nvim color scheme using lua.',
2525
// },
2626
Bash: { icon: '🐢', description: 'Shebang!' },
27-
'Regular Expression': { icon: '🐫', description: "Can't remember it for 2 days" },
27+
'Regular Expression': { icon: '🐫', description: '' },
2828
Nix: { icon: '❄', description: 'Reproduce freedom' },
2929
'Entity Framework Core': { icon: '🗿', description: '' },
30-
'HTML & CSS': { icon: '😬', description: '' },
30+
// 'HTML & CSS': { icon: '😬', description: '' },
3131
PowerShell: { icon: '🐚', description: 'A pretty solid shell' },
3232
Lua: { icon: '🌝', description: 'I wish lua could have JavaScript syntax' },
3333
} as const satisfies DocumentInfo;

docs/services/SidebarService.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,27 @@ import { execSync } from 'node:child_process';
22
import path from 'node:path';
33
import type { DefaultTheme } from 'vitepress';
44
import { type DirectoryInfo, type FileInfo, Path, documentRoot } from '../shared/FileSystem';
5-
import { type DocumentName, skillDocMap, documentService } from './DocumentService';
5+
import { type DocumentName, documentService } from './DocumentService';
66
import type { IDocumentService } from './IDocumentService';
77
import type { ISidebarService } from './ISidebarService';
88
const solveSharpSign = (text: string) => {
99
if (text.includes('sharp')) return text.replace('sharp', '#');
1010
if (text.includes('Sharp')) return text.replace('Sharp', '#');
1111
return text;
1212
};
13+
1314
class SidebarService implements ISidebarService {
1415
private readonly base: string = `/${documentRoot().name}`;
1516
readonly documentService: IDocumentService = documentService;
1617
getMultipleSidebar(): DefaultTheme.SidebarMulti {
1718
const sidebar: DefaultTheme.SidebarMulti = {};
18-
for (const name of Object.keys(skillDocMap)) {
19-
sidebar[`${this.base}/${name}/docs/`] = this.getSidebarOfDocument(name as DocumentName);
19+
for (const name of Object.keys(documentService.skillDocInfo)) {
20+
sidebar[`${this.base}/Skill/${name}/docs/`] = this.getSidebarOfDocument(name as DocumentName);
21+
}
22+
for (const name of Object.keys(documentService.readingDocInfo)) {
23+
sidebar[`${this.base}/Reading/${name}/docs/`] = this.getSidebarOfDocument(
24+
name as DocumentName,
25+
);
2026
}
2127
return sidebar;
2228
}

0 commit comments

Comments
 (0)