Skip to content

Commit 1029247

Browse files
authored
feat(docs): fetch docs from monorepository branches (#103)
1 parent 659cd04 commit 1029247

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+302
-8481
lines changed

.github/workflows/deploy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Deploy
22

33
on:
44
workflow_dispatch:
5+
repository_dispatch:
6+
types: [deploy]
57

68
jobs:
79
deploy:

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.tempest
22
node_modules/
33
vendor/
4+
docs-clone/
45
/public/main.css
56
/package-lock.json
67
.env
@@ -18,4 +19,4 @@ tempest-access.log
1819
vite-tempest
1920
public/build/
2021
database.sqlite
21-
database-old.sqlite
22+
database-old.sqlite

bun.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@
44
"": {
55
"dependencies": {
66
"highlight.js": "^11.11.1",
7-
"puppeteer": "24.15.0",
7+
"puppeteer": "^24.11.2",
88
},
99
"devDependencies": {
1010
"@fontsource-variable/kantumruy-pro": "^5.2.6",
1111
"@fontsource-variable/public-sans": "^5.2.6",
1212
"@tailwindcss/typography": "^0.5.16",
1313
"@tailwindcss/vite": "^4.1.11",
14-
"@vitejs/plugin-vue": "6.0.1",
15-
"@vueuse/core": "13.6.0",
14+
"@vitejs/plugin-vue": "^6.0.0",
15+
"@vueuse/core": "^13.5.0",
1616
"fuse.js": "^7.1.0",
17-
"reka-ui": "2.4.1",
17+
"reka-ui": "^2.3.2",
1818
"tailwindcss": "^4.1.11",
1919
"typescript": "^5.8.3",
2020
"vite": "^6.3.5",
2121
"vite-plugin-tempest": "^0.0.2",
22-
"vue": "3.5.18",
22+
"vue": "^3.5.17",
2323
},
2424
},
2525
},

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@
4848
"bun run build",
4949
"@php ./tempest static:generate",
5050
"@php ./tempest static:clean",
51-
"rm -rf public/build"
51+
"rm -rf public/build",
52+
"composer mago:lint"
5253
]
5354
},
5455
"minimum-stability": "dev",

deploy.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ php8.4 tempest migrate:up --force
1515
php8.4 tempest static:clean --force
1616

1717
# Build front-end
18+
php8.4 tempest docs:pull --no-interaction
1819
php8.4 tempest command-palette:index
1920
/home/forge/.bun/bin/bun run build
2021
php8.4 tempest cache:clear --force

mago.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ empty_line_after_opening_tag = false
2828
default_plugins = true
2929
plugins = ["symfony", "php-unit"]
3030

31+
# Good rule but needs some work
32+
[[linter.rules]]
33+
name = "best-practices/literal-named-argument"
34+
level = "off"
35+
# level = "error"
36+
3137
# MAINTENABILITY
3238
[[linter.rules]]
3339
name = "maintainability/too-many-enum-cases"

src/Web/Analytics/StatsController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
final readonly class StatsController
1717
{
1818
#[Get('/stats')]
19-
public function __invoke(Clock $clock): View
19+
public function __invoke(): View
2020
{
2121
$limit = 30;
2222

@@ -44,7 +44,7 @@ public function __invoke(Clock $clock): View
4444
packageDownloadsPerDay: new Chart(
4545
labels: $packageDownloadsPerDay->map(fn (PackageDownloadsPerDay $item) => $item->date->format('Y-m-d')),
4646
values: $packageDownloadsPerDay->map(fn (PackageDownloadsPerDay $item) => $item->total),
47-
min: $packageDownloadsPerDay->sortByCallback(fn (PackageDownloadsPerDay $a, PackageDownloadsPerDay $b) => $a->total)->first()->total,
47+
min: $packageDownloadsPerDay->sortByCallback(fn (PackageDownloadsPerDay $a, PackageDownloadsPerDay $_b) => $a->total)->first()->total,
4848
),
4949
);
5050
}

src/Web/Blog/BlogPost.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
use function Tempest\uri;
99

10+
/**
11+
* @mago-expect maintainability/too-many-properties
12+
*/
1013
final class BlogPost
1114
{
1215
public string $slug;

src/Web/Documentation/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
content/*

src/Web/Documentation/Chapter.php

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,22 @@ public function __construct(
2323

2424
public function getUri(): string
2525
{
26-
return uri(DocumentationController::class, version: $this->version, category: $this->category, slug: $this->slug);
26+
return uri(
27+
DocumentationController::class,
28+
version: $this->version,
29+
category: $this->category,
30+
slug: $this->slug,
31+
);
32+
}
33+
34+
public function getCanonicalUri(): string
35+
{
36+
return uri(
37+
DocumentationController::class,
38+
version: $this->version->default(),
39+
category: $this->category,
40+
slug: $this->slug,
41+
);
2742
}
2843

2944
public function getMetaUri(): string

0 commit comments

Comments
 (0)