Skip to content

Commit

Permalink
init style
Browse files Browse the repository at this point in the history
  • Loading branch information
chdeskur committed Oct 10, 2024
1 parent 8c80643 commit 8598df9
Show file tree
Hide file tree
Showing 5 changed files with 201 additions and 16 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/preview-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Preview Docs

on: pull_request

jobs:
run:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Fern
run: npm install -g fern-api

- name: Generate preview URL
id: generate-docs
env:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
run: |
OUTPUT=$(fern generate --docs --preview --log-level debug 2>&1) || true
echo "$OUTPUT"
URL=$(echo "$OUTPUT" | grep -oP 'Published docs to \K.*(?= \()')
echo "Preview URL: $URL"
echo "🌿 Preview your docs: $URL" > preview_url.txt
- name: Comment URL in PR
uses: thollander/[email protected]
with:
filePath: preview_url.txt
22 changes: 22 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Publish Docs

on:
push:
branches:
- main

jobs:
run:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' && contains(github.ref, 'refs/heads/main') && github.run_number > 1 }}
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Fern
run: npm install -g fern-api

- name: Publish Docs
env:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
run: fern generate --docs
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,27 @@ This will generate the SDK and download it to a local folder that can be pip ins
```sh
pip install -e /fern/.preview/fern-python-sdk
```

## How to update documentation?

### Local Development server

To run a local development server with hot-reloading you can run the following command

```sh
fern docs dev
```

#### Hosted URL

To update your documentation on a hosted URL, run
```
# npm install -g fern-api
fern generate --docs
```
To preview your documentation, run
```
# npm install -g fern-api
fern generate --docs --preview
```
The repository contains GitHub workflows that will automatically run these commands for you. For example, when you make a PR a preview link will be auto-generated and when you merge to main the docs site will update.
43 changes: 27 additions & 16 deletions fern/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,15 @@ colors:
background:
dark: '#000000'
light: '#FFFFFF'
header-background:
dark: '#000000'
light: '#FFFFFF'
experimental:
mdx-components:
- snippets
landing-page:
page: Welcome
path: welcome.mdx
css: assets/styles.css
navbar-links:
- type: minimal
Expand All @@ -40,6 +46,12 @@ navbar-links:
rightIcon: fa-solid fa-chevron-right
href: https://example.com/login
rounded: true
footer-links:
github: https://github.com/vapiai
twitter: https://twitter.com/vapi_ai
discord: https://discord.gg/pUFNcf2WmH
website: https://vapi.ai/
linkedin: https://www.linkedin.com/company/vapi-ai
tabs:
api-reference:
slug: api-reference
Expand All @@ -50,13 +62,12 @@ tabs:
layout:
tabs-placement: header
searchbar-placement: header
header-height: 80px
navigation:
- tab: documentation
layout:
- section: ''
contents:
- page: Introduction
path: introduction.mdx
- page: Introduction
path: introduction.mdx
- section: General
contents:
- section: How Vapi Works
Expand Down Expand Up @@ -89,8 +100,8 @@ navigation:
path: changelog.mdx
- page: Support
path: support.mdx
- page: Status
path: status.mdx
- link: Status
href: https://status.vapi.ai/
- section: Quickstart
contents:
- page: Dashboard
Expand Down Expand Up @@ -305,12 +316,12 @@ navigation:
contents:
- page: HIPAA Compliance
path: security-and-privacy/hipaa.mdx
- page: SOC-2 Compliance
path: security-and-privacy/soc.mdx
- page: Privacy Policy
path: security-and-privacy/privacy-policy.mdx
- page: Terms of Service
path: security-and-privacy/tos.mdx
- link: SOC-2 Compliance
href: https://security.vapi.ai/
- link: Privacy Policy
href: https://vapi.ai/privacy
- link: Terms of Service
href: https://vapi.ai/terms-of-service
- tab: api-reference
layout:
- api: API Reference
Expand All @@ -325,8 +336,8 @@ navigation:
paginated: true
- section: ''
contents:
- page: Swagger
path: api-reference/swagger.mdx
- page: OpenAPI
path: api-reference/openapi.mdx
- link: Swagger
href: https://api.vapi.ai/api
- link: OpenAPI
href: https://api.vapi.ai/api-json

98 changes: 98 additions & 0 deletions fern/welcome.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
---
layout: custom
---

<style>
{`
body {
background-color: #000;
background-image: url("https://vapi.ai/assets/SolutionsBg-714aa4a1.svg");
background-position: center top;
background-repeat: no-repeat;
background-size: cover;
margin-top: 100px;
}
h1 {
background: linear-gradient(110deg, #fff 18.62%, #afdee9 121.64%);
-webkit-background-clip: text;
-webkit-font-smoothing: antialiased;
-webkit-text-fill-color: transparent;
}
.full {
width: 100%;
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
padding-top: 100px;
}
.floating {
animation: floating 4s ease-in-out infinite !important;
}
@keyframes floating {
0% { transform: translate(0, 0px); }
50% { transform: translate(0, 20px); }
100% { transform: translate(0, -0px); }
}
.vapi {
position: relative;
display: flex;
flex-direction: column;
flex: 1 1 0%;
}
.vapi .fern-card {
border-radius: 20px !important;
border: 1px solid rgba(148, 255, 210, 0.8) !important;
background: radial-gradient(72.24% 136.19% at 52.51% 0%, rgba(0, 0, 0, 0) 0%, rgba(15, 32, 28, 0.08) 57.49%, rgba(128, 209, 255, 0.2) 90.03%, rgba(128, 255, 171, 0.2) 100%), rgba(0, 0, 0, 0.95) !important;
backdrop-filter: blur(4px) !important;
}
.not-vapi .fern-card {
border-radius: 20px !important;
border: 1px solid rgba(255, 255, 255, 0.2) !important;
background: rgba(0, 0, 0, 0.7) !important;
backdrop-filter: blur(4px) !important;
}
.cards {
padding-top: 100px;
width: 75%;
}
`}
</style>

<div class="full dark">
<h1>Welcome to Vapi's</h1>
<h1>Developer Documentation</h1>
<p>Build, test, & deploy voice AI agents in minutes rather than months</p>

<div class="cards">
<CardGroup cols={2}>
<div class="not-vapi">
<Card
title="The status quo"
icon="fa-solid fa-waveform-lines"
color="#BCC5CC"
>
Months to work to production, continued DevOps and R&D investment.
</Card>
</div>
<div class="vapi">
<img src="https://vapi.ai/assets/ComparisonCardTop-16f844a0.svg" />
<Card
title="Using Vapi"
icon={<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.3062 13.4393C15.4321 13.695 15.6921 13.8572 15.9771 13.858C16.2622 13.8587 16.523 13.6978 16.6502 13.4427L19.9263 6.87415C20.8632 4.99584 23.1771 4.21162 25.0968 5.14201C27.0107 6.0696 27.7888 8.34107 26.855 10.2132L19.4167 25.1269C18.7688 26.4257 17.4225 27.2537 15.9425 27.25C14.4625 27.2463 13.1205 26.4116 12.4794 25.1096L5.13642 10.1959C4.21237 8.31916 5.00207 6.05154 6.92086 5.13351C8.84542 4.21272 11.1552 5.00861 12.0823 6.89148L15.3062 13.4393Z" stroke="#94FFD2" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg>}
>
In production tonight, world-class pushing DevOps and R&D.
</Card>
<img src="https://vapi.ai/assets/ComparisonCardBottom-d214c8de.svg" />
</div>
</CardGroup>
</div>
</div>

0 comments on commit 8598df9

Please sign in to comment.