Skip to content

lymarrie/site-attributes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

b1b2f37 · Mar 17, 2022

History

98 Commits
Mar 17, 2022
Mar 17, 2022
Jan 25, 2022
Dec 10, 2021
Nov 17, 2021
Mar 17, 2022
Dec 21, 2021
Sep 21, 2021
Jul 23, 2021
Jan 7, 2022
Oct 4, 2021
Oct 4, 2021
Jun 16, 2021
Nov 17, 2021
Jul 23, 2021
Jun 16, 2021

Repository files navigation

Sites Products Starter - Site Entity Implementation

This repo contains an implementation of site attributes via Streams, instead of global.json. On the Knowledge Graph side, this was accomplished by:

  1. Creating a site entity
  2. Adding a custom field (c_relatedSite) to the product entity type that relates the product with the site entity (example)
  3. Converting all static pages in the repo to stream-based pages

Typically by convention, all pages in Sites starter repos are divided into two directories - based on whether or not they rely on Streams:

  • /pages - (holds static pages - e.g. index, about, etc.)
  • /templates - (page templates for entity pages - e.g. location, product, faq, etc.)

This repo differs in that:

  • all static pages defined in the /pages directory now rely on a Stream scoped to this saved filter (which contains a single site entity)
  • all templates defined in /templates now include a reference to the site entity as a related field in frontmatter (refer to line 16)

Therefore, when a site entity is updated in KG, every single page template in the repo is affected, and therefore gets updated as a result.

The resulting deploy can be viewed in the platform here.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published