This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(** logic to setup param using url query parameters **) | |
{{$limit = 5}} | |
{{$page = 0}} | |
{{if {get_var.page} }} | |
{{$page = {get_var.page} }} | |
{{end-if}} | |
{{if {get_var.limit} }} | |
{{$limit = {get_var.limit} }} | |
{{end-if}} | |
(** code to loop through a content model and make a json ouput **) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// fetchRedirects, get the list of all redirects set in the content manager, loads into next.config.js | |
async function fetchZestyRedirects() { | |
// access the headless url map | |
let redirectsAPIURL = 'https://ahscom.zesty.dev/-/headless/redirects.json'; | |
try { | |
const req = await fetch(redirectsAPIURL); | |
let redirects = await req.json(); | |
let redirectsForNext = [] | |
redirects.forEach(r => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Note : | |
- You can modify the font style and form style to suit your website. | |
- Code lines with comments Do not remove this code are required for the form to work properly, make sure that you do not remove these lines of code. | |
- The Mandatory check script can modified as to suit your business needs. | |
- It is important that you test the modified form before going live.--> | |
<div id='crmWebToEntityForm' class='zcwf_lblLeft crmWebToEntityForm' style='background-color: white;color: black;max-width: 600px;'> | |
<meta name='viewport' content='width=device-width, initial-scale=1.0'> | |
<META HTTP-EQUIV ='content-type' CONTENT='text/html;charset=UTF-8'> | |
<form action='https://crm.zoho.com/crm/WebToLeadForm' name=WebToLeads4863239000000576019 method='POST' onSubmit='javascript:document.charset="UTF-8"; return checkMandatory4863239000000576019()' accept-charset='UTF-8'> | |
<input type='text' style='display:none;' name='xnQsjsdp' value='5ee1dee6d6364d8d7fad94f4555993b5a97c604f78afe42210a7390b99f48dd4'></input |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('dotenv').config() | |
const request = require('request') | |
// webhooks instances-api | |
function scheduleItemPublishWebhook () { | |
// create webhook | |
const createItemPublishWebhookOption = { | |
method: 'POST', | |
url: `${process.env.ACCOUNTS_API_HOST}/v1/webhooks`, | |
headers: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log('Simple Recursion Example') | |
function recurse(num){ | |
let newnum = num + 1 | |
if(num < 50){ | |
recurse(newnum) | |
} | |
console.log(newnum) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Hello from the outside</h1> | |
<p>The Server Time is {{site.date(r)}}</p> | |
<h2>YourTitle: {{this.title}}</h2> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "bootstrap", | |
"content": "asdfasf.yaml", | |
"web": { | |
"stylesheets": "styles.yaml", | |
"scripts": "asdfasd.yaml", | |
"views": "asdfasdf.yaml" | |
}, | |
"env": { | |
"settings": "/yaml-files/settings.yaml" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// hello |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// basic fires upa search | |
<Docs subject="content models"/> | |
// with url override | |
<Docs subject="ZUID Specificaion" url="https://zesty-io.github.io/zuid-specification/" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var corsOptions = { | |
origin: function(origin, callback) { | |
if (whitelist.indexOf(origin) !== -1) { | |
callback(null, true); | |
} else { | |
callback(new Error("Not allowed by CORS")); | |
} | |
} | |
}; |
NewerOlder