Skip to content

Commit c098989

Browse files
committed
docs: add comprehensive content directives guide
- Create references/content-directives.md covering: - Accordion directive for collapsible FAQ sections - Admonitions (note, tip, warning, etc.) with decision guide - Card-grid for overview pages and navigation - Tabs with synchronized switching - Tables (simple, grid, csv-table, t3-field-list-table) - Version directives (versionadded, versionchanged, deprecated) - ViewHelper documentation (typo3:viewhelper) - Comments and special characters - Update SKILL.md: - Add content-directives.md to Quick Reference Table - Add Content Directives section with usage guidance - Expand description to mention accordion, tabs, admonitions - Add content/version directive items to pre-commit checklist
1 parent 0194552 commit c098989

File tree

2 files changed

+525
-9
lines changed

2 files changed

+525
-9
lines changed

SKILL.md

Lines changed: 55 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: typo3-docs
3-
description: "Create and maintain TYPO3 extension documentation following official docs.typo3.org standards. Use when creating/editing Documentation/*.rst files or README.md, using TYPO3 directives (confval, versionadded, card-grid), creating/adding screenshots, rendering/testing/viewing docs locally, or deploying to docs.typo3.org. By Netresearch."
3+
description: "Create and maintain TYPO3 extension documentation following official docs.typo3.org standards. Use when creating/editing Documentation/*.rst files or README.md, using TYPO3 directives (confval, versionadded, card-grid, accordion, tabs, admonitions), creating/adding screenshots, rendering/testing/viewing docs locally, or deploying to docs.typo3.org. By Netresearch."
44
---
55

66
# TYPO3 Documentation
@@ -11,7 +11,7 @@ description: "Create and maintain TYPO3 extension documentation following offici
1111
- Creating new `Documentation/` directory structure
1212
- Editing `Documentation/**/*.rst` files
1313
- Creating `Documentation/guides.xml` or updating `Settings.cfg`
14-
- Using TYPO3 directives: `confval`, `versionadded`, `card-grid`, `php:class`
14+
- Using TYPO3 directives: `confval`, `versionadded`, `card-grid`, `accordion`, `tabs`
1515
- Using text roles: `:php:`, `:file:`, `:guilabel:`, `:ref:`
1616
- **Creating/adding screenshots**: Docker container, image guidelines
1717
- **Rendering documentation**: `scripts/render_docs.sh`, Docker container
@@ -66,6 +66,7 @@ See `references/rendering.md` for complete init documentation.
6666
| guides.xml configuration | `references/guides-xml.md` |
6767
| Coding guidelines and .editorconfig | `references/coding-guidelines.md` |
6868
| **Code blocks, confval, PHP domain** | `references/code-structure-elements.md` |
69+
| **Content directives (accordion, tabs, cards)** | `references/content-directives.md` |
6970
| Rendering, testing, viewing documentation | `references/rendering.md` |
7071
| Screenshots and images | `references/screenshots.md` |
7172
| Text roles (`:php:`, `:file:`, `:guilabel:`) | `references/text-roles-inline-code.md` |
@@ -164,6 +165,49 @@ Use `confval` for extension settings, TCA fields, TypoScript properties:
164165

165166
See `references/code-structure-elements.md` for complete guide.
166167

168+
## Content Directives
169+
170+
Use the right directive for structured content:
171+
172+
| Content Type | Directive | When to Use |
173+
|--------------|-----------|-------------|
174+
| Collapsible content | `accordion` | FAQ, optional details |
175+
| Important notices | `note`, `tip`, `warning` | Callouts, caveats |
176+
| Feature grids | `card-grid` | Overview pages, navigation |
177+
| Alternative examples | `tabs` | Multi-language code, variants |
178+
| Version changes | `versionadded`, `deprecated` | API changes |
179+
180+
### Admonitions (Use Appropriately)
181+
182+
```rst
183+
.. note::
184+
Background information users should know.
185+
186+
.. tip::
187+
Helpful suggestion for better results.
188+
189+
.. warning::
190+
Potential issue or data loss risk.
191+
```
192+
193+
### Tabs (Synchronized)
194+
195+
```rst
196+
.. tabs::
197+
198+
.. group-tab:: Composer
199+
200+
Run :bash:`composer require vendor/package`
201+
202+
.. group-tab:: Classic
203+
204+
Download and install manually.
205+
```
206+
207+
Tabs with the same name synchronize across the page.
208+
209+
See `references/content-directives.md` for complete guide.
210+
167211
## Required File Structure
168212

169213
Full documentation requires this structure (per [TYPO3 File Structure](https://docs.typo3.org/m/typo3/docs-how-to-document/main/en-us/Reference/FileStructure.html)):
@@ -263,13 +307,15 @@ See `references/screenshots.md` for complete guidelines.
263307
4. **Code blocks**: Have `:caption:`, correct language, valid syntax
264308
5. **Configuration**: Uses `confval` directive with `:type:`, `:default:`
265309
6. **Text roles**: Inline code uses proper roles (`:php:`, `:file:`, etc.)
266-
7. **guides.xml**: Valid config with edit-on-github, project links, inventories
267-
8. **Screenshots**: PNG format, proper alt text, stored in `Documentation/Images/`
268-
9. `scripts/validate_docs.sh` passes
269-
10. `scripts/render_docs.sh` shows no warnings
270-
11. **Visual verification**: Open rendered HTML and confirm formatting
271-
12. README.md and Documentation/ are in sync (no contradictions)
272-
13. `Documentation-GENERATED-temp/` is in `.gitignore`
310+
7. **Content directives**: Correct admonition type, synchronized tab names
311+
8. **Version directives**: Include version number, deprecations mention replacement
312+
9. **guides.xml**: Valid config with edit-on-github, project links, inventories
313+
10. **Screenshots**: PNG format, proper alt text, stored in `Documentation/Images/`
314+
11. `scripts/validate_docs.sh` passes
315+
12. `scripts/render_docs.sh` shows no warnings
316+
13. **Visual verification**: Open rendered HTML and confirm formatting
317+
14. README.md and Documentation/ are in sync (no contradictions)
318+
15. `Documentation-GENERATED-temp/` is in `.gitignore`
273319

274320
## README.md Synchronization
275321

0 commit comments

Comments
 (0)