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 7
7
getConnectionModes,
8
8
isCatalogItemHidden,
9
9
sanitize,
10
- doesCatalogItemExist
10
+ doesCatalogItemExist,
11
+ engageDestinations,
11
12
} = require ( './utilities.js' ) ;
12
13
13
14
require ( 'dotenv' ) . config ( ) ;
@@ -120,6 +121,7 @@ const updateDestinations = async () => {
120
121
name : destination . name ,
121
122
slug,
122
123
hidden : isCatalogItemHidden ( url ) ,
124
+ engage : engageDestinations ( url ) ,
123
125
endpoints,
124
126
regions,
125
127
url,
Original file line number Diff line number Diff line change @@ -159,6 +159,20 @@ const isCatalogItemHidden = (itemURL) => {
159
159
}
160
160
} ;
161
161
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
+
162
176
const sanitize = ( text ) => {
163
177
const regex = / ( < [ ^ \/ a ] .* ?> ) / ig;
164
178
result = text . replace ( regex , "`$1`" ) ;
@@ -173,3 +187,4 @@ exports.getConnectionModes = getConnectionModes;
173
187
exports . isCatalogItemHidden = isCatalogItemHidden ;
174
188
exports . sanitize = sanitize ;
175
189
exports . doesCatalogItemExist = doesCatalogItemExist ;
190
+ exports . engageDestinations = engageDestinations ;
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ <h6>Components</h6>
70
70
</ ul >
71
71
{% endunless %}
72
72
</ div >
73
- {% unless page.hide-cmodes %}
73
+ {% unless page.hide-cmodes or page.engage %}
74
74
< div class ="qi-content ">
75
75
< h6 > Connection Modes < a href ="/docs/connections/destinations/#connection-modes "> < img src ="/docs/images/help.svg "/> </ a > </ h6 >
76
76
< table >
@@ -98,6 +98,11 @@ <h6>Connection Modes <a href="/docs/connections/destinations/#connection-modes">
98
98
</ div >
99
99
{% endunless %}
100
100
{% 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 %}
101
106
{% if destinationInfo.partnerOwned == true %}
102
107
< div >
103
108
< h6 > Partner Owned</ h6 >
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ strat: google
4
4
hide-settings : true
5
5
id : 65302a3acb309a8a3d5593f2
6
6
beta : true
7
+ engage : true
7
8
---
8
9
9
10
> info ""
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ strat: facebook
4
4
hide-boilerplate : true
5
5
redirect_from : ' /connections/destinations/catalog/personas-facebook-ads/'
6
6
id : 5a4d24dcc5836400017188f6
7
+ engage : true
7
8
---
8
9
## Overview
9
10
You can’t perform that action at this time.
0 commit comments