Skip to content

Commit 177e93a

Browse files
author
Thomas Leiter
committed
Add VitePress documentation with GitHub Pages deployment
- Add VitePress configuration with willhaben brand color #03A4E8 - Add homepage with hero and features section - Add guide pages: getting-started, installation, configuration - Add command reference: login, logout, whoami, list, get, publish, update, delete, images, config - Add GitHub workflow for automatic docs deployment - Add docs scripts to package.json - Add documentation link to README
1 parent 9b2f6ed commit 177e93a

22 files changed

Lines changed: 1506 additions & 10 deletions

.github/workflows/docs.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'docs/**'
8+
- '.github/workflows/docs.yml'
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
concurrency:
17+
group: pages
18+
cancel-in-progress: false
19+
20+
jobs:
21+
build:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0
28+
29+
- name: Setup Bun
30+
uses: oven-sh/setup-bun@v2
31+
with:
32+
bun-version: latest
33+
34+
- name: Setup Pages
35+
uses: actions/configure-pages@v4
36+
37+
- name: Install dependencies
38+
run: bun install
39+
40+
- name: Build with VitePress
41+
run: bun run docs:build
42+
43+
- name: Upload artifact
44+
uses: actions/upload-pages-artifact@v3
45+
with:
46+
path: docs/.vitepress/dist
47+
48+
deploy:
49+
environment:
50+
name: github-pages
51+
url: ${{ steps.deployment.outputs.page_url }}
52+
needs: build
53+
runs-on: ubuntu-latest
54+
name: Deploy
55+
steps:
56+
- name: Deploy to GitHub Pages
57+
id: deployment
58+
uses: actions/deploy-pages@v4

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,16 @@
99
</p>
1010

1111
<p align="center">
12+
<a href="https://tomladder.github.io/willhaben-cli/">📖 Documentation</a> •
1213
<a href="#features">Features</a> •
1314
<a href="#installation">Installation</a> •
1415
<a href="#quick-start">Quick Start</a> •
1516
<a href="#commands">Commands</a> •
16-
<a href="#configuration">Configuration</a> •
1717
<a href="#contributing">Contributing</a>
1818
</p>
1919

2020
<p align="center">
21+
<a href="https://tomladder.github.io/willhaben-cli/"><img src="https://img.shields.io/badge/docs-online-03A4E8.svg" alt="Documentation"></a>
2122
<img src="https://img.shields.io/badge/version-1.0.0-blue.svg" alt="Version">
2223
<img src="https://img.shields.io/badge/license-MIT-green.svg" alt="License">
2324
<img src="https://img.shields.io/badge/bun-%3E%3D1.0-black.svg" alt="Bun">
@@ -74,7 +75,7 @@
7475

7576
```bash
7677
# Clone the repository
77-
git clone https://github.com/willhaben/willhaben-cli.git
78+
git clone https://github.com/tomLadder/willhaben-cli.git
7879
cd willhaben-cli
7980

8081
# Install dependencies
@@ -446,7 +447,7 @@ Contributions are welcome! Please read our contributing guidelines before submit
446447

447448
```bash
448449
# Clone and install
449-
git clone https://github.com/willhaben/willhaben-cli.git
450+
git clone https://github.com/tomLadder/willhaben-cli.git
450451
cd willhaben-cli
451452
bun install
452453

bun.lock

Lines changed: 345 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/.vitepress/config.ts

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
import { defineConfig } from 'vitepress'
2+
3+
export default defineConfig({
4+
title: 'willhaben-cli',
5+
description: 'Unofficial CLI for willhaben.at - Austrian marketplace',
6+
7+
base: '/willhaben-cli/',
8+
9+
head: [
10+
['meta', { name: 'theme-color', content: '#03A4E8' }],
11+
['meta', { name: 'og:type', content: 'website' }],
12+
['meta', { name: 'og:site_name', content: 'willhaben-cli' }],
13+
],
14+
15+
themeConfig: {
16+
nav: [
17+
{ text: 'Guide', link: '/guide/getting-started' },
18+
{ text: 'Commands', link: '/commands/' },
19+
],
20+
21+
sidebar: {
22+
'/guide/': [
23+
{
24+
text: 'Introduction',
25+
items: [
26+
{ text: 'Getting Started', link: '/guide/getting-started' },
27+
{ text: 'Installation', link: '/guide/installation' },
28+
{ text: 'Configuration', link: '/guide/configuration' },
29+
]
30+
}
31+
],
32+
'/commands/': [
33+
{
34+
text: 'Commands',
35+
items: [
36+
{ text: 'Overview', link: '/commands/' },
37+
{ text: 'login', link: '/commands/login' },
38+
{ text: 'logout', link: '/commands/logout' },
39+
{ text: 'whoami', link: '/commands/whoami' },
40+
{ text: 'list', link: '/commands/list' },
41+
{ text: 'get', link: '/commands/get' },
42+
{ text: 'publish', link: '/commands/publish' },
43+
{ text: 'update', link: '/commands/update' },
44+
{ text: 'delete', link: '/commands/delete' },
45+
{ text: 'images', link: '/commands/images' },
46+
{ text: 'config', link: '/commands/config' },
47+
]
48+
}
49+
],
50+
},
51+
52+
socialLinks: [
53+
{ icon: 'github', link: 'https://github.com/tomLadder/willhaben-cli' }
54+
],
55+
56+
footer: {
57+
message: 'Released under the MIT License. Not affiliated with willhaben.',
58+
copyright: 'Made with ❤️ in Austria'
59+
},
60+
61+
search: {
62+
provider: 'local'
63+
}
64+
}
65+
})

docs/.vitepress/theme/custom.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
:root {
2+
--vp-c-brand-1: #03A4E8;
3+
--vp-c-brand-2: #0BB8FF;
4+
--vp-c-brand-3: #5CCFFF;
5+
--vp-c-brand-soft: rgba(3, 164, 232, 0.14);
6+
7+
--vp-button-brand-bg: #03A4E8;
8+
--vp-button-brand-hover-bg: #0BB8FF;
9+
10+
--vp-home-hero-name-color: #03A4E8;
11+
}
12+
13+
.dark {
14+
--vp-c-brand-1: #0BB8FF;
15+
--vp-c-brand-2: #03A4E8;
16+
--vp-c-brand-3: #0290CC;
17+
}

docs/.vitepress/theme/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import DefaultTheme from 'vitepress/theme'
2+
import './custom.css'
3+
4+
export default DefaultTheme

docs/commands/config.md

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# config
2+
3+
Manage CLI configuration settings.
4+
5+
## Subcommands
6+
7+
| Command | Description |
8+
|---------|-------------|
9+
| `get` | Show current configuration |
10+
| `set` | Set a configuration value |
11+
| `reset` | Reset to defaults |
12+
| `path` | Show config file path |
13+
14+
---
15+
16+
## get
17+
18+
Show current configuration.
19+
20+
### Usage
21+
22+
```bash
23+
willhaben config get [options]
24+
```
25+
26+
### Options
27+
28+
| Option | Description |
29+
|--------|-------------|
30+
| `--json` | Output as JSON |
31+
32+
### Example
33+
34+
```bash
35+
willhaben config get
36+
37+
# Configuration
38+
# ────────────────────────────────────────
39+
# Output format: text
40+
# Logged in: Yes
41+
#
42+
# Config file: /Users/you/.willhaben/config.json
43+
```
44+
45+
---
46+
47+
## set
48+
49+
Set a configuration value.
50+
51+
### Usage
52+
53+
```bash
54+
willhaben config set <key> <value>
55+
```
56+
57+
### Available Keys
58+
59+
| Key | Values | Description |
60+
|-----|--------|-------------|
61+
| `outputFormat` | `text`, `json` | Default output format |
62+
63+
### Examples
64+
65+
```bash
66+
# Set default output to JSON
67+
willhaben config set outputFormat json
68+
69+
# Set default output to text
70+
willhaben config set outputFormat text
71+
```
72+
73+
---
74+
75+
## reset
76+
77+
Reset configuration to defaults.
78+
79+
### Usage
80+
81+
```bash
82+
willhaben config reset
83+
```
84+
85+
### Example
86+
87+
```bash
88+
willhaben config reset
89+
# Configuration reset to defaults
90+
```
91+
92+
::: warning
93+
This removes your authentication tokens. You'll need to login again.
94+
:::
95+
96+
---
97+
98+
## path
99+
100+
Show configuration file path.
101+
102+
### Usage
103+
104+
```bash
105+
willhaben config path
106+
```
107+
108+
### Example
109+
110+
```bash
111+
willhaben config path
112+
# /Users/you/.willhaben/config.json
113+
```

docs/commands/delete.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# delete
2+
3+
Delete a listing permanently.
4+
5+
## Usage
6+
7+
```bash
8+
willhaben delete <id> [options]
9+
```
10+
11+
## Arguments
12+
13+
| Argument | Description |
14+
|----------|-------------|
15+
| `<id>` | Listing ID |
16+
17+
## Options
18+
19+
| Option | Description |
20+
|--------|-------------|
21+
| `--force` | Skip confirmation prompt |
22+
| `--json` | Output as JSON |
23+
24+
## Example
25+
26+
### With Confirmation
27+
28+
```bash
29+
willhaben delete 123456789
30+
# Are you sure you want to delete listing 123456789? (y/N) y
31+
# Listing deleted successfully
32+
```
33+
34+
### Skip Confirmation
35+
36+
```bash
37+
willhaben delete 123456789 --force
38+
# Listing deleted successfully
39+
```
40+
41+
## JSON Output
42+
43+
```bash
44+
willhaben delete 123456789 --force --json
45+
```
46+
47+
```json
48+
{
49+
"success": true,
50+
"id": 123456789,
51+
"message": "Listing deleted successfully"
52+
}
53+
```
54+
55+
::: danger
56+
This action is permanent and cannot be undone. The listing and all its images will be removed.
57+
:::
58+
59+
## Requires Authentication
60+
61+
You must be logged in to use this command.

0 commit comments

Comments
 (0)