You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/prompts/plan-upgradeGravDocs.prompt.md
+21-1Lines changed: 21 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,9 +31,12 @@ description: Description here.
31
31
32
32
-`metadata.description` → promoted to top-level `description:`
33
33
-`taxonomy:` block → removed entirely
34
-
- Pages with no `metadata.description` → keep only `title:`
34
+
- Pages with no `metadata.description`(empty or missing value) → keep only `title:`, do **not** emit `description:` at all
35
35
- Do not add any other fields
36
36
- If the description value is wrapped in YAML double quotes (e.g. `"Some text."`), strip the surrounding quotes in the output — unless the value contains a colon (`:`), in which case keep the quotes for valid YAML
37
+
- If the description value is **not** quoted but **contains a colon** (`:`) in its text, wrap the entire value in double quotes to produce valid YAML (e.g. `description: "Some text: here."`)
38
+
39
+
> **Edge case:** When `metadata.description:` is present but empty (no value on the line), the regex must not consume the next YAML line. Always check that the extracted description value is non-empty before promoting it.
37
40
38
41
### T2 — Notice Blocks → GitHub Alerts
39
42
@@ -62,6 +65,10 @@ Line two with **bold** and a [link](/page).
62
65
> Line two with **bold** and a [link](/page).
63
66
```
64
67
68
+
> **Edge cases to handle:**
69
+
> -**Indented notices** (e.g. inside a numbered list): ` [notice=tip]...[/notice]` — match regardless of leading whitespace, not just at line start. Move the converted alert block *outside* the list item (alerts cannot be nested in list items).
70
+
> -**Inline notices** (opening tag mid-sentence): e.g. `Some text. [notice]Warning.[/notice]` — split the sentence before the tag, then output the alert on its own line.
71
+
65
72
### T3 — Image `?resize=` Parameters
66
73
67
74
Remove Grav's image processing query parameters from all image references:
@@ -203,6 +210,13 @@ Convert all `[notice...]` blocks across all files using the T2 mapping table. Ru
203
210
204
211
Flatten `metadata.description` and remove `taxonomy:` blocks across all files. *Can run in parallel with Phase 2.*
205
212
213
+
After running, verify no files contain `description: taxonomy:` (sign of empty-description regex bleed) and no unquoted descriptions containing a colon:
0 commit comments