Skip to content

Commit

Permalink
docs: add titles and descs to frontmatter in Fern's documentation pag…
Browse files Browse the repository at this point in the history
…es (#3006)

* docs: add title and desc to introduction.mdx

* docs: add title and desc to import.mdx

* docs: add title and desc to examples.mdx

* docs: add title and desc to why-fern.mdx

* docs: add title and desc to extensions.mdx

* docs: add title and desc to export.mdx

* docs: add title and desc to go-sdk.mdx

* docs: add title and desc to python-sdk.mdx

* docs: add title and desc to java-sdk.mdx

* docs: add title and desc to node-sdk.mdx

* docs: add title and desc to postman-collection.mdx

* docs: add title and desc to php-sdk.mdx

* docs: add title and desc to csharp-sdk.mdx

* docs: add comma

* docs: add comma

* docs: update desc wording in node-sdk.mdx

* docs: reword desc in java-sdk.mdx

* docs: add title and desc to ruby-sdk.mdx

* docs: add title and desc to browser-sdk.mdx

* docs: add title and desc to publish-to-maven-central.mdx

* docs: add title and desc to writing-content.mdx

* docs: add title and desc to snippets.mdx

* docs: add title and desc to previews.mdx

* docs: add title and desc to endpoint-errors.mdx

* docs: add title and desc to custom-domain.mdx

* docs: add title and desc to configurations-overview.mdx

* docs: add title and desc to audiences.mdx

* docs: add title and desc to availability.mdx

* docs: update frontmatter and content of availability.mdx

- realized that some of the content is an unintentional copy from Callout.mdx, fixed

* docs: add title and desc to callout.mdx

* docs: add title and desc to card.mdx

* docs: add title and desc to codeblock.mdx

* docs: add title and desc to icons.mdx
  • Loading branch information
minaelee authored Feb 22, 2024
1 parent cd900a3 commit 3d91632
Show file tree
Hide file tree
Showing 25 changed files with 144 additions and 12 deletions.
5 changes: 5 additions & 0 deletions fern/docs/pages/docs/audiences.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Fern | Configuring audiences for different consumer groups
description: Segment your API documentation for different consumers, called 'Audiences'. For example, you can publish a subset of your docs to the 'public' Audience.
---

[Audiences](/api-definition/fern-definition/audiences) are a useful tool for segmenting your API for different consumers. You can configure your Fern Docs to publish documentation specific to an `Audience`.

The following example shows how to configure your `docs.yml` to publish documentation for the `public` audience.
Expand Down
7 changes: 6 additions & 1 deletion fern/docs/pages/docs/components/availability.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
The `Availability Component` is used when you want to visually highlight important content for the user.
---
title: Fern | Indicate the Availability of an endpoint
description: Indicate the status of an endpoint using the Availability component. Display whether the endpoint is in beta, generally available, or deprecated.
---

The `Availability` component is used to indicate the availability status of an endpoint.

Availability Prop:

Expand Down
10 changes: 8 additions & 2 deletions fern/docs/pages/docs/components/callout.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
The `Callout Component` is used when you want to visually highlight important content for the user. There are different props available to design callout component properly.
---
title: Fern | Highlight content with the Callout component
description: Use the Callout component to visually highlight important content within your documentation. Configure the 'intent' as 'info', 'success', or 'warn'.
---


The `Callout` component is used when you want to visually highlight important content for the user. There are different props available to design callout component properly.

Note: it is helpful to add a `<br />` after the callout component to ensure that the next component is not too close to the callout.

Expand Down Expand Up @@ -54,4 +60,4 @@ This is a warn callout.
This is a warn callout.
</Callout>
```
</CodeBlock>
</CodeBlock>
8 changes: 7 additions & 1 deletion fern/docs/pages/docs/components/card.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
The `Card` is used when you want to display content in a rectangular box.
---
title: Fern | Use the Card component to display content in a box
description: The Card component displays content in a rectangular box, with an optional title, icon, and href (link). Create a grid of boxes using the Cards component.
---


The `Card` component is used when you want to display content in a rectangular box.

Card Prop:

Expand Down
8 changes: 7 additions & 1 deletion fern/docs/pages/docs/components/codeblock.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
The `CodeBlock` is used when you want to display a code snippet.
---
title: Fern | Display code snippets using the CodeBlock component
description: The CodeBlock component displays a code snippet, with an optional title and language. Use the CodeBlocks component to show multiple snippets in a tabbed view.
---


The `CodeBlock` component is used when you want to display a code snippet.

CodeBlock Props:

Expand Down
6 changes: 6 additions & 0 deletions fern/docs/pages/docs/components/icons.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
title: Fern | Using Font Awesome icons or custom icons in Fern Docs
description: Use and style the 26,000+ icons available in the Font Awesome icon library in your Fern Docs. Fern also supports custom icons on its Business plan.
---


[Font Awesome](https://fontawesome.com/) is the Internet's icon library and toolkit, used by millions of designers, developers, and content creators. We use Font Awesome to power the icons within Fern Docs.

You can pick from the 26,000+ icons available and then apply a style, color, size, or animation to them.
Expand Down
8 changes: 7 additions & 1 deletion fern/docs/pages/docs/configurations-overview.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
---
title: Fern | Overview of available documentation configurations
description: Links to configurations for your Fern Docs site, including a custom domain, pull request previews, SDK snippets, audiences, and display of endpoint errors.
---


- [Custom domain.](/generate-docs/configurations/custom-domain) Bring your own custom domain to Fern Docs.
- [Pull request previews.](/generate-docs/configurations/pull-request-previews) Preview changes from pull requests before merging code to a production branch.
- [SDK Snippets.](/generate-docs/configurations/sdk-snippets) Add SDK code snippets in different languages to your documentation.
- [Audiences.](/generate-docs/configurations/audiences) Configure your Fern Docs to publish documentation specific to different `Audiences`.
- [Endpoints errors.](/generate-docs/configurations/endpoint-errors) Enables errors to show up in your documentation.
- [Endpoint errors.](/generate-docs/configurations/endpoint-errors) Enables errors to show up in your documentation.
6 changes: 6 additions & 0 deletions fern/docs/pages/docs/custom-domain.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
title: Fern | Bring your custom domain to your Fern Docs
description: Learn how you can set up your Fern-generated documentation site to use a custom domain or subdomain.
---


Learn how to bring your own custom domain to Fern Docs.

<Callout intent="tip">
Expand Down
5 changes: 5 additions & 0 deletions fern/docs/pages/docs/endpoint-errors.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Fern | Endpoint errors configuration and example
description: Enable errors to show up on the endpoint pages of your documentation, from the error names, codes, and objects returned configured in your API definition.
---

This configuration enables errors to show up on the endpoint pages of your documentation. The error names, codes, and objects returned are configured in your API definition.

## Configuration
Expand Down
9 changes: 8 additions & 1 deletion fern/docs/pages/docs/previews.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
---
title: Fern | Pull request previews of docs changes before merge
description: Fern's PR previews feature lets you preview changes to your docs from pull requests before merging to the live docs site. Use manually or in GitHub Actions.
---



`PR previews` offer a way to preview changes from pull requests (PRs) before merging code to a production branch. This is useful for reviewing documentation changes before publishing them to your live documentation site.

Here's an example of a `PR preview`: https://fern-preview-fa86d0dd-7763-4d5f-84d8-6d630dc1742a.docs.buildwithfern.com
Expand Down Expand Up @@ -62,4 +69,4 @@ jobs:
## Link expiration
Preview links do not expire. However, the time to live (TTL) may be subject to change in the future.
Preview links do not expire. However, the time to live (TTL) may be subject to change in the future.
7 changes: 6 additions & 1 deletion fern/docs/pages/docs/snippets.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Fern | Add SDK code snippets to your documentation
description: From examples in your API definition, Fern generates SDK code sample snippets in cURL and other languages that are automatically populated in your Fern Docs.
---

Fern allows you to add SDK code snippets to your documentation. This is useful for showing how to use your SDK in different languages. By default, Fern will generate cURL snippets. By following the steps below, you can add code snippets for other languages.

![SDK code snippet selector](https://fern-image-hosting.s3.amazonaws.com/sdk-code-snippets.png)
Expand Down Expand Up @@ -58,4 +63,4 @@ navigation:
If you'd like to bring SDK snippets into your own documentation, you can use the [Snippets API](/api-reference/reference/snippets). API acces requires a a [SDK Business plan](https://buildwithfern.com/pricing).
Merge.dev is an example of a Fern customer that uses the Snippets API to bring Python code samples [into their API Reference](https://docs.merge.dev/hris/employees/#employees_list).
Merge.dev is an example of a Fern customer that uses the Snippets API to bring Python code samples [into their API Reference](https://docs.merge.dev/hris/employees/#employees_list).
7 changes: 7 additions & 0 deletions fern/docs/pages/docs/writing-content.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
---
title: Fern | Write and customize content in docs built with Fern
description: Add content with Markdown and MDX. Use Fern's custom components and frontmatter. Customize navigation and styles. Add an automatically generated API Reference.
---



## Add content with Markdown or MDX files

Add pages manually to your documentation by creating [Markdown](https://www.markdownguide.org/) (`.md`) or [MDX](https://mdxjs.com/) (`.mdx`) files and linking to them in [docs.yml](#configure-your-site-with-docs-yml).
Expand Down
6 changes: 5 additions & 1 deletion fern/docs/pages/guides/publish-to-maven-central.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Fern | How to publish your Java SDK as an artifact to Maven Central
description: A guide to publishing your SDK generated by Fern as an artifact to the public Maven Central repository.
---
The following is a guide on how to publish your SDK (referred to as an `artifact`) to Maven Central.

## Step 1: Decide what your Maven `groupId` will be .
Expand Down Expand Up @@ -81,4 +85,4 @@ Going forward, when referencing the artifact you'll use the `groupId` and `artif
- `com.stripe:stripe-java`
- `com.slack.api/slack-api-client`
- `dev.merge:merge-java-client`
- `com.amazonaws:aws-java-sdk-s3`
- `com.amazonaws:aws-java-sdk-s3`
7 changes: 6 additions & 1 deletion fern/docs/pages/openapi/export.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Fern | Export your API from Fern's format to OpenAPI
description: Use Fern's OpenAPI generator to convert your API defined using the Fern Definition format to an OpenAPI 3.1 specification file.
---

To export your API to OpenAPI from Fern, you can use the `fern-openapi` generator. The OpenAPI generator outputs an OpenAPI 3.1 document for your API, which can be used with any OpenAPI-compatible tools.

Here is an example of how you can configure the fern-openapi generator in your generators.yml file:
Expand Down Expand Up @@ -33,4 +38,4 @@ When configured, the generator outputs OAS files in the specified format.

**Default:** {}

When configured, the object is merged into the generated OAS file. This allows you to add custom fields to the specification.
When configured, the object is merged into the generated OAS file. This allows you to add custom fields to the specification.
4 changes: 4 additions & 0 deletions fern/docs/pages/openapi/extensions.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Fern | Fern's custom OpenAPI extensions for higher-quality SDKs
description: Learn about Fern's OpenAPI extensions for SDK method names, authentication overrides, global headers, enum descriptions and names, audiences, and more.
---

Fern supports different OpenAPI extensions so that you can generate higher-quality SDKs.

Expand Down
5 changes: 5 additions & 0 deletions fern/docs/pages/sdks/browser-sdk.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Fern | How to use Fern's TypeScript Browser SDK Generator
description: Use Fern's TypeScript Browser SDK generator and your API definition to output a fully functional Browser SDK locally, or publish it privately or to NPM.
---

[Source code](https://github.com/fern-api/fern-typescript)

**Latest version**: `0.9.5`
Expand Down
5 changes: 5 additions & 0 deletions fern/docs/pages/sdks/csharp-sdk.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Fern | How to use Fern's C# SDK Generator
description: Use Fern's C# SDK generator and your API definition to output a fully functional C# SDK (client libraries) to your local filesystem, or publish it to NuGet.
---

Latest version: `0.0.0`

<Callout intent = "tip">
Expand Down
5 changes: 5 additions & 0 deletions fern/docs/pages/sdks/go-sdk.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Fern | How to use Fern's Go SDK Generator
description: Use Fern's Go SDK generator and your API definition to output a fully functional Go SDK (client libraries) to your local filesystem, or publish it to GitHub.
---

[Source code](https://github.com/fern-api/fern/tree/main/generators/go)<br />
**Latest version**: `0.12.0`

Expand Down
5 changes: 5 additions & 0 deletions fern/docs/pages/sdks/java-sdk.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Fern | How to use Fern's Java SDK Generator
description: Use Fern's Java SDK generator and your API definition to output a fully functional Java SDK locally, or publish it to a private or public Maven repository.
---

[Source code](https://github.com/fern-api/fern/tree/main/generators/java)<br />
**Latest version**: `0.6.1`

Expand Down
5 changes: 5 additions & 0 deletions fern/docs/pages/sdks/node-sdk.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Fern | How to use Fern's TypeScript Node.js SDK Generator
description: Use Fern's TypeScript Node.js SDK generator and your API definition to output a fully functional SDK locally, and publish the package internally or to NPM.
---

[Source code](https://github.com/fern-api/fern-typescript)<br/>
**Latest version**: `0.9.5`

Expand Down
5 changes: 5 additions & 0 deletions fern/docs/pages/sdks/php-sdk.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Fern | How to use Fern's PHP SDK Generator
description: Use Fern's PHP SDK generator and your API definition to output a fully functional PHP SDK (client libraries) to your local filesystem, or publicly to Packagist.
---

Latest version: `0.0.0`

<Callout intent = "tip">
Expand Down
5 changes: 5 additions & 0 deletions fern/docs/pages/sdks/postman-collection.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Fern | How to use Fern's Postman Collection Generator
description: Use Fern's Postman Collection generator and your API definition to output a Postman Collection to your local filesystem, or publish it to Postman.
---

[Source code](https://github.com/fern-api/fern/tree/main/generators/postman)<br />
**Latest version**: `0.1.0`

Expand Down
5 changes: 5 additions & 0 deletions fern/docs/pages/sdks/python-sdk.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Fern | How to use Fern's Python SDK Generator
description: Use Fern's Python SDK generator and your API definition to output a fully functional Python SDK (client libraries) to your local filesystem, or publish it to GitHub.
---

[Source code](https://github.com/fern-api/fern/tree/main/generators/python)<br />
**Latest version**: `0.8.0`

Expand Down
5 changes: 5 additions & 0 deletions fern/docs/pages/sdks/ruby-sdk.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Fern | How to use Fern's Ruby SDK Generator
description: Use Fern's Ruby SDK generator and your API definition to output a fully functional Ruby SDK (client libraries) locally, or publish it to RubyGems.
---

[Source code](https://github.com/fern-api/fern/tree/main/generators/ruby)

Latest version: `0.0.0`
Expand Down
8 changes: 6 additions & 2 deletions fern/docs/pages/welcome/introduction.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Fern | Introduction to the Fern toolkit for REST APIs
description: Define your API with OpenAPI or Fern's simpler format, then generate SDKs, server boilerplate, and a documentation website with an API Reference.
---

Fern is a toolkit for building REST APIs. With Fern, you can generate SDKs, API documentation, and boilerplate for your backend server.

Fern is **fully compatible with OpenAPI**. Leverage your existing OpenAPI
Expand All @@ -14,6 +19,5 @@ OpenAPI, you can also use Fern's simpler format to define your API.
The magic of Fern is our compiler, which transforms your API definition into:

- **SDKs.** Client libraries that **feel handwritten** and are published to package managers like npm and PyPI.
- **Documentation.** A beautiful docs website with a best-in-class API Reference. Automatically sync your Postman Collection
- **Documentation.** A beautiful docs website with a best-in-class API Reference. Automatically sync your Postman Collection.
- **Backend boilerplate.** Server side code, such as Pydantic models for FastAPI and Jersey interfaces for Spring Boot. Get compile-time validation that your endpoints are being served correctly.

0 comments on commit 3d91632

Please sign in to comment.