Skip to content

Transform post descriptions: extract first sentence to description field, move rest to body with markdown lists#12

Draft
Copilot wants to merge 3 commits into
mainfrom
copilot/move-description-to-body
Draft

Transform post descriptions: extract first sentence to description field, move rest to body with markdown lists#12
Copilot wants to merge 3 commits into
mainfrom
copilot/move-description-to-body

Conversation

Copilot AI commented Oct 22, 2025

Copy link
Copy Markdown
Contributor

Overview

This PR transforms all 349 posts in the _posts directory to improve content structure and readability by:

  1. Extracting the first sentence from each post's description and keeping it as a concise single-line summary
  2. Moving the remaining description content to the post body
  3. Converting plain text lists to properly formatted markdown lists

Changes Made

Description Field Transformation

Previously, post descriptions contained multiple paragraphs with social media links, credits, and other metadata in YAML literal block format:

description: |
  Gary Joins Rachel Burden to talk about his 
  He explains Quantitative Easing and questions why the media...
  
  SOCIAL MEDIA:
  WEBSITE - https://www.wealtheconomics.org
  TWITTER - @garyseconomics
  ...

Now, descriptions contain only the first sentence as a single line:

description: "Gary Joins Rachel Burden to talk about his He explains Quantitative Easing and questions why the media and politicians have not considered a wealth tax."

Post Body Enhancement

The remaining content is moved to the post body with improved formatting:

---

I probably should make it clear that my ideal threshold for a wealth tax...

SOCIAL MEDIA:
- WEBSITE - https://www.wealtheconomics.org
- TWITTER - @garyseconomics
- FACEBOOK - garyseconomics
- INSTAGRAM - garyseconomics

Markdown List Conversion

Plain text lists under section headers (SOCIAL MEDIA, DATA SOURCES, etc.) are now properly formatted as markdown lists with bullet points, making them more readable and semantically correct.

YAML Validation Fixes

Descriptions containing special YAML characters (:, &, #, @, etc.) are now properly quoted to ensure valid YAML syntax:

# Before (invalid YAML)
description: so there's a housing crisis & countries by extension: possibly a cost...

# After (valid YAML)
description: "so there's a housing crisis & countries by extension: possibly a cost..."

Special Cases Handled

  • Multi-line quoted text: Entire quotes are kept together as the first sentence
  • Unclosed quotes: Opening quotes without closing quotes are handled gracefully
  • Single-line descriptions: Posts with only one line of description maintain their structure
  • Various formats: Sentences, paragraphs, and quoted text are all handled appropriately

Validation

  • ✅ All 349 posts have valid YAML front matter
  • ✅ All descriptions are in single-line format
  • ✅ Plain text lists converted to markdown lists
  • ✅ No security vulnerabilities detected

This transformation improves the semantic structure of posts, making descriptions more suitable for use as meta descriptions or social media previews, while moving detailed content and lists to the post body where they belong.

Original prompt

For each post in ./_posts, move the contents of the description property to the post body, but retain the first sentence of the description property in that property as a single line. format all plain text lists in the body as markdown lists.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI self-assigned this Oct 22, 2025
Copilot AI and others added 2 commits October 22, 2025 13:55
…eld, move rest to body with markdown lists

Co-authored-by: davelab6 <261579+davelab6@users.noreply.github.com>
Co-authored-by: davelab6 <261579+davelab6@users.noreply.github.com>
Copilot AI changed the title [WIP] Move description contents to post body and format lists Transform post descriptions: extract first sentence to description field, move rest to body with markdown lists Oct 22, 2025
Copilot AI requested a review from davelab6 October 22, 2025 14:06
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.

2 participants