Skip to content

techdivision/eds-spin-landingpage

Repository files navigation

SPIN DX

Environments

Installation

npm i

Linting

npm run lint

Local development

  1. Create a new repository based on the helix-project-boilerplate template and add a mountpoint in the fstab.yaml
  2. Add the helix-bot to the repository
  3. Install the Helix CLI: npm install -g @adobe/helix-cli
  4. Start Franklin Proxy: hlx up (opens your browser at http://localhost:3000)
  5. Open the {repo} directory in your favorite IDE and start coding :)

Delete Cache/Code (sometimes required if resources are not found)

{GitHub Token} = Token auf https://github.com/settings/tokens mit scope repo generieren lassen. Anschließend löschen.
{Branch} = branch

Mehr Infos: https://www.hlx.live/docs/admin.html#tag/code/operation/codeStatus

curl -X POST "https://admin.hlx.page/code/techdivision/eds-spin-landingpage/{branch}/*?branch={branch}" -H "x-github-token: {GitHub token}"

Als Antwort wird bei einem Erfolg ein json Objekt übertragen

Consent Guards

Um einen Block mit einem Consent Guard zu versehen, kann die Funktion initConsentGuard aus scripts/utilities.js genutzt werden. Diese sorgt dafür, dass Inhalte erst geladen werden, wenn der entsprechende Consent (z.B. marketing) erteilt wurde.

Verwendung

import { initConsentGuard } from '../../scripts/utilities.js';

export default function decorate(block) {
  function onConsent() {
    // Logik die ausgeführt wird, wenn Consent erteilt wurde
  }

  function onRevoke() {
    // Optional: Logik die ausgeführt wird, wenn Consent entzogen wurde (z.B. Reload)
  }

  initConsentGuard(onConsent, 'marketing', block, onRevoke);
}

Parameter

  • onConsent: Funktion, die aufgerufen wird, sobald der Consent erteilt ist.
  • consentName: Der Key des Consents aus DataReporter (z.B. 'marketing').
  • block: Das DOM-Element des Blocks.
  • onRevoke (optional): Funktion, die aufgerufen wird, wenn der Consent entzogen wird.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Generated from adobe/aem-boilerplate