Skip to content

Commit 8c6a7e4

Browse files
committed
Revert "USE v3 DOCS AS DEFAULT"
This reverts commit cc9d9e8.
1 parent bfeb084 commit 8c6a7e4

File tree

4 files changed

+11
-18
lines changed

4 files changed

+11
-18
lines changed

docs/src/components/Navigation.astro

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

docs/src/components/VersionSelector.astro

Lines changed: 4 additions & 4 deletions
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/panels/installation/", "3.x", "panels", "installation"];
4+
let segments = Astro.url.pathname.match(/\/([0-9]*\.x)\/([a-z\-\_]*)\/([a-z\-\_]*)\/([a-z\-\_]*)/) || ["/4.x/introduction/overview/", "4.x", "introduction", "overview"];
55
let currentVersion = segments[1].replaceAll("/", "");
66
let currentSection = segments[2].replaceAll("/", "");
77
let currentPage = (segments[3] ?? null)?.replaceAll("/", "");
@@ -46,7 +46,7 @@ const versions = navigation.map((version) => {
4646
aria-label="Open version options"
4747
>
4848
<span class="hidden sm:block">Version&nbsp;</span>
49-
<span id="current-version" class="font-bold">{currentVersion} {(currentVersion === '4.x') ? 'beta' : ''}</span>
49+
<span id="current-version" class="font-bold">{currentVersion}</span>
5050
</button>
5151

5252
<div
@@ -59,7 +59,7 @@ const versions = navigation.map((version) => {
5959
{versions.map((version) => (
6060
<a
6161
href={version.href}
62-
class="flex justify-start items-center rounded-[0.5rem] py-1 px-3 w-full hover:bg-gray-100 hover:dark:bg-gray-900/40 transition duration-200"
62+
class="flex justify-center items-center rounded-[0.5rem] py-1 px-3 w-full hover:bg-gray-100 hover:dark:bg-gray-900/40 transition duration-200"
6363
class:list={[
6464
{
6565
'text-primary-500 hover:text-primary-500 hover:dark:text-primary-500': version.version === currentVersion,
@@ -70,7 +70,7 @@ const versions = navigation.map((version) => {
7070
]}
7171
>
7272
<span>Version&nbsp;</span>
73-
<span>{version.version} {(version.version === '4.x') ? 'beta' : ''}</span>
73+
<span>{version.version}</span>
7474
</a>
7575
))}
7676
</div>

docs/src/layouts/BaseLayout.astro

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
import { collectHeadings, getAllLinks } from "src/lib/helpers";
3-
import Aside from "@components/Aside.astro";
43
import Navigation from "@components/Navigation.astro";
54
import Footer from "@components/Footer.astro";
65
import Header from "@components/Header.astro";
@@ -29,7 +28,7 @@ let isHomePage = Astro.url.pathname === "/docs";
2928
3029
let tableOfContents = headings.length > 0 ? collectHeadings(headings) : [];
3130
32-
let segments = Astro.url.pathname.match(/\/([0-9]*\.x)\/([a-z\-\_]*)\/([a-z\-\_]*)/) || ["/4.x/introduction/overview/", "3.x", "panels", "installation"];
31+
let segments = Astro.url.pathname.match(/\/([0-9]*\.x)\/([a-z\-\_]*)\/([a-z\-\_]*)/) || ["/4.x/introduction/overview/", "4.x", "introduction", "overview"];
3332
3433
let currentVersion = segments[1].replaceAll("/", "");
3534
let currentPackage = segments[2].replaceAll("/", "");
@@ -171,12 +170,6 @@ const canonicalURL = new URL(Astro.url.pathname, Astro.site);
171170
</div>
172171
</div>
173172
<div class="min-w-0 max-w-2xl flex-auto px-4 py-16 lg:max-w-none lg:pr-0 lg:pl-8 xl:pl-16 xl:pr-10">
174-
{(currentVersion === '4.x') && (
175-
<Aside variant="info">
176-
Filament v4 is currently in beta and is not stable. Please report any issues you encounter on <a href="https://github.com/filamentphp/filament/issues/new" target="_blank">GitHub</a>.
177-
</Aside>
178-
)}
179-
180173
<article>
181174
{(title || section) && (
182175
<header class="mb-9 space-y-1">

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-4]+\.x')->name('api-docs');
6060

@@ -74,7 +74,7 @@
7474
$slug = trim($slug, '/');
7575

7676
if (filled($slug) && (! str_contains($slug, '.x'))) {
77-
return redirect()->route('docs', ['slug' => "3.x/{$slug}"]);
77+
return redirect()->route('docs', ['slug' => "4.x/{$slug}"]);
7878
}
7979

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

0 commit comments

Comments
 (0)