docs: fix docs config
Some checks failed
Tests / test-deno (push) Successful in 1m35s
Tests / test-node (node18) (push) Successful in 1m47s
Tests / test-node (node22) (push) Successful in 1m45s
Tests / test-node (node20) (push) Successful in 1m47s
Tests / test-web (chromium) (push) Successful in 1m40s
Tests / test-bun (push) Successful in 1m48s
Tests / test-web (firefox) (push) Successful in 1m2s
Docs / build (push) Successful in 6m22s
Tests / lint (push) Successful in 6m24s
Tests / e2e (push) Has been cancelled
Tests / e2e-deno (push) Has been cancelled

This commit is contained in:
alina 🌸 2025-01-03 22:42:30 +03:00
parent b3790f14db
commit db9b083d35
Signed by: teidesu
SSH key fingerprint: SHA256:uNeCpw6aTSU4aIObXLvHfLkDa82HWH9EiOj9AXOIRpI
5 changed files with 26 additions and 2 deletions

View file

@ -0,0 +1,15 @@
import { DefaultTheme } from 'typedoc'
class FixedTheme extends DefaultTheme {
constructor(renderer) {
super(renderer)
this.mappings.find(it => it.directory === 'functions').directory = 'funcs'
}
}
export function load(app) {
// https://github.com/TypeStrong/typedoc/issues/2111
// https://github.com/cloudflare/workers-sdk/issues/2240
// (tldr: /functions/ is treated incorrectly on cloudflare pages)
app.renderer.themes.set('default', FixedTheme)
}

View file

@ -24,9 +24,12 @@ jobs:
touch docs/.nojekyll
echo "ref.mtcute.dev" > docs/CNAME
echo "ignore-workspace-root-check=true" >> .npmrc
curl -O https://gist.githubusercontent.com/j0nl1/7f9b5210c9e6ecbabe322baa16dcb5db/raw/760de77327bf83671cfb6bd4e64181299ba26113/typedoc-fix-cf.mjs
node typedoc-fix-cf.mjs docs
- name: Deploy
# do not run on forks and releases
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && github.actor == 'desu-bot'
# if: github.event_name == 'push' && github.ref == 'refs/heads/master' && github.actor == 'desu-bot'
uses: https://github.com/cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_PAGES_TOKEN }}

View file

@ -63,7 +63,9 @@ export default {
plugin: [
'./.config/typedoc/plugin-external-links.js',
'./.config/typedoc/plugin-umami.js',
'./.config/typedoc/plugin-fix-cfpages.js',
],
gitRemote: 'https://github.com/mtcute/mtcute',
},
viteConfig: '.config/vite.build.ts',
}

View file

@ -46,9 +46,9 @@
"@antfu/eslint-config": "^3.11.2",
"@fuman/build": "https://pkg.pr.new/teidesu/fuman/@fuman/build@c0e740b",
"@fuman/utils": "0.0.4",
"@types/bun": "1.1.14",
"@types/deno": "npm:@teidesu/deno-types@1.46.3",
"@types/node": "20.10.0",
"@types/bun": "1.1.14",
"@types/ws": "8.5.4",
"@vitest/browser": "2.0.5",
"@vitest/coverage-v8": "2.0.5",
@ -66,6 +66,7 @@
"rimraf": "6.0.1",
"rollup-plugin-node-externals": "7.1.3",
"semver": "7.5.1",
"tinyglobby": "^0.2.10",
"tsx": "4.17.0",
"typedoc": "0.27.6",
"typescript": "5.5.4",

View file

@ -80,6 +80,9 @@ importers:
semver:
specifier: 7.5.1
version: 7.5.1
tinyglobby:
specifier: ^0.2.10
version: 0.2.10
tsx:
specifier: 4.17.0
version: 4.17.0