@apify/docs-theme 1.0.219 → 1.0.220

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apify/docs-theme",
3
- "version": "1.0.219",
3
+ "version": "1.0.220",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "files": [
@@ -6,20 +6,20 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
6
6
  import { usePluginData } from '@docusaurus/useGlobalData';
7
7
  import React from 'react';
8
8
 
9
- import { absoluteUrl } from '../../absoluteUrl';
10
-
11
9
  export default function LayoutWrapper(props) {
12
10
  const { options: { subNavbar } } = usePluginData('@apify/docs-theme');
13
11
  const baseUrl = useBaseUrl('/');
14
12
  const currentPath = useLocation().pathname.replace(new RegExp(`^${baseUrl}`), '').trim();
15
13
  const shouldRenderAlternateLink = currentPath && currentPath !== '404';
16
14
 
15
+ const alternateMarkdownLink = useBaseUrl(`/${currentPath}.md`, { absolute: true });
16
+
17
17
  return (
18
18
  <>
19
19
  <Head>
20
20
  {
21
21
  shouldRenderAlternateLink
22
- ? <link rel="alternate" type="text/markdown" href={`${absoluteUrl}/${currentPath}.md`}/>
22
+ ? <link rel="alternate" type="text/markdown" href={alternateMarkdownLink}/>
23
23
  : null
24
24
  }
25
25
  </Head>