Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ease naming convention for Bookshop components #145

Open
8 tasks
bglw opened this issue Apr 10, 2023 · 0 comments
Open
8 tasks

Ease naming convention for Bookshop components #145

bglw opened this issue Apr 10, 2023 · 0 comments

Comments

@bglw
Copy link
Contributor

bglw commented Apr 10, 2023

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant