Skip to content

Commit ca4908d

Browse files
committed
Merge branch 'master' into littledata-docs-update
2 parents 4db87dc + 90c1cd1 commit ca4908d

File tree

76 files changed

+1068
-274
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+1068
-274
lines changed

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ GEM
7474
jekyll-watch (2.2.1)
7575
listen (~> 3.0)
7676
json (2.5.1)
77-
kramdown (2.3.0)
77+
kramdown (2.3.1)
7878
rexml
7979
kramdown-parser-gfm (1.1.0)
8080
kramdown (~> 2.0)
@@ -124,7 +124,7 @@ GEM
124124

125125
PLATFORMS
126126
ruby
127-
x86_64-linux-musl
127+
x86_64-linux
128128

129129
DEPENDENCIES
130130
dotenv

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,9 @@ Each piece of frontmatter does something special!
189189
#### Content-related frontmatter
190190
- `beta`: default false. When true, show an "in beta" warning in the page layout (see the warning in `_includes/content/beta-note.md`)
191191
- `rewrite`: defaults to false. This is a legacy frontmatter flag that comes from the old `site-docs` repo, and which labels any destination that was rewritten in ~2018 to a standardized template. It disables the duplicate "connection modes" table that would otherwise show up in the boilerplate content at the end of the page.
192-
- `hide-boilerplate`: defaults to false. When true, none of the content from `integration-foot.md` is appended to the destination page.
192+
- `hide-boilerplate`: defaults to false. When true, none of the content from `destination-footer.md` is appended to the destination page.
193193
- `hide-cmodes`: defaults to false. A renaming of "rewrite" for more clarity, hides the connection modes table in the boilerplate.
194-
- `hide-personas-partial`: defaults to false. When true, hides the section of content from `integration-foot.md` that talks about being able to receive personas data.
194+
- `hide-personas-partial`: defaults to false. When true, hides the section of content from `destination-footer.md` that talks about being able to receive personas data.
195195
- `integration_type`: This is set in the `_config.yml` on three paths to add a noun (Source, Destination, or Warehouse) to the end of the title, and the end of the title tag in the html layout. It also controls the layout and icon for some of these.
196196
- `source-type`: These are only used to supplement when a Cloud App in the sources path doesn't appear in the Config API list, and needs its type explicitly set. It runs some logic in the `cloud-app-note.md` to explain which cloud-apps are object vs event sources.
197197

_config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ defaults:
2525
path: "connections/destinations/catalog"
2626
values:
2727
integration_type: destination
28-
layout: integration
28+
layout: destination
2929
- scope:
3030
path: "connections/sources/catalog"
3131
values:
3232
integration_type: source
33-
layout: integration
33+
layout: source
3434
- scope:
3535
path: "connections/storage/catalog"
3636
values:
@@ -53,4 +53,4 @@ algolia:
5353
application_id: UINQ2M4D9S
5454
index_name: segment-docs
5555
files_to_exclude:
56-
- _release_notes/*
56+
- _release_notes/*

devguide.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,19 @@ It also does some slugification and destination-name normalization, since our ha
5353

5454
### Layouts
5555

56-
`default.html` is the base container through which all the individual other layouts (currently one, `page.html`) are built to have the right title, seo, etc. `Integration.html` contains the logic that runs the catalog pages.
56+
`default.html` is the base container through which all the individual other layouts are built to have the right title, seo, etc. The template inheritance is described in the diagram below.
57+
58+
The `destination.html`, `source.html`, and `integration.html` templates contain the logic that runs the layouts for individual catalog pages. Storage/warehouses use the generic Integration right now because they don't need anything special. Set the layout in the Jekyll `_config.yml` file.
5759

5860
```text
5961
default.html
60-
|- integration.html
61-
|- catalog.html
62-
|- main.html
63-
|-page.html
64-
|-home.html
62+
|- integration.html
63+
|- destination.html
64+
|- source.html
65+
|- main.html
66+
|- catalog.html
67+
|- home.html
68+
|- page.html
6569
```
6670

6771
### Platform Config API + Catalog

js/algolia/index.js

Lines changed: 63 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -13,68 +13,74 @@ const searchClient = algoliasearch(appId, apiKey);
1313
insightsClient('init', { appId, apiKey });
1414
const algoliaInsightsPlugin = createAlgoliaInsightsPlugin({ insightsClient });
1515

16+
// define locations to separate invocation for mobile and desktop
17+
const locations = ['#autocomplete','#autocomplete-mobile'];
1618

17-
const search = autocomplete({
18-
container: '#autocomplete',
19-
placeholder: 'Search the Segment documentation',
20-
debug: false,
21-
openOnFocus: false,
22-
keyboardShortcuts: ['s', 191],
23-
plugins: [algoliaInsightsPlugin,],
24-
detachedMediaQuery:'none',
25-
getSources( {query} ) {
26-
return [
27-
{
28-
sourceId: 'articles',
29-
getItemUrl({ item }){
30-
if (item.anchor != null) {
31-
var itemUrl = item.url+"#" + item.anchor;
32-
} else {
33-
var itemUrl = item.url;
34-
}
35-
return itemUrl;
36-
},
37-
getItems() {
38-
return getAlgoliaHits({
39-
searchClient,
40-
queries: [
41-
{
42-
indexName: 'segment-docs',
43-
query,
44-
params: {
45-
hitsPerPage: 7,
46-
facetFilters: ['hidden:-true'],
47-
clickAnalytics: true,
48-
},
49-
},
50-
],
51-
});
52-
},
53-
templates: {
54-
item({ item }){
19+
function initAutocomplete(item){
20+
const search = autocomplete({
21+
container: item,
22+
placeholder: 'Search the Segment documentation',
23+
debug: false,
24+
openOnFocus: false,
25+
keyboardShortcuts: ['s', 191],
26+
plugins: [algoliaInsightsPlugin,],
27+
detachedMediaQuery:'none',
28+
getSources( {query} ) {
29+
return [
30+
{
31+
sourceId: 'articles',
32+
getItemUrl({ item }){
5533
if (item.anchor != null) {
56-
var anchorLink = "#" + item.anchor;
34+
var itemUrl = item.url+"#" + item.anchor;
5735
} else {
58-
var anchorLink = "";
36+
var itemUrl = item.url;
5937
}
60-
return html `<a class="aa-link" href="/docs${item.url}${anchorLink}">
61-
<p class="aa-title" >${highlightHit({hit: item, attribute: 'title'})}</h3>
62-
<p class="aa-heading">${item.headings.join(' >')}</p>
63-
<p class="aa-content">${highlightHit({hit: item, attribute: 'content'})}</p></a>
64-
`;
38+
return itemUrl;
39+
},
40+
getItems() {
41+
return getAlgoliaHits({
42+
searchClient,
43+
queries: [
44+
{
45+
indexName: 'segment-docs',
46+
query,
47+
params: {
48+
hitsPerPage: 7,
49+
facetFilters: ['hidden:-true'],
50+
clickAnalytics: true,
51+
},
52+
},
53+
],
54+
});
6555
},
66-
noResults() {
67-
return html `<p class="aa-content">No results for <strong>${query}</strong></p>`;
68-
}
56+
templates: {
57+
item({ item }){
58+
if (item.anchor != null) {
59+
var anchorLink = "#" + item.anchor;
60+
} else {
61+
var anchorLink = "";
62+
}
63+
return html `<a class="aa-link" href="/docs${item.url}${anchorLink}">
64+
<p class="aa-title" >${highlightHit({hit: item, attribute: 'title'})}</h3>
65+
<p class="aa-heading">${item.headings.join(' >')}</p>
66+
<p class="aa-content">${highlightHit({hit: item, attribute: 'content'})}</p></a>
67+
`;
68+
},
69+
noResults() {
70+
return html `<p class="aa-content">No results for <strong>${query}</strong></p>`;
71+
}
72+
},
73+
6974
},
70-
71-
},
72-
];
73-
},
74-
navigator: {
75-
navigate({ itemUrl }) {
76-
window.location.assign('/docs'+itemUrl);
75+
];
7776
},
78-
}
79-
});
77+
navigator: {
78+
navigate({ itemUrl }) {
79+
window.location.assign('/docs'+itemUrl);
80+
},
81+
}
82+
});
83+
84+
}
8085

86+
locations.forEach(initAutocomplete);

src/404.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<div class="flex flex--justify gutter gutter--large@medium">
1010
<div class="flex__column flex__column--6@xlarge">
1111
<div class="search">
12-
{% include_cached navbar/search.html placeholder="Search the Segment documentation..." %}
12+
{% include_cached navbar/search.html container="autocomplete" %}
1313
</div>
1414
</div>
1515

@@ -31,7 +31,7 @@ <h1 class="page-404__heading">The page you were looking for doesn't exist.</h1>
3131
<p>You may have mistyped the address or the page may have moved. Double-check the URL and try again or search the term.</p>
3232

3333
<div class="search search--mobile" data-search>
34-
{% include_cached navbar/search.html placeholder="Enter a search term" mobile="true" %}
34+
{% include_cached navbar/search.html container="autocomplete" %}
3535
</div>
3636
</div>
3737
</div>

src/_data/catalog/destination_categories.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# AUTOGENERATED FROM PLATFORM API. DO NOT EDIT
2-
# destination categories last updated 2021-03-10
2+
# destination categories last updated 2021-04-01
33
items:
44
- display_name: Email Marketing
55
slug: email-marketing

src/_data/catalog/destinations.yml

Lines changed: 73 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# AUTOGENERATED FROM PLATFORM API. DO NOT EDIT
2-
# destination data last updated 2021-03-10
2+
# destination data last updated 2021-04-01
33
items:
44
- display_name: ActiveCampaign
55
slug: activecampaign
@@ -16689,6 +16689,59 @@ items:
1668916689
server: false
1669016690
previous_names:
1669116691
- Pingdom
16692+
- display_name: Pinterest Audiences
16693+
slug: pinterest-audiences
16694+
name: catalog/destinations/pinterest-audiences
16695+
description: >-
16696+
The Pinterest Audiences integration lets you add user audiences for
16697+
remarketing.
16698+
hidden: false
16699+
url: connections/destinations/catalog/pinterest-audiences
16700+
status: PUBLIC
16701+
logo:
16702+
url: 'https://cdn.filepicker.io/api/file/p3vCawmQ2CtnbacRnRHD'
16703+
mark:
16704+
url: 'https://cdn.filepicker.io/api/file/GBX5NV3USYmSOcpePkA1'
16705+
categories:
16706+
- Advertising
16707+
components:
16708+
- type: CLOUD
16709+
platforms:
16710+
browser: false
16711+
server: true
16712+
mobile: false
16713+
browserUnbundlingSupported: false
16714+
browserUnbundlingPublic: true
16715+
methods:
16716+
alias: false
16717+
group: false
16718+
identify: false
16719+
page_view: false
16720+
track: true
16721+
settings:
16722+
- name: account
16723+
display_name: account
16724+
type: STRING
16725+
deprecated: false
16726+
required: true
16727+
string_validators:
16728+
regexp: ^\d+$
16729+
description: >-
16730+
You can find your Account ID on the **Account Settings** page of your
16731+
[Pinterest Ads account](https://ads.pinterest.com/). It should be a series
16732+
of numbers, like `319762813599`.
16733+
settings: []
16734+
connection_modes:
16735+
device:
16736+
web: false
16737+
mobile: false
16738+
server: false
16739+
cloud:
16740+
web: false
16741+
mobile: true
16742+
server: true
16743+
previous_names:
16744+
- Pinterest Audiences
1669216745
- display_name: Pinterest Tag
1669316746
slug: pinterest-tag
1669416747
name: catalog/destinations/pinterest-tag
@@ -17956,24 +18009,6 @@ items:
1795618009
required: false
1795718010
description: Map your Segment properties to Responsys Columns
1795818011
settings:
17959-
- name: columns
17960-
display_name: Segment Property Name
17961-
type: STRING
17962-
deprecated: false
17963-
required: true
17964-
string_validators:
17965-
regexp: ''
17966-
description: Enter the Segment Property Name.
17967-
settings: []
17968-
- name: fieldName
17969-
display_name: Responsys Column Name
17970-
type: STRING
17971-
deprecated: false
17972-
required: true
17973-
string_validators:
17974-
regexp: ''
17975-
description: Enter the Responsys column name.
17976-
settings: []
1797718012
- name: fieldType
1797818013
display_name: Responsys Column Type
1797918014
type: SELECT
@@ -17998,6 +18033,24 @@ items:
1799818033
required: false
1799918034
description: Mark this property as a Primary Key in Responsys.
1800018035
settings: []
18036+
- name: columns
18037+
display_name: Segment Property Name
18038+
type: STRING
18039+
deprecated: false
18040+
required: true
18041+
string_validators:
18042+
regexp: ''
18043+
description: Enter the Segment Property Name.
18044+
settings: []
18045+
- name: fieldName
18046+
display_name: Responsys Column Name
18047+
type: STRING
18048+
deprecated: false
18049+
required: true
18050+
string_validators:
18051+
regexp: ''
18052+
description: Enter the Responsys column name.
18053+
settings: []
1800118054
- name: mapEmail
1800218055
display_name: Map Email
1800318056
type: BOOLEAN
@@ -22980,9 +23033,9 @@ items:
2298023033
url: >-
2298123034
https://public-segment-devcenter-production.s3.amazonaws.com/b6a1db0f-1b55-4651-9cc5-d78d8365a447.svg
2298223035
categories:
23036+
- Surveys
2298323037
- Customer Success
2298423038
- Analytics
22985-
- Surveys
2298623039
- Personalization
2298723040
components: []
2298823041
platforms:

src/_data/catalog/source_categories.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# AUTOGENERATED FROM PLATFORM API. DO NOT EDIT
2-
# source cateogries last updated 2021-03-10
2+
# source cateogries last updated 2021-04-01
33
items:
44
- display_name: Server
55
slug: server

src/_data/catalog/sources.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# AUTOGENERATED FROM PLATFORM API. DO NOT EDIT
2-
# sources last updated 2021-03-10
2+
# sources last updated 2021-04-01
33
items:
44
- display_name: .NET
55
slug: net

0 commit comments

Comments
 (0)