-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update cli to use default language * update fern cli * checkpoint * add analytics config * add docs page to talk about analytics block * fix docs errors
- Loading branch information
Showing
25 changed files
with
156 additions
and
37 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file renamed
BIN
+1.32 MB
...98.18-aaf13f7f5-28d1ceb312-2cab59acf6.zip → ...98.18-ff8e48d2c-079b2989be-769cb23e52.zip
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
title: Segment | ||
description: Learn how to integrate Fern Docs with Segment to track user behavior and analytics. | ||
--- | ||
|
||
<Note> | ||
Currently we only support Segment via a custom writeKey in the docs.yml file, however you can add other providers to your docs page through [Custom Javascript](/learn/docs/building-your-docs/custom-css-js). | ||
We are also working on adding support for additional analytics tools via the docs.yml file analytics block! | ||
</Note> | ||
|
||
## Add Segment to your Docs | ||
|
||
To add Segment to your Docs, you need to add the Segment writeKey to your `docs.yml` file. | ||
|
||
### Get your Segment writeKey | ||
|
||
1. Log in to your Segment account. | ||
2. Go to the workspace where you want to add the Docs integration. | ||
3. Click on the Source you want to track.' | ||
4. Click on the `Settings` tab. | ||
5. Copy the `Write Key` from the `API Keys` section. | ||
|
||
### Add the Segment writeKey to your Docs | ||
|
||
In your `docs.yml` file, add the Segment writeKey: | ||
|
||
<CodeBlock title="docs.yml"> | ||
```yaml | ||
analytics: | ||
segment: | ||
write-key: YOUR_SEGMENT_WRITE_KEY | ||
``` | ||
</CodeBlock> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
...es/cli/configuration/src/docs-yml/schemas/sdk/api/resources/docs/types/AnalyticsConfig.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/** | ||
* This file was auto-generated by Fern from our API Definition. | ||
*/ | ||
|
||
import * as FernDocsConfig from "../../.."; | ||
|
||
export interface AnalyticsConfig { | ||
segment?: FernDocsConfig.SegmentConfig; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
...ages/cli/configuration/src/docs-yml/schemas/sdk/api/resources/docs/types/SegmentConfig.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** | ||
* This file was auto-generated by Fern from our API Definition. | ||
*/ | ||
|
||
export interface SegmentConfig { | ||
writeKey: string; | ||
} |
2 changes: 2 additions & 0 deletions
2
packages/cli/configuration/src/docs-yml/schemas/sdk/api/resources/docs/types/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...figuration/src/docs-yml/schemas/sdk/serialization/resources/docs/types/AnalyticsConfig.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
* This file was auto-generated by Fern from our API Definition. | ||
*/ | ||
|
||
import * as serializers from "../../.."; | ||
import * as FernDocsConfig from "../../../../api"; | ||
import * as core from "../../../../core"; | ||
|
||
export const AnalyticsConfig: core.serialization.ObjectSchema< | ||
serializers.AnalyticsConfig.Raw, | ||
FernDocsConfig.AnalyticsConfig | ||
> = core.serialization.object({ | ||
segment: core.serialization.lazyObject(async () => (await import("../../..")).SegmentConfig).optional(), | ||
}); | ||
|
||
export declare namespace AnalyticsConfig { | ||
interface Raw { | ||
segment?: serializers.SegmentConfig.Raw | null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...onfiguration/src/docs-yml/schemas/sdk/serialization/resources/docs/types/SegmentConfig.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
* This file was auto-generated by Fern from our API Definition. | ||
*/ | ||
|
||
import * as serializers from "../../.."; | ||
import * as FernDocsConfig from "../../../../api"; | ||
import * as core from "../../../../core"; | ||
|
||
export const SegmentConfig: core.serialization.ObjectSchema< | ||
serializers.SegmentConfig.Raw, | ||
FernDocsConfig.SegmentConfig | ||
> = core.serialization.object({ | ||
writeKey: core.serialization.property("write-key", core.serialization.string()), | ||
}); | ||
|
||
export declare namespace SegmentConfig { | ||
interface Raw { | ||
"write-key": string; | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
...es/cli/configuration/src/docs-yml/schemas/sdk/serialization/resources/docs/types/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.