Skip to content

Commit

Permalink
Migrating docs from mintlify to fern
Browse files Browse the repository at this point in the history
  • Loading branch information
hellovai committed Jun 23, 2024
1 parent b42382f commit 834f513
Show file tree
Hide file tree
Showing 181 changed files with 727 additions and 2,900 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/fern-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Fern Check

on:
pull_request:
push:
branches: [canary]

jobs:
fern-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install fern
run: npm install -g fern-api
- name: fern check
run: fern check
33 changes: 33 additions & 0 deletions .github/workflows/preview-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Preview Docs

on:
pull_request:
branches:
- canary

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 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:
- canary

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
38 changes: 13 additions & 25 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,22 @@
# Mintlify Starter Kit
# Fern Configuration

Click on `Use this template` to copy the Mintlify starter kit. The starter kit contains examples including
View the documentation [here](https://boundary.docs.buildwithfern.com).

- Guide pages
- Navigation
- Customizations
- API Reference pages
- Use of popular components
## Updating your Docs

### 👩‍💻 Development
### Local Development server

Install the [Mintlify CLI](https://www.npmjs.com/package/mintlify) to preview the documentation changes locally. To install, use the following command
To run a local development server with hot-reloading you can run the following command

```sh
fern docs dev
```
npm i -g mintlify
```

Run the following command at the root of your documentation (where mint.json is)

```
mintlify dev
```

### 😎 Publishing Changes

Changes will be deployed to production automatically after pushing to the default branch.
### Hosted URL

You can also preview changes using PRs, which generates a preview link of the docs.
Documentation is automatically updated when you push to main via the `fern generate` command.

#### Troubleshooting

- Mintlify dev isn't running - Run `mintlify install` it'll re-install dependencies.
- Page loads as a 404 - Make sure you are running in a folder with `mint.json`
```sh
npm install -g fern-api # only required once
fern generate --docs
```
3 changes: 0 additions & 3 deletions docs/_snippets/snippet-example.mdx

This file was deleted.

File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
5 changes: 5 additions & 0 deletions docs/assets/logo-dark-mode.svg
5 changes: 5 additions & 0 deletions docs/assets/logo-light-mode.svg
Binary file added docs/assets/logo.png
Binary file added docs/assets/open-sans-v17-all-charsets-300.woff2
Binary file not shown.
Binary file added docs/assets/open-sans-v17-all-charsets-700.woff2
Binary file not shown.
Binary file not shown.
Binary file not shown.
34 changes: 34 additions & 0 deletions docs/assets/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.fern-sidebar-link-content {
padding-top: 0.2rem;
padding-bottom: 0.2rem;
}

.fern-sidebar-link-container {
min-height: 26px;
}

.fern-sidebar-link-container[data-state=active] .fern-sidebar-link {
background-color: transparent;
}

body {
font-size: 1rem !important;
}

.fern-main {
margin-left: 14%;
margin-right: 14%;
}

.fern-sidebar-group li {
margin-top: 0px !important;
}

.group\/sidebar {
z-index: 1000;
padding-top: 20px;
}

.fern-search-bar {
margin-bottom: 10px;
}
90 changes: 0 additions & 90 deletions docs/build_guide_index.py

This file was deleted.

Loading

0 comments on commit 834f513

Please sign in to comment.