bookshop icon indicating copy to clipboard operation
bookshop copied to clipboard

Ease naming convention for Bookshop components

Open bglw opened this issue 3 years ago • 0 comments

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.html if the nested file does not exist
  • [ ] Jekyll engine: Check for components/hero.jekyll.html if the nested file does not exist
  • [ ] Eleventy engine: Check for components/hero.eleventy.liquid if the nested file does not exist
  • [ ] Svelte engine: Check for components/hero.svelte if 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

bglw avatar Apr 10 '23 23:04 bglw