Skip to content
Open
Show file tree
Hide file tree
Changes from 56 commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
2afb7e9
docs: new docs framework
Apr 24, 2026
fda1c7e
feat(docs): expressive-code custom plugins
jktrn-osec Apr 24, 2026
e813bf3
chore: sync
jktrn-osec Apr 24, 2026
b8b9cea
chore: sync
jktrn-osec Apr 24, 2026
91e21d2
chore: sync
jktrn-osec Apr 24, 2026
4f302e6
chore: sync
jktrn-osec Apr 27, 2026
2447ac5
chore: sync
jktrn-osec Apr 28, 2026
564afe5
chore: sync
jktrn-osec Apr 28, 2026
b7880ac
chore: sync
jktrn-osec Apr 28, 2026
10ea626
feat: title and description markdown rendering for inline code
jktrn-osec Apr 28, 2026
79192ed
chore: sync
jktrn-osec Apr 29, 2026
c4b5174
chore: sync
jktrn-osec Apr 29, 2026
449448e
chore: sync
jktrn-osec Apr 29, 2026
38fe3b3
chore(docs): changelog
jktrn-osec Apr 29, 2026
cb777b2
Merge remote-tracking branch 'upstream/anchor-next' into enscribe/v2-…
jktrn-osec Apr 29, 2026
8c432ef
chore: sync
jktrn-osec Apr 29, 2026
e5823d0
feat(docs): complete references conversions
jktrn-osec Apr 29, 2026
658f5e4
feat(docs): tokens conversion
jktrn-osec Apr 29, 2026
eb8ccba
fix(docs): base url as `/docs`
jktrn-osec Apr 29, 2026
a78b8e7
chore(docs): add trailing slashes
jktrn-osec Apr 29, 2026
3df5eec
feat(docs): v2 docs
jktrn-osec Apr 29, 2026
6a2a778
ci(docs-v2): add Vercel staging deployment
jktrn-osec Apr 29, 2026
d420696
ci(docs-v2): add Node 22 to deploy workflow
jktrn-osec Apr 29, 2026
6a6e1b5
chore(docs-v2): replace template favicons with Anchor branding
jktrn-osec Apr 29, 2026
f1e63bd
fix(docs-v2): move prose to @layer utilities so prod build keeps the …
jktrn-osec Apr 29, 2026
cdb7d3a
chore(docs): soften language
jktrn-osec Apr 29, 2026
e226059
fix(docs-v2): make view transitions actually animate
jktrn-osec Apr 29, 2026
16c3119
chore: adjust errors
jktrn-osec Apr 29, 2026
1a8c53e
fix(docs-v2): use plus-lighter blend for view-transition cross-fade
jktrn-osec Apr 30, 2026
5eae710
Revert "fix(docs-v2): use plus-lighter blend for view-transition cros…
jktrn-osec Apr 30, 2026
0af92e4
Revert "fix(docs-v2): make view transitions actually animate"
jktrn-osec Apr 30, 2026
3146f38
chore(docs): v2 nits
jktrn-osec Apr 30, 2026
301192a
feat(docs): icons & favicons
jktrn-osec Apr 30, 2026
814248b
feat(docs): local icons, reduce nested padding
jktrn-osec Apr 30, 2026
3020d6d
fix(docs): fix wordiness
jktrn-osec Apr 30, 2026
941b37d
feat(docs): use cooler callout components
jktrn-osec Apr 30, 2026
7dc2b6e
fix(docs): actually serve fonts
jktrn-osec Apr 30, 2026
c8bed43
refactor(docs): clean typography css
jktrn-osec Apr 30, 2026
b059c31
refactor(docs): more readable small utility
jktrn-osec Apr 30, 2026
53a7d32
fix(docs): clean up old splash
jktrn-osec Apr 30, 2026
307352c
Merge remote-tracking branch 'upstream/anchor-next' into enscribe/v2-…
jktrn-osec Apr 30, 2026
ff6cff4
docs: restructure v1 docs
jktrn-osec May 1, 2026
19e5a5d
feat(docs): v2 docs
jktrn-osec May 1, 2026
4b79cdd
fix(docs): improve language
jktrn-osec May 1, 2026
8fb3072
fix(docs): improve language
jktrn-osec May 1, 2026
cb4b536
feat(docs): landing wip, homer graphics
jktrn-osec May 2, 2026
17edd4b
feat(docs): landing
jktrn-osec May 3, 2026
da52ceb
refactor(docs): cleanup
jktrn-osec May 3, 2026
ea486b9
feat(docs): rotating banner
jktrn-osec May 3, 2026
48ea5f9
fix(docs): better copy
jktrn-osec May 3, 2026
bff6e7e
chore(docs): revert crossfade
jktrn-osec May 3, 2026
f4b293b
feat(docs): og image generation
jktrn-osec May 3, 2026
4c28225
chore(docs): vercel site resolution
jktrn-osec May 3, 2026
20bfdd9
fix(docs): increase padding in og image
jktrn-osec May 4, 2026
b99c255
perf(docs): serve as webp
jktrn-osec May 4, 2026
2ca0984
refactor(docs): nits
jktrn-osec May 4, 2026
26a4b69
Merge remote-tracking branch 'upstream/anchor-next' into enscribe/v2-…
jktrn-osec May 20, 2026
663a875
feat(docs): rework
jktrn-osec May 21, 2026
cc57ffa
fix(docs): restore rotating banner
jktrn-osec May 21, 2026
46501ad
fix(docs): disable scroll-mt behavior for root of scroll group
jktrn-osec May 21, 2026
5394912
fix(docs): remove ansi, use tones, add file/dir markers
jktrn-osec May 21, 2026
8eefb4a
feat(docs): v1.0.2 changelog, sync with master
jktrn-osec May 21, 2026
e8d2679
chore: sync
jktrn-osec May 21, 2026
9712c1a
chore: cleanup
jktrn-osec May 21, 2026
28c6f5f
chore(docs): address feedback
jktrn-osec May 21, 2026
14bfd64
feat(docs): better readme
jktrn-osec May 21, 2026
9c656e3
fix(docs): better form factor for v1.0.2 docs
jktrn-osec May 21, 2026
ec15568
chore(docs): address feedback
jktrn-osec May 22, 2026
bfbe21b
chore: lint
jktrn-osec May 22, 2026
281c193
feat(docs): table scroll area
jktrn-osec May 22, 2026
cbf7a5c
fix(docs): humanize
jktrn-osec May 22, 2026
e8740be
fix(docs): digestability
jktrn-osec May 22, 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
  •  
  •  
  •  
71 changes: 71 additions & 0 deletions .github/workflows/deploy-docs-v2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Deploy docs-v2 (staging)

on:
push:
branches: [enscribe/v2-docs]
Comment thread
jktrn-osec marked this conversation as resolved.
Outdated
paths:
- 'docs-v2/**'
- '.github/workflows/deploy-docs-v2.yaml'
workflow_dispatch:

concurrency:
group: deploy-docs-v2
cancel-in-progress: true

env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}

jobs:
deploy:
name: Build and deploy to Vercel
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs-v2
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 22

- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: latest

- name: Install Vercel CLI
run: bun install -g vercel@latest

- name: Pull Vercel environment
run: vercel pull --yes --environment=production --token="$VERCEL_TOKEN"
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}

- name: Build with Vercel
run: vercel build --prod --token="$VERCEL_TOKEN"
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}

- name: Deploy to Vercel (production)
id: deploy
shell: bash
run: |
set -euo pipefail
url=$(vercel deploy --prebuilt --prod --token="$VERCEL_TOKEN")
echo "url=$url" >> "$GITHUB_OUTPUT"
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}

- name: Write summary
shell: bash
run: |
set -euo pipefail
{
echo "## Staging deployment"
echo ""
echo "- Commit deploy URL: ${{ steps.deploy.outputs.url }}"
echo "- Stable staging URL: https://anchor-docs-staging.vercel.app/docs/"
} >> "$GITHUB_STEP_SUMMARY"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ docker-target
test-keypair.json
tsconfig.tsbuildinfo
.vscode
*.stackdump
CODEX_NOTES.md
1 change: 1 addition & 0 deletions docs-v2/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.mdx linguist-vendored
14 changes: 14 additions & 0 deletions docs-v2/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
dist/
.astro/
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
.env
.env.production
.DS_Store
.idea/
teaser.pptx
~$teaser.pptx
.vercel
13 changes: 13 additions & 0 deletions docs-v2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<div align="center">

## astro-erudocs

</div>

astro-erudocs is an opinionated, unstyled documentation framework built with [Astro](https://astro.build/), [Tailwind](https://tailwindcss.com/), and [shadcn/ui](https://ui.shadcn.com/). It is a sister project to [astro-erudite](https://github.com/jktrn/astro-erudite), inheriting its design system and technical-content tooling (Expressive Code, KaTeX, callouts, OKLCh tokens, view transitions) and re-shaping them around docs-native primitives: hierarchical sidebar, static search, prev/next navigation, and MDX components for steps, tabs, file trees, and cards.

> [!WARNING] This repository is in active early development. The public API and file layout will change.

## License

MIT. See [LICENSE](LICENSE).
152 changes: 152 additions & 0 deletions docs-v2/astro.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
import { defineConfig } from 'astro/config'

import mdx from '@astrojs/mdx'
import react from '@astrojs/react'
import sitemap from '@astrojs/sitemap'
import pagefind from 'astro-pagefind'

import { rehypeHeadingIds } from '@astrojs/markdown-remark'
import rehypeAutolinkHeadings from 'rehype-autolink-headings'
import rehypeExpressiveCode from 'rehype-expressive-code'
import rehypeExternalLinks from 'rehype-external-links'
import rehypeKatex from 'rehype-katex'
import rehypeShiki from '@shikijs/rehype'
import remarkEmoji from 'remark-emoji'
import remarkMath from 'remark-math'

import { rehypeInlineShellCmd } from './src/lib/rehype-inline-shell-cmd'
import { rehypeInlinePathIcon } from './src/lib/rehype-inline-path-icon'
import { rehypeWrapTables } from './src/lib/rehype-wrap-tables'
import { ecOptions } from './src/lib/ec-config'
import { latte, mocha } from './src/lib/shiki-themes'
import { resolveSiteUrl } from './src/lib/site-url'

import tailwindcss from '@tailwindcss/vite'
import { extname, isAbsolute, relative, resolve } from 'node:path'
import { readFile } from 'node:fs/promises'

type DevMiddleware = (
req: { url?: string },
res: { setHeader(name: string, value: string): void; end(data: Uint8Array): void },
next: () => void,
) => void | Promise<void>

type DevServer = {
middlewares: {
use(path: string, handler: DevMiddleware): void
}
}

const DOCS_BASE = '/docs'
const PAGEFIND_DIST_DIR = resolve(process.cwd(), 'dist', 'docs', 'pagefind')

function pagefindDevServer() {
const mime: Record<string, string> = {
js: 'application/javascript',
mjs: 'application/javascript',
css: 'text/css',
json: 'application/json',
wasm: 'application/wasm',
}

return {
name: 'pagefind-dev-server',
enforce: 'pre' as const,
apply: 'serve' as const,
configureServer(server: DevServer) {
server.middlewares.use('/pagefind', async (req, res, next) => {
const filePath = resolvePagefindAsset(req.url ?? '/')
if (!filePath) return next()

try {
const data = await readFile(filePath)
const ext = extname(filePath).slice(1)
if (mime[ext]) res.setHeader('Content-Type', mime[ext])
res.end(data)
} catch {
next()
}
})
},
}
}

function resolvePagefindAsset(url: string): string | null {
let pathname: string
try {
pathname = decodeURIComponent(url.split('?')[0] ?? '/')
} catch {
return null
}

if (!pathname || pathname === '/') return null

const filePath = resolve(PAGEFIND_DIST_DIR, `.${pathname}`)
const relativePath = relative(PAGEFIND_DIST_DIR, filePath)

if (relativePath.startsWith('..') || isAbsolute(relativePath)) return null

return filePath
}

export default defineConfig({
site: resolveSiteUrl(),
base: DOCS_BASE,
trailingSlash: 'always',
outDir: './dist/docs',
integrations: [mdx(), react(), sitemap(), pagefind()],
vite: {
plugins: [tailwindcss(), pagefindDevServer()],
},
server: {
port: 4321,
host: true,
},
devToolbar: {
enabled: false,
},
markdown: {
syntaxHighlight: false,
rehypePlugins: [
[
rehypeExternalLinks,
{
target: '_blank',
rel: ['nofollow', 'noreferrer', 'noopener'],
},
],
rehypeWrapTables,
rehypeKatex,
[rehypeExpressiveCode, { themes: [latte, mocha], ...ecOptions }],
[
rehypeShiki,
{
themes: { light: latte, dark: mocha },
inline: 'tailing-curly-colon',
},
],
rehypeInlineShellCmd,
rehypeInlinePathIcon,
rehypeHeadingIds,
[
rehypeAutolinkHeadings,
{
behavior: 'append',
properties: {
className: ['heading-anchor'],
'aria-label': 'Link to section',
tabindex: -1,
'data-pagefind-ignore': '',
},
content: {
type: 'text',
value: '#',
},
test: (node: { tagName: string }) =>
['h2', 'h3', 'h4', 'h5', 'h6'].includes(node.tagName),
},
],
],
remarkPlugins: [remarkMath, remarkEmoji],
},
})
Loading