Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tatimblin/707eac146181feb4012ccaf95b4f8bf9 to your computer and use it in GitHub Desktop.
Save tatimblin/707eac146181feb4012ccaf95b4f8bf9 to your computer and use it in GitHub Desktop.
export { urlWritebackPlugin } from "src/urlWritebackPlugin";
export { jiraNotification } from "src/jiraNotification";
export const urlWritebackPlugin = ({field = 'c_pagesUrl', payload}) => {
fetch(`yext.com/${payload.id}`);
};
{
"artifactStructure": {
"assets": [
{
"root": "dist",
"pattern": "assets/**/*"
}
],
"features": "sites-config/features.json",
"plugins": [
{
"pluginName": "Generator",
"sourceFiles": [
{
"root": "dist/plugin",
"pattern": "*{.ts,.json}"
},
{
"root": "dist",
"pattern": "assets/{server,static,renderer}/**/*{.js,.css}"
}
],
"event": "ON_PAGE_GENERATE",
"functionName": "Generate"
},
{
"pluginName": "URL Writeback",
"sourceFiles": [
{
"root": "src/functions",
"pattern": "*{.ts,.json}"
}
],
"event": "ON_URL_CHANGE",
"functionName": "myUrlWritebackPlugin"
},
{
"pluginName": "Jira Notification",
"sourceFiles": [
{
"root": "src/functions",
"pattern": "*{.ts,.json}"
}
],
"event": "ON_SOME_HOOK",
"functionName": "jiraNotification"
}
]
},
"dependencies": {
"installDepsCmd": "npm install",
"requiredFiles": ["package.json", "package-lock.json", ".npmrc"]
},
"buildArtifacts": {
"buildCmd": "npm run build"
},
"livePreview": {
"serveSetupCmd": ":"
}
}
import { urlWritebackPlugin } from "deno.land/yext/functions";
export { jiraNotification } from "deno.land/yext/functions";
export const myUrlWritebackPlugin = urlWritebackPlugin({
field: 'c_pagesUrl2'
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment