Code Monkey home page Code Monkey logo

std's Introduction

deco.cx standard blocks library

This repo contains all the Live.ts blocks built by the community that are officially maintained by the deco.cx team.

How we deal with breaking changes

We are committed to avoiding breaking changes at all costs. The product is still early, but nonetheless we prefer to add new blocks or new properties whenever possible.

If and when breaking changes occur, they will be signaled with a new Major version on the git tags.

VTEX Portal Data Layer Compatibility

โš ๏ธ The compatibility layer requires structured data from the SEO/SEOPLP/SEOPDP component to be present on every page.

How to use:

  1. add the AddVTEXPortalData at routes/_app.tsx after <props.Component />. Example:
// routes/_app.tsx
export default function App(props) {
  return (
    <>
    {/* ... */}
      <props.Component />
      <GTM trackingId={id} /> // or can be Analytics Section, that would be inside <props.Component />
      <AddVTEXPortalData accountName="{{ vtexAccountNameHere }}" type="module" />
    </>
  )
}
  1. Add the ProductDetailsTemplate at ProductDetails.tsx for routes /:slug/p. Example:
// sections/ProductDetails.tsx
export default function ProductDetails({ page }: Props) {
  if (!page) {
    return null;
  }

  return (
    <>
      {/* Breadcrumb */}
      <Breadcrumb
        itemListElement={breadcrumbList?.itemListElement.slice(0, -1)}
      />
      <ProductDetailsTemplate product={page.product} />
      {/* ... */}
    </>
  );
}
  1. Add ProductInfo to all rendered products on all pages.
  2. Add VTEXPortalDataLayerCompatibility section to PDP if necessary, to add skuJson.

To disable the scripts to work outside partytown, change the all components type property to something different from text/partytown, example: type="module".

Thanks to all contributors!

std's People

Contributors

tlgimenes avatar mcandeia avatar lucis avatar igorbrasileiro avatar lfroes avatar gustavo-vasconcellos avatar guifromrio avatar matheusgr avatar augustocb avatar vavarine avatar mouradaniel avatar decobot avatar jonathanwlopes avatar leolanavo avatar incognitadev avatar eduardobbrito avatar hamiltonlopes avatar kauanfiolo-04 avatar loliveirawebdev avatar pedroteosousa avatar rafaeltj13 avatar renanhcosta avatar guitavano avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.