bookshop
bookshop copied to clipboard
Ease naming convention for Bookshop components
This is tied to the goal of shifting Bookshop toward adapting to your existing components/includes/partials, rather than enforcing a strict naming convention.
Goal:
Currently, a Bookshop name of hero strictly means components/hero/hero.<template>. While this should still be supported (and encouraged), we want this name to also use of components/hero.<template>.
High level change: The "Bookshop name" should be defined as the path to a component template, excluding the extension, with the parent folder removed if it matched the component name.
Jobs:
- [ ] Hugo engine: Check for
components/hero.hugo.htmlif the nested file does not exist - [ ] Jekyll engine: Check for
components/hero.jekyll.htmlif the nested file does not exist - [ ] Eleventy engine: Check for
components/hero.eleventy.liquidif the nested file does not exist - [ ] Svelte engine: Check for
components/hero.svelteif the nested file does not exist - [ ] Astro engine: Check for
components/hero.*if the nested file does not exist - [ ] Generate: Generate keys using the path to the file rather than the path to the parent directory, with the trailing key deduplicated
- [ ] Browser: Probably something
- [ ] General: Ensure matching logic is applied for resolving the Bookshop config files, allowing them to be placed as siblings