|
| 1 | +--- |
| 2 | +name: quarto-blog-post |
| 3 | +description: Use when writing, drafting, or editing blog posts for quarto.org, creating Quarto feature or release announcements, or reviewing blog post drafts for the Quarto website. |
| 4 | +--- |
| 5 | + |
| 6 | +# Quarto Blog Post |
| 7 | + |
| 8 | +Write blog posts for `quarto.org/blog` matching the voice, structure, and conventions |
| 9 | +from 40+ existing posts. |
| 10 | + |
| 11 | +## Setup |
| 12 | + |
| 13 | +1. `ls docs/blog/posts/` — browse existing posts for reference |
| 14 | +2. Read `docs/blog/posts/_metadata.yml` — inherited by all posts (Giscus comments, |
| 15 | + title-block-banner, left TOC, signup widget, `search: false`) |
| 16 | +3. If the post covers a Quarto feature, read the relevant docs page for accurate |
| 17 | + terminology and linking. |
| 18 | + |
| 19 | +## File Structure |
| 20 | + |
| 21 | +``` |
| 22 | +docs/blog/posts/YYYY-MM-DD-slug/ |
| 23 | + index.qmd # The post (required) |
| 24 | + thumbnail.png # Listing card image (required) |
| 25 | + *.png, *.jpg # Additional images |
| 26 | + _contribs.md # Contributor list (release posts only) |
| 27 | +``` |
| 28 | + |
| 29 | +Directory name: `YYYY-MM-DD-slug` — date matches frontmatter, slug is short kebab-case. |
| 30 | + |
| 31 | +## Frontmatter |
| 32 | + |
| 33 | +```yaml |
| 34 | +--- |
| 35 | +title: "Post Title" |
| 36 | +description: | |
| 37 | + One to three sentences for listing cards and social sharing. |
| 38 | +author: Author Name |
| 39 | +date: "YYYY-MM-DD" |
| 40 | +categories: |
| 41 | + - Category1 |
| 42 | + - Category2 |
| 43 | +image: thumbnail.png |
| 44 | +image-alt: "Descriptive alt text for the thumbnail." |
| 45 | +--- |
| 46 | +``` |
| 47 | + |
| 48 | +**title**: Short. Release posts: `"Quarto X.Y"`. Backtick code spans OK. |
| 49 | + |
| 50 | +**description**: Self-contained summary (makes sense without the title). Always `|` block scalar. |
| 51 | + |
| 52 | +**author**: Plain string for staff (`Charlotte Wickham`). Two authors: `Name and Name`. |
| 53 | +Guest authors use structured form with `name:` and optional `url:`. |
| 54 | + |
| 55 | +**date**: ISO 8601 `"YYYY-MM-DD"`. Must match directory name. |
| 56 | + |
| 57 | +**categories**: 2-3 per post. Use existing values — scan recent posts to check. Common: |
| 58 | +`Releases`, `Quarto X.Y`, `Features`, `Authoring`, `Learn`, `Workshop`, `Conference`, |
| 59 | +`Tip`, `Extensions`, `Tables`, `Teaching`, `Jupyter`. |
| 60 | + |
| 61 | +**image / image-alt**: `thumbnail.png` preferred. `image-alt` is mandatory. |
| 62 | +See `references/thumbnail-guide.md` for dimensions, visual style, and design patterns. |
| 63 | + |
| 64 | +**Optional**: `lightbox: true` (many screenshots), `draft: true` (while developing). |
| 65 | +Do not use `subtitle:` (phased out after 2023). |
| 66 | + |
| 67 | +## Post Types |
| 68 | + |
| 69 | +Identify the type before writing — it determines structure, opening, and closing. |
| 70 | +Read `references/post-types.md` for detailed structure guidance per type. |
| 71 | + |
| 72 | +| Type | When | Key trait | |
| 73 | +|------|------|-----------| |
| 74 | +| **Release** | New Quarto version ships | Most structured: features → Other Highlights → Acknowledgements | |
| 75 | +| **Feature** | Spotlight a specific capability | Concept-driven sections, docs links | |
| 76 | +| **How-to** | Tutorial or walkthrough | Problem → solution, sequential steps | |
| 77 | +| **News** | Short announcement, roundup | Very short, layout-heavy, minimal prose | |
| 78 | + |
| 79 | +## Writing Voice |
| 80 | + |
| 81 | +**First-person plural**: "We" for team work, "you" for the reader. |
| 82 | + |
| 83 | +**Warm, not marketing**: "We're excited about this feature" — good. |
| 84 | +"This groundbreaking capability" — bad. Collegial tone, sharing with practitioners. |
| 85 | + |
| 86 | +**Direct openers**: Get to the point immediately. No "In this blog post, we will..." |
| 87 | +preambles. State what happened or what the feature does, then elaborate. |
| 88 | + |
| 89 | +**Technical accuracy**: Use exact terminology from the docs. Link to docs rather than |
| 90 | +trying to replicate them — the post introduces, the docs page is the reference. |
| 91 | + |
| 92 | +**Thank contributors**: Call out external contributors warmly inline. |
| 93 | + |
| 94 | +## Technical Conventions |
| 95 | + |
| 96 | +### Images |
| 97 | + |
| 98 | +Every image must have `fig-alt=` text — non-negotiable accessibility standard. |
| 99 | + |
| 100 | +```markdown |
| 101 | +{fig-alt="Description of what the screenshot shows."} |
| 102 | +``` |
| 103 | + |
| 104 | +Multi-image layouts use Quarto's layout system (`{layout-ncol="2"}`). |
| 105 | +For many images, add `{.lightbox group="name"}`. |
| 106 | + |
| 107 | +### Code Blocks |
| 108 | + |
| 109 | +Always specify language. Use `filename=` labels for file content or terminal commands: |
| 110 | + |
| 111 | +````markdown |
| 112 | +```{.yaml filename="_quarto.yml"} |
| 113 | +project: |
| 114 | + type: website |
| 115 | +``` |
| 116 | +```` |
| 117 | + |
| 118 | +### Links |
| 119 | + |
| 120 | +Every feature mentioned links to its docs page. Pattern: explain briefly, show example, |
| 121 | +then link. Use site-root-relative paths: `[Feature](/docs/path.qmd)`. |
| 122 | + |
| 123 | +### Callouts |
| 124 | + |
| 125 | +Use sparingly: `.callout-tip` for post origin context, `.callout-warning` for caveats, |
| 126 | +`.callout-note` for prerequisites. Release posts typically skip callouts. |
| 127 | + |
| 128 | +### Shortcodes |
| 129 | + |
| 130 | +- `{{< prerelease-callout X.Y type="blog" >}}` — pre-release banner (auto-disappears) |
| 131 | +- `{{< video URL >}}` — video embed |
| 132 | +- `{{< include file.md >}}` — include generated content |
| 133 | + |
| 134 | +## Workflow |
| 135 | + |
| 136 | +1. **Identify post type** → read `references/post-types.md` for that type |
| 137 | +2. **Create directory**: `docs/blog/posts/YYYY-MM-DD-slug/` |
| 138 | +3. **Write frontmatter** per schema above |
| 139 | +4. **Draft body** following type-specific structure |
| 140 | +5. **Add images** with `fig-alt=` on every one |
| 141 | +6. **Link to docs** for every feature mentioned |
| 142 | +7. **Create thumbnail** (or note one is needed) |
| 143 | +8. **Review**: direct opener? code blocks fenced with language? all images alt-texted? |
| 144 | + docs links present? closing matches type convention? categories correct? |
| 145 | + |
| 146 | +## Publishing |
| 147 | + |
| 148 | +When ready to publish, set the post date to today and rename the directory: |
| 149 | + |
| 150 | +```bash |
| 151 | +quarto run _tools/publish-date.ts docs/blog/posts/YYYY-MM-DD-slug |
| 152 | +``` |
| 153 | + |
| 154 | +This updates `date:` in frontmatter and renames the directory to match. Run it |
| 155 | +on the day you intend to merge — avoids manual date edits if the publish date slips. |
| 156 | + |
| 157 | +## PR Workflow |
| 158 | + |
| 159 | +PR to `main` first. On merge, auto-backport creates cherry-pick PR to `prerelease`. |
| 160 | +Push branches to `upstream` remote (quarto-dev/quarto-web), not `origin`. |
0 commit comments