This guide walks you (and any collaborators) through writing, previewing, and deploying a new blog post. We assume your repository is already configured with the “source → GitHub Actions → main” workflow described earlier.


📁 Directory Structure

Your Hugo site uses this layout:

/content/posts/         ← Markdown files live here
/static/images/         ← Put cover & figure images here
/layouts/_default/      ← Your custom summary.html override

✍️ Post Front Matter Template

Create every post under content/posts/YYYY-MM-DD-title.md. Copy this boilerplate into the top:

---
title: "In‑Context Linear Regression Demystified"
date: 2025-03-25
author: "Jianliang He, Xintian Pan, Siyu Chen, and Zhuoran Yang"
cover: "/images/03_25_in_context_regression/cover.png"
categories:
  - research blog
tags:
  - in-context learning
  - transformers
  - LLM
draft: true          # keep true while editing → set false to publish
math: true
---

Key points:

  • Always escape subscripts: x\_q, \mathsf{P}\_x.
  • Use draft: true until you’re ready to go live (Hugo’s -D flag shows drafts locally).
  • Cover paths are relative to /static.

🧪 Local Preview

Before pushing, preview your site exactly as GitHub Actions will:

git checkout source
hugo server -D

Open http://localhost:1313 — check formatting, images, math, and links.


📊 Markdown Content Guidelines

  • Headings: Use ## for sections, ### for subsections.
  • Figures:
    <figure style="text-align:center;">
      <img src="/images/03_25_in_context_regression/img/Layer_1_Head_1_d_5_attnmtrx_HeadId1-1.jpg" alt="Pattern">
      <figcaption>Figure 2.1. Learned Pattern …</figcaption>
    </figure>
  • Math: Inline with $…$, display with $$…$$. Always escape underscores (\_).
  • Code blocks: Triple backticks with language (e.g. latex).

💻 Git Workflow

  1. Add your post + assets

    git add content/posts/2025-03-25-in_context_regression.md static/images/03_25_in_context_regression/*
  2. Commit

    git commit -m "Draft: Add In‑Context Regression blog post"
  3. Push

    git push origin source

Your GitHub Action automatically builds & deploys.


🚀 Publishing

When ready for public release:

  1. Change draft: true → draft: false in front matter.

  2. Commit & push again.

  3. Wait ~2 minutes, then visit

    https://Y-Agent.github.io
    

    to see your live post.


✅ Checklist Before Publishing

  • draft: false
  • Cover image shows correctly
  • Math renders (enableMathJax = true)
  • Subscripts escaped (x\_q)
  • Figures have <figcaption>
  • No broken links

That’s it — happy blogging!