Skip to content

Commit 20fdfb3

Browse files
author
markzegarelli
committed
Add support for connection mode overrides in dossier
1 parent cd33e8d commit 20fdfb3

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

src/_data/catalog/overrides.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
# This file is manually generated. When you add or remove an item, add or remove
22
# it from the `overrides-list.yml` too.
33
items:
4+
- slug: intercom
5+
connection_modes:
6+
device:
7+
web: true
8+
mobile: false
9+
server: false
10+
cloud:
11+
web: false
12+
mobile: true
13+
server: true
414
- slug: hubspot
515
display_name: HubSpot
616
previous_names:

src/_includes/content/destination-dossier.html

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
<!-- in the file we're pulling from the API, "name" corresponds with the path to the yml blob for a specific destination.-->
22
{% assign thisDestination = page.url | split: "/" | last %}
3+
4+
{% assign overrideInfo = site.data.catalog.overrides.items % | where: "slug", thisDestination | first %}
5+
6+
7+
38
{% assign destinationInfo = site.data.catalog.destinations.items | where: "slug", thisDestination | first %}
49
{% comment %}There are probably prettier ways to generate a list of links to these methods, but this was good enough for me.{% endcomment %}
510
{% assign destMethods = "" | split: ", " %}
@@ -12,14 +17,18 @@
1217
{% assign methodHTML = methodUrl | append: methodName %}
1318
{% assign methodHTML = methodHTML | append: '</a>' %}
1419
{% assign destMethods = destMethods | push: methodHTML %} {%endif%}
20+
21+
{% if page.cmode-override %}
22+
{% assign connectionModes = overrideInfo.connection_modes %}
23+
{% else %}
1524
{% assign connectionModes = destinationInfo.connection_modes %}
25+
{% endif %}
26+
1627
{% assign components = destinationInfo.components %}
1728
{% endfor %}
1829
{% assign destMethods = destMethods| reverse %}
1930

20-
{% if page.cmode-override %}
21-
{% assign destinationInfo = site.data.catalog.overrides.items % | where: "slug", thisDestination | first %}
22-
{% endif %}
31+
2332

2433

2534
<div class="quick-info">

src/connections/destinations/catalog/intercom/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: Intercom Destination
33
hide-cmodes: true
44
hide-personas-partial: true
5+
cmode-override: true
56
---
67

78
[Intercom](https://www.intercom.com/) makes customer messaging apps for sales, marketing, and support, connected on one platform. The Intercom Destination is open-source. You can browse the code for [analytics.js](https://github.com/segment-integrations/analytics.js-integration-intercom), [iOS](https://github.com/segment-integrations/analytics-ios-integration-intercom) and [Android](https://github.com/segment-integrations/analytics-android-integration-intercom) on GitHub.

0 commit comments

Comments
 (0)