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

Multi source support for commerce configs and placeholders #286

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

fnhipster
Copy link
Collaborator

@fnhipster fnhipster commented Jan 28, 2025

Overrides Commerce endpoint configs and placeholders based on the root page metadata provided. Otherwise, it defaults to the base /.

Metadata are managed as a bulk (https://www.aem.live/docs/bulk-metadata) in metadata.xlsx.

image
  • root: path to where configs.xlsx files are located. default /](root: Path to the directory where configs.xlsx files are located. Default is /.)
  • placeholders: path to the placeholders.json filer to use. default /placeholders.json. By adding a path in a new line in this value adds an override file where both paths will be fetch and the values of the second will override the first.](placeholders: Path to the placeholders.json file to use. Default is /placeholders.json. Adding a new line with another path in this value specifies an override file. Both files will be fetched, and the values in the second file will override those in the first.)

☑️ TODO

  • Fallback placeholders
  • Load fragments relative to root
  • Localized links
  • Copy over the rest of the pages. /drafts/multistore/* only have the index at the moment.

https://multistore--aem-boilerplate-commerce--hlxsites.hlx.page/
image

https://multistore--aem-boilerplate-commerce--hlxsites.hlx.page/drafts/multistore/en/
image

https://multistore--aem-boilerplate-commerce--hlxsites.hlx.page/drafts/multistore/en_ca/
image

Test URLs:

Copy link

aem-code-sync bot commented Jan 28, 2025

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

Copy link

aem-code-sync bot commented Jan 28, 2025

Page Scores Audits Google
📱 / PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
🖥️ / PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
📱 /drafts/multistore/en_ca/ PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
🖥️ /drafts/multistore/en_ca/ PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
📱 /drafts/multistore/en/ PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
🖥️ /drafts/multistore/en/ PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@fnhipster fnhipster changed the title refactor: update fetchPlaceholders import path and enhance multi-stor… Multi source support for commerce configs and placeholders Jan 28, 2025
@fnhipster fnhipster marked this pull request as draft January 28, 2025 21:18
scripts/configs.js Outdated Show resolved Hide resolved
… as the default

- decorate links for EDS pages
- localize links for Blocks
const links = main.querySelectorAll('a');

links.forEach((link) => {
if (link.href.startsWith('//' || link.href.startsWith(root))) return;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (link.href.startsWith('//' || link.href.startsWith(root))) return;
if (link.href.startsWith('//') || link.href.startsWith(root))) return;

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

Successfully merging this pull request may close these issues.

3 participants