File tree Expand file tree Collapse file tree 5 files changed +26
-2
lines changed
connections/destinations/catalog
actions-display-video-360
personas-facebook-custom-audiences Expand file tree Collapse file tree 5 files changed +26
-2
lines changed Original file line number Diff line number Diff line change 77 getConnectionModes,
88 isCatalogItemHidden,
99 sanitize,
10- doesCatalogItemExist
10+ doesCatalogItemExist,
11+ engageDestinations,
1112} = require ( './utilities.js' ) ;
1213
1314require ( 'dotenv' ) . config ( ) ;
@@ -120,6 +121,7 @@ const updateDestinations = async () => {
120121 name : destination . name ,
121122 slug,
122123 hidden : isCatalogItemHidden ( url ) ,
124+ engage : engageDestinations ( url ) ,
123125 endpoints,
124126 regions,
125127 url,
Original file line number Diff line number Diff line change @@ -159,6 +159,20 @@ const isCatalogItemHidden = (itemURL) => {
159159 }
160160} ;
161161
162+ const engageDestinations = ( itemURL ) => {
163+ try {
164+ const catalogPath = path . resolve ( 'src' , itemURL , 'index.md' ) ;
165+ if ( fs . existsSync ( catalogPath ) ) {
166+ const f = fm ( fs . readFileSync ( catalogPath , 'utf8' ) ) ;
167+ if ( f . attributes . engage ) return true ;
168+ }
169+ return false ;
170+ } catch ( e ) {
171+ console . log ( error ) ;
172+ return false ;
173+ }
174+ } ;
175+
162176const sanitize = ( text ) => {
163177 const regex = / ( < [ ^ \/ a ] .* ?> ) / ig;
164178 result = text . replace ( regex , "`$1`" ) ;
@@ -173,3 +187,4 @@ exports.getConnectionModes = getConnectionModes;
173187exports . isCatalogItemHidden = isCatalogItemHidden ;
174188exports . sanitize = sanitize ;
175189exports . doesCatalogItemExist = doesCatalogItemExist ;
190+ exports . engageDestinations = engageDestinations ;
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ <h6>Components</h6>
7070</ ul >
7171{% endunless %}
7272</ div >
73- {% unless page.hide-cmodes %}
73+ {% unless page.hide-cmodes or page.engage %}
7474< div class ="qi-content ">
7575< h6 > Connection Modes < a href ="/docs/connections/destinations/#connection-modes "> < img src ="/docs/images/help.svg "/> </ a > </ h6 >
7676< table >
@@ -98,6 +98,11 @@ <h6>Connection Modes <a href="/docs/connections/destinations/#connection-modes">
9898</ div >
9999{% endunless %}
100100{% endif %}
101+ {% if page.engage == true %}
102+ < div >
103+ < b > This destination is only compatible with < a href ="/docs/engage "> Twilio Engage</ a > .</ b >
104+ </ div >
105+ {% endif %}
101106{% if destinationInfo.partnerOwned == true %}
102107< div >
103108 < h6 > Partner Owned</ h6 >
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ strat: google
44hide-settings : true
55id : 65302a3acb309a8a3d5593f2
66beta : true
7+ engage : true
78---
89
910> info ""
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ strat: facebook
44hide-boilerplate : true
55redirect_from : ' /connections/destinations/catalog/personas-facebook-ads/'
66id : 5a4d24dcc5836400017188f6
7+ engage : true
78---
89## Overview
910
You can’t perform that action at this time.
0 commit comments