@@ -89,13 +89,24 @@ def handle_submit(self, form_data: dict):
8989 pass
9090
9191
92- def footer_link (text : str , href : str ):
93- return rx .link (
94- text ,
95- class_name = "font-small text-secondary-9 hover:!text-secondary-11 transition-color" ,
96- href = href ,
97- underline = "none" ,
92+ def footer_link (text : str , href : str , * , root_site : bool = False ) -> rx .Component :
93+ """Create a footer link, optionally bypassing the docs router basename.
94+
95+ Args:
96+ text: The visible link label.
97+ href: The link destination.
98+ root_site: Whether the destination is outside the docs router basename.
99+
100+ Returns:
101+ The styled footer link.
102+ """
103+ class_name = (
104+ "font-small text-secondary-9 hover:!text-secondary-11 "
105+ "transition-color no-underline"
98106 )
107+ if root_site :
108+ return rx .el .elements .a (text , href = href , class_name = class_name )
109+ return rx .link (text , href = href , class_name = class_name , underline = "none" )
99110
100111
101112def footer_link_flex (heading : str , links ):
@@ -360,7 +371,7 @@ def docpage_footer(path: rx.Var[str]) -> rx.Component:
360371 "Links" ,
361372 [
362373 footer_link ("Home" , "/" ),
363- footer_link ("Blog" , "/blog" ),
374+ footer_link ("Blog" , "/blog/" , root_site = True ),
364375 footer_link ("Changelog" , "/changelog/" ),
365376 ],
366377 ),
@@ -376,7 +387,7 @@ def docpage_footer(path: rx.Var[str]) -> rx.Component:
376387 footer_link_flex (
377388 "Resources" ,
378389 [
379- footer_link ("FAQ" , "/faq/" ),
390+ footer_link ("FAQ" , "/faq/" , root_site = True ),
380391 footer_link ("Roadmap" , ROADMAP_URL ),
381392 footer_link ("Forum" , FORUM_URL ),
382393 ],
0 commit comments