Astro Reels Template
A reels-style feed of short pieces for Astro, with no JavaScript
Shows short pieces one per screen, like a reels feed, each with a page of its own, built from HTML and CSS alone.
Home page of Astro Reels Template


Drag the handle to compare light and dark.Left: your scheme. Right: the other one.


Drag the handle to compare light and dark.Left: your scheme. Right: the other one.
Facts
- Role
- Creator and maintainer
- Kind
- template
- Status
- in active development
- Site
- astro-reels-template.pages.dev
- Lighthouse
- Performance 100 · Accessibility 100 · Best practices 100 · SEO 100,measured by PageSpeed Insights on the home page (mobile; performance the best of 5 runs, the rest the median), 22 November 2026
- Repository
- cevdetch/astro-reels-template
- Licence
- MIT
- Active
- November 2026
- Commits
- 59
Stack
Highlights
- Builds a one-piece-per-screen feed from HTML and CSS alone, with deep links, paging and a page of its own for every piece.
- Checks every build with a contrast test and a deadhead audit.
Problem
A reels-style feed shows one short piece per screen. The goal was that format with every piece also at an address of its own, readable and indexable on its own page, and with no JavaScript at all. Poems add a typesetting problem: their line breaks carry meaning, so a line that wraps on a small screen must not read as a new line.
Constraints
- No JavaScript in any page. The only
<script>allowed is structured data. - Every piece needs a stable address in the feed and a page of its own.
- Verse has to keep its lines as written, including indented couplets and irregular poems that do not fit a fixed shape.
- The template must stay generic: the feed’s path, page size, wording and content type are settings, so a later site can mount the same feed for its own pieces.
- Accessible and fast in light and dark, with no web fonts.
Decisions
- All the motion is CSS. Scroll-snap holds one piece per screen, and the mouse wheel, touch and native keys (arrows, Page Down, Space) move card by card. Page turns cross-fade with a cross-document view transition. With reduced motion requested, snapping relaxes and the transition is off.
- One continuous feed is possible: setting
PAGE_SIZEto the full count puts every piece on a single page that scrolls straight through. By default the feed is split into pages of 20 instead, which keeps each page under 14 KB compressed, small enough to arrive in the first round trip, and each page ends with a card that opens the next. While the pieces are public-domain demo text, found on many other sites, only the home feed page is indexed: later feed pages and every piece’s own page carrynoindex, followand stay out of the sitemap, but keep self-referencing canonicals and share images, since they are still the links people share. AnindexPiecessetting makes them all indexable for a site with pieces of its own. - Each card has the piece’s number as its ID, so
/#18and/page/2/#25are deep links that land on the right card, and each piece’s own page links to its neighbours and back into the feed. - Verse is typeset line by line, and a line too long for the screen wraps with a hanging indent, so its remainder never reads as a new line. Indentation comes from the source text, so irregular sonnets keep their own shape.
- Off-screen cards are skipped with
content-visibility, and the system serif stack replaces a web font. - The trade-off is documented: without JavaScript the address bar does not follow the scroll and there is no native share sheet, so each piece’s own page is the link to share.
- The template is built from the Astro Minimal Template and keeps its metadata, sitemap,
robots.txt,noindex404 and generated share images, addingCreativeWorkstructured data per piece.
Results
- The demo publishes all 154 of Shakespeare’s sonnets, imported from Project Gutenberg by a script that records the source file and its hash and fails unless it finds exactly 154 sonnets in order.
- No built page ships JavaScript beyond structured data, and the deadhead audit and contrast test pass.
Next
- Mount the same feed on One for its poems and art, using the configurable feed path.