Document local dev setup gotchas; fix install-plugins gpm path
This commit is contained in:
@@ -27,3 +27,35 @@ Always use `make` commands for anything on the production server (`make remote-i
|
|||||||
### User repo gitignore
|
### User repo gitignore
|
||||||
|
|
||||||
Only these folders are tracked in the `user/` Git repo: `pages/`, `config/`, `accounts/`, `themes/`. The `plugins/` and `data/` folders are excluded.
|
Only these folders are tracked in the `user/` Git repo: `pages/`, `config/`, `accounts/`, `themes/`. The `plugins/` and `data/` folders are excluded.
|
||||||
|
|
||||||
|
## 1. Local development setup
|
||||||
|
|
||||||
|
### First-time setup after cloning
|
||||||
|
|
||||||
|
`user/plugins/` and `user/data/` are excluded from git but Grav requires them to exist. Create them once after cloning:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mkdir -p user/plugins user/data
|
||||||
|
```
|
||||||
|
|
||||||
|
Then run `make setup` (starts Docker + installs plugins).
|
||||||
|
|
||||||
|
### After make install-plugins: fix cache permissions
|
||||||
|
|
||||||
|
If the site returns a 500 error after plugin installation, the cache/logs/tmp directories may have wrong ownership (gpm runs as root inside the container). Fix with:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker exec intotheeast_grav chown -R abc:users /app/www/public/cache /app/www/public/logs /app/www/public/tmp
|
||||||
|
```
|
||||||
|
|
||||||
|
### Language URL prefix
|
||||||
|
|
||||||
|
If Grav redirects to `/en/...` URLs, ensure `user/config/system.yaml` contains:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
languages:
|
||||||
|
supported: [en]
|
||||||
|
include_default_lang: false
|
||||||
|
```
|
||||||
|
|
||||||
|
Without `include_default_lang: false`, Grav adds a language prefix to all URLs even for single-language sites.
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ stop:
|
|||||||
setup: start install-plugins
|
setup: start install-plugins
|
||||||
|
|
||||||
install-plugins:
|
install-plugins:
|
||||||
docker exec intotheeast_grav php /app/www/public/bin/gpm install $(shell cat plugins.txt | tr '\n' ' ') -y
|
docker exec -w /app/www/public intotheeast_grav php bin/gpm install $(shell cat plugins.txt | tr '\n' ' ') -y
|
||||||
|
|
||||||
# ── Content sync (user repo ↔ Gitea) ──────────────────────────────────────────
|
# ── Content sync (user repo ↔ Gitea) ──────────────────────────────────────────
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user