Skip to content

Commit d6f8583

Browse files
committed
Merge branch '4.x' into 4.x-stable
2 parents 8c6a7e4 + 249dff7 commit d6f8583

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

docs/src/layouts/BaseLayout.astro

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ let nextPage = allLinks[linkIndex + 1]
4545
let section = packageNavigation.links?.find((item) => item.slug === currentSection) ?? null;
4646
4747
pageTitle = pageTitle ?? buildTitle(title, packageNavigation);
48-
const canonicalURL = new URL(Astro.url.pathname, Astro.site);
48+
const canonicalURL = (currentVersion !== '4.x') ? new URL('docs/4.x', Astro.site) : new URL(Astro.url.pathname, Astro.site);
4949
---
5050

5151
<!DOCTYPE html>
@@ -170,6 +170,14 @@ const canonicalURL = new URL(Astro.url.pathname, Astro.site);
170170
</div>
171171
</div>
172172
<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">
173+
{(currentVersion !== '4.x') && (
174+
<Aside variant="warning">
175+
<p><span class="font-medium">You are currently viewing the documentation for Filament {currentVersion}</span>, which is a previous version of Filament.</p>
176+
177+
<p class="pt-3">Looking for the current stable version? Visit the <a href="/docs/4.x" class="font-medium underline">4.x documentation</a>.</p>
178+
</Aside>
179+
)}
180+
173181
<article>
174182
{(title || section) && (
175183
<header class="mb-9 space-y-1">

0 commit comments

Comments
 (0)