Files
wp-materialize/examples.md

106 lines
2.2 KiB
Markdown

# Configuration Examples
Reference: [configurations.md](configurations.md)
## Per-Directory Manifests
Root directory manifest (`.wp-materialize.json`):
```json
{
"categories": { "content": ["Systems", "Infrastructure"], "inherit": true },
"tags": { "content": ["automation", "wordpress"], "inherit": true },
"subdirectories": { "content": ["design", "notes"], "inherit": true },
"files": {
"post.md": {
"title": "Explicit Title",
"categories": { "content": ["Overrides"], "inherit": false },
"tags": { "content": ["extra"], "inherit": true }
},
"essay.md": {
"use_heading_as_title": { "level": 1, "strict": true }
}
}
}
```
Subdirectory manifest (`design/.wp-materialize.json`):
```json
{
"categories": { "content": ["Design"], "inherit": true },
"tags": { "content": ["ui"], "inherit": true },
"subdirectories": { "content": [], "inherit": false },
"files": {
"system.md": {
"use_heading_as_title": { "level": 1, "strict": true }
}
}
}
```
## Minimal (Directories Only)
```json
{
"wordpress_root": "/var/www/wordpress",
"repo_storage_dir": "/home/user/wp-materialize-repos",
"git_repositories": [],
"directories": [
{
"name": "local-notes",
"path": "/home/user/notes",
"root_subdir": "wordpress"
}
]
}
```
## Git Repositories + Directories
```json
{
"wordpress_root": "/var/www/wordpress",
"repo_storage_dir": "/home/user/wp-materialize-repos",
"git_repositories": [
{
"name": "content-repo",
"url": "https://github.com/example/content-repo.git",
"branch": "main",
"root_subdir": "posts"
},
{
"name": "docs-repo",
"url": "git@github.com:example/docs-repo.git",
"branch": "main",
"root_subdir": null
}
],
"directories": [
{
"name": "local-notes",
"path": "/home/user/notes",
"root_subdir": "wordpress"
}
]
}
```
## Single Git Repository
```json
{
"wordpress_root": "/var/www/wordpress",
"repo_storage_dir": "/home/user/wp-materialize-repos",
"git_repositories": [
{
"name": "content-repo",
"url": "https://github.com/example/content-repo.git",
"branch": "main",
"root_subdir": "posts"
}
],
"directories": []
}
```