Guidelines and instructions when adding a new page to the blog.
Installation
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Guidelines and instructions when adding a new page to the blog.
Contributing Guidelines for Steren's Labs Blog
This skill provides the official guidelines, step-by-step workflow, and standard templates for adding new pages/posts to this blog. Follow these instructions precisely to ensure consistency, accessibility, and correct indexing.
Workflow Checklist
Date & Slug Selection: Determine the URL-friendly folder name (slug) and always use today's date (the current local date) for any new posts. Ensure the date is formatted correctly in all locations.
Directory Creation: Create a new directory to host the page within the relevant yearly directory.
Example: Use 2025/a-new-post/ for a post named "A new post".
Write Post Content (index.html): Initialize the post with the standard metadata, semantic tags, and JSON-LD schema. Ensure the index.html uses the same template/structure as the other existing pages on the blog.
Generate Assets (icon.svg, title.svg, title.png):
Create a light/dark-responsive icon.svg square logo with a solid background (no transparency).
Create a 1200x630px title.svg social preview embedding the icon.svg content, with a solid background and descriptive typography.
Convert title.svg to an opaque title.png using the macOS sips utility.
Update Root Index (index.html): Register the new page at the top of the list in the root index.html using the new post's icon.svg image.
Update Atom Feed (atom.xml): Add a feed entry at the top, and update the feed's root <updated> timestamp to today's date/time.
Verify: Run manual and local validation checks.
1. Directory Structure
Every blog post must reside in its own folder under the directory of the current calendar year:
[root]
├── YYYY/
│ └── [post-slug]/
│ ├── index.html <-- Post content
│ ├── icon.svg <-- Square logo (responsive light/dark mode)
│ ├── title.svg <-- 1200x630 social preview mockup (SVG)
│ └── title.png <-- 1200x630 social preview mockup (PNG)
Example: Create 2025/a-new-post/ for a post named "A new post".
2. Post Content Template (index.html)
Use the template below to create YYYY/[post-slug]/index.html. Replace all placeholder values (YYYY, post-slug, [Post Title], [Post Description], etc.) with today's date and actual post details:
<!DOCTYPE html><htmllang="en"><head><title>[Post Title]</title><metacharset="UTF-8"><linkrel="stylesheet"href="/style.css" /><linkrel="icon"type="image/svg+xml"href="icon.svg"><metaname="color-scheme"content="light dark"><metaname="view-transition"content="same-origin"><metaname="viewport"content="width=device-width, initial-scale=1"><metaname="description"content="[Post Description]"><metaname="author"content="Steren"><!-- Twitter Card --><metaname="twitter:card"content="summary_large_image"><metaname="twitter:creator"content="@steren"><metaname="twitter:title"content="[Post Title]"><metaname="twitter:image"content="https://labs.steren.fr/YYYY/[post-slug]/title.png"><!-- Open Graph --><metaproperty="og:type"content="article"><metaproperty="og:title"content="[Post Title]"><metaproperty="og:image"content="https://labs.steren.fr/YYYY/[post-slug]/title.png"><metaproperty="og:description"content="[Post Description]"><!-- Schema.org JSON-LD --><scripttype="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Article",
"author": "Steren Giannini",
"name": "[Post Title]",
"headline": "[Post Title]",
"description": "[Post Description]",
"image": "https://labs.steren.fr/YYYY/[post-slug]/title.png",
"datePublished": "YYYY-MM-DDT00:00:00Z"
}
</script></head><body><header><h1><ahref="/"rel="home">Steren's labs</a></h1></header><mainrole="main"><article><header><h2>[Post Title]</h2><span><timedatetime="YYYY-MM-DDT00:00:00Z">YYYY-MM-DD</time></span></header><!-- Post Body starts here --><p>[First paragraph introducing the project or experiment...]</p><figure><imgsrc="icon.svg"alt="[Descriptive alternative text for accessibility]"/><figcaption>[Figure caption explaining the diagram/icon]</figcaption></figure><h3>[Sub-heading]</h3><p>[Content...]</p><!-- Post Body ends here --></article></main><footer><ahref="/"title="Steren's labs">labs home</a>
-
<ahref="https://twitter.com/intent/follow?screen_name=steren&user_id=21694917"rel=nofollowtarget=_blanktitle="Follow me on Twitter">@steren</a></footer></body></html>
Writing Best Practices
Accessibility: Any <img> tags within the blog post must have a descriptive alt= attribute. Do not leave it blank.
Dates: Always use today's date (the current local date) for any new posts. Ensure the date is formatted correctly in all locations. The <time> tag within the page must use the YYYY-MM-DD format (e.g., YYYY-MM-DD for display, and YYYY-MM-DDT00:00:00Z in JSON-LD and the datetime attribute).
To maintain the premium look and feel of the blog, high-quality vector assets are required for each post.
A. Square Logo (icon.svg)
The icon appears in the hexagonal list on the home page and as the tab icon.
Create a square layout with standard responsive styling.
Background Constraint: Generate an icon in SVG format named icon.svg in the new post's folder. Make sure the SVG includes a solid background (e.g., using a <rect width="100%" height="100%" fill="..."> as the base layer) with no transparency so it is always compatible and readable on both black and white pages. Responsive light/dark styles can be achieved via media queries, but a solid background remains mandatory.
Social previews must be exactly 1200x630px (the industry-standard aspect ratio for Twitter large images and Facebook Open Graph previews).
Layout Constraint: Place the post's logo/diagram on the left side and typography (post title + description) on the right side.
Embedded Content: If applicable, embed the icon.svg content and add a title.
Background Constraint: Make sure it also includes a solid background <rect> with no transparency.
Text Alignment: Ensure that the text on the right does not overlap with the diagram on the left; use newlines (<text> tags on different y coordinates) or scale down the diagram as needed.
Minimal title.svg Boilerplate:
<svgxmlns="http://www.w3.org/2000/svg"viewBox="0 0 1200 630"width="1200"height="630"><style>.font-title { font-family: sans-serif; font-size: 64px; font-weight: bold; fill: #111111; }
.font-sub { font-family: sans-serif; font-size: 32px; fill: #555555; }
.stroke-shape { stroke: #111111; stroke-width: 8; fill: none; }
</style><!-- Full, solid background to prevent transparency on PNG conversion --><rectwidth="100%"height="100%"fill="#f8f9fa" /><!-- Left Side: Icon / Diagram Graphic (Scaled and centered) --><gtransform="translate(100, 115)"><!-- (Copy of icon.svg elements or a beautiful custom schematic) --><rectwidth="400"height="400"rx="16"fill="#ffffff"stroke="#111111"stroke-width="6" /><circlecx="200"cy="200"r="100"class="stroke-shape" /></g><!-- Right Side: Descriptive Typography --><!-- Note: Ensure y-coordinates are separated to prevent overlapping --><textx="620"y="260"class="font-title">First Line of Title</text><textx="620"y="340"class="font-title">Second Line of Title</text><textx="620"y="440"class="font-sub">A description of the project</text><textx="620"y="490"class="font-sub">and what it achieves.</text></svg>
C. Convert SVG to PNG (title.png)
Social networks require a static raster image. Generate a PNG version of title.svg using the sips command on macOS:
sips -s format png title.svg --out title.png
Note: Because of the solid background in the SVG, this will result in an opaque PNG. Run this command inside the new post directory. Always verify that title.png was created successfully and is opaque.
Social Media Markup: The <head> section of the new page must contain social media markup (e.g., Open Graph, Twitter cards) referencing the generated title.png image.
4. Registering the Post
After creating the post folder and generating assets, register it in the main listing and feed.
A. Root index.html Registration
Open the root index.html file, locate the <ol class="pages"> tag, and insert the new post's list item at the very top (directly after <ol class="pages">):
Reference the new page at the top of the list in the root index.html.
Use the new post's icon.svg image in the root index listing.
Note: Do NOT include any <content> tag for the new entry; use an empty <summary> tag instead (e.g., <summary /> or <summary></summary>).
5. Verification Checklist
Before marking the task as completed, verify the following:
Post directories and files are named with correct casing and URL-friendly dashes (e.g., YYYY/[post-slug]/).
All references to dates use the identical and correctly formatted date (always use today's date).
icon.svg loads cleanly, has responsive dark/light styles, and has a solid background with no transparency.
title.svg has an opaque background, contains a left-hand visual with right-hand text, and has zero text overlap.
title.png was correctly compiled via sips, is non-transparent, and has standard dimensions of 1200x630.
<head> metadata in the new post points to the absolute Twitter and Open Graph image URLs on https://labs.steren.fr/....
Every image in the post has a descriptive alt= attribute.
Root index.html features the new listing at the very top of <ol class="pages"> using icon.svg.
Root atom.xml contains the new entry at the top, feed <updated> is bumped, and the entry's <summary> is empty.
A local verification web server has been started, and the localhost preview URL has been shared with the human for verification.
6. Local Server Verification
Once you have completed creating the article, generating assets, and updating root indexes, you must launch a local web server at the root of this repository so the human can preview and verify the changes:
Start the Server: Propose or run one of these commands at the repository root: