create-blog-post
Use this if the user wants to convert a blog post from Google Docs markdown to the format used in the Open Home Foundation website.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use this if the user wants to convert a blog post from Google Docs markdown to the format used in the Open Home Foundation website.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | create-blog-post |
| description | Use this if the user wants to convert a blog post from Google Docs markdown to the format used in the Open Home Foundation website. |
Convert a draft markdown file into a properly formatted Open Home Foundation blog post.
Place your draft blog post markdown file in the project root create-blog-post/ directory, then run:
/create-blog-post
Automates conversion of a draft markdown file with metadata into a production-ready Open Home Foundation blog post:
### **– Summary break / Read more –** to <!--more--><a> tags with target="_blank"src/blog/ with front mattercreate-blog-post/ Directorycard.* - OG/social card image (required, any common image format: .webp, .png, .jpg, .jpeg). This image is used for social sharing only and is not shown inline in the blog content.image1.*, image2.*, etc. - Inline content images (optional, any common image format). These are embedded in the blog content body.# Metadata
**Blog title:** Your Blog Title
**Author:** Author Name
**Publish date:** DD-MM-YYYY
**Category:** Category Name
**Social/OpenGraph title** (Usually same as the blog title, visibility mostly limited to 50-60 characters)**:**
A short title.
**Social/OpenGraph description** (120-158 characters):
Influences SEO ranking. Include the main keyword, describe what readers will find, and give them a clear reason to click.
# Blog notes/preparations
☝️ Any lines with the pointer emoji can be removed during processing
# Blog content
Your intro paragraph here...
### **– Summary break / Read more –**
Rest of content...
Notes:
![][image1] through ![][imageN] references in the content body correspond to image1.* through imageN.* files in create-blog-post/. They are replaced with inline <img> tags.### **– Summary break / Read more –** marker will be converted to <!--more-->Creates a production-ready blog post at:
src/blog/slug.md - The formatted blog postsrc/assets/images/blog/slug/card.webp - OG/social card image (moved from create-blog-post/)src/assets/images/blog/slug/image1.webp, image2.webp, etc. - Inline content images (converted from source format)Before doing anything else, strip out embedded base64 image data from the draft file using a shell command. Do not read the draft file before this step — the base64 data can make the file extremely large.
Google Docs markdown exports include image references like ![][image1] in the content body, with corresponding base64 definitions at the bottom of the file in the format:
[image1]: <data:image/png;base64,iVBORw0KGgo... (potentially megabytes of data)>
Run this sed command via the Bash tool to strip them in-place:
sed -i '/^\[image[0-9]*\]: <data:/d' "create-blog-post/draft.md"
![][image1] references in the content body are preserved — they will be replaced with proper image paths later### **– Summary break / Read more –** marker to <!--more-->Before processing images, ensure the cwebp tool is installed. If not, install it:
# Check if cwebp is available, install if missing
which cwebp || sudo apt-get install -y webp
Card image (card.*):
card image in create-blog-post/ (any extension: .webp, .png, .jpg, .jpeg).webp, copy it to src/assets/images/blog/slug/card.webpcwebp -resize 1200 630 -q 85 input -o src/assets/images/blog/slug/card.webp-resize 1200 630 to ensure correctnesscard_image front matter field only; it is not placed in the content bodyInline content images (if any):
image1.*, image2.*, image3.*, etc. in create-blog-post/ (any extension: .webp, .png, .jpg, .jpeg)cwebp -resize 900 0 -q 85 input -o output.webp (the 0 for height preserves the aspect ratio).webp, still re-encode it with the resize: cwebp -resize 900 0 -q 85 input.webp -o output.webpsrc/assets/images/blog/slug/image1.webp, image2.webp, etc.![][imageN] reference in the content with: <img src="/assets/images/blog/slug/imageN.webp" alt="descriptive alt text" style="border: 0;box-shadow: none;"><p> tag)External links (different domains/subdomains):
<a href="URL" target="_blank" rel="noopener noreferrer">text</a>Internal links (www.openhomefoundation.org only):
[text](/path)## **Title** → ## Title)#), demote all headings one level (content should start at H2)’ should also be converted to the curly character directly.Create src/blog/slug.md with the following front matter:
---
layout: post
title: "Blog Title"
description: "Social/OpenGraph description"
card_image: /assets/images/blog/slug/card.webp
eleventyComputed:
og_image: "https://assets.openhomefoundation.org/opengraph?url=https://www.openhomefoundation.org{{ page.url }}"
hide_header_image: true
date: YYYY-MM-DD
author: "Author Name"
category: "Category"
---
Then the content:
<!--more--> tag after first paragraph![][imageN] references appeared)Note: The card_image and OG image are header/social fields only. Do not add a hero image to the content body.
create-blog-post/:
draft-partner-update.md - Your draft filecard.webp - OG/social card image (1200x630)image1.png, image2.png - Inline content images (if any)/create-blog-postThis would create:
src/blog/partner-update.mdsrc/assets/images/blog/partner-update/card.webpsrc/assets/images/blog/partner-update/image1.webp, image2.webp (if inline images exist)Image handling:
card.* → card.webp (1200x630, OG/social only, not shown in content)image1.* → image1.webp (max 900px wide, inline content image)image2.* → image2.webp (max 900px wide, inline content image).webp, .png, .jpg, .jpeg) — all are converted/re-encoded to .webp![][imageN] references in draft content → inline <img> tags pointing to imageN.webpRequirements:
cwebp tool is required — the skill will auto-install it via sudo apt-get install -y webp if not already presentFront matter:
card_image points to card.webp (OG/social card image)og_image is dynamically generated via eleventyComputed using the OG image servicehide_header_image: true suppresses the default header imagecategory is a plain string (not a YAML list)YYYY-MM-DDdate_formatted fieldContent processing:
### **– Summary break / Read more –** to <!--more-->Output format:
slug.md (no date prefix in filename)src/blog/src/assets/images/blog/slug/Link handling:
www.openhomefoundation.org stay as Markdown links<a> tags with target="_blank" rel="noopener noreferrer">After the blog post has been created, output a summary to the user covering:
Metadata:
people.yml), date, categoryImages:
Content transformations:
Proposed text changes (requires user approval):