# Show Last Updated Dates on a Zola Blog

Yes. An agent makes your Zola theme show a post's updated date beside its published date, adds it to the page metadata, builds the site to check, and opens a PR.

[Run this on Rush](https://cloud.getrush.ai/run/add-last-updated-dates/zola/). Opens the console with this prompt ready to send, in a Project that has your repository.

## What the agent does

The agent reads how the theme prints dates before changing a template, because Zola already knows about updates and the theme is what ignores them. In a site on the Terminimal theme, as in pawroman/zola-theme-terminimal, `templates/macros/post.html` holds a `date` macro that prints `page.date` formatted as `%Y-%m-%d` inside a `span` with class `post-date`, a `header` macro that calls it inside `post-meta-inline` under the title, and a `list_posts` macro for the archive that prints the raw `page.date`. `templates/page.html` renders a post through those macros, and `templates/macros/head.html` writes Open Graph and Twitter tags with a type of `article` for pages but no time properties. The five posts under `content/` set `title`, `date` and tags in their front matter and none sets `updated`. `config.toml` has `generate_feeds = true` with `rss.xml` and `atom.xml`, the repository has no feed or sitemap template of its own, and `content/_index.md` sorts by `date` and paginates by two.

Zola's front matter has had an `updated` field since 0.11.0, the same release `theme.toml` names as `min_version`: its changelog says the built-in sitemap and the default Atom feed use it when present. So the change is small and stays in the theme. The agent extends the `date` macro to print a second `span`, with a class of its own and the text `updated` followed by the formatted date, only when `page.updated` is set and differs from `page.date`; the archive list keeps the published date alone so its columns stay aligned. In `head.html` it adds `article:published_time` and `article:modified_time` for pages that have the dates. It gives the new span a rule in `sass/post.scss` next to the existing `.post-date` one, adds `updated` to one demo post so the published demo shows the feature, and documents the field in the README.

Building it takes one decision. The theme's last changes predate Zola 0.23.0, whose changelog says the move to version 2 of the Tera template engine means themes will most likely need updating. The agent therefore downloads a Zola release from before 0.23 for the check, says which, and separately tries the current release and reports what it prints, without turning this pull request into an engine migration. With the working binary it runs `zola build` and `zola check`.

Then it reads the output. In `public/` it confirms the demo post's page carries both dates and the other four carry one, that the archive is unchanged, that the two `article:` meta tags appear with ISO 8601 values, and it opens `atom.xml` and `sitemap.xml` to report what Zola's built-in templates did with the field. It opens the post and the index in a browser in the default blue scheme and in a light one, since the theme ships a stylesheet per accent and background, and attaches the screenshots. `.github/workflows/publish-pages.yml` deploys the demo with `shalzz/zola-deploy-action` on a push to `master`, so the pull request notes that the demo updates on merge and that the action picks its own Zola version.

## Start it with one API call

`POST https://api.phoenix.so/o/{org}/sessions`

```json
{
  "agent": "claude",
  "input": "Make this Zola theme show when a post was last updated. Read config.toml, theme.toml, every template under templates/ including the macros, sass/post.scss, the front matter of every file under content/, the README and the workflow under .github/workflows first. Use Zola's own updated front matter field; add no script and no new config option. Extend the date macro in templates/macros/post.html so a post page shows an updated date next to the published one only when page.updated is set and differs from page.date, leave the archive list as it is, and add article:published_time and article:modified_time to the Open Graph macro for pages. Style the new element in sass/post.scss, set updated on one demo post, and document the field in the README. Download a Zola release this theme builds with, say which, run zola build and zola check, and also report what the current Zola release prints. Check the built HTML of every post, and read public/atom.xml and public/sitemap.xml to report how the built-in templates use the field. Open the post and the index in a browser in a dark and a light scheme, and open a pull request with the screenshots and the build output.",
  "resources": [
    {
      "url": "https://github.com/your-org/your-app"
    }
  ]
}
```

1. **Get an API key.** In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
2. **Send the request.** POST the body in request.json to https://api.phoenix.so/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
3. **Read what came back.** Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.

## What comes back

A pull request that touches two macro files, one Sass partial, one demo post and the README. The description shows the rendered header of the demo post with both dates, the meta tags as built, the relevant lines of `atom.xml` and `sitemap.xml`, the Zola version used for the build, and what the current Zola release reported. Two screenshots show the post in a dark and a light scheme.

A reviewer looks at the wording and placement of the second date, checks that a post without `updated` renders exactly as before, and merges. Writers then add one line of front matter when they revise a post. Nothing reorders: the section still sorts by `date`, so an updated post keeps its place in the list.

## Run it on every terminal hand-off

Someone who has just corrected an old post and noticed the page still shows only its original date sends this body from the terminal with the theme's repository in `resources`, then returns to writing. The run works from the real macros and the real Sass, so the new date lands in the existing header with the theme's own classes.

Include a `request_id`, a UUID, so a retried start returns the run that already began. `GET /o/{org}/sessions/{id}` names the pull request once the turn ends. A follow-up message to the same session can ask for the wording to change, for the date to appear in the archive list too, or for a config switch that hides it.

## Why run it on Rush?

A theme change is judged by pages, and this one has two outcomes to show: a post with an update and a post without. The agent builds the site in its own sandbox with a Zola release the theme supports, reads the generated HTML and feeds, and opens the result in a browser, and the build output and screenshots stay in the run's record beside the pull request.

The request suits other Zola themes as well, including one that already prints dates in a `time` element or keeps posts in a `blog` section with its own templates. Each run finds where that theme prints a date and adds the second one in the same style, without importing markup from a different theme.

## Frequently asked questions

### Where does the updated date come from?

From an `updated` line in the post's front matter, which Zola has supported since 0.11.0. Zola has no Git integration, so the date is whatever the writer sets. That is deliberate here: a typo fix does not have to count as an update.

### Will an updated post move to the top of the blog?

No. The section's `_index.md` sorts by `date`, and the pull request leaves that alone. Zola also offers `update_date` as a sort order if you want revised posts to rise; that is a one-line change you can ask for in a follow-up.

### Do the feeds and the sitemap pick it up?

Zola's changelog says its built-in sitemap and default Atom feed use `updated` when a page has it, and this theme supplies neither template. The run opens the generated `atom.xml` and `sitemap.xml` and quotes the lines, so you see the result and not an assumption.

### Why not build with the newest Zola?

The changelog for 0.23.0 warns that themes will most likely need changes for the new template engine version, and this theme predates it. The run checks the feature on a release the theme builds with and reports what the newest one prints, leaving that migration as its own piece of work.

## More Zola jobs

- [Add Link Checking to a Zola Site](https://getrush.ai/run/add-link-checking/zola/)
- [Add llms.txt to a Zola Site With a Feed Template](https://getrush.ai/run/add-llms-txt/zola/)
- [Add Open Graph Tags to a Zola Site](https://getrush.ai/run/add-open-graph-tags/zola/)

## The same job on other stacks

- [Add Last Updated Dates to an mdBook Site](https://getrush.ai/run/add-last-updated-dates/mdbook/)
- [Show Last Updated Dates on MkDocs Pages](https://getrush.ai/run/add-last-updated-dates/mkdocs/)
- [Show Last-Updated Dates on a Pelican Blog](https://getrush.ai/run/add-last-updated-dates/pelican/)

## Keep reading

- [How a Rush run works on your repository, from request to pull request](https://getrush.ai/cloud/)
- [Compare cloud agents, agent sandboxes and AI code review](https://getrush.ai/compare/)
- [Rush pricing: Free, Pro and Max](https://getrush.ai/pricing/)
