File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed 
apify-docs-theme/src/theme/Layout Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -3,14 +3,14 @@ import { useLocation } from '@docusaurus/router';
33// cannot use any of the theme aliases here as it causes a circular dependency :( ideas welcome 
44import  Layout  from  '@docusaurus/theme-classic/lib/theme/Layout/index' ; 
55import  useBaseUrl  from  '@docusaurus/useBaseUrl' ; 
6+ import  useDocusaurusContext  from  '@docusaurus/useDocusaurusContext' ; 
67import  {  usePluginData  }  from  '@docusaurus/useGlobalData' ; 
78import  React  from  'react' ; 
89
9- import  {  absoluteUrl  }  from  '../../absoluteUrl' ; 
10- 
1110export  default  function  LayoutWrapper ( props )  { 
1211    const  {  options : {  subNavbar }  }  =  usePluginData ( '@apify/docs-theme' ) ; 
1312    const  baseUrl  =  useBaseUrl ( '/' ) ; 
13+     const  {  siteConfig : {  customFields }  }  =  useDocusaurusContext ( ) ; 
1414    const  currentPath  =  useLocation ( ) . pathname . replace ( new  RegExp ( `^${ baseUrl }  ` ) ,  '' ) . trim ( ) ; 
1515    const  shouldRenderAlternateLink  =  currentPath  &&  currentPath  !==  '404' ; 
1616
@@ -19,7 +19,7 @@ export default function LayoutWrapper(props) {
1919            < Head > 
2020                { 
2121                    shouldRenderAlternateLink 
22-                         ? < link  rel = "alternate"  type = "text/markdown"  href = { `${ absoluteUrl }  /${ currentPath }  .md` } /> 
22+                         ? < link  rel = "alternate"  type = "text/markdown"  href = { `${ customFields . absoluteUrl }  /${ currentPath }  .md` } /> 
2323                        : null 
2424                } 
2525            </ Head > 
Original file line number Diff line number Diff line change @@ -538,6 +538,7 @@ module.exports = {
538538            '^/legal/*' , 
539539        ] , 
540540        ...config . customFields  ??  [ ] , 
541+         absoluteUrl : config . absoluteUrl , 
541542    } , 
542543    clientModules : [ './clientModule.js' ] , 
543544} ; 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments