Skip to content

Instantly share code, notes, and snippets.

View KayeeNL's full-sized avatar

Robbert Hock KayeeNL

View GitHub Profile
FEAAS.External.registerComponent(MyByocComponent, {
name: 'MyByocComponent',
properties: {
title: {
type: 'string',
},
columnsCount: {
type: 'number',
},
},
@KayeeNL
KayeeNL / jss-scaffold-byoc.ps1
Last active March 15, 2024 10:25
JSS scaffolding a BYOC component
jss scaffold 'src/byoc/ByocPromo' --byoc
@KayeeNL
KayeeNL / kayee-blogpost-scaffold-byoc-component
Created March 15, 2024 09:43
Scaffolds an example Sitecore XM Cloud BYOC 'MyByocComponent' component
jss scaffold src/byoc/MyByocComponent --byoc
@KayeeNL
KayeeNL / byocpromo-component-props.json
Created March 6, 2024 11:26
BYOC Promo component data json result that is stored in the Component Props fields
{
"url": "https://www.kayee.nl",
"url-text": "Check out Kayee.nl",
"image-url": "http://xmcloudcm.localhost/-/media/Project/Kayee/shared/kayee-blogpost-15x-sitecore-mvp-award-2024.png?h=1116&iar=0&w=2000&hash=E2C0DDB5A74094A79E34C2321845F27C",
"text": "This is a BYOC Promo"
}
@KayeeNL
KayeeNL / kayee-blogpost-import-byocpromo.tsx
Created March 6, 2024 10:42
Import statement of the ByocPromo component in index.client.tsx and index.hybrid.ts
import './ByocPromo';
@KayeeNL
KayeeNL / ByocPromo.tsx
Created March 6, 2024 10:35
Sitecore XM Cloud BYOC Promo component implementation
import React from 'react';
import * as FEAAS from '@sitecore-feaas/clientside/react';
interface ByocPromoProps {
imageUrl: string;
text: string;
url: string;
urlText: string;
}
@KayeeNL
KayeeNL / NODE_TLS_REJECT_UNAUTHORIZED
Created February 22, 2024 13:58
NODE_TLS_REJECT_UNAUTHORIZED
NODE_TLS_REJECT_UNAUTHORIZED=0
@KayeeNL
KayeeNL / sitecore-xmcloud-pages-icon-css-classes.txt
Created February 5, 2024 13:46
Available css classes for icons in Sitecore XM Cloud Pages
account - e900
account-edit-outline - e901
account-filled - e902
account-lock-outline - e903
account-off-outline - e904
add-spacing-bottom - e905
add-spacing-sides - e906
add-spacing-top - e907
advanced-controls - e908
alert-circle - e909
@KayeeNL
KayeeNL / kayee-blogpost-sitecore-dictionary-service-dictionarymodel.cs
Created January 4, 2024 12:12
kayee-blogpost-sitecore-dictionary-service-dictionarymodel.cs
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace KayeeDictionaryServiceDemo.Services.Dictionary.Models
{
public class DictionaryModel
{
private readonly Lazy<Task<Dictionary<string, string>>> _dictionaryDataTask;
@KayeeNL
KayeeNL / kayee-blogpost-sitecore-dictionary-service-contentblock-example.cshtml
Created January 2, 2024 14:29
kayee-blogpost-sitecore-dictionary-service-contentblock-example.cshtml
@using KayeeDictionaryServiceDemo.Services.Dictionary.Models
@model ContentBlock
@inject IServiceProvider ServiceProvider
@{
bool isReuse = ViewBag.IsReuse ?? false;
var dictionaryModel = new DictionaryModel(ServiceProvider);
}
<h1>Here are translations from Dictionary Items:</h1>