Skip to content

Instantly share code, notes, and snippets.

{
"Services": [
{
"Url": "https://sandboxapi.ordercloud.io/v1",
"Endpoints": [
{
"Path": "/products/",
"ItemPath": "Items",
"Method": "GET",
"ItemType": "Product",
{
"Services": [
{
"Url": "https://sandboxapi.ordercloud.io/v1",
"Endpoints": [
{
"Path": "/products/",
"ItemPath": "Items",
"Method": "GET",
"ItemType": "Product",
{
"Services": [
{
"Url": "https://sandboxapi.ordercloud.io/v1",
"Endpoints": [
{
"Path": "/products/",
"ItemPath": "Items",
"Method": "GET",
"ItemType": "Product",
@Mitya88
Mitya88 / scribanextensions.config
Created August 26, 2022 07:21
scribanextension.config
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/" xmlns:role="http://www.sitecore.net/xmlconfig/role/">
<sitecore>
<pipelines>
<generateScribanContext>
<processor type="Demo.Pipelines.GenerateScribanContext.GetSVGFunction,Demo" resolve="true" />
</generateScribanContext>
</pipelines>
</sitecore>
</configuration>
namespace Demo
{
using Scriban.Runtime;
using Sitecore.Abstractions;
using Sitecore.Data.Items;
using Sitecore.XA.Foundation.Abstractions;
using Sitecore.XA.Foundation.Scriban.Pipelines.GenerateScribanContext;
using System;
using System.IO;
using FieldRendererBase = Sitecore.XA.Foundation.Scriban.FieldRendererBase;
$certificatePassword = "Test123!"
$newCert = New-SelfSignedCertificate -DnsName "localhost" -FriendlyName "Sitecore Identity Token Signing" -NotAfter (Get-Date).AddYears(5)
Export-PfxCertificate -Cert $newCert -FilePath .\SitecoreIdentityTokenSigning.pfx -Password (ConvertTo-SecureString -String $certificatePassword -Force -AsPlainText)
[System.Convert]::ToBase64String([System.IO.File]::ReadAllBytes((Get-Item .\SitecoreIdentityTokenSigning.pfx))) | Out-File -Encoding ascii -NoNewline -Confirm -FilePath .\secrets\sitecore-identitycertificate.txt
IF NOT EXIST mkcert.exe powershell Invoke-WebRequest https://github.com/FiloSottile/mkcert/releases/download/v1.4.1/mkcert-v1.4.1-windows-amd64.exe -UseBasicParsing -OutFile mkcert.exe
mkcert -install
del /Q /S *.crt
del /Q /S *.key
mkcert -cert-file secrets\tls\global-cm\tls.crt -key-file secrets\tls\global-cm\tls.key "cm.globalhost"
mkcert -cert-file secrets\tls\global-cd\tls.crt -key-file secrets\tls\global-cd\tls.key "cd.globalhost"
mkcert -cert-file secrets\tls\global-id\tls.crt -key-file secrets\tls\global-id\tls.key "id.globalhost"
function ExecuteHealthcheck {
param(
$componentId,
[hashtable]$params
)
$result = @{ }
$props = @{
{
"namespace": "Project.HelixBase",
"references": [
"Foundation.*",
"Feature.*",
"Project.Common"
],
"items": {
"includes": [
{
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<unicorn>
<configurations>
<configuration
name="Project.HelixBase"
description="HelixBase site content"
dependencies="Foundation.*,Feature.*,Project.Common"
patch:after="configuration[@name='Foundation.Serialization']"
extends="Helix.Feature.Base">