Skip to content

Commit 81a8747

Browse files
author
markzegarelli
authored
Merge branch 'master' into customerio-source-update
2 parents 2497efd + b512ae3 commit 81a8747

File tree

37 files changed

+340
-719
lines changed

37 files changed

+340
-719
lines changed

.github/ISSUE_TEMPLATE/fix-display.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Display bug or other issue
2-
description: Rais an issue related to the display of the site it self, or anything else not related to content.
2+
description: Raise an issue related to the display of the site it self, or anything else not related to content.
33
title: "[Bug]: "
44
labels: [bug, triage]
55
body:
@@ -32,4 +32,4 @@ body:
3232
label: Please describe the issue.
3333
description: Add any other context or screenshots about the feature request here.
3434
validations:
35-
required: true
35+
required: true

.github/release.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
changelog:
2+
exclude:
3+
labels:
4+
- automated-reposync-pr
5+
- autoupdate
6+
- back-end
7+
authors:
8+
- bot-docsteam
9+
categories:
10+
- title: New Features
11+
labels:
12+
- new-feature
13+
- title: New Integration Docs
14+
labels:
15+
- new-integration
16+
- title: Improvements
17+
labels:
18+
- enhancement
19+
- title: Fixes
20+
labels:
21+
- fixed-content
22+
- fixed-site
23+
- title: Other Updates
24+
labels:
25+
- "*"

.github/workflows/repo-sync.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
GITHUB_TOKEN: ${{ secrets.DOCS_BOT_PAT_REPO_SCOPE }}
1818
with:
1919
source_repo: ${{ secrets.SOURCE_REPO }}
20-
source_branch: master
20+
source_branch: ${{ secrets.SOURCE_BRANCH }}
2121
destination_branch: ${{ secrets.INTERMEDIATE_BRANCH }}
2222
github_token: ${{ secrets.DOCS_BOT_PAT_REPO_SCOPE }}
2323

@@ -27,7 +27,7 @@ jobs:
2727
GITHUB_TOKEN: ${{ secrets.DOCS_BOT_PAT_REPO_SCOPE }}
2828
with:
2929
source_branch: ${{ secrets.INTERMEDIATE_BRANCH }}
30-
destination_branch: master
30+
destination_branch: ${{ secrets.DESTINATION_BRANCH }}
3131
pr_title: 'repo sync'
3232
pr_body: "This is an automated pull request to sync changes between the public and private repos.\n\n:robot: This pull request should be merged (not squashed) to preserve continuity across repos, so please let a bot do the merging!"
3333
pr_label: autoupdate,automated-reposync-pr
@@ -39,7 +39,7 @@ jobs:
3939
with:
4040
github-token: ${{ secrets.GITHUB_TOKEN }}
4141
branch: repo-sync
42-
base: master
42+
base: ${{ secrets.DESTINATION_BRANCH }}
4343
author: bot-docsteam
4444
state: open
4545

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ Not all pages have a 1-1 mapping with their location within the repository. This
1414

1515
## Want to go deeper? Fork the repository
1616

17-
You can fork this repository to your local machine to make larger changes. Examples of larger changes include:
17+
You can fork this repository and clone it to your local machine to make larger changes. Examples of larger changes include:
1818
- editing more than one file at a time
1919
- adding or updating images
2020
- updating navigation items
2121

22-
In this scenario, you'll fork the repository locally, make your changes, and submit a pull request to have them reviewed and merged back into the site.
22+
In this scenario, you'll fork the repository, clone it locally, make your changes, and submit a pull request to have them reviewed and merged back into the site.
2323

2424
## Site structure
2525

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
Here, you can contribute to the Segment Documentation site.
55

6+
**Note**: On Friday, October 1st, the default branch of this repository was changed from `master` to `develop`. If you have a fork of `segment-docs`, please ensure the default branch of the fork is updated accordingly.
7+
68
## Overview
79

810
This repository contains the documentation website code and source files for https://segment.com/docs.
@@ -16,17 +18,21 @@ In this article, find information about:
1618

1719
## Contributing
1820

19-
The Segment docs team accepts a few types of contribution, including:
21+
The Segment docs team accepts contributions in the form of issues and pull requests.
22+
23+
All accepted contributions, in the form of approved pull requests and resolved issues, are deployed twice weekly, on Tuesday and Thursdays. As a result, once your pull request is closed, or your issue resolved, you may not see these changes on the site immediately.
2024

2125
### Issues
2226

2327
If you see an error or something incorrect on a specific page, click Request docs change to create an issue to bring it to the team’s attention.
2428

2529
### Pull Requests
2630

27-
If you would like to update the documentation yourself, create a Pull Request to bring it to the team’s attention. Click Edit this page to edit the page directly on GitHub. Alternatively, you can clone the repository and submit your Pull Request that way. For more information, see Contributing and the Developer Guide
31+
If you would like to update the documentation yourself, create a Pull Request to bring it to the team’s attention. Click Edit this page to edit the page directly on GitHub. Alternatively, you can clone the repository and submit your Pull Request that way. For more information, see [Contributing](CONTRIBUTING.md) and the [Developer Guide](devguide.md)
32+
33+
34+
2835

29-
For more information about contributing, see [Contributing](CONTRIBUTING.md).
3036

3137
## List of READMEs
3238

devguide.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The contents of this guide will help you get up and running with the Segment Doc
44

55
## Local development with `ruby` and `node`, without Config API
66

7-
If using OSX:
7+
If using MacOS:
88
* Install command line tools, `xcode-select --install`
99
* Install `Ruby` >= 2.3.0 https://www.ruby-lang.org/en/documentation/installation/
1010
* Ensure you're running `RubyGems` >= 2.5.0 by running `gem update --system` followed by `gem --version`
@@ -16,7 +16,7 @@ If using OSX:
1616

1717
## All about the Catalog script
1818

19-
You run the Catalog update script by running `make catalog` from the docs repo. You, a person who is going to run the script, must first save a Segment token to an `.env` file locally, which is `gitignored` so we don’t check it in to gihub accidentally.
19+
You run the Catalog update script by running `make catalog` from the docs repo. You, a person who is going to run the script, must first save a Segment token to an `.env` file locally, which is `gitignored` so we don’t check it in to GitHub accidentally.
2020

2121
Note: Old ConfigAPI tokens are not compatible with Public API. You'll need a new one if you want to use Public API.
2222

@@ -33,7 +33,7 @@ It also does some slugification and destination-name normalization, since our ha
3333

3434
### 3.1. <a name='Layouts'></a>Layouts
3535

36-
`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.
36+
`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.
3737

3838
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.
3939

js/algolia/index.js

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const placeHolder = envApiKey != null ? 'Search the Segment documentation' : 'Se
1818
const searchClient = algoliasearch(appId, apiKey);
1919

2020
//insights
21-
insightsClient('init', { appId, apiKey });
21+
insightsClient('init', { appId, apiKey, useCookie: true });
2222
const algoliaInsightsPlugin = createAlgoliaInsightsPlugin({ insightsClient });
2323

2424
// define locations to separate invocation for mobile and desktop
@@ -39,9 +39,9 @@ function initAutocomplete(item){
3939
sourceId: 'articles',
4040
getItemUrl({ item }){
4141
if (item.anchor != null) {
42-
var itemUrl = item.url+"#" + item.anchor;
42+
var itemUrl = '/docs'+item.url+"#" + item.anchor;
4343
} else {
44-
var itemUrl = item.url;
44+
var itemUrl = '/docs'+item.url;
4545
}
4646
return itemUrl;
4747
},
@@ -87,9 +87,19 @@ function initAutocomplete(item){
8787
},
8888
navigator: {
8989
navigate({ itemUrl }) {
90-
window.location.assign('/docs'+itemUrl);
90+
window.location.assign(itemUrl);
9191
},
92-
}
92+
navigateNewTab({ itemUrl }) {
93+
const windowReference = window.open(itemUrl, '_blank', 'noopener');
94+
95+
if (windowReference) {
96+
windowReference.focus();
97+
}
98+
},
99+
navigateNewWindow({ itemUrl }) {
100+
window.open(itemUrl, '_blank', 'noopener');
101+
},
102+
},
93103
});
94104

95105
}

netlify.toml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build]
2-
# command = "jekyll algolia && yarn build"
2+
command = "jekyll algolia && yarn build"
33
# Ignore builds unless [netlify-build] is present in commit message
44
# ignore = "git log -1 --pretty=%B | ( ! grep -q '\[netlify\-build\]' )"
55
# Ignore if [netlify-ignore] is present
@@ -12,15 +12,11 @@
1212
ignore = "./scripts/ignore.sh"
1313

1414
[context.branch-deploy]
15-
command = "yarn develop-inc"
15+
command = "yarn develop"
1616
ignore = "./scripts/ignore.sh"
1717

18-
[[context.branch-deploy.plugins]]
19-
package = "netlify-plugin-jekyll-cache"
20-
21-
[context.branch-deploy.plugins.inputs]
22-
jekyllSource = "/src"
23-
18+
[context.develop]
19+
command = "yarn develop"
2420

2521

2622
[[redirects]]

scripts/catalog_papi.js

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const path = require('path');
33
const fs = require('fs');
44
const fm = require('front-matter');
55
const yaml = require('js-yaml');
6+
const { type } = require('os');
67

78
require('dotenv').config();
89

@@ -369,7 +370,8 @@ const updateDestinations = async () => {
369370
// Flip the slug of Actions destinations
370371
const actionsDests = [
371372
'amplitude-actions',
372-
'slack-actions'
373+
'slack-actions',
374+
'fullstory-actions'
373375
]
374376

375377
if (actionsDests.includes(slug)) {
@@ -392,11 +394,31 @@ const updateDestinations = async () => {
392394
})
393395

394396
let settings = destination.options
397+
395398
settings.sort((a, b) => {
396399
if(a.name.toLowerCase() < b.name.toLowerCase()) { return -1; }
397400
if(a.name.toLowerCase() > b.name.toLowerCase()) { return 1; }
398401
return 0;
399402
})
403+
404+
405+
// Here we are dealing with settings that should not be exposed
406+
settings.forEach(setting => {
407+
if (setting.name == 'directChannels' || setting.name == 'endpoint' || setting.name == 'batchApiLocation') {
408+
delete setting.name
409+
delete setting.type
410+
delete setting.defaultValue
411+
delete setting.description
412+
delete setting.required
413+
delete setting.label
414+
delete setting
415+
416+
}
417+
});
418+
419+
settings = settings.filter(value => JSON.stringify(value) !== '{}')
420+
421+
// end settings removal block
400422

401423
const clone = (obj) => Object.assign({}, obj)
402424
const renameKey = (object, key, newKey) => {

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 PUBLIC API. DO NOT EDIT
2-
# destination categories last updated 2021-09-30
2+
# destination categories last updated 2021-10-08
33
items:
44
- display_name: A/B Testing
55
slug: a-b-testing

0 commit comments

Comments
 (0)