Skip to content

feat: GitHub-style alert admonitions + contributor guide#44

Merged
HeyItsGilbert merged 2 commits into
mainfrom
feat/admonition-alerts
Jun 25, 2026
Merged

feat: GitHub-style alert admonitions + contributor guide#44
HeyItsGilbert merged 2 commits into
mainfrom
feat/admonition-alerts

Conversation

@HeyItsGilbert

@HeyItsGilbert HeyItsGilbert commented Jun 24, 2026

Copy link
Copy Markdown
Member

What

Adds GitHub-style alert admonitions to the site and the "How to Write for PowerShell.org" contributor guide that uses them.

Authors write the standard GitHub alert syntax:

> [!NOTE]
> Useful context.

> [!TIP] Optional custom title
> A handy shortcut.

…and a Goldmark blockquote render hook turns it into a styled callout. Ordinary blockquotes are untouched.

Why limited to GitHub's 5 types

Articles are submitted as plain Markdown — pasted into a GitHub issue (no-Git path) or as a Markdown file in a PR — so the Markdown is read on GitHub before it is ever read on the site. GitHub natively renders exactly five alert types (NOTE, TIP, IMPORTANT, WARNING, CAUTION); anything beyond that degrades to a literal [!SUCCESS] blockquote there. Supporting only the five keeps the rendering identical in the issue form, the PR diff, and the published page. Full rationale in docs/adr/0004-github-alert-admonitions.md.

Changes

  • layouts/_markup/render-blockquote.html — render hook: 5 alert types → Font Awesome icon + label (honors an optional custom title); plain-blockquote fallback.
  • static/css/alerts.css.ps-alert base + 5 variants (GitHub light-mode palette). Title uses a tight, uppercase label with a filled circular icon badge as the per-type visual indicator. Theme-owned, linked from baseof.html.
  • docs/adr/0004-github-alert-admonitions.md — records the syntax/type-cap decision and why the existing terminal shortcode convention was deliberately not extended.
  • content/articles/2026-06-23-how-to-write-for-powershell-org.md — new contributor guide; dogfoods [!IMPORTANT] and [!TIP].

Drive-by polish (same article)

  • baseof.html — trimmed the inherited .prose pre padding/margins on Hugo/Chroma .highlight code blocks, which had been rendering as a wall of whitespace. Line numbers are retained.
  • frontmatter.json — Front Matter CMS config touch-ups.

Verification

  • hugo --gc --minify builds clean (pre-existing languageCode deprecation only).
  • Confirmed in generated output and via hugo server: both alerts render as .ps-alert-*, the stylesheet ships and is linked, the article's category-list blockquote stays a plain <blockquote> (fallback intact), and code blocks render tighter.

🤖 Generated with Claude Code

Render `> [!NOTE]` / `[!TIP]` / `[!IMPORTANT]` / `[!WARNING]` / `[!CAUTION]`
blockquotes as styled callouts via a Goldmark blockquote render hook, with
a plain-blockquote fallback for ordinary quotes.

Limited to GitHub's five canonical alert types so the same Markdown renders
identically in a GitHub issue/PR and on the site, matching the article
submission flow. Styling ships in a theme-owned stylesheet.

Also adds the how-to-write contributor guide, which dogfoods [!IMPORTANT]
and [!TIP]. See docs/adr/0004-github-alert-admonitions.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@netlify

netlify Bot commented Jun 24, 2026

Copy link
Copy Markdown

Deploy Preview for powershellorg ready!

Name Link
🔨 Latest commit eae7f2c
🔍 Latest deploy log https://app.netlify.com/projects/powershellorg/deploys/6a3c6888332e6f0008f371d4
😎 Deploy Preview https://deploy-preview-44--powershellorg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

- Alert title: tighter spacing, uppercase label, filled circular icon badge
  as a stronger per-type visual indicator.
- Highlighted (.highlight) code blocks: trim the inherited .prose pre
  padding/margins so server-side Chroma blocks no longer read as a wall of
  whitespace; line numbers retained.
- Update contributor guide article and Front Matter CMS config.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@HeyItsGilbert HeyItsGilbert merged commit 80a734e into main Jun 25, 2026
5 checks passed
@HeyItsGilbert HeyItsGilbert deleted the feat/admonition-alerts branch June 25, 2026 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant