Skip to content

Directory data file not respected until 11ty server restarted #3569

@rcmosher

Description

@rcmosher

Operating system

Linux Ubuntu 22.04.5

Eleventy

3.0.0

Describe the bug

I'm following along with "6 Minutes to Build a Blog from Scratch with Eleventy," although using version 3 instead of 2. When I get to the step to create a directory data file, "posts.json" it does not re-render my post files using the new layout specified. The 11ty logs indicate the files are re-written, but they are unchanged.

I need to restart 11ty then the files are updated using the specified layout. I've also tested this with the permalink property. It is also not respected until I restart 11ty.

Reproduction steps

  1. npx @11ty/eleventy --serve
  2. Create an index file, layout file, and a subdirectory with content that isn't yet using the layout file.
  3. Create a directory data file to specify that subdirectory should use the layout file.
  4. Note the pages are not re-rendered with the layout file.

Or follow along to "6 Minutes to Build a Blog from Scratch with Eleventy" until 3:14.

Expected behavior

Files are re-rendered using the layout specified in the directory data file (as well as other options) without having to restart 11ty.

Reproduction URL

No response

Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug: --serve restartChanges to projects shouldn’t need to restart dev serverfeature: ⏱️ watchDoesn’t affect primary builds, only subsequent builds during --watch and --serve

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions