Skip to content

Commit d069931

Browse files
committed
fix(web): add rel=external to docs links to bypass SPA router
Leptos Router intercepts all <a> clicks for client-side navigation. Docs links point to a static mdBook site outside the SPA, so the router finds no matching route and renders NotFound. Adding rel="external" tells the router to skip interception.
1 parent 2e57df7 commit d069931

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

crates/tabula-web/src/layout/nav.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ pub fn SiteNav() -> impl IntoView {
7171
"tabula"
7272
</A>
7373
<div class="nav-links">
74-
<a href=docs_href() class="nav-link">"Docs"</a>
74+
<a href=docs_href() rel="external" class="nav-link">"Docs"</a>
7575
<A href=app_href("/playground") attr:class="nav-link">"Playground"</A>
7676
<button class="nav-theme-btn" on:click=toggle title="Toggle theme">
7777
{move || if is_dark.get() { "\u{2600}" } else { "\u{263E}" }}

crates/tabula-web/src/pages/home/footer_cta.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub fn FooterCta() -> impl IntoView {
1818
</div>
1919
<div class="cta-links">
2020
<A href=app_href("/playground") attr:class="action filled">"Playground"</A>
21-
<a href=docs_href() class="action ghost">"Documentation"</a>
21+
<a href=docs_href() rel="external" class="action ghost">"Documentation"</a>
2222
</div>
2323
</section>
2424
}

crates/tabula-web/src/pages/home/hero.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub fn HeroSection() -> impl IntoView {
1616
</p>
1717
<div class="hero-cta">
1818
<A href=app_href("/playground") attr:class="action filled">"Playground"</A>
19-
<a href=docs_href() class="action ghost">"Documentation"</a>
19+
<a href=docs_href() rel="external" class="action ghost">"Documentation"</a>
2020
</div>
2121
</section>
2222
}

crates/tabula-web/src/pages/home/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ pub fn HomePage() -> impl IntoView {
7171
<span class="paper-toc-dots" />
7272
<span class="paper-toc-desc">"Try the DSL and prover"</span>
7373
</A>
74-
<a href=docs_href() class="paper-toc-entry">
74+
<a href=docs_href() rel="external" class="paper-toc-entry">
7575
<span class="paper-toc-num">"2."</span>
7676
<span class="paper-toc-label">"Documentation"</span>
7777
<span class="paper-toc-dots" />

0 commit comments

Comments
 (0)