# Add Author Pages to an Astro Blog

Yes. An agent adds /authors/ and paginated /authors/<slug>/ routes from the posts collection's author field, links posts to their author and opens a PR.

[Run this on Rush](https://cloud.getrush.ai/run/add-author-pages/astro/). 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 existing tag pages are built, because author pages are the same shape. In a blog shaped like satnaing/astro-paper, `package.json` runs Astro 7 with `@astrojs/mdx`, `@astrojs/sitemap`, Tailwind 4 and Pagefind, on Node 22 or later with pnpm; the `build` script runs `astro check`, `astro build` and the Pagefind index. `src/content.config.ts` defines the `posts` collection with a Zod schema whose `author` is a string defaulting to `config.site.author`, beside `tags`, `pubDatetime`, `draft` and `featured`. `src/pages/tags/[tag]/[...page].astro` calls `getUniqueTags` from `src/utils/getUniqueTags.ts`, which slugifies each tag with `slugifyStr` from `src/utils/slugify.ts` and de-duplicates by slug, then paginates with `config.posts.perPage` and renders `Card` components inside `Main`. `src/pages/tags/index.astro` lists the tags. `src/pages/posts/[...slug]/index.astro` renders a post through `PostLayout.astro`, which already emits JSON-LD with a single `Person` author taken from `config.site.author`, not from the post.

The agent adds `src/utils/getUniqueAuthors.ts` mirroring `getUniqueTags`: it filters with `postFilter` so drafts and scheduled posts are excluded, maps each post's `data.author` to `{ author: slugifyStr(name), authorName: name }`, de-duplicates by slug and sorts by name. `src/pages/authors/index.astro` lists them with a post count each, and `src/pages/authors/[author]/[...page].astro` paginates that author's posts with `getSortedPosts` and `config.posts.perPage`, with `Breadcrumb`, `Pagination` and `Footer` wired exactly as the tag page does. New `authorsTitle` and `authorsDesc` strings go into `src/i18n/lang/en.ts` and its type in `src/i18n/types.ts`, since every page title there comes from `useTranslations`.

On the post page, the author name under the title becomes a link to `/authors/<slug>/` through `getRelativeLocaleUrl`, as `Tag.astro` does for tags, and `PostLayout.astro` takes an optional `author` prop so the JSON-LD `Person` names the post's author rather than the site's. The sitemap integration picks the new routes up on its own. A `src/types/config.ts` feature flag, `showAuthors`, defaults to `true` and hides the link and the index when a single-author site does not want them, following how `showArchives` gates the archives page.

The agent runs `pnpm install --frozen-lockfile`, `pnpm run lint`, `pnpm run format:check` and `pnpm run build`, the four steps `.github/workflows/ci.yml` runs on Node 24 with pnpm 11, then `pnpm run preview` and opens `/authors/` and one author page in the sandbox browser to check the list, the pagination and the breadcrumb. It pastes the build output and two screenshots in the pull request.

## Start it with one API call

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

```json
{
  "agent": "claude",
  "input": "Add author pages to this Astro blog and open a pull request. Read package.json, astro.config.ts, astro-paper.config.ts, src/config.ts, src/types/config.ts, src/content.config.ts, src/utils/getUniqueTags.ts, src/utils/slugify.ts, src/utils/getSortedPosts.ts, src/utils/postFilter.ts, src/pages/tags/index.astro, src/pages/tags/[tag]/[...page].astro, src/pages/posts/[...slug]/index.astro, src/layouts/PostLayout.astro, src/i18n/lang/en.ts and src/i18n/types.ts first. Add src/utils/getUniqueAuthors.ts mirroring getUniqueTags over the author field. Add src/pages/authors/index.astro listing authors with post counts and src/pages/authors/[author]/[...page].astro paginating that author's posts with config.posts.perPage, using the same Layout, Header, Breadcrumb, Main, Card, Pagination and Footer components as the tag pages. Add authorsTitle and authorsDesc translations. Link the author name on the post page to its author page and pass the post's author into PostLayout so the JSON-LD Person uses it. Add a showAuthors feature flag defaulting to true, gated like showArchives. Run pnpm install --frozen-lockfile, pnpm run lint, pnpm run format:check and pnpm run build, preview the site and verify /authors/ and one author page in the browser, and paste the build output in the pull request. Do not change the tag pages, search or the RSS feed.",
  "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

What comes back is a pull request with three new files, `src/utils/getUniqueAuthors.ts`, `src/pages/authors/index.astro` and `src/pages/authors/[author]/[...page].astro`, and small edits to `src/pages/posts/[...slug]/index.astro`, `src/layouts/PostLayout.astro`, `src/types/config.ts`, `src/config.ts`, `src/i18n/lang/en.ts` and `src/i18n/types.ts`. The description shows the `astro check` result, the `astro build` page count, the eslint and prettier output, and screenshots of the authors index and one author page.

On a repository with AstroPaper's workflow, the pull request runs lint, the format check and the full build on Node 24 within the workflow's three-minute limit, so a type error in the new `getStaticPaths` or a Prettier difference in an `.astro` file fails there. The existing tag, archive and search pages build unchanged.

A reviewer checks that a post with no `author` lands under the site author rather than an empty slug, that two spellings of one name collapse or do not as they intend, and that the flag hides every entry point when off. Then they add `author` to the posts that were written by someone else.

## Run it on every Linear issue labelled agent

A Rush automation with a `linear` trigger starts one run for each issue that gets the label, with this prompt as the instructions and the issue's title and description added after it. A content team's issue asking for author pages on a particular site becomes a pull request on that site's repository with screenshots the team can check.

Each run is independent and has its own `max_runs_per_hour` cap on the automation, so several site issues labelled in one afternoon become several separate pull requests.

## Why run it on Rush?

Author pages touch a util, two routes, the post page, the layout's structured data, the i18n strings and the config type, and the proof is a full build plus looking at the pages. In a Rush sandbox the agent follows the tag pages as the pattern, runs the same four commands the workflow runs, opens the result in a browser and keeps the screenshots and every command's output in the run's record.

The same request works on any Astro content-collection blog with an author field, and because the run opens a pull request through the Rush GitHub App, the feature arrives as a reviewable diff with the build already green rather than as a theme fork someone has to merge back later.

## Frequently asked questions

### What if every post has the same author?

The index shows one author with the full post count and the flag can turn the pages off. The pull request defaults `showAuthors` to `true` so the feature is visible in review, and notes the one-line change to hide it.

### Why slugify the author name?

The URL needs a stable lowercase segment, and `slugifyStr` is what the theme already uses for tags, including its handling of non-Latin names through `lodash.kebabcase`. Using it keeps `/authors/sat-naing/` consistent with `/tags/docs/`.

### Does it change the structured data?

Only the `Person` name inside the existing `BlogPosting` JSON-LD in `PostLayout.astro`, which now takes the post's author when one is passed and falls back to the site author as before.

### Will the new pages show up in search and the sitemap?

The sitemap integration includes every built route, so yes. Pagefind indexes the author pages too unless they are marked with `data-pagefind-ignore`, which the pull request adds to the list pages so search results stay posts.

## More Astro jobs

- [Add Giscus Comments to an Astro Blog](https://getrush.ai/run/add-giscus-comments/astro/)
- [Add a Second Language to an Astro Site](https://getrush.ai/run/add-i18n/astro/)
- [Check for Broken Links in an Astro Site's CI](https://getrush.ai/run/add-link-checking/astro/)

## The same job on other stacks

- [Add Author Pages to a Jekyll Blog](https://getrush.ai/run/add-author-pages/jekyll/)
- [Add Author Pages to a VitePress Blog](https://getrush.ai/run/add-author-pages/vitepress/)
- [Add Author Pages to a Wagtail Blog](https://getrush.ai/run/add-author-pages/wagtail/)

## 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/)
