@apify/docs-theme 1.0.206 → 1.0.208

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.206",
3
+ "version": "1.0.208",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "files": [
@@ -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={{
@@ -145,6 +145,9 @@ function clearMcpRedirectCache() {
145
145
  fetch('https://mcp.apify.com/', {
146
146
  method: 'get',
147
147
  cache: 'reload',
148
+ headers: {
149
+ Accept: 'text/html',
150
+ },
148
151
  }).then(() => {
149
152
  // Cache cleared successfully
150
153
  }).catch(() => {