Skip to content

How to publish

Cedric Brisson edited this page Oct 20, 2025 · 3 revisions

IRCC — How to Publish (Internal & External)

This site is a Next.js static export (via next export) deployed to GitHub Pages at irchaos.club.
Posts are Markdown files parsed by Contentlayer and rendered with Tailwind Typography + syntax highlighting.
This page covers:

  • where posts live,
  • front-matter you can use,
  • how to publish internal (full) vs external (link-out) posts,
  • images & code blocks,
  • Spotify track embedding,
  • local preview & PR → publish flow (GitHub Pages),
  • quick troubleshooting.

Where posts live

  • Create one folder per post under content/:
content/
  <slug>/
    index.md
  • Slug rules: lowercase, hyphens, no spaces. The slug becomes the URL path: https://irchaos.club/<slug>.

Note: Unlike Hugo page bundles, images for this site do not go next to index.md. See "Images" below.


Front matter schema (what the site understands)

From contentlayer.config.ts, the supported fields are:

Required

  • title (string)
  • date (date) — ISO format recommended, e.g. 2025-10-12.

Recommended

  • authors (list of strings) — used by the UI/filters.
  • tags (list of strings) — short, lowercase; helps filtering.
  • description (string) — short teaser used in lists/RSS.

Optional

  • readingTime (number) — minutes; shown in the UI if present.
  • external (string URL) — if set, the post is treated as an external link (list row opens the URL; RSS points to it).
  • spotifyTrack (string) — Spotify track ID for embedding a recommended song (see "Spotify Integration" below).

Don't add fields that aren't in the schema (e.g., draft) unless we update contentlayer.config.ts to include them.


Templates you can copy

Internal post (full article on irchaos.club)

---
title: "Memory hints that hide in plain sight"
date: "2025-10-12"
authors: ["humpty_tony"]
tags: ["dfir", "memory"]
description: "Subtle memory artifacts that kick off useful DFIR pivots."
readingTime: 7
---

Then write your Markdown body below the front matter.

Internal post with Spotify track

---
title: "Dissecting BlankGrabber malware"
date: "2025-10-12"
authors: ["humpty_tony"]
tags: ["malware", "reverse engineering"]
description: "Deep dive analysis of the BlankGrabber stealer family."
readingTime: 15
spotifyTrack: "4iV5W9uYEdYUVa79Axb7Rh"
---

External post (links out to another site)

---
title: "Shadow Copies: weird collisions"
date: "2025-10-12"
authors: ["humpty_tony", "BunchOfWetFrongs"]
tags: ["dfir", "windows"]
description: "Notes and cases around VSS artifacts."
external: "https://example.com/blog/shadow-copies-collisions"
---

No body is required. The home page shows an external link and opens in a new tab.
Our RSS generator includes externals (with a "Read on original site →" in the item content).


Spotify Integration

You can embed a Spotify track as a "recommended song to listen to while reading" by adding a spotifyTrack field to your front matter.

How to get the Spotify Track ID

  1. Open Spotify (web player, desktop app, or mobile)
  2. Find your track and right-click (or tap the share button on mobile)
  3. Select "Share" → "Copy link to song"
  4. Extract the track ID from the URL:
https://open.spotify.com/track/4iV5W9uYEdYUVa79Axb7Rh?si=...
                             ^^^^^^^^^^^^^^^^^^^^^^
                             This is your track ID
  1. Add to front matter:
spotifyTrack: "4iV5W9uYEdYUVa79Axb7Rh"

What it looks like

  • The Spotify player appears at the top of your article
  • Shows a loading skeleton while the iframe loads
  • Smooth fade-in transition when ready
  • Fully responsive and matches the site's dark theme

Best practices

  • Choose instrumental or ambient tracks that won't distract from reading
  • Consider the article's mood/theme when selecting music
  • Test the track to ensure it's available in most regions

Images (where to put them & how to reference)

Put all images under /public so they're served statically by Next:

public/
  images/
    posts/
      <slug>/
        hero.jpg
        diagram.png

Reference them in Markdown using absolute paths:

![Diagram](/images/posts/<slug>/diagram.png "Optional title")

Do not use ./diagram.png next to index.md — that pattern isn't wired up in this repo.

Tips:

  • Use descriptive alt text.
  • Prefer PNG/JPG/WebP; ~1400–1800px width for hero/diagrams.
  • Images auto-scale in the .prose content area.

Tables, task lists, and code blocks

  • GFM features (tables, strikethrough, task lists, autolinks) are enabled via remark-gfm.
  • Use fenced code blocks with a language for highlighting:
```bash
vol.py -f mem.vmem windows.psxview | grep False
```

```kusto
Security
| where EventID in (4688, 10)
```
  • Very long lines scroll horizontally inside the code block (we normalize padding so there isn't a "double box").
  • Tables use pipe-syntax:
| Artifact | Useful? | Notes               |
|---------:|:-------:|---------------------|
| Shimcache|| Last mod timestamps |

Local preview

npm i
npm run dev
# Opens http://localhost:3000
  • Put your draft at content/<slug>/index.md.
  • If you also want RSS locally:
    • one-off: node scripts/generate-rss.mjs → check public/rss.xml
    • or run the watcher if configured (npm run rss:watch).

GitHub PR → publish flow

  1. Create a branch
git checkout -b post/<slug>
  1. Add your post
content/<slug>/index.md
public/images/posts/<slug>/...   # if you have images
  1. Preview locally
  • Title/date/authors/tags/description render correctly on home.
  • External posts open in a new tab and show the external pill.
  • Tables & code blocks look good on mobile/desktop.
  • Spotify track (if added) loads and plays correctly.
  1. Commit & open PR
git add content/<slug> public/images/posts/<slug>
git commit -m "post: <Title>"
git push -u origin post/<slug>

Open a PR. Paste your front matter and (optionally) a screenshot.

  1. Merge
  • GitHub Actions runs npm run static (build + export).
  • We write public/rss.xml at build time; Pages deploys out/ to irchaos.club.
  • A CNAME with irchaos.club is shipped; HTTPS enforced.

How the RSS feed works (quick)

  • Built at postbuild by scripts/generate-rss.mjs.
  • Includes both internal and external posts.
  • Uses NEXT_PUBLIC_SITE_URL (set in CI) for absolute URLs.
  • Lives at /rss.xml (linked in the footer and <head>).

If your reader only shows the latest item, ensure:

  • public/rss.xml contains multiple <item> entries,
  • the CDATA escaping fix is present (we included it),
  • CI sets NEXT_PUBLIC_SITE_URL=https://irchaos.club.

Troubleshooting

  • 404 for /rss.xml locally: serve the exported folder:
    npm run static
    python3 -m http.server -d out 3000
  • Image doesn't load: ensure the path starts with /images/... and the file exists under public/images/....
  • Tables render as plain text: ensure you're using pipe-syntax and that you're on the version with remark-gfm enabled (we are).
  • Extra black box around code: you're on the fixed styles; if not, merge the CSS that moves padding to code.hljs.
  • Spotify track won't load: verify the track ID is correct and the track is available in most regions.

Pre-PR checklist

  • content/<slug>/index.md created (slug is lowercase-hyphenated)
  • title and date set
  • authors, tags, description added
  • readingTime (approx minutes) added
  • For external posts: external URL set
  • For posts with music: spotifyTrack ID added and tested
  • Images in public/images/posts/<slug>/ and referenced via /images/posts/<slug>/...
  • Local preview looks good on mobile & desktop
  • (Optional) RSS regenerated locally for sanity

That's it—happy publishing!