Skip to content

Commit 661feff

Browse files
espenclaude
andcommitted
Migrate docs to jekyll-vitepress-theme
Replace minimal GitHub Pages setup with jekyll-vitepress-theme for a polished documentation site with search, dark/light mode, sidebar navigation, and code block copy buttons. Split monolithic readme.md into individual pages organized as Jekyll collections: guides (13 pages), endpoints (12 pages + index), and examples (4 pages). Add GitHub Actions workflow for deployment since the theme gem is not in the GitHub Pages allowlist. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent d70e230 commit 661feff

41 files changed

Lines changed: 2023 additions & 1766 deletions

Some content is hidden

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

.github/workflows/pages.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Deploy Jekyll site to Pages
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
- uses: ruby/setup-ruby@v1
23+
with:
24+
ruby-version: '3.3'
25+
bundler-cache: true
26+
- name: Setup Pages
27+
uses: actions/configure-pages@v5
28+
- name: Build with Jekyll
29+
run: bundle exec jekyll build
30+
env:
31+
JEKYLL_ENV: production
32+
- name: Upload artifact
33+
uses: actions/upload-pages-artifact@v3
34+
35+
deploy:
36+
environment:
37+
name: github-pages
38+
url: ${{ steps.deployment.outputs.page_url }}
39+
runs-on: ubuntu-latest
40+
needs: build
41+
steps:
42+
- name: Deploy to GitHub Pages
43+
id: deployment
44+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
_site/
2+
.jekyll-cache/
3+
.bundle/
4+
vendor/
5+
Gemfile.lock

Gemfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
source "https://rubygems.org"
2+
3+
gem "jekyll", "~> 4.3"
4+
gem "jekyll-vitepress-theme"

_config.yml

Lines changed: 56 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,57 @@
1-
markdown: CommonMarkGhPages
21
title: Makeplans API
3-
commonmark:
4-
options: ["UNSAFE"]
5-
extensions: ["table"]
2+
description: API documentation for Makeplans — online booking for appointments, classes and events.
3+
url: https://developer.makeplans.com
4+
5+
theme: jekyll-vitepress-theme
6+
plugins:
7+
- jekyll-vitepress-theme
8+
9+
collections:
10+
guides:
11+
output: true
12+
permalink: "/guide/:name/"
13+
endpoints:
14+
output: true
15+
permalink: "/endpoints/:name/"
16+
examples:
17+
output: true
18+
permalink: "/examples/:name/"
19+
20+
defaults:
21+
- scope:
22+
path: ""
23+
values:
24+
layout: default
25+
- scope:
26+
path: ""
27+
type: guides
28+
values:
29+
layout: default
30+
- scope:
31+
path: ""
32+
type: endpoints
33+
values:
34+
layout: default
35+
- scope:
36+
path: ""
37+
type: examples
38+
values:
39+
layout: default
40+
41+
jekyll_vitepress:
42+
branding:
43+
site_title: Makeplans API
44+
syntax:
45+
light_theme: github
46+
dark_theme: github.dark
47+
edit_link:
48+
enabled: true
49+
pattern: "https://github.com/makeplans/makeplans-api/edit/master/docs/:path"
50+
text: "Edit this page on GitHub"
51+
last_updated:
52+
enabled: true
53+
doc_footer:
54+
enabled: true
55+
github_star:
56+
enabled: true
57+
repository: makeplans/makeplans-api

_data/navigation.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
- title: Guide
2+
url: /guide/getting-started/
3+
collections: [guides]
4+
- title: API Endpoints
5+
url: /endpoints/
6+
collections: [endpoints]
7+
- title: Examples
8+
url: /examples/overview/
9+
collections: [examples]
10+
- title: Changelog
11+
url: /changelog/
12+
- title: Partner API
13+
url: /partner/

_data/sidebar.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
- title: Guide
2+
collection: guides
3+
- title: API Endpoints
4+
collection: endpoints
5+
- title: Examples
6+
collection: examples

_data/social_links.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- icon: github
2+
url: https://github.com/makeplans/makeplans-api
3+
label: GitHub

_endpoints/account.md

Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
---
2+
title: Account
3+
nav_order: 12
4+
---
5+
6+
Information and settings for your account.
7+
8+
## Attributes
9+
10+
<table>
11+
<tr><th>Name</th><th>Type</th><th>Description</th></tr>
12+
<tr><td>id</td><td>Integer</td><td>Automatically set</td></tr>
13+
<tr><td>created_at</td><td>Datetime</td><td>Automatically set</td></tr>
14+
<tr><td>updated_at</td><td>Datetime</td><td>Automatically set</td></tr>
15+
<tr><td>subdomain</td><td>String</td><td>Required</td></tr>
16+
<tr><td>email</td><td>String</td><td>Required</td></tr>
17+
<tr><td>name</td><td>String</td><td>Required</td></tr>
18+
<tr><td>google_analytics</td><td>String</td><td></td></tr>
19+
<tr><td>css_url</td><td>String</td><td></td></tr>
20+
<tr><td>time_zone</td><td>String</td><td>Required</td></tr>
21+
<tr><td>verification_method</td><td>Integer</td><td></td></tr>
22+
<tr><td>address</td><td>String</td><td></td></tr>
23+
<tr><td>country_code</td><td>String</td><td>Required. ISO 3166-1 alpha-2.</td></tr>
24+
<tr><td>google_merchant_id</td><td>String</td><td></td></tr>
25+
<tr><td>google_merchant_key</td><td>String</td><td></td></tr>
26+
<tr><td>logo</td><td>File</td><td></td></tr>
27+
<tr><td>template</td><td>Integer</td><td>Required</td></tr>
28+
<tr><td>service_template</td><td>String</td><td></td></tr>
29+
<tr><td>locale</td><td>String</td><td>Required. Supported locales: 'en', 'sv' and 'nb'. Default: 'en'.</td></tr>
30+
<tr><td>currency</td><td>String</td><td>ISO4217 currency code</td></tr>
31+
<tr><td>email_notification</td><td>Boolean</td><td></td></tr>
32+
<tr><td>mail_notification_recipient</td><td>Email</td><td></td></tr>
33+
<tr><td>sms_notification</td><td>Boolean</td><td></td></tr>
34+
<tr><td>phone_number</td><td>String</td><td></td></tr>
35+
<tr><td>confirm_manually</td><td>Boolean</td><td></td></tr>
36+
<tr><td>settings</td><td>Array</td><td></td></tr>
37+
<tr><td>public_access</td><td>Boolean</td><td></td></tr>
38+
<tr><td>interval_rounding</td><td>Integer</td><td>Default setting for all services for rounding to next available time. '15' will round 10:07 to become 10:15 as next available slot time.</td></tr>
39+
<tr><td>slot_generation_type</td><td>Integer</td><td>Default: 2. 1=fixed. 2=next available.</td></tr>
40+
<tr><td>future_bookable_period</td><td>String</td><td>Natural language date/time relative to current time.</td></tr>
41+
<tr><td>first_bookable_period</td><td>String</td><td>Natural language date/time relative to current time.</td></tr>
42+
<tr><td>payment_provider</td><td>String</td><td></td></tr>
43+
<tr><td>footer</td><td>Text</td><td></td></tr>
44+
<tr><td>verification_methods</td><td>String</td><td></td></tr>
45+
<tr><td>reminder_sms</td><td>Boolean</td><td></td></tr>
46+
<tr><td>closed_for_holidays</td><td>Boolean</td><td></td></tr>
47+
<tr><td>new_user_text</td><td>Liquid-Text</td><td>Above booking form.</td></tr>
48+
<tr><td>new_booking_text</td><td>Liquid-Text</td><td>Booking confirmation page.</td></tr>
49+
<tr><td>booking_form</td><td>Liquid-Text</td><td>Custom booking form.</td></tr>
50+
<tr><td>person_form</td><td>Liquid-Text</td><td>For custom data in administration system.</td></tr>
51+
<tr><td>resource_form</td><td>Liquid-Text</td><td>For custom data in administration system.</td></tr>
52+
<tr><td>service_form</td><td>Liquid-Text</td><td>For custom data in administration system.</td></tr>
53+
<tr><td>event_form</td><td>Liquid-Text</td><td>For custom data in administration system.</td></tr>
54+
<tr><td>appointment_form</td><td>Liquid-Text</td><td>For custom data in administration system.</td></tr>
55+
<tr><td>category_form</td><td>Liquid-Text</td><td>For custom data in administration system.</td></tr>
56+
<tr><td>sms_verification</td><td>Liquid-Text</td><td></td></tr>
57+
<tr><td>sms_confirmation</td><td>Liquid-Text</td><td></td></tr>
58+
<tr><td>sms_modification</td><td>Liquid-Text</td><td></td></tr>
59+
<tr><td>sms_cancellation</td><td>Liquid-Text</td><td></td></tr>
60+
<tr><td>sms_reminder</td><td>Liquid-Text</td><td></td></tr>
61+
<tr><td>mail_verification</td><td>Liquid-Text</td><td></td></tr>
62+
<tr><td>mail_confirmation</td><td>Liquid-Text</td><td></td></tr>
63+
<tr><td>mail_modification</td><td>Liquid-Text</td><td></td></tr>
64+
<tr><td>mail_cancellation</td><td>Liquid-Text</td><td></td></tr>
65+
<tr><td>mail_verification_subject</td><td>String</td><td></td></tr>
66+
<tr><td>mail_confirmation_subject</td><td>String</td><td></td></tr>
67+
<tr><td>mail_modification_subject</td><td>String</td><td></td></tr>
68+
<tr><td>mail_cancellation_subject</td><td>String</td><td></td></tr>
69+
<tr><td>allow_cancellation</td><td>Boolean</td><td></td></tr>
70+
<tr><td>cancellation_period</td><td>String</td><td>Natural language date/time relative to start of booking.</td></tr>
71+
</table>
72+
73+
### Additional parameters
74+
75+
<table>
76+
<tr><th>Name</th><th>Type</th><th>Description</th></tr>
77+
<tr><td>remove_logo</td><td>Boolean</td><td></td></tr>
78+
</table>
79+
80+
## Get account
81+
82+
`GET /client` will get the account.
83+
84+
## Update account
85+
86+
`PUT /client` will update the account.
87+
88+
## Holidays
89+
90+
Who doesn't like a holiday?
91+
92+
### Listing
93+
94+
`GET /client/holidays` will get holidays for account country.
95+
96+
Response
97+
98+
```json
99+
[
100+
{
101+
"holiday": {
102+
"date": "2016-01-01",
103+
"name": "New Year's Day"
104+
}
105+
},
106+
{
107+
"holiday": {
108+
"date": "2016-05-01",
109+
"name": "International Workers' Day"
110+
}
111+
}
112+
]
113+
```
114+
115+
#### Query Parameters
116+
117+
<table>
118+
<tr><th>Name</th><th>Type</th><th>Description</th></tr>
119+
<tr><td>from</td><td>Date</td><td></td></tr>
120+
<tr><td>to</td><td>Date</td><td></td></tr>
121+
</table>
122+
123+
## Users
124+
125+
Users who can login into the account.
126+
127+
### Attributes for user role on the account
128+
129+
<table>
130+
<tr><th>Name</th><th>Type</th><th>Description</th></tr>
131+
<tr><td>id</td><td>Integer</td><td>Automatically set</td></tr>
132+
<tr><td>created_at</td><td>Datetime</td><td>Automatically set</td></tr>
133+
<tr><td>updated_at</td><td>Datetime</td><td>Automatically set</td></tr>
134+
<tr><td>user_id</td><td>Integer</td><td>Automatically set</td></tr>
135+
<tr><td>role</td><td>String</td><td>admin, manager or staff</td></tr>
136+
<tr><td>user</td><td>Object</td><td>See attributes for a user</td></tr>
137+
</table>
138+
139+
### Attributes for user
140+
141+
<table>
142+
<tr><th>Name</th><th>Type</th><th>Description</th></tr>
143+
<tr><td>id</td><td>Integer</td><td>Automatically set</td></tr>
144+
<tr><td>created_at</td><td>Datetime</td><td>Automatically set</td></tr>
145+
<tr><td>updated_at</td><td>Datetime</td><td>Automatically set</td></tr>
146+
<tr><td>name</td><td>String</td><td>Required</td></tr>
147+
<tr><td>email</td><td>String</td><td>Required</td></tr>
148+
<tr><td>phone_number</td><td>String</td><td>Also available as phonenumber (deprecated).</td></tr>
149+
</table>
150+
151+
### Listing
152+
153+
`GET /client/users` will list all users with access to the account.
154+
155+
Response
156+
157+
```json
158+
[
159+
{
160+
"client_user_link": {
161+
"id": 1337,
162+
"created_at": "2016-11-07T07:26:32+01:00",
163+
"updated_at": "2016-11-07T07:27:42+01:00",
164+
"role": "admin",
165+
"user_id": 1,
166+
"user": {
167+
"id": 1,
168+
"email": "maestro@example.org",
169+
"phone_number": "180",
170+
"name": "Espen Antonsen",
171+
"created_at": "2016-11-07T07:26:32+01:00",
172+
"updated_at": "2016-11-07T07:27:42+01:00"
173+
}
174+
}
175+
}
176+
]
177+
```
178+
179+
## Get user
180+
181+
`GET /client/users/{user_link_id}` will get a user with id `{user_link_id}`.
182+
183+
### Add new user
184+
185+
`GET /client/users` will create a new user. An email is sent to the user so the user can specify their password.

0 commit comments

Comments
 (0)