Skip to content

Commit 95fc937

Browse files
committed
docs: prefer guides.xml over Settings.cfg for modern PHP-based rendering
- Update intercept-deployment.md with accurate webhook status codes (200, 204, 412) - Add GitHub CLI automation examples for webhook setup - Fix validate_docs.sh to accept either guides.xml OR Settings.cfg - Update templates/AGENTS.md with complete guides.xml example configuration - Update typo3-extension-architecture.md to document guides.xml as preferred Based on learnings from setting up docs.typo3.org webhook for nr-saml-auth extension. guides.xml uses modern PHP-based rendering while Settings.cfg is legacy Sphinx-based.
1 parent fad5d54 commit 95fc937

File tree

4 files changed

+105
-22
lines changed

4 files changed

+105
-22
lines changed

references/intercept-deployment.md

Lines changed: 51 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ Before setting up webhooks, ensure:
1414
2. **Git Repository Referenced**: The Git repository URL must be listed on your extension's TER detail page
1515
3. **Documentation Structure**: Your `Documentation/` directory must contain:
1616
- `Index.rst` (main entry point)
17-
- `Settings.cfg` (documentation metadata)
17+
- `guides.xml` (modern, preferred) OR `Settings.cfg` (legacy)
1818
- Valid RST files following TYPO3 documentation standards
1919

20+
> **Note**: `guides.xml` is the modern PHP-based rendering configuration and is preferred over `Settings.cfg` (legacy Sphinx-based). New extensions should use `guides.xml`.
21+
2022
## Webhook Registration
2123

2224
### GitHub Setup
@@ -54,6 +56,32 @@ Before setting up webhooks, ensure:
5456
- Click **Add webhook** to save
5557
- GitLab will test the connection
5658

59+
### GitHub CLI Automation
60+
61+
For faster setup using `gh` CLI:
62+
63+
```bash
64+
# Create webhook
65+
gh api repos/{owner}/{repo}/hooks \
66+
--method POST \
67+
--field name=web \
68+
--field "config[url]=https://docs-hook.typo3.org" \
69+
--field "config[content_type]=json" \
70+
--field "config[insecure_ssl]=0" \
71+
--raw-field "events[]=push" \
72+
--field active=true
73+
74+
# Trigger test delivery
75+
gh api repos/{owner}/{repo}/hooks/{hook_id}/tests --method POST
76+
77+
# Check delivery status
78+
gh api repos/{owner}/{repo}/hooks/{hook_id}/deliveries \
79+
--jq '.[] | {id: .id, status: .status, status_code: .status_code, event: .event}'
80+
81+
# List webhooks to find hook_id
82+
gh api repos/{owner}/{repo}/hooks --jq '.[] | {id: .id, url: .config.url}'
83+
```
84+
5785
## First-Time Approval
5886

5987
The first time you trigger documentation rendering, the TYPO3 Documentation Team must approve your repository:
@@ -76,7 +104,16 @@ The first time you trigger documentation rendering, the TYPO3 Documentation Team
76104
1. Go to **Settings****Webhooks**
77105
2. Click on the webhook
78106
3. Scroll to **Recent Deliveries**
79-
4. Verify delivery shows `200` response code
107+
4. Verify delivery shows `200` or `204` response code
108+
109+
**Expected Status Codes:**
110+
| Code | Meaning |
111+
|------|---------|
112+
| `200` | Success (ping events) |
113+
| `204` | Success (push events accepted) |
114+
| `412` | Precondition Failed - expected on first-time test pushes before approval |
115+
116+
> **Note**: A `412` error on test push delivery is normal for repositories not yet approved. The actual push after commits will trigger the approval workflow.
80117
81118
**GitLab:**
82119
1. Go to **Settings****Webhooks**
@@ -180,10 +217,10 @@ Understanding the rendering pipeline:
180217
~/.claude/skills/typo3-docs/scripts/validate_docs.sh
181218
```
182219

183-
2. **Missing Settings.cfg**
220+
2. **Missing Configuration File**
184221
```bash
185-
# Check file exists
186-
ls -la Documentation/Settings.cfg
222+
# Check for guides.xml (modern) or Settings.cfg (legacy)
223+
ls -la Documentation/guides.xml Documentation/Settings.cfg
187224
```
188225

189226
3. **Invalid Cross-References**
@@ -219,7 +256,7 @@ Understanding the rendering pipeline:
219256
**Fix**:
220257
1. Trigger manual rebuild from Intercept dashboard
221258
2. Check build logs for errors
222-
3. Verify `Settings.cfg` has correct project configuration
259+
3. Verify `guides.xml` or `Settings.cfg` has correct project configuration
223260

224261
## Best Practices
225262

@@ -276,8 +313,15 @@ For supporting multiple TYPO3 versions:
276313
git push origin docs-v12
277314
```
278315

279-
2. **Configure Settings.cfg** for each branch
316+
2. **Configure guides.xml** (or Settings.cfg) for each branch
317+
```xml
318+
<!-- guides.xml (modern) -->
319+
<project title="Extension Name"
320+
version="2.1.0"
321+
copyright="since 2024 by Your Name"/>
322+
```
280323
```ini
324+
# Settings.cfg (legacy)
281325
[general]
282326
project = Extension Name
283327
release = 2.1.0

references/typo3-extension-architecture.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,24 @@ Official TYPO3 extension file structure for documentation extraction weighting a
1717
**ext_emconf.php** - Extension metadata
1818
- **Documentation Priority:** HIGH
1919
- **Extract:** Title, description, version, author, constraints
20-
- **Map to RST:** Introduction/Index.rst, Settings.cfg
20+
- **Map to RST:** Introduction/Index.rst, guides.xml (or Settings.cfg)
2121
- **Weight:** Essential metadata, version constraints
2222

2323
**Index.rst** (in Documentation/)
2424
- **Documentation Priority:** CRITICAL
2525
- **Required:** Main documentation entry point
2626
- **Must Exist:** For TYPO3 Intercept deployment
2727

28-
**Settings.cfg** (in Documentation/)
28+
**guides.xml** (in Documentation/) - Modern, Preferred
2929
- **Documentation Priority:** CRITICAL
30-
- **Required:** Documentation build configuration
30+
- **Required:** Documentation build configuration (PHP-based rendering)
3131
- **Must Exist:** For TYPO3 Intercept deployment
32+
- **Note:** Modern format, preferred over Settings.cfg
33+
34+
**Settings.cfg** (in Documentation/) - Legacy
35+
- **Documentation Priority:** CRITICAL (if guides.xml not present)
36+
- **Required:** Documentation build configuration (Sphinx-based)
37+
- **Note:** Legacy format, migrate to guides.xml for modern rendering
3238

3339
### 🟡 Core Structure Files (Medium-High Priority)
3440

@@ -205,7 +211,8 @@ Official TYPO3 extension file structure for documentation extraction weighting a
205211

206212
**Required Files:**
207213
- `Index.rst` - Main entry point
208-
- `Settings.cfg` - Build configuration
214+
- `guides.xml` - Build configuration (modern, preferred)
215+
- `Settings.cfg` - Build configuration (legacy, if guides.xml not present)
209216

210217
**Common Structure:**
211218
- `Introduction/` - Overview, features, screenshots
@@ -495,12 +502,12 @@ Missing Utility documentation:
495502
-`composer.json` with `"type": "typo3-cms-extension"`
496503
- ✅ PSR-4 autoload configuration
497504
-`Documentation/Index.rst`
498-
-`Documentation/Settings.cfg`
505+
-`Documentation/guides.xml` (modern) OR `Documentation/Settings.cfg` (legacy)
499506

500507
**Classic-Mode Installation:**
501508
-`ext_emconf.php`
502509
-`Documentation/Index.rst`
503-
-`Documentation/Settings.cfg`
510+
-`Documentation/guides.xml` (modern) OR `Documentation/Settings.cfg` (legacy)
504511

505512
### Reserved Prefixes
506513

scripts/validate_docs.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,16 @@ fi
3030
echo "Found $RST_FILES RST files"
3131
echo ""
3232

33-
# Check for Settings.cfg
34-
if [ ! -f "$DOC_DIR/Settings.cfg" ]; then
35-
echo "⚠️ Warning: Settings.cfg not found"
36-
echo " This file is required for TYPO3 Intercept builds"
33+
# Check for guides.xml (modern) or Settings.cfg (legacy)
34+
if [ -f "$DOC_DIR/guides.xml" ]; then
35+
echo "✅ guides.xml found (modern PHP-based rendering)"
36+
elif [ -f "$DOC_DIR/Settings.cfg" ]; then
37+
echo "✅ Settings.cfg found (legacy Sphinx-based rendering)"
38+
echo " ℹ️ Consider migrating to guides.xml for modern rendering"
39+
else
40+
echo "⚠️ Warning: Neither guides.xml nor Settings.cfg found"
41+
echo " One of these files is required for TYPO3 Intercept builds"
42+
echo " Recommended: Create guides.xml (modern PHP-based rendering)"
3743
fi
3844

3945
# Check for Index.rst

templates/AGENTS.md

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ This is the official TYPO3 extension documentation directory in reStructuredText
3131
### Required Files
3232

3333
- `Index.rst` - Main documentation entry point
34-
- `Settings.cfg` - Documentation metadata and configuration
34+
- `guides.xml` - Documentation metadata (modern, preferred)
35+
- `Settings.cfg` - Documentation metadata (legacy, migrate to guides.xml)
3536

3637
### Common Sections
3738

@@ -236,11 +237,33 @@ scripts/validate_docs.sh
236237
Documentation is automatically built and deployed when:
237238

238239
1. Changes pushed to `main` branch
239-
2. Webhook configured in Settings.cfg
240+
2. Webhook configured (docs-hook.typo3.org)
240241
3. TYPO3 Intercept receives notification
241242
4. Documentation rebuilt and published
242243

243-
### Settings.cfg Configuration
244+
### guides.xml Configuration (Modern - Preferred)
245+
246+
```xml
247+
<?xml version="1.0" encoding="UTF-8"?>
248+
<guides xmlns="https://www.phpdoc.org/guides"
249+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
250+
xsi:schemaLocation="https://www.phpdoc.org/guides https://www.phpdoc.org/guides/guides.xsd"
251+
default-code-language="php">
252+
<project title="Extension Name"
253+
version="1.0.0"
254+
copyright="since 2024 by Vendor Name"/>
255+
256+
<extension class="\T3Docs\Typo3DocsTheme\DependencyInjection\Typo3DocsThemeExtension"
257+
edit-on-github="vendor/extension"
258+
edit-on-github-branch="main"
259+
edit-on-github-directory="Documentation"
260+
project-home="https://github.com/vendor/extension"
261+
project-repository="https://github.com/vendor/extension"
262+
project-issues="https://github.com/vendor/extension/issues"/>
263+
</guides>
264+
```
265+
266+
### Settings.cfg Configuration (Legacy)
244267

245268
```ini
246269
[general]
@@ -253,6 +276,8 @@ copyright = 2024
253276
project_repository = https://github.com/vendor/extension
254277
```
255278

279+
> **Note**: New extensions should use `guides.xml`. Migrate existing `Settings.cfg` to `guides.xml` for modern PHP-based rendering.
280+
256281
## Documentation Extraction and Analysis
257282

258283
### Using Extraction Tools
@@ -416,9 +441,10 @@ See `references/extraction-patterns.md` for complete extraction documentation.
416441
- Validate code block languages are supported
417442

418443
**Webhook not triggering:**
419-
- Check Settings.cfg has correct repository URL
420-
- Verify webhook configured in repository settings
444+
- Check guides.xml or Settings.cfg has correct repository URL
445+
- Verify webhook configured in repository settings (https://docs-hook.typo3.org)
421446
- Check TYPO3 Intercept logs for errors
447+
- First-time webhooks require TYPO3 Documentation Team approval (1-3 days)
422448

423449
## Resources
424450

0 commit comments

Comments
 (0)