Skip to content

Eleventy and Jekyll presets advertise post URLs their generators don’t serve #902

Description

@rmdes

When a post is created, Indiekit returns the URL where it will live — in the Location
header, and in the interface as “Post will be created at …”. For preset-eleventy, and for
preset-jekyll on every type except article, that URL doesn’t resolve. The file is written
correctly and the request succeeds, so nothing surfaces the problem.

Cause

packages/preset-eleventy/lib/post-types.js:15-16

path: `${collection}/{yyyy}-{MM}-{dd}-{slug}.md`,
url:  `${collection}/{yyyy}/{MM}/{dd}/{slug}`,

The date goes into the filename and is advertised as path segments. Neither generator
makes that translation on its own, and neither preset writes a permalink to reconcile it.

packages/preset-jekyll/lib/post-types.js:34-35 has the same pair for every non-article
type. Jekyll does derive URLs from filename dates, but only inside _posts — which is why
article works there and the collection types don’t. preset-eleventy has no such branch:
it loops over every type, so articles are affected too.

preset-hugo is unaffected — it puts no date in either the path or the URL.

Affected post types

Preset Affected
preset-eleventy all post types
preset-jekyll all except article

Observed

Tested against each generator’s canonical starter, not a bare scaffold.

Generator Starter Advertised Served
Eleventy 3.1.6 eleventy-base-blog /notes/2026/08/22/hello-note /notes/2026-08-22-hello-note
Jekyll 4.4.1 jekyll new (minima) /notes/2026/08/22/hello-note /notes/2026-08-22-hello-note
Hugo 0.165.0 hugo new site + ananke /notes/hello-note /notes/hello-note

Reproduced by adding one file to a stock starter:

printf -- '---\ndate: 2026-08-22T10:05:00.000Z\n---\n\nMARKER\n' \
  > content/notes/2026-08-22-hello-note.md   # _notes/… for Jekyll

then building and looking for where MARKER landed.

Impact

The failure is silent. Micropub returns 202, the file is correct, and the URL 404s. If
syndication is enabled, the dead URL has already been posted to Mastodon or Bluesky. On an
IndieWeb site the permalink is the post’s identity, so a URL that doesn’t resolve defeats
the point of publishing to your own domain.

Suggested fix

Write the url property into front matter as a permalink, so the file declares the URL
Indiekit promised rather than leaving the generator to infer one. Both presets need it.

Separately, and not fixable by a preset: a stock jekyll new _config.yml has no
collections block, so documents written to _notes, _photos and so on produce no page at
all until the user adds

collections:
  notes:
    output: true

This isn’t mentioned in the preset README, get-started or concepts, and a user bringing an
existing Jekyll blog has no reason to have configured collections Indiekit introduces for
them. Worth a line in the docs.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationGood documentation benefits everyone

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions