Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
8554df8
feat: move pelican.dev to Next.js + Fumadocs with the V12 redesign
alexevladgabriel Nov 2, 2026
d24c5e5
feat: SEO, AI-readable docs, OG images and the /eggs browser
alexevladgabriel Nov 2, 2026
ef9cac4
fix: share images point at the deploy's own URL on Netlify previews
alexevladgabriel Nov 2, 2026
09b48c7
feat: redesigned OG images
alexevladgabriel Nov 2, 2026
e489193
feat: dark theme for the landing pages
alexevladgabriel Nov 2, 2026
343dcb1
fix: nothing moves when switching theme or loading the docs diagram
alexevladgabriel Nov 2, 2026
a98f3db
feat: homepage round from Lance's review
alexevladgabriel Nov 3, 2026
9319089
Merge branch 'main' into feat/fumadocs-next
notAreYouScared Nov 3, 2026
050a636
fix: docs callouts written without blank lines render as callouts
alexevladgabriel Nov 3, 2026
7d5c4b6
Merge main into feat/fumadocs-next
alexevladgabriel Nov 14, 2026
1274c25
build: install and run the docs with Bun instead of pnpm
alexevladgabriel Nov 15, 2026
f580ddb
Serve the docs under /docs, with the rest of pelican.dev on the Hub (…
alexevladgabriel Nov 15, 2026
8b672b8
ci(preview): build the hub-preview docs from feat/fumadocs-next
alexevladgabriel Nov 15, 2026
1e6aafa
fix(netlify): send the old /blog address to the homepage for now
alexevladgabriel Nov 15, 2026
d2d9303
feat(publish): pack the docs for the Hub to serve on pelican.dev from…
alexevladgabriel Nov 15, 2026
b6c60f4
refactor(publish): run the docs packing on Bun, with simpler code
alexevladgabriel Nov 15, 2026
a35e5f1
chore(scripts): one way to write, run and test every script
alexevladgabriel Nov 15, 2026
06d25cd
refactor(scripts): one list of served paths, testable scripts, and th…
alexevladgabriel Nov 15, 2026
323a25e
fix(router): keep a Hub redirect to its own //host path on the site; …
alexevladgabriel Nov 15, 2026
276fd6a
feat(docs): the Hub's look, Copy for AI, and a guide to installing wi…
alexevladgabriel Nov 15, 2026
d0e3107
fix(install): Docker on AlmaLinux, Rocky and Oracle Linux, and the ke…
alexevladgabriel Nov 16, 2026
4fb10ce
fix(docs): working links, better search and AI answers, keyboard and …
alexevladgabriel Nov 19, 2026
2113c0b
feat: take the Pelican Panel version from GitHub at build time (#244)
alexevladgabriel Nov 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
51 changes: 39 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,54 @@ name: 'Build'
on:
workflow_dispatch:
workflow_call:
pull_request:
push:
branches:
- 'main'

jobs:
deploy:
name: 'Deploy'
build:
name: 'Build'
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
# The whole history: each page's "Last updated", sitemap date and JSON-LD dates come
# from git (lastModified in source.config.ts). A shallow clone gives every page the same date.
fetch-depth: 0

# Bun installs and runs the scripts; Next.js itself still builds on Node.
- name: 'Setup Bun'
uses: oven-sh/setup-bun@v2
with:
bun-version-file: package.json

- name: 'Setup Node'
uses: actions/setup-node@v4
uses: actions/setup-node@v7
with:
node-version: 20
- uses: pnpm/action-setup@v3
name: Install pnpm
node-version: 22

- name: 'Cache Bun packages'
uses: actions/cache@v6
with:
version: 10
run_install: true # pnpm will install dependencies recursively.
path: ~/.bun/install/cache
key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }}
restore-keys: bun-${{ runner.os }}-

- name: 'Install dependencies'
run: bun install --frozen-lockfile

- name: 'Check content (MDX that could run code)'
run: bun run check:content

- name: 'Test the scripts (bun test)'
run: bun test

- name: 'Typecheck'
run: bun run typecheck

- name: 'Build'
run: |
pnpm build
# prebuild runs check:content again (Netlify builds run it there);
# postbuild runs check:paths and check:links on out/.
- name: 'Build'
run: bun run build
106 changes: 106 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Publishes the built docs for the Pelican Hub, which serves them on pelican.dev from Forge:
# /docs/* and the root files (/update-panel.sh, /llms.txt, ...). scripts/pack-docs.mjs packs
# out/ into the folder the Hub installs (App\Services\Site\DocsBuildService): the /docs files,
# _next/, _root/ with the root files, 404.html, redirects.json (netlify.toml's /docs redirects)
# and BUILD.json naming the commit. It goes to a branch the Hub downloads:
#
# main -> docs-build (pelican.dev, production)
# feat/fumadocs-next -> preview/docs-under-docs (hub-preview.pelican.dev)
#
# The last step asks that Hub to install it right away; it also checks every 10 minutes.
name: 'Publish docs build'
on:
workflow_dispatch:
push:
branches:
- 'main'
- 'feat/fumadocs-next'
# Daily, so a new Panel release (scripts/sync-release.mjs) reaches pelican.dev without a push.
# GitHub runs schedules from main only, so this rebuilds pelican.dev, like a push to main.
schedule:
- cron: '23 5 * * *'

concurrency:
group: publish-docs-${{ github.ref_name }}
cancel-in-progress: true

permissions:
contents: write

jobs:
publish:
name: 'Build and publish /docs for the Hub'
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v7
with:
# The whole history: each page's "Last updated", sitemap date and JSON-LD dates come
# from git (lastModified in source.config.ts). A shallow clone gives every page the same date.
fetch-depth: 0

- name: 'Setup Bun'
uses: oven-sh/setup-bun@v2
with:
bun-version-file: package.json

- name: 'Setup Node'
uses: actions/setup-node@v7
with:
node-version: 22

- name: 'Cache Bun packages'
uses: actions/cache@v6
with:
path: ~/.bun/install/cache
key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }}
restore-keys: bun-${{ runner.os }}-

- name: 'Install dependencies'
run: bun install --frozen-lockfile

# Nothing is published that fails the tests or the typecheck (build.yml runs the same).
- name: 'Test the scripts (bun test)'
run: bun test

- name: 'Typecheck'
run: bun run typecheck

# prebuild checks the content, postbuild checks every file lands where it should and every link works.
- name: 'Build'
env:
# sync-release reads the latest Panel release with it (a higher rate limit).
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: bun run build

- name: 'Pack the docs for the Hub'
run: bun run pack:docs dist-docs

- name: 'Pick the target'
id: target
run: |
if [ "$GITHUB_REF_NAME" = "main" ]; then
echo "branch=docs-build" >> "$GITHUB_OUTPUT"
echo "refresh=https://pelican.dev/docs/_refresh" >> "$GITHUB_OUTPUT"
else
echo "branch=preview/docs-under-docs" >> "$GITHUB_OUTPUT"
echo "refresh=https://hub-preview.pelican.dev/docs/_refresh" >> "$GITHUB_OUTPUT"
fi

- name: 'Publish to ${{ steps.target.outputs.branch }}'
working-directory: dist-docs
env:
GH_TOKEN: ${{ github.token }}
TARGET: ${{ steps.target.outputs.branch }}
run: |
git init -q -b docs-build
git config user.name 'github-actions[bot]'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
git add -A
git commit -q -m "Docs build of ${GITHUB_SHA::10} (${GITHUB_REF_NAME})"
git push -q -f "https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "HEAD:refs/heads/${TARGET}"

# Not fatal: the Hub also checks on its own every 10 minutes and on the first visit. Until
# the Hub serves pelican.dev, the production refresh reaches Netlify and fails harmlessly.
- name: 'Ask the Hub to install it'
run: curl -fsS --max-time 60 "${{ steps.target.outputs.refresh }}" || echo "The Hub will pick it up on its next check."
17 changes: 13 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# Dependencies
/node_modules

# Production
/build
# Production (static export)
/out

# Generated files
.docusaurus
.cache-loader
/.next
/.source
next-env.d.ts
*.tsbuildinfo
.netlify

# Misc
.DS_Store
Expand All @@ -22,3 +25,9 @@ yarn-error.log*
/.idea

package-lock.json

# design skill working files
.taste-skill

# scripts/pack-docs.mjs
/dist-docs
29 changes: 29 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!-- BEGIN:nextjs-agent-rules -->

## This is NOT the Next.js you know

This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` (resolved from this file's directory; in monorepos the `next` package may not be visible from the repo root) before writing any code. Heed deprecation notices.

This block is written and re-added by `next dev` — verify at `node_modules/next/dist/server/lib/generate-agent-files.js`. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean.

<!-- END:nextjs-agent-rules -->

## Scripts and checks

- Everything runs with Bun: `bun install`, `bun run <script>`. Next.js builds on Node 22.
- Scripts live in `scripts/` and `router/`. Each one starts with a header saying what it does,
`When:` it runs, how to `Run:` it, and where its `Tests:` are. `scripts/README.md` lists them
all, with the rules a new script follows.
- Tests are `<name>.test.mjs` files next to the code, written with `bun:test`. Run them all with
`bun test`.
- Before opening a pull request: `bun test`, `bun run typecheck`, `bun run build`. The build
checks the pages before it (`check:content`), refreshes the egg data (`sync:eggs`, which uses
the network and rewrites `data/eggs.json`, `public/data/eggs/`, `public/img/eggs/`, `public/img/games/`: don't
commit those unless the task is about eggs), reads the latest Panel release from GitHub (`sync:release`,
which rewrites `data/release.json`: never commit it; on failure the build uses `lib/home-data.ts`'s typed
values), and checks the paths and the links after it (`check:paths`, `check:links`).
- The paths this build serves on pelican.dev are in one file, `router/paths.mjs`. Change them
there, and in the Hub's `DocsBuildService::ROOT_FILES` for the root files.
- A new MDX component goes in `mdx-components.tsx` and in `COMPONENTS` in
`scripts/check-content.mjs`; a test fails if the two lists differ.
- How pelican.dev is served (the Hub on Forge, the docs under /docs) is in `router/README.md`.
110 changes: 104 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,111 @@

The source for the documentation at [pelican.dev/docs](https://pelican.dev/docs), covering [Pelican Panel](https://github.com/pelican/panel) and [Wings](https://github.com/pelican/wings).

Pelican docs are created with [Docusaurus](https://docusaurus.io).
Built with [Next.js](https://nextjs.org) and [Fumadocs](https://fumadocs.dev) as a static site. Today Netlify serves pelican.dev; after the switch the Pelican Hub serves these docs under /docs from Forge (decided, not done yet: see [router/README.md](router/README.md)). Netlify builds a preview for every pull request.

## Building
## Running it locally

To test changes locally install the dependencies and run the server using pnpm.
You need Node.js 22 or newer (Next.js builds on Node) and [Bun](https://bun.com) 1.3 or newer (installs and runs the scripts).

```shell
pnpm i
pnpm run start
```sh
bun install
bun run dev # http://localhost:3000, reloads as you edit
bun run build # the production site, written to out/ (checks the pages first, the paths and links after)
bun test # the tests for scripts/ and router/
```

Every script in `scripts/` and `router/` runs on Bun and starts with the same header: what it does, when it runs, how to run it and where its tests are. [scripts/README.md](scripts/README.md) lists them all.

The build refreshes the egg data for the interim `/eggs` page (it uses the network), so it can change `data/eggs.json`, `public/data/eggs/`, `public/img/eggs/` and `public/img/games/`. Leave those out of a pull request unless it's about the egg data. It also writes the latest Panel release from GitHub into `data/release.json`; leave that out too (`git restore data`).

### Before a pull request

```sh
bun test && bun run typecheck && bun run build
```

## Where things are

| Path | What it is |
| --- | --- |
| `content/docs/` | The documentation. One `.mdx` file per page; the URL follows the folder. |
| `content/docs/**/meta.json` | Sidebar order and section names for that folder. |
| `content/pages/` | Stand-alone pages: `/support` and `/faq`. |
| `app/(home)/page.tsx` | The homepage. |
| `public/` | Files served as they are, including the `install.sh`, `update-panel.sh` and `migrate-*.sh` scripts (`install.sh` is tested in `scripts/install-sh.test.mjs`). |
| `netlify.toml` | Build settings and redirects such as `/discord`. |
| `ui/` | Design tokens (`tokens.css`) and site nav (`nav.json`) shared with the Hub; published at `/docs/ui/v1/`. |
| `scripts/` | The build's checks, the egg data sync and the packing for the Hub. Listed in [scripts/README.md](scripts/README.md). |
| `router/` | How pelican.dev is served: `dev-server.mjs` (one site on your machine) and `worker.mjs` (the Cloudflare option for later). See its README. |

## Writing a page

Create `content/docs/<section>/<name>.mdx` and add `<name>` to that folder's `meta.json`
so it shows up in the sidebar.

```mdx
---
title: Installing Wings
description: One sentence shown under the title and in search results.
---

Your content, in Markdown.
```

The title goes in the frontmatter, not as a `# Heading`.

### Callouts

```mdx
:::tip
Short tips work like this.
:::

<Admonition type="warning" title="Back up first">
Or like this, when you want a title. Types: note, info, tip, warning, danger.
</Admonition>
```

### Tabs

```mdx
<Tabs groupId="webserver">
<TabItem value="nginx" label="NGINX" default>…</TabItem>
<TabItem value="apache" label="Apache">…</TabItem>
<TabItem value="caddy" label="Caddy">…</TabItem>
</Tabs>
```

Tabs with the same `groupId` switch together on every page and remember the reader's choice.
Use `groupId="webserver"` with the values `nginx`, `apache` and `caddy`, and `groupId="ssl"`
with `https` and `http`, so they also follow the reader's setup (below).

### Code blocks

````mdx
```nginx title="/etc/nginx/sites-available/pelican.conf" {3,5}
````

`title` shows a file name above the block and `{3,5}` highlights lines 3 and 5.

### Filling in the reader's setup

Put a setup box on a page:

```mdx
<SetupPanel fields={['domain', 'webserver', 'ssl', 'php', 'path']} />
```

Then add `setup` to any code block that should use the reader's values:

````mdx
```nginx setup title="/etc/nginx/sites-available/pelican.conf"
server_name <domain>;
root /var/www/pelican/public;
fastcgi_pass unix:/run/php/php8.5-fpm.sock;
```
````

In blocks marked `setup`, `<domain>`, `/var/www/pelican` and the version in `php8.5` are replaced
with what the reader entered. Their choices are saved in their browser, so other pages pick them up too.
Blocks without `setup` are never changed.
Loading