@apify/docs-theme 1.0.100 → 1.0.102

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.100",
3
+ "version": "1.0.102",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "files": [
@@ -25,6 +25,7 @@
25
25
  "axios": "^1.4.0",
26
26
  "babel-loader": "^9.1.3",
27
27
  "docusaurus-gtm-plugin": "^0.0.2",
28
+ "postcss-preset-env": "^9.3.0",
28
29
  "prism-react-renderer": "^2.0.6"
29
30
  },
30
31
  "peerDependencies": {
@@ -1,8 +1,17 @@
1
1
  import React from 'react';
2
+ import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
2
3
  import Link from '@docusaurus/Link';
3
4
  import { isDifferentInstance } from '../../utils';
4
5
 
5
6
  export default function MDXA(props) {
7
+ const { siteConfig } = useDocusaurusContext();
8
+
9
+ if (props.href?.startsWith(siteConfig.url) && isDifferentInstance(siteConfig.baseUrl)) {
10
+ const { href, ...rest } = props;
11
+ rest.to = props.href.replace(siteConfig.url + siteConfig.baseUrl, '/');
12
+ props = rest;
13
+ }
14
+
6
15
  if (props.href && isDifferentInstance(props.href)) {
7
16
  return <a {...props} onClick={((e) => {
8
17
  e.preventDefault();
@@ -317,7 +317,7 @@ html[data-theme='dark'] {
317
317
  --ifm-h5-font-size: 1.6rem;
318
318
  --ifm-h6-font-size: 1.4rem;
319
319
  }
320
-
320
+
321
321
  .markdown h1:first-child {
322
322
  --ifm-h1-font-size: 4.2rem;
323
323
  }
@@ -588,6 +588,10 @@ article .card h2 {
588
588
  white-space: nowrap;
589
589
  }
590
590
 
591
+ .tsd-flag {
592
+ user-select: none;
593
+ }
594
+
591
595
  .menu__caret:before,
592
596
  .menu__link--sublist:after {
593
597
  float: right;
package/src/theme.js CHANGED
@@ -1,3 +1,4 @@
1
+ const postcssPreset = require('postcss-preset-env');
1
2
  const path = require('path');
2
3
  const fs = require('fs');
3
4
  const axios = require('axios');
@@ -125,6 +126,10 @@ This either means that your Docusaurus setup is misconfigured, or that your GitH
125
126
  },
126
127
  };
127
128
  },
129
+ configurePostCss(o) {
130
+ o.plugins.push(postcssPreset); // allow newest CSS syntax
131
+ return o;
132
+ },
128
133
  };
129
134
  }
130
135