@@ -26,6 +26,30 @@ This project is a Python cheatsheet website built with Vue.js and Vite. The cont
2626* Pages are located in ` src/pages ` .
2727* Content is in Markdown files in the ` docs/ ` directory.
2828
29+ ## Routing & Layout System
30+
31+ - Uses ` vite-plugin-pages ` for file-based routing with multiple layouts:
32+ - ` default.vue ` : Main layout with sidebar + TOC
33+ - ` article.vue ` : Blog post layout
34+ - ` fullPage.vue ` : Full-width pages
35+ - ` blog.vue ` : Blog index layout
36+ - Route metadata defined in ` <route lang="yaml"> ` blocks
37+ - Navigation structure centralized in ` src/store/navigation.ts `
38+
39+ ## Content Rendering
40+
41+ - Markdown files auto-converted to Vue components via ` unplugin-vue-markdown `
42+ - Prism.js for syntax highlighting with custom theme
43+ - Custom Vue components available in markdown (e.g., ` <base-title> ` , ` <base-disclaimer> ` )
44+ - Automatic TOC generation from headings using ` markdown-it-anchor `
45+
46+ ## Key Features Implementation
47+
48+ - ** Reader Mode** : Full-screen reading with font size controls (` src/store/reader.ts ` )
49+ - ** Dark Mode** : Theme toggle with system preference detection
50+ - ** Search** : Algolia DocSearch integration (` src/components/AlgoliaDocSearch.vue ` )
51+ - ** Contributors** : Auto-fetched from GitHub API (` scripts/fetch-contributors.ts ` )
52+
2953## Available Scripts
3054
3155The following scripts are available in ` package.json ` :
@@ -37,3 +61,71 @@ The following scripts are available in `package.json`:
3761* ` pnpm lint ` : Lints the code with ESLint.
3862* ` pnpm typecheck ` : Runs a type check with ` vue-tsc ` .
3963* ` pnpm fetch-contributors ` : Fetches the contributors from GitHub.
64+
65+
66+ ## Content Creation Patterns
67+
68+ ** New Cheatsheet Page:**
69+
70+ ``` markdown
71+ ---
72+ title: Topic Name - Python Cheatsheet
73+ description: Brief description of the topic
74+ ---
75+
76+ <base-title :title="frontmatter.title" :description="frontmatter.description">
77+ Topic Name
78+ </base-title>
79+
80+ <!-- Content with proper heading structure -->
81+ ```
82+
83+ ** New Blog Post:**
84+
85+ ``` markdown
86+ ---
87+ title: Post Title - Python Cheatsheet
88+ description: Post description
89+ date: MMM DD, YYYY
90+ updated: MMM DD, YYYY
91+ tags: python, topic, level
92+ socialImage: /blog/image.jpg
93+ ---
94+
95+ <route lang="yaml">
96+ meta:
97+ layout: article
98+ # duplicate frontmatter here
99+ </route>
100+
101+ <blog-title-header :frontmatter="frontmatter" title="Display Title" />
102+ ```
103+
104+ ## Navigation Updates
105+
106+ - Add new routes to ` src/store/navigation.ts ` in appropriate section
107+ - Use ` updated: true ` flag for highlighting new content
108+ - Internal links use ` <router-link> ` for SPA navigation
109+
110+ ## Project-Specific Conventions
111+
112+ ### Component Organization
113+
114+ - ** UI Components** : ` src/components/ui/ ` - reusable base components
115+ - ** Layout Components** : ` src/components/layout/ ` - navigation, sidebars, footers
116+ - ** Icons** : ` src/components/icons/ ` - SVG icon components
117+ - ** Auto-imports** : Components auto-registered via ` unplugin-vue-components `
118+
119+ ## State Management
120+
121+ - ** Pinia stores** for global state (navigation, reader mode, newsletter)
122+ - ** VueUse composables** for reactive utilities
123+ - ** Auto-imports** for composables and Vue APIs
124+
125+ ## Content Guidelines
126+
127+ - Use consistent frontmatter structure across similar content types
128+ - Link internally with ` <router-link> ` for better SPA experience
129+ - Include code examples in fenced blocks for proper syntax highlighting
130+ - Add social images for blog posts to improve sharing
131+ - Update navigation store when adding new major sections
0 commit comments