Skip to content

Hugo Setup

  • data/scribe.yaml committed to repo
  • framework: hugo set in scribe.yaml
  • Single post template reads feature_image
  • static/images/posts/ folder exists
  • GitHub Actions builds Hugo on push to main

scribe writes feature_image to front matter with a root-relative URL like /images/posts/filename.webp. Add this to your single post template:

{{ with .Params.feature_image }}
<img src="{{ . }}" alt="{{ $.Title }}" class="post-hero-image">
{{ end }}

If your template uses a different field name, add feature_image as a fallback:

{{ with (or .Params.feature_image .Params.cover .Params.image) }}
<img src="{{ . }}" alt="{{ $.Title }}">
{{ end }}

Add scribe fields to archetypes/default.md:

---
title: "{{ replace .File.ContentBaseName "-" " " | title }}"
date: {{ .Date }}
author: ""
categories: []
tags: []
feature_image: ""
draft: true
---

scribe uploads images to static/images/posts/ in your repo. Hugo serves static/ from the site root, so the URL becomes /images/posts/filename.webp. No configuration needed.