Skip to content

Commit 48647a6

Browse files
committed
Merge branch 'master' into DOC-204_papi_catalog
2 parents 46fe75f + 9bdd8ee commit 48647a6

Some content is hidden

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

48 files changed

+446
-190
lines changed

.env.example

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
PLATFORM_API_TOKEN=look for me in chamber
1+
PLATFORM_API_TOKEN=look for me in chamber
2+
PAPI_TOKEN=get one from a papi-enabled workspace

README.md

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ See the [Contributor Guide](contributors.md) for more info.
6464

6565
If you're planning substantial changes to the docs, follow this process for great success! 🏆
6666

67-
1. 📞 Contact the docs team* during the planning phase. This way, we can help with logistics and information architecture, and alert you to any gotchas in your content area.
67+
1. 📞 Contact the docs team ( @segmentio/segment-doc-team ) during the planning phase. This way, we can help with logistics and information architecture, and alert you to any gotchas in your content area.
6868
2. 📝 Unless previously booked, we don't need to be involved in the writing - go for it! (We're happy to consult if you get stuck or need someone to bounce ideas off.)
6969
3. 👀 When you've got a draft at least 70% ready for review, tag a member of the docs team, who'll do an initial review. (This can be either in Paper/Gdocs, or in a Github [Draft PR](#draft-prs) with markdown changes if you're comfortable with that.) They'll do a copy edit pass, and ask clarifying questions.
7070
4. ❓The doc author/owner should answer the questions asked in the review phase. Either the doc author, or the docs team member can resolve comments as they are clarified in the doc text.👍
@@ -76,8 +76,6 @@ If you're planning substantial changes to the docs, follow this process for grea
7676

7777
Once the PR is merged, the docs site rebuilds and the changes are live!
7878

79-
(* The docs team is just Laura right now.)
80-
8179

8280
### The Docs Process for direct contributors
8381

@@ -88,17 +86,16 @@ Once the PR is merged, the docs site rebuilds and the changes are live!
8886
3. Commit your changes.
8987
3. Push the branch to `segment-docs` and make a PR to master.
9088
- Include any context you can in the PR: links to ZD tickets, Jira tickets, Paper docs or wiki pages about the project. (If you include a Jira ticket number, Jira can often link directly to the PR.)
91-
3. [Check if you need a review](#most-frequently-asked-question-do-i-need-a-review) and tag @sanscontext (or another member of the docs team). (Github also tags the CODEOWNERS for the path you're editing.)
89+
3. [Check if you need a review](#most-frequently-asked-question-do-i-need-a-review) and tag a member of the docs team. (Github also tags the CODEOWNERS for the path you're editing.)
9290
5. If the reviewers ask for clarifications or edits:
9391
- make the changes
9492
- push the new commits to the branch
9593
5. Once you get an approving review and the checks pass, merge your PR.
96-
6. Once you've merged the branch, _delete it_!
97-
7. Once merged, you can track build and deploy process in [buildkite/segment-docs](https://buildkite.com/segment/segment-docs).
94+
7. Once merged, Netlify builds the changes to `master` and redeploys the docs site.
9895

9996
### Draft PRs
10097

101-
If you're doing a substantial change and you're going to want to spend a few weeks on it, use [Github's Draft PRs feature](https://help.github.com/en/articles/about-pull-requests#draft-pull-requests), or add `WIP` to the title of your PR. This lets us know to ignore the PR until you're ready (otherwise Laura will ping you weekly about it!).
98+
If you're doing a substantial change and you're going to want to spend a few weeks on it, use [Github's Draft PRs feature](https://help.github.com/en/articles/about-pull-requests#draft-pull-requests), or add `DRAFT` or `WIP` to the title of your PR. This lets us know to ignore the PR until you're ready (otherwise we might ping you weekly about it!).
10299

103100

104101
## How the docs build works
@@ -111,10 +108,10 @@ When you run `make dev` (or `make docs`) on your laptop, Jekyll runs the same pr
111108

112109
Some of these files include Liquid script, which allows them to load reusable content ("includes"), render fancy HTML styling, and run simple code processes to build programmatic content. As long as the Jekyll process is running on your laptop, you can edit the content of a page in markdown and save it, and Jekyll will detect the change and rebuild that page so you can view it locally. However, this doesn't work if you're editing the page layouts or stylesheets, which are assumed to be static at build time.
113110

114-
When you merge a PR to master, our build system runs the Jekyll program, and automatically publishes the rebuilt HTML files to our web server. (Which is why we *require* that the Buildkite build passes before you merge!)
111+
When you merge a PR to master, the Netlify build system runs the Jekyll program, and automatically publishes the rebuilt HTML files.
115112

116113
## Formatting and Prettifying
117-
Some important tips are in the [styleguide](styleguide.md). We also have a (rendering)[Formatting guide](/src/utils/formatguide.md) available so you can see how different formatting looks when rendered.
114+
Some important tips are in the [styleguide](styleguide.md). We also have a (rendering) [Formatting guide](/src/utils/formatguide.md) available so you can see how different formatting looks when rendered.
118115

119116
## Repo structure
120117

@@ -147,15 +144,13 @@ A few possibilities/suggestions:
147144
- **Name images to describe a process flow**. For example `checkout-1-add-to-cart.png`, `checkout-2-est-shipping.png` and so on.
148145

149146

150-
### Diagram Library
151-
152-
We have a diagram library in Sketch, which you can use to build pretty, on-brand architecture diagrams, etc. There's a [readme file in that directory](diagram-library/readme.md) with instructions on how to use it.
153-
154147
### Content structure
155148

156149
There are folders for each of the top level products, and those folders might also contain topics that are related to that product area (for example the Privacy Portal section also contains GDPR/CCPA docs).
157150

158-
For the Connections product, the section is divided into the Spec, then Sources, Destinations, and Warehouses, with general accessory topics at the folder root. (More specific accessory topics are in each sub directory.) Each also contains a `catalog` directory, which contains all the directories with information about specific integrations. The top-level of this folder (the `index.md`) is a pretty "catalog" page which gives a tile-like view by category, suitable for browsing. It pulls the logo for these tiles from the path for the integration in the metadata service.
151+
For the Connections product, the section is divided into the Spec, then Sources, Destinations, and Storage Destinations (formerly called "Warehouses"), with general accessory topics at the folder root. (More specific accessory topics are in each sub directory.)
152+
153+
Each also contains a `catalog` directory, which contains all the directories with information about specific integrations. The top-level of this `catalog` folder (the `index.md`) is a pretty "catalog" page which gives a tile-like view by category, suitable for browsing. It pulls the logo for these tiles from the path for the integration in the metadata, either in `destinations.yml`, `sources.yml`, or `warehouses.yml`.
159154

160155

161156
### Programmatic content
@@ -166,7 +161,7 @@ Programmatic content is built using information in the files in `/src/_data/cata
166161

167162
Most of the programmatic content is built into the `_layouts` templates that each page uses. Sources, Destinations, and Warehouses use the `integration.html` template, which uses some Liquid logic, and calls an `include` depending on the integration type. Most of logic for the actual content must live in the include file itself, however logic controlling *if* the include is built can live in the `layout`.
168163

169-
Destination pages include the `integration_foot.md` content which uses Liquid scripting and pulls from the catalog metadata.
164+
Destination pages include the `destination-dossier.html` and `destination_footer.md` content, which use Liquid scripting and pulls from the catalog metadata.
170165

171166
Sources pages check if the source is a cloud-app, then include information about if the source is an object or event source, based on the `type` data from the ConfigAPI.
172167

@@ -223,14 +218,10 @@ We have two neat icons that you can add to a bottom-level menu item to mark it w
223218
- `dev`: runs `jekyll serve` locally with incremental builds. Useful when updating CSS, JS, or content and you don't want to rebuild every time.
224219
- `docs`: same as `make dev`, but for Laura's convenience.
225220
- `build`: Builds the site docs. Used by CI to publish the docs to staging and production
226-
- `catalog`: Pulls in the latest catalog data from the Platform API and saves it in the respective data files. Requires an API key to be passed in env via PLATFORM_API_TOKEN. [Instructions here](#bring-your-own-token).
221+
- `catalog`: Pulls in the latest catalog data from the Platform API and saves it in the respective data files. Requires an API key to be passed in env via PLATFORM_API_TOKEN. [Instructions here](https://github.com/segmentio/segment-docs/blob/master/contributors.md#refresh-the-segment-catalog).
227222
- `sidenav`: Builds the side navs for 'main', 'legal', 'api', 'partners' and stores the output in `/src/_data/sidenav-auto/`. This output isn't used for the actual build.
228223
- `typewriter`: pulls in the current state of the Docs tracking plan for implementing Segment tracking
229224
- `seed`: copies all example data files out of the `_templates` directory and puts them in the `_data` directory. Useful if you don't have a way to set up an API key.
230225
- `clean`: removes all build artifacts
231226
- `clean-deps`: removes all downloaded `gems` and `node_modules`
232227
- `deps`: installs the required `gems` and `node_modules`
233-
234-
235-
- docker-build: runs `make build` on a docker host.
236-
- docker-dev: runs `make dev` on a docker host.

contributors.md

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,25 @@ Thanks for helpin' out! We really appreciate it.
44

55
![](guide-imgs/segment-sloth-heart.png)
66

7+
Here's what's here:
8+
<!-- TOC depthFrom:2 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 -->
9+
10+
- [Contribute from the Github web UI](#contribute-from-the-github-web-ui)
11+
- [Contribute using Git and Atom](#contribute-using-git-and-atom)
12+
- [Making review edits in a PR](#making-review-edits-in-a-pr)
13+
- [Contribute using git native commands](#contribute-using-git-native-commands)
14+
- [Tips and tricks](#tips-and-tricks)
15+
- [Adding links that open in a new window](#adding-links-that-open-in-a-new-window)
16+
- [Escaping code snippets](#escaping-code-snippets)
17+
- [Syntax highlighting](#syntax-highlighting)
18+
- [Note Blocks](#note-blocks)
19+
- [Redirect to a workspace](#redirect-to-a-workspace)
20+
- [Set up on Mac using the Env script](#set-up-on-mac-using-the-env-script)
21+
- [Refresh the Segment catalog](#refresh-the-segment-catalog)
22+
- [Set up to refresh the Segment catalog](#set-up-to-refresh-the-segment-catalog)
23+
24+
<!-- /TOC -->
25+
726

827
There are three ways to contribute.
928
- EASY: [Contribute from the Github web UI](#contribute-from-the-github-web-ui) - only use this when making small edits to existing text files
@@ -36,7 +55,7 @@ This guide also contains a bunch of [useful formatting tips and tricks](#tips-an
3655
6. Once someone has reviewed and approved the change, merge the change.
3756
7. Delete the branch once the change has been merged!
3857

39-
**If changes are needed on your Github PR**: You (or they) can add Github "suggestions", which you can merge into your PR one by one. If there are many updates, you might need to check out your branch using the Atom and Git process below to make the changes in a single commit.
58+
**If changes are needed on your Github PR**: You (or they) can add Github "suggestions", which you can merge into your PR either in a batch, or one by one. If there are many updates, you might need to check out your branch using the Atom and Git process below to make the changes in a single commit.
4059

4160
## Contribute using Git and Atom
4261

@@ -95,7 +114,7 @@ This section is a very sparse outline of a git flow for git-experts and other fo
95114
6. Push your branch and changes to the `segment-docs` repo (`git push`, `git push --set-upstream origin`)
96115
7. Repeat steps 3-6 as needed.
97116
8. Open a PR by [going to the PRs page](https://github.com/segmentio/segment-docs/pulls), if not prompted, create new by selecting `master` as base, `(your branch name)` as other.
98-
9. Request a review. The Codeowners should populate this, and if not you can tag @sanscontext.
117+
9. Request a review. The Codeowners should populate this, and if not you can tag someone on the docs team.
99118
10. If changes are requested, repeat steps 3-6 as needed.
100119
11. Once approved, merge and delete branch, delete branch locally.
101120

@@ -110,7 +129,7 @@ To make a link open in a new tab append `[text](https://example.com){:target="_b
110129

111130
### Escaping code snippets
112131

113-
Certain code syntax will be interpreted by Jekyll/Liquid as site code. If you're having trouble showing code snippets in the docs, you can wrap the snippet in a `{% raw %}` tag. In the example below, the curly brackets would not render in the docs. The raw tags ensure the code renders properly.
132+
Certain code syntax is interpreted by Jekyll/Liquid as site code. If you're having trouble showing code snippets in the docs, you can wrap the snippet in a `{% raw %}` tag. In the example below, the curly brackets would not render in the docs. The raw tags ensure the code renders properly.
114133

115134
```
116135
{% raw %}
@@ -134,17 +153,18 @@ You'd write a block like this:
134153
```
135154

136155
Notes *must* include a `[]` in the heading/title, even if it's empty.
137-
You can see how to write them in the `styleguide.md`, and see how they render at [https://segment.build/docs/styleguide](https://segment.build/docs/styleguide)
156+
You can see how to write them in the `formatguide.md`, and see how they render at [https://segment.com/docs/utils/formatguide/#alerts](https://segment.com/docs/utils/formatguide/#alerts). This section also includes instructions on when to use each one.
138157

139158
### Redirect to a workspace
140-
Occasionally, you'll want to deep-link into the Segment app to link a reader to a specific page or screen. Previously we'd throw them an URL and say "replace {MY SLUG} with your actual workspace slug", but now you can use the slug of `goto-my-workspace` and the Segment app will redirect them.
159+
Occasionally, you'll want to deep-link into the Segment app to link a reader to a specific page or screen. Previously we'd throw them an URL and say "replace {MY SLUG} with your actual workspace slug", but now you can use the slug of `goto-my-workspace` and the Segment app will redirect them to the first workspace they have access to. (This does mean that it can go a bit wrong for users with access to multiple workspaces, however that's a small proportion of our users at this time.)
160+
141161
https://app.segment.com/goto-my-workspace/destinations/catalog
142162

143163

144164

145165
## Set up on Mac using the Env script
146166

147-
We've written a bash script to set up the environment for you on a Mac computer. If you're on another platform, please [email us](mailto:[email protected]) or [file a Github Issue](https://github.com/segmentio/segment-docs/issues/new) to request other instructions, and we'll see what we can do.
167+
Laura wrote a bash script to set up the environment for you on a Mac computer. If you're on another platform, please [email us](mailto:[email protected]) or [file a Github Issue](https://github.com/segmentio/segment-docs/issues/new) to request other instructions, and we'll see what we can do.
148168

149169
> info ""
150170
> You only need to run `make env` once!
@@ -155,7 +175,7 @@ We've written a bash script to set up the environment for you on a Mac computer.
155175
4. Start by checking what directory you’re in, to make sure you’re in the `segment-docs` repo.
156176
Type `pwd` (which means “print working directory”) to check. You should see something like `~/repos/segment-docs`.
157177
5. Type `make env`.
158-
The script first checks to see if you have Brew installed, and if you don’t, it installs it. It then runs more brew commands to download and install the software you need.
178+
The script first checks to see if you have [Brew](https://brew.sh) installed, and if you don’t, it installs it. It then runs more brew commands to download and install the software you need, including a bunch of really useful Atom packages.
159179

160180
> **Heads up**! You’re going to need to enter your laptop password as part of this installation, but only once!
161181
@@ -166,13 +186,15 @@ We've written a bash script to set up the environment for you on a Mac computer.
166186
Go to **Preferences > Editor**, and scroll down to **Show Invisibles**. Make sure that’s checked!
167187
![](guides-img/show-invisibles.png)
168188

189+
190+
<!-- LR: This stopped working when Apple switched to Zshell by default, and I haven't been able to get it working since.
169191
8. Finally, configure bash completion by adding tab-completion to your `.bash` profile:
170192
171193
1. Open Terminal and type `atom ~/.bash_profile` to open the file in Atom.
172194
2. Paste the following anywhere in the file:
173195
`[[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh"`
174196
3. Save and close the file in Atom.
175-
4. Quit and relaunch both Terminal and Atom.
197+
4. Quit and relaunch both Terminal and Atom.-->
176198

177199
## Refresh the Segment catalog
178200

@@ -182,14 +204,15 @@ To update the files, you run `make catalog` from your Terminal. Before you can
182204

183205
### Set up to refresh the Segment catalog
184206

185-
To use the `make catalog` command to update the list of sources and destinations that Segment supports, you'll need [a basic token for the Segment ConfigAPI](https://segment.com/docs/config-api/authentication/). You'll save this in a `.env` file on your computer, which will allow the script to talk to the Segment APIs.
207+
To use the `make catalog` command to update the list of sources and destinations that Segment supports, you'll need [a basic token for the Segment ConfigAPI](https://segment.com/docs/config-api/authentication/). You'll save this in a `.env` file on your computer, which allows the script to talk to the Segment APIs.
186208

187209
1. If you don't already have one, sign up for a free Segment workspace.
188210
2. Copy the `.env.example` file at the root of this directory, and rename it to remove the word "example". It should *just* be called `.env` when you're done. **Do NOT check in your .env file.**
189211
2. Go to the workspace's **Settings > Access Management > Tokens** tab (or click [here](https://app.segment.com/goto-my-workspace/settings/access-management)).
190212
3. Click **Create Token**.
191-
4. Add a description (you and specify that you're using it for docs purposes).
192-
5. Select **Workspace Member**, check **Source Admin**, and select one or all sources. You can grant this token more privileges, but that is unnecessary for this use.
213+
4. Add a description (and specify that you're using it for docs purposes, so nobody revokes it accidentally).
214+
5. Select **Workspace Member**, check **Source Admin**, and select one or all sources. You _can_ grant this token more privileges, but that's unnecessary.
193215
5. Click **Create**.
194-
6. Copy the token payload, and paste it after the equals sign (`=`) after "PLATFORM_API_TOKEN".
195-
7. Save and close the file. Before running the make command you may need to type `env` and enter into Terminal, or otherwise restart your Terminal session.
216+
6. Copy the token, and paste it after the equals sign (`=`) after "PLATFORM_API_TOKEN".
217+
7. Save and close the file.
218+
Before you run the make command you might need to type `env` and enter into Terminal, or otherwise restart your Terminal session.

0 commit comments

Comments
 (0)