File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
apify-docs-theme/src/theme/Layout Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -9,12 +9,17 @@ import React from 'react';
9
9
export default function LayoutWrapper ( props ) {
10
10
const { options : { subNavbar } } = usePluginData ( '@apify/docs-theme' ) ;
11
11
const baseUrl = useBaseUrl ( '/' ) ;
12
- const currentPath = useLocation ( ) . pathname . replace ( new RegExp ( `^${ baseUrl } ` ) , '' ) ;
12
+ const currentPath = useLocation ( ) . pathname . replace ( new RegExp ( `^${ baseUrl } ` ) , '' ) . trim ( ) ;
13
+ const shouldRenderAlternateLink = currentPath && currentPath !== '404' ;
13
14
14
15
return (
15
16
< >
16
17
< Head >
17
- < link rel = "alternate" type = "text/markdown" href = { `${ currentPath } .md` } />
18
+ {
19
+ shouldRenderAlternateLink
20
+ ? < link rel = "alternate" type = "text/markdown" href = { `${ currentPath } .md` } />
21
+ : null
22
+ }
18
23
</ Head >
19
24
< div
20
25
style = { {
You can’t perform that action at this time.
0 commit comments