Skip to content

Commit 7b5f87d

Browse files
docs: cleanup README.md and add docs site (#166)
* docs: cleanup README.md and add docs site * docs: formatting
1 parent dac935c commit 7b5f87d

60 files changed

Lines changed: 9109 additions & 1033 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/docs.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Deploy docs
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- "docs/**"
9+
- ".github/workflows/docs.yml"
10+
workflow_dispatch:
11+
12+
# Allow the workflow to deploy to GitHub Pages.
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
# Allow one concurrent deployment, without cancelling in-progress runs.
19+
concurrency:
20+
group: pages
21+
cancel-in-progress: false
22+
23+
jobs:
24+
build:
25+
name: Build site
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v7
30+
31+
# Enables GitHub Pages for the repo on first run, so no manual
32+
# "Settings -> Pages -> Source: GitHub Actions" step is required.
33+
- name: Setup Pages
34+
uses: actions/configure-pages@v6
35+
with:
36+
enablement: true
37+
38+
- name: Build with Astro
39+
uses: withastro/action@v6
40+
with:
41+
path: ./docs
42+
43+
deploy:
44+
name: Deploy to GitHub Pages
45+
needs: build
46+
runs-on: ubuntu-latest
47+
environment:
48+
name: github-pages
49+
url: ${{ steps.deployment.outputs.page_url }}
50+
steps:
51+
- name: Deploy to GitHub Pages
52+
id: deployment
53+
uses: actions/deploy-pages@v5

.github/workflows/release.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,32 @@ jobs:
3131
- name: Test
3232
run: go test -v ./...
3333

34+
docs:
35+
name: Check generated docs
36+
runs-on: ubuntu-latest
37+
steps:
38+
- name: Checkout
39+
uses: actions/checkout@v7
40+
41+
- name: Set up Go
42+
uses: actions/setup-go@v6
43+
with:
44+
go-version: ${{ env.GO_VERSION }}
45+
cache: true
46+
47+
- name: Generate docs
48+
run: make docs
49+
50+
- name: Verify docs are up to date
51+
run: |
52+
# Use porcelain so newly added (untracked) command pages are caught too.
53+
if [ -n "$(git status --porcelain -- docs/src/content/docs/commands)" ]; then
54+
echo "::error::Generated command docs are out of date. Run 'make docs' and commit the result."
55+
git status --porcelain -- docs/src/content/docs/commands
56+
git diff -- docs/src/content/docs/commands
57+
exit 1
58+
fi
59+
3460
build:
3561
name: Build Go binaries
3662
needs: [ test ]

.qbt.toml.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[qbittorrent]
22
addr = "http://127.0.0.1:6776" # qbittorrent webui-api hostname/ip
3+
#apikey = "APIKEY" # qbittorrent webui-api api key, qbit 5.2.x+ (optional)
34
login = "user" # qbittorrent webui-api user (optional)
45
password = "password" # qbittorrent webui-api password (optional)
56
#basicUser = "user" # qbittorrent webui-api basic auth user (optional)

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
.PHONY: deps build docs
2+
13
deps:
24
go mod tidy
35

46
build:
5-
go build -o bin/qbt cmd/qbt/main.go
7+
go build -o bin/qbt cmd/qbt/main.go
8+
9+
docs:
10+
go run ./tools/gen-docs

0 commit comments

Comments
 (0)