Skip to content

Model site archetypes in Front Matter CMS and ease article submission#12

Merged
HeyItsGilbert merged 5 commits into
mainfrom
frontmatter-cms-archetypes
Jun 19, 2026
Merged

Model site archetypes in Front Matter CMS and ease article submission#12
HeyItsGilbert merged 5 commits into
mainfrom
frontmatter-cms-archetypes

Conversation

@HeyItsGilbert

Copy link
Copy Markdown
Member

Summary

The Front Matter CMS config (frontmatter.json) was scaffolded with a single generic default content type mapped to all of content/, but the site has five distinct archetypes whose real fields (author/authors, aliases, podcast_url, the event fields, layout) weren't modeled at all. This reworks the config to match reality and smooths the path for submitting new content.

Content types & config

  • Replace the lone default type with article, podcast, event, page, author, each mapped to its content folder via pageFolders.
  • Articles/podcast get filePrefix: {{year}}-{{month}}-{{day}} so the YYYY-MM-DD-slug convention is automatic.
  • author/authors wired to a seeded custom taxonomy; categories is a closed multiselect from the existing 15-term list.
  • dateFormat set to RFC3339 to match existing content (prevents Hugo parse drift); required description field for SEO/social cards/list excerpts.

Archetypes

  • Convert archetypes/default.md from TOML to YAML (all content uses YAML).
  • Add articles.md, podcast.md, calendar.md, authors.md — named to match Hugo section dirs so hugo new picks them up.

Submission flow

  • New .github/workflows/add-article.yml: an approved guest-post issue is parsed into a front-mattered content/articles/YYYY-MM-DD-slug.md and opened as a PR (mirrors the existing add-event.yml).
  • guest-blog-post.yml issue template gains Description, Category (dropdown), and Tags inputs.
  • CONTRIBUTING.md front-matter template now includes description + a Front Matter tip.

Verification

  • frontmatter.json and taxonomyDb.json are valid JSON; both workflow/template YAML files validate with PyYAML.
  • hugo --gc builds clean.
  • hugo new for articles/podcast/calendar/authors each produces a file matching its archetype.

🤖 Generated with Claude Code

Replace the single generic `default` content type with five typed ones
(article, podcast, event, page, author) mapped to their content folders,
so the Front Matter editor matches what contributors actually write.

- frontmatter.json: per-folder content types + mappings, auto
  date-prefixed filenames, RFC3339 dateFormat, authors custom taxonomy
- archetypes: convert default.md to YAML; add articles/podcast/calendar/
  authors templates named to match Hugo sections
- taxonomyDb.json: seed authors dropdown from existing content
- add-article.yml: turn an approved guest-post issue into a
  front-mattered article file + PR (mirrors add-event.yml)
- guest-blog-post.yml: add Description, Category, and Tags inputs
- CONTRIBUTING.md: include description in the front matter template

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

netlify Bot commented Jun 19, 2026

Copy link
Copy Markdown

Deploy Preview for powershellorg ready!

Name Link
🔨 Latest commit 5ed81be
🔍 Latest deploy log https://app.netlify.com/projects/powershellorg/deploys/6a35d57face5eb0008b0a2c0
😎 Deploy Preview https://deploy-preview-12--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.

* Introduced a new `.vscode/extensions.json` file.
* Added recommendations for essential extensions to enhance development experience.
* Prevent local Netlify folder from being tracked by Git.
@HeyItsGilbert HeyItsGilbert enabled auto-merge (rebase) June 19, 2026 23:07
@KennyNeal KennyNeal assigned KennyNeal and unassigned KennyNeal Jun 19, 2026
@therealgill therealgill requested a review from Copilot June 19, 2026 23:32
@KennyNeal KennyNeal self-assigned this Jun 19, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the repository’s authoring workflow for the Hugo site by modeling the site’s real content archetypes in Front Matter CMS, adding matching Hugo archetypes, and automating “approved” guest-article issue submissions into PRs.

Changes:

  • Adds a multi–content-type frontmatter.json (article/podcast/event/page/author) plus seeded taxonomy DB entries for categories/authors.
  • Adds Hugo archetypes for section-based content creation and converts the default archetype to YAML.
  • Introduces an add-article GitHub Actions workflow and expands the guest blog post issue form to capture description/category/tags.

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
frontmatter.json Defines Front Matter CMS content types/fields and folder mappings for Hugo sections.
CONTRIBUTING.md Updates the front-matter template and documents a Front Matter CMS submission tip.
archetypes/default.md Converts default archetype front matter from TOML to YAML.
archetypes/articles.md Adds an articles section archetype with expected front matter.
archetypes/podcast.md Adds a podcast section archetype including podcast_url.
archetypes/calendar.md Adds a calendar/events section archetype matching existing event fields.
archetypes/authors.md Adds an authors section archetype for author taxonomy pages.
.vscode/extensions.json Recommends VS Code extensions (Front Matter CMS + Markdown tooling).
.gitignore Ignores local Netlify artifacts.
.github/workflows/add-article.yml Creates a PR automatically from an approved guest-article issue submission.
.github/ISSUE_TEMPLATE/guest-blog-post.yml Adds description/category/tags fields to support automated article generation.
.frontmatter/database/taxonomyDb.json Seeds categories and the custom authors taxonomy options for Front Matter CMS.
.frontmatter/database/pinnedItemsDb.json Adds a pinned-items DB placeholder for Front Matter CMS.

Comment thread .vscode/extensions.json
Comment thread frontmatter.json
Comment thread frontmatter.json
Comment thread .github/workflows/add-article.yml Outdated
Comment thread .github/workflows/add-article.yml Outdated
Comment thread .github/workflows/add-article.yml
KennyNeal and others added 2 commits June 19, 2026 18:42
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
- frontmatter.json: write event startDate/endDate as date-only
  (yyyy-MM-dd) so Front Matter CMS doesn't add a time component and
  drift from existing calendar files
- add-article.yml: strip HTML from scalar front matter fields (parity
  with add-event.yml), normalize CRLF and tolerate whitespace around the
  markdown content fences, and fall back to article-<issue#> when a title
  produces an empty slug

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

Copy link
Copy Markdown
Member Author

Addressed the review feedback in 5ed81be:

  • frontmatter.json startDate/endDate (datetime vs date-only) — kept the datetime type (preserves the date picker + isPublishDate) but added a field-level dateFormat: "yyyy-MM-dd" so Front Matter writes date-only strings matching the existing content/calendar/*.md files. No more time-component drift.
  • add-article.yml HTML in Description — added a strip_html() helper applied to all scalar front matter fields (title, author, description, category, tags), matching add-event.yml.
  • add-article.yml fragile fence unwrapping — issue body is now normalized to LF first, and the fence regexes tolerate surrounding whitespace/blank lines.
  • add-article.yml empty slug — falls back to article-<issue#> when a title yields an empty slug, so filenames/branches are always valid.
  • .vscode/extensions.json trailing comma — already fixed in 69c7679.

Verified with a parser unit test (CRLF body, HTML in description, fenced content with blank lines, and a punctuation-only title) plus JSON/YAML validation.

@HeyItsGilbert HeyItsGilbert merged commit e590650 into main Jun 19, 2026
5 checks passed
@HeyItsGilbert HeyItsGilbert deleted the frontmatter-cms-archetypes branch June 19, 2026 23:51
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.

3 participants