Wiki.js is het documentatie platform binnen ASD-PMA. Het biedt moderne wiki functionaliteit met Markdown editor, zoekfunctie en GraphQL API.
| Eigenschap | Waarde |
|---|---|
| Poort | 9119 |
| Container | asd-wikijs |
| Database | PostgreSQL (asd-wikijs-postgres) |
| Health endpoint | / |
| Categorie | Documentation |
| Classificatie | Secondary |
| Editor | Format | Use Case |
|---|---|---|
| Markdown | MD | Technische docs |
| Visual | WYSIWYG | Niet-technische content |
| Code | Raw HTML | Geavanceerde layouts |
Wiki.js gebruikt GraphQL voor de API.
# API token aanmaken via:
# Administration > API Access > Create API Key
# Lijst alle pagina's
curl -s -X POST "http://localhost:9119/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{"query":"{ pages { list { id path title } } }"}' | jq .
# Pagina content ophalen
curl -s -X POST "http://localhost:9119/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{"query":"{ pages { single(id: 1) { content } } }"}' | jq .
# Pagina aanmaken
curl -s -X POST "http://localhost:9119/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"query": "mutation { pages { create(content: \"# Hello\", description: \"Test\", editor: \"markdown\", isPublished: true, isPrivate: false, locale: \"nl\", path: \"test/page\", tags: [], title: \"Test Page\") { responseResult { succeeded message } } } }"
}' | jq .
| Command | Omschrijving |
|---|---|
just start wikijs |
Start Wiki.js |
just stop wikijs |
Stop Wiki.js |
just status wikijs |
Bekijk status |
just logs wikijs |
Bekijk logs |
just info wikijs |
Service info |
just backup wikijs |
Backup database |
Wiki.js ondersteunt OAuth2 via Authentik:
sso:
type: wikijs
redirect_path: /login/oauth2/callback
quirks:
- Config stored in PostgreSQL database
- Administrators group needs pageRules
# SSO toevoegen
just sso-add wikijs
# Controleren
just sso-check wikijs
| Setting | Waarde |
|---|---|
| Client ID | Van Authentik |
| Client Secret | Van Authentik |
| Authorization URL | http://IP:9101/application/o/authorize/ |
| Token URL | http://asd-authentik:9000/application/o/token/ |
| Userinfo URL | http://asd-authentik:9000/application/o/userinfo/ |
pma-v2/
├── index # Overzicht
├── executive/ # Business content
├── architecture/ # Technical docs
├── services/ # Service documentatie
│ ├── index
│ ├── redmine
│ ├── mattermost
│ └── ...
├── integrations/ # Integratie guides
└── reference/ # Reference docs
Wiki.js bouwt automatisch navigatie op basis van:
Wiki.js ondersteunt Mermaid syntax:
```mermaid
flowchart LR
A[Start] --> B[Process]
B --> C[End]
```
Wiki.js kan via GraphQL worden aangestuurd vanuit n8n:
| Workflow | Actie |
|---|---|
| Daily Backup | Export alle pagina's |
| Content Sync | Sync van Git repository |
| Report Generator | Maak rapport pagina |
# Check logs
just logs wikijs
# Database connectie
docker exec asd-wikijs-postgres pg_isready -U wikijs
# Introspection query
curl -s -X POST "http://localhost:9119/graphql" \
-H "Content-Type: application/json" \
-d '{"query":"{ __schema { types { name } } }"}' | jq .
# Check OAuth configuratie in database
docker exec asd-wikijs-postgres psql -U wikijs -c \
"SELECT value FROM settings WHERE key='auth';" | head -50
# Logs voor auth errors
docker logs asd-wikijs 2>&1 | grep -i oauth
# Rebuild search index
docker exec asd-wikijs node wiki db migrate
# Check search engine status
docker exec asd-wikijs-postgres psql -U wikijs -c \
"SELECT COUNT(*) FROM pages;"