This file provides instructions for Gemini to effectively assist with development in this project.
This project is a Python cheatsheet website built with Vue.js and Vite. The content is written in Markdown and located in the docs/ directory.
- Framework: Vue.js 3
- Build Tool: Vite
- Package Manager: pnpm
- Language: TypeScript
- Styling: Tailwind CSS
- Linting: ESLint
- Formatting: Prettier
- Testing: Vitest
- Follow the existing coding style.
- Use TypeScript for all new code.
- Use pnpm for all package management.
- Components are located in
src/components. - Pages are located in
src/pages. - Content is in Markdown files in the
docs/directory.
- Uses
vite-plugin-pagesfor file-based routing with multiple layouts:default.vue: Main layout with sidebar + TOCarticle.vue: Blog post layoutfullPage.vue: Full-width pagesblog.vue: Blog index layout
- Route metadata defined in
<route lang="yaml">blocks - Navigation structure centralized in
src/store/navigation.ts
- Markdown files auto-converted to Vue components via
unplugin-vue-markdown - Prism.js for syntax highlighting with custom theme
- Custom Vue components available in markdown (e.g.,
<base-title>,<base-disclaimer>) - Automatic TOC generation from headings using
markdown-it-anchor
- Reader Mode: Full-screen reading with font size controls (
src/store/reader.ts) - Dark Mode: Theme toggle with system preference detection
- Search: Algolia DocSearch integration (
src/components/AlgoliaDocSearch.vue)
The following scripts are available in package.json:
pnpm dev: Starts the development server.pnpm build: Builds the project for production.pnpm preview: Previews the production build.pnpm test: Runs the tests.pnpm lint: Lints the code with ESLint.pnpm typecheck: Runs a type check withvue-tsc.
New Cheatsheet Page:
---
title: Topic Name - Python Cheatsheet
description: Brief description of the topic
---
<base-title :title="frontmatter.title" :description="frontmatter.description">
Topic Name
</base-title>
<!-- Content with proper heading structure -->New Blog Post:
---
title: Post Title - Python Cheatsheet
description: Post description
date: MMM DD, YYYY
updated: MMM DD, YYYY
tags: python, topic, level
socialImage: /blog/image.jpg
---
<route lang="yaml">
meta:
layout: article
# duplicate frontmatter here
</route>
<blog-title-header :frontmatter="frontmatter" title="Display Title" />- Add new routes to
src/store/navigation.tsin appropriate section - Use
updated: trueflag for highlighting new content - Internal links use
<router-link>for SPA navigation
- UI Components:
src/components/ui/- reusable base components - Layout Components:
src/components/layout/- navigation, sidebars, footers - Icons:
src/components/icons/- SVG icon components - Auto-imports: Components auto-registered via
unplugin-vue-components
- Pinia stores for global state (navigation, reader mode)
- VueUse composables for reactive utilities
- Auto-imports for composables and Vue APIs
- Use consistent frontmatter structure across similar content types
- Link internally with
<router-link>for better SPA experience - Include code examples in fenced blocks for proper syntax highlighting
- Add social images for blog posts to improve sharing
- Update navigation store when adding new major sections