Skip to content

Commit b1dacb9

Browse files
committed
update
1 parent b09fa02 commit b1dacb9

4,924 files changed

Lines changed: 1074172 additions & 1 deletion

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Deploy VitePress Documentation
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build-and-deploy:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0 # Needed for git history
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: '18'
23+
cache: 'npm'
24+
25+
- name: Install dependencies
26+
run: npm ci
27+
28+
- name: Build documentation
29+
run: npm run docs:build
30+
31+
- name: Deploy to GitHub Pages
32+
if: github.ref == 'refs/heads/main'
33+
uses: peaceiris/actions-gh-pages@v3
34+
with:
35+
github_token: ${{ secrets.GITHUB_TOKEN }}
36+
publish_dir: docs/.vitepress/dist
37+
cname: # Add your custom domain here if you have one

.vscode/tasks.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "Start Development Server",
6+
"type": "shell",
7+
"command": "npm start",
8+
"group": "build",
9+
"isBackground": true,
10+
"problemMatcher": []
11+
}
12+
]
13+
}

DEVELOPMENT.md

Lines changed: 247 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,247 @@
1+
# 🚀 VitePress Documentation Setup
2+
3+
This guide will help you set up and run the VitePress documentation site locally.
4+
5+
## 📋 Prerequisites
6+
7+
- **Node.js** v18 or higher
8+
- **npm** (comes with Node.js)
9+
- **Git** for version control
10+
11+
## 🛠️ Quick Start
12+
13+
### 1. Install Dependencies
14+
15+
```bash
16+
npm install
17+
```
18+
19+
### 2. Start Development Server
20+
21+
```bash
22+
npm run docs:dev
23+
```
24+
25+
The site will be available at: **http://localhost:5173**
26+
27+
### 3. Build for Production
28+
29+
```bash
30+
npm run docs:build
31+
```
32+
33+
### 4. Preview Production Build
34+
35+
```bash
36+
npm run docs:preview
37+
```
38+
39+
## 📁 Project Structure
40+
41+
```
42+
docs/
43+
├── .vitepress/
44+
│ └── config.js # VitePress configuration
45+
├── widgets/ # Widget documentation pages
46+
│ ├── index.md # Widget overview
47+
│ ├── weather-widget.md # Individual widget docs
48+
│ └── ...
49+
├── index.md # Homepage
50+
├── installation.md # Installation guide
51+
└── contributing.md # Contributing guide
52+
```
53+
54+
## ⚙️ Configuration
55+
56+
### Site Configuration
57+
58+
Edit `.vitepress/config.js` to customize:
59+
60+
- Site title and description
61+
- Navigation menu
62+
- Sidebar structure
63+
- Theme settings
64+
- SEO metadata
65+
66+
### Adding New Widgets
67+
68+
1. Create a new `.md` file in `docs/widgets/`
69+
2. Add entry to sidebar in `.vitepress/config.js`
70+
3. Follow the existing documentation template
71+
72+
## 🎨 Customization
73+
74+
### Themes and Styling
75+
76+
VitePress uses the default theme with customization options:
77+
78+
- **Colors**: Customize CSS variables
79+
- **Layout**: Modify theme components
80+
- **Typography**: Adjust font settings
81+
- **Dark mode**: Built-in support
82+
83+
### Custom Components
84+
85+
Add Vue components for enhanced functionality:
86+
87+
```vue
88+
<!-- .vitepress/components/WidgetDemo.vue -->
89+
<template>
90+
<div class="widget-demo">
91+
<h3>{{ title }}</h3>
92+
<div class="demo-content">
93+
<slot />
94+
</div>
95+
</div>
96+
</template>
97+
```
98+
99+
## 📝 Writing Documentation
100+
101+
### Markdown Features
102+
103+
VitePress supports enhanced Markdown:
104+
105+
```markdown
106+
::: tip Pro Tip
107+
This is a helpful tip for users!
108+
:::
109+
110+
::: warning Important
111+
Pay attention to this warning.
112+
:::
113+
114+
::: danger Critical
115+
This is critical information.
116+
:::
117+
```
118+
119+
### Code Blocks
120+
121+
Syntax highlighting for JavaScript:
122+
123+
```javascript
124+
// Configuration example
125+
const CONFIG = {
126+
apiKey: "your_api_key_here",
127+
refreshInterval: 30
128+
};
129+
```
130+
131+
### Custom Containers
132+
133+
```markdown
134+
::: details Click to expand
135+
This content is hidden by default.
136+
:::
137+
```
138+
139+
## 🚀 Deployment
140+
141+
### Automatic Deployment
142+
143+
The site automatically deploys to GitHub Pages when you push to `main` branch.
144+
145+
### Manual Deployment
146+
147+
```bash
148+
npm run deploy
149+
```
150+
151+
### Custom Domain
152+
153+
1. Add CNAME file to `docs/public/`
154+
2. Update GitHub Pages settings
155+
3. Modify deployment workflow
156+
157+
## 🔧 Development Tips
158+
159+
### Hot Reload
160+
161+
The development server supports hot reload - changes appear instantly.
162+
163+
### Debug Mode
164+
165+
Add debug information to config:
166+
167+
```javascript
168+
export default {
169+
// ... other config
170+
vite: {
171+
logLevel: 'info'
172+
}
173+
}
174+
```
175+
176+
### Performance
177+
178+
- Optimize images before adding
179+
- Use lazy loading for large content
180+
- Minimize JavaScript in pages
181+
182+
## 📊 Analytics
183+
184+
Add analytics tracking in `.vitepress/config.js`:
185+
186+
```javascript
187+
export default {
188+
head: [
189+
['script', {
190+
async: true,
191+
src: 'https://www.googletagmanager.com/gtag/js?id=GA_MEASUREMENT_ID'
192+
}],
193+
['script', {}, `
194+
window.dataLayer = window.dataLayer || [];
195+
function gtag(){dataLayer.push(arguments);}
196+
gtag('js', new Date());
197+
gtag('config', 'GA_MEASUREMENT_ID');
198+
`]
199+
]
200+
}
201+
```
202+
203+
## 🤝 Contributing to Docs
204+
205+
1. **Fork** the repository
206+
2. **Create** a feature branch
207+
3. **Make** your changes
208+
4. **Test** locally with `npm run docs:dev`
209+
5. **Build** with `npm run docs:build`
210+
6. **Submit** a pull request
211+
212+
### Documentation Standards
213+
214+
- **Clear headings** and structure
215+
- **Code examples** for all features
216+
- **Screenshots** where helpful
217+
- **Step-by-step** instructions
218+
- **Error handling** and troubleshooting
219+
220+
## 🐛 Troubleshooting
221+
222+
### Common Issues
223+
224+
**Build fails:**
225+
- Check Node.js version (needs v18+)
226+
- Clear node_modules and reinstall
227+
- Check for TypeScript errors
228+
229+
**Images not loading:**
230+
- Place images in `docs/public/`
231+
- Use absolute paths `/images/filename.png`
232+
- Optimize image sizes
233+
234+
**Links broken:**
235+
- Use relative paths for internal links
236+
- Check file names and paths
237+
- Test all links before deployment
238+
239+
### Getting Help
240+
241+
- **VitePress Docs**: https://vitepress.dev/
242+
- **GitHub Issues**: Report bugs and ask questions
243+
- **Discord/Community**: Join VitePress community
244+
245+
---
246+
247+
**Happy documenting!** 📚✨

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Each day of the week is mapped to a specific color, deity, and spiritual quality
8787
<!-- ![MyQuotes Widget](.src/quote/quote_showcase.png)
8888
-->
8989

90-
<img width="60%" src=".src/quotes/quote_showcase_1.png">
90+
<img width="60%" src="https://raw.githubusercontent.com/rushhiii/Scriptable-IOSWidgets/8f58656dd322a300196bc236f302d8f82d744691/.src/quotes/quote_showcase_1.png">
9191

9292
<!-- <img width="100%" src=".src/quote/quote_showcase.png"> -->
9393

0 commit comments

Comments
 (0)