Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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
21 changes: 15 additions & 6 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: fern-check
name: docs-check

on:
pull_request:
Expand All @@ -7,14 +7,23 @@ on:
- main

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

- name: Install Fern CLI tool
run: npm install -g fern-api
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm

- name: Check API is valid
run: fern check
- name: Install dependencies
run: npm ci

- name: Run docs checks
run: npm run check

- name: Run smoke tests
run: npm run test:smoke
32 changes: 0 additions & 32 deletions .github/workflows/preview-docs.yml

This file was deleted.

22 changes: 0 additions & 22 deletions .github/workflows/publish-docs.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@

# Production
/build
/dist

# Generated files
.docusaurus
.cache-loader
.astro

# Misc
.DS_Store
Expand Down
28 changes: 21 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,32 @@ This documentation is written and maintained by [Promptless](https://promptless.

### Prerequisites

- Node.js 18 or higher
- Fern CLI installed globally:
```bash
npm install -g fern-api
```
- Node.js 20 or higher
- npm 10 or higher

### Local Development

From the repository root, run:

```bash
fern docs dev
npm install
npm run migrate
npm run dev
```

This starts a local server at `http://localhost:3000` with hot-reloading as you edit markdown and configuration files.
This starts Astro/Starlight at `http://localhost:4321` with hot-reloading.

### Useful Commands

```bash
npm run migrate:dry # route/content migration dry run
npm run migrate # regenerate manifests, redirects, and content
npm run validate:links # internal link validation against route + redirect manifests
npm run check:route-parity
npm run check # typecheck + build + link validation + parity check
```

### Deployment

- Production and preview deployments are handled by Vercel Git integration.
- Redirects are generated into `vercel.json` by the migration script.
58 changes: 58 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';

import generatedSidebar from './src/lib/generated/sidebar.json' with { type: 'json' };
import redirectsManifest from './migration/redirects.generated.json' with { type: 'json' };

const redirectEntries = (redirectsManifest.redirects || []).map((rule) => [rule.source, rule.destination]);

const redirects = {
'/': '/docs/getting-started/welcome',
'/docs': '/docs/getting-started/welcome',
'/blog/all': '/blog',
'/changelog/all': '/changelog',
...Object.fromEntries(redirectEntries),
};

export default defineConfig({
site: 'https://docs.gopromptless.ai',
redirects,
image: {
service: {
entrypoint: 'astro/assets/services/noop',
},
},
integrations: [
starlight({
title: 'Promptless | Documentation',
description: 'Automated docs that eliminate manual overhead and keep your docs current with your codebase',
logo: {
src: './fern/docs/assets/logo.svg',
dark: './fern/docs/assets/logo_darkbg.svg',
alt: 'Promptless',
replacesTitle: true,
},
favicon: '/favicon.ico',
customCss: ['./src/styles/custom.css'],
sidebar: generatedSidebar,
components: {
Header: './src/components/starlight/Header.astro',
},
titleDelimiter: '|',
markdown: {
processedDirs: ['./src/content/blog', './src/content/changelog'],
},
editLink: {
baseUrl: 'https://github.com/Promptless/docs/tree/main',
},
}),
],
vite: {
resolve: {
alias: {
'@components': '/src/components',
'@lib': '/src/lib',
},
},
},
});
Loading
Loading