Blog Publishing & Styling Skill
This skill ensures that every blog post is published correctly and adheres to the strict "Noir" aesthetic and styling rules.
Part 1: The 6-Step Publishing Workflow
- •Create SQL File: Create
sql/create-blog-post-[slug].sqlandpublic/sql/create-blog-post-[slug].sql.- •Pattern: Must use
DECLARE existing_post_id UUID;and a check-and-insert/update block. - •Critical: Never use
ON CONFLICT (slug).
- •Pattern: Must use
- •Update SQL.tsx: Add fetch code and register in the
allScriptsarray insrc/pages/SQL.tsx. - •Update API Endpoint: Add the new SQL file path to
SQL_FILESinapi/sql/latest.ts. - •Commit Changes: Stage and commit with a descriptive message.
- •Merge to Production: Checkout
main, pull, merge the branch, and push. - •Verify Deployment:
- •URL:
https://www.thelostandunfounds.com/sql/create-blog-post-[slug].sql - •Page:
https://www.thelostandunfounds.com/sql
- •URL:
Part 2: Content Styling & Formatting
1. Text Alignment (Critical)
- •NEVER use
text-centerortext-justifyfor body content. - •ALWAYS use
text-left. Applies to paragraphs, analysis components, and headers.
2. Book Title Formatting
- •Bolding: All book titles must be bold.
- •Case Preservation: Titles must preserve the author's original case.
- •Linking: Max 2 links per book. Linked titles must be underlined.
3. Disclosure & Special Characters
- •Disclosure: Author names must be UPPERCASE BOLD. Disclosure text can be justified.
- •Remove "⸻": Do not use the long dash character. Use proper paragraph spacing.
SQL Template Pattern
sql
DO $$
DECLARE
existing_post_id UUID;
BEGIN
SELECT id INTO existing_post_id FROM blog_posts WHERE slug = '[slug]' LIMIT 1;
IF existing_post_id IS NOT NULL THEN
UPDATE blog_posts SET ... WHERE id = existing_post_id;
ELSE
INSERT INTO blog_posts (...) VALUES (...);
END IF;
END $$;