Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌿 introducing fern docs #779

Merged
merged 9 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/actions-comment-pull-request@v2.4.3
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
```
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
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.
79 changes: 79 additions & 0 deletions docs/assets/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
.fern-sidebar-link-content {
padding-top: 0.4rem;
padding-bottom: 0.4rem;
}

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

.fern-prose code {
background-color: #f8f8f8;
/* font-weight: 600; */
}

.fern-sidebar-link-container[data-state="active"] .fern-sidebar-link {
font-weight: 600;
}

/* .fern-sidebar-container {
color: #000000;
} */

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

p {
color: #333333;
}

fern-docs {
color: #333333;
}

ul {
color: #333333;
}

fern-button-text {
color: #ffffff;
}

h1,
h2,
h3,
h4,
h5,
h6 {
color: #333333;
}

.fern-sidebar-link-container:not([data-state="active"]) .fern-sidebar-link {
color: #333333;
}

span:not(a span) {
color: #333333;
}

:root {
--accent-aaa: 139, 92, 246;
}

.fern-mdx-link {
text-decoration-color: rgba(167, 139, 250, 1);
}

/* .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