11ty / 11ty/docs

Docs: “Global data files” should address non-camelCased filenames, name collisions

Open
#1,424 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Nunjucks
Stars
547
Forks
726
Avg merge
2h 23m
Merged PRs (30d)
3

Description

The example on the Global data files uses a hypothetical file called _data/userList.json.

But what if...

  • …the user has a data file named user-list.json instead?
  • …there exists both a folder _data/users/ and the file _data/users.js?

    (This is a pretty common pattern, where top-level file’s name matches a folder name containing details )

Eleventy’s behavior in these cases should be documented.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Global data files page linked in the issue and review its current userList.json example. Check Eleventy’s behavior for a hyphenated filename and for a _data/users/ directory alongside _data/users.js, then document both outcomes on that page.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, json
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.