You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-20Lines changed: 11 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ See the [Contributor Guide](contributors.md) for more info.
64
64
65
65
If you're planning substantial changes to the docs, follow this process for great success! 🏆
66
66
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.
68
68
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.)
69
69
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.
70
70
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
76
76
77
77
Once the PR is merged, the docs site rebuilds and the changes are live!
78
78
79
-
(* The docs team is just Laura right now.)
80
-
81
79
82
80
### The Docs Process for direct contributors
83
81
@@ -88,17 +86,16 @@ Once the PR is merged, the docs site rebuilds and the changes are live!
88
86
3. Commit your changes.
89
87
3. Push the branch to `segment-docs` and make a PR to master.
90
88
- 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.)
92
90
5. If the reviewers ask for clarifications or edits:
93
91
- make the changes
94
92
- push the new commits to the branch
95
93
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.
98
95
99
96
### Draft PRs
100
97
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!).
102
99
103
100
104
101
## 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
111
108
112
109
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.
113
110
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.
115
112
116
113
## 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.
118
115
119
116
## Repo structure
120
117
@@ -147,15 +144,13 @@ A few possibilities/suggestions:
147
144
-**Name images to describe a process flow**. For example `checkout-1-add-to-cart.png`, `checkout-2-est-shipping.png` and so on.
148
145
149
146
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
-
154
147
### Content structure
155
148
156
149
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).
157
150
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`.
159
154
160
155
161
156
### Programmatic content
@@ -166,7 +161,7 @@ Programmatic content is built using information in the files in `/src/_data/cata
166
161
167
162
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`.
168
163
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.
170
165
171
166
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.
172
167
@@ -223,14 +218,10 @@ We have two neat icons that you can add to a bottom-level menu item to mark it w
223
218
-`dev`: runs `jekyll serve` locally with incremental builds. Useful when updating CSS, JS, or content and you don't want to rebuild every time.
224
219
-`docs`: same as `make dev`, but for Laura's convenience.
225
220
-`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).
227
222
-`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.
228
223
-`typewriter`: pulls in the current state of the Docs tracking plan for implementing Segment tracking
229
224
-`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.
230
225
-`clean`: removes all build artifacts
231
226
-`clean-deps`: removes all downloaded `gems` and `node_modules`
232
227
-`deps`: installs the required `gems` and `node_modules`
233
-
234
-
235
-
- docker-build: runs `make build` on a docker host.
- [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
+
7
26
8
27
There are three ways to contribute.
9
28
- 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
36
55
6. Once someone has reviewed and approved the change, merge the change.
37
56
7. Delete the branch once the change has been merged!
38
57
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.
40
59
41
60
## Contribute using Git and Atom
42
61
@@ -95,7 +114,7 @@ This section is a very sparse outline of a git flow for git-experts and other fo
95
114
6. Push your branch and changes to the `segment-docs` repo (`git push`, `git push --set-upstream origin`)
96
115
7. Repeat steps 3-6 as needed.
97
116
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.
99
118
10. If changes are requested, repeat steps 3-6 as needed.
100
119
11. Once approved, merge and delete branch, delete branch locally.
101
120
@@ -110,7 +129,7 @@ To make a link open in a new tab append `[text](https://example.com){:target="_b
110
129
111
130
### Escaping code snippets
112
131
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.
114
133
115
134
```
116
135
{% raw %}
@@ -134,17 +153,18 @@ You'd write a block like this:
134
153
```
135
154
136
155
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.
138
157
139
158
### 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.)
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.
148
168
149
169
> info ""
150
170
> 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.
155
175
4. Start by checking what directory you’re in, to make sure you’re in the `segment-docs` repo.
156
176
Type `pwd` (which means “print working directory”) to check. You should see something like `~/repos/segment-docs`.
157
177
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.
159
179
160
180
> **Heads up**! You’re going to need to enter your laptop password as part of this installation, but only once!
161
181
@@ -166,13 +186,15 @@ We've written a bash script to set up the environment for you on a Mac computer.
166
186
Go to **Preferences > Editor**, and scroll down to **Show Invisibles**. Make sure that’s checked!
167
187

168
188
189
+
190
+
<!-- LR: This stopped working when Apple switched to Zshell by default, and I haven't been able to get it working since.
169
191
8. Finally, configure bash completion by adding tab-completion to your `.bash` profile:
170
192
171
193
1. Open Terminal and type `atom ~/.bash_profile` to open the file in Atom.
@@ -182,14 +204,15 @@ To update the files, you run `make catalog` from your Terminal. Before you can
182
204
183
205
### Set up to refresh the Segment catalog
184
206
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.
186
208
187
209
1. If you don't already have one, sign up for a free Segment workspace.
188
210
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.**
189
211
2. Go to the workspace's **Settings > Access Management > Tokens** tab (or click [here](https://app.segment.com/goto-my-workspace/settings/access-management)).
190
212
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.
193
215
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