Skip to content

Commit ff5ff68

Browse files
committed
v4 docs
1 parent abb15ce commit ff5ff68

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

docs/bin/checkout-latest-filament

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ DOCS_VERSIONS=(
44
1.x
55
2.x
66
3.x
7+
4.x
78
)
89

910
for v in "${DOCS_VERSIONS[@]}"; do

docs/src/components/Navigation.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
import { Icon } from 'astro-icon/components';
33
44
let segments = Astro.url.pathname.match(/\/([0-9]*\.x)\/([a-z\-\_]*)\//) || [
5-
'/3.x/quickstart/',
6-
'3.x',
5+
'/4.x/quickstart/',
6+
'4.x',
77
'quickstart',
88
]
99

docs/src/components/VersionSelector.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
import navigation from '../navigation.json'
33
4-
let segments = Astro.url.pathname.match(/\/([0-9]*\.x)\/([a-z\-\_]*)\/([a-z\-\_]*)\/([a-z\-\_]*)/) || ["/3.x/quickstart/", "3.x", "quickstart"];
4+
let segments = Astro.url.pathname.match(/\/([0-9]*\.x)\/([a-z\-\_]*)\/([a-z\-\_]*)\/([a-z\-\_]*)/) || ["/4.x/quickstart/", "4.x", "quickstart"];
55
let currentVersion = segments[1].replaceAll("/", "");
66
let currentSection = segments[2].replaceAll("/", "");
77
let currentPage = (segments[3] ?? null)?.replaceAll("/", "");

docs/src/layouts/BaseLayout.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ let isHomePage = Astro.url.pathname === "/docs";
2828
2929
let tableOfContents = headings.length > 0 ? collectHeadings(headings) : [];
3030
31-
let segments = Astro.url.pathname.match(/\/([0-9]*\.x)\/([a-z\-\_]*)\/([a-z\-\_]*)/) || ["/3.x/quickstart/", "3.x", "quickstart", ""];
31+
let segments = Astro.url.pathname.match(/\/([0-9]*\.x)\/([a-z\-\_]*)\/([a-z\-\_]*)/) || ["/4.x/quickstart/", "4.x", "quickstart", ""];
3232
3333
let currentVersion = segments[1].replaceAll("/", "");
3434
let currentPackage = segments[2].replaceAll("/", "");

routes/web.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454

5555
Route::redirect('/discord', 'https://discord.gg/filament')->name('discord');
5656

57-
Route::get('/api/{version?}', function (string $version = '3.x'): RedirectResponse {
57+
Route::get('/api/{version?}', function (string $version = '4.x'): RedirectResponse {
5858
return redirect('/api/' . $version . '/index.html');
5959
})->where('version', '[1-3]+\.x')->name('api-docs');
6060

@@ -91,7 +91,7 @@
9191
$slug = trim($slug, '/');
9292

9393
if (filled($slug) && (! str_contains($slug, '.x'))) {
94-
return redirect()->route('docs', ['slug' => "3.x/{$slug}"]);
94+
return redirect()->route('docs', ['slug' => "4.x/{$slug}"]);
9595
}
9696

9797
$filePath = base_path("docs/preserved-dist/{$slug}/index.html");

0 commit comments

Comments
 (0)