Skip to content

Commit a607e20

Browse files
Kirill BolotskyPepe Cano
authored andcommitted
chore: rebasing commit (->master)
Side: - added algolia indecies exclusion for cloud rest api section once again
1 parent e2000ef commit a607e20

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,4 @@
8484
"lint-staged": "^10.4.0",
8585
"wait-on": "^5.2.0"
8686
}
87-
}
87+
}

src/components/blocks/html-content/html-content.view.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
import PropTypes from 'prop-types';
2-
import React, { useRef } from 'react';
3-
4-
import styles from './html-content.module.scss';
5-
61
import './html-content.scss';
72
import { MDXProvider } from '@mdx-js/react';
83
import { MDXRenderer } from 'gatsby-plugin-mdx';
94
import { useElementsReplacement } from 'hooks';
5+
import PropTypes from 'prop-types';
6+
import React, { useRef } from 'react';
107

118
import styles from './html-content.module.scss';
129

src/utils/algolia.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ const processMdxEntry = ({ children: [entry] }) => {
2323
// avoid pushing empty records
2424
return [];
2525
}
26+
/* @TODO: remove if clause after cloud rest api docs will be ported ,
27+
* avoid indexing this section for a while to avoid
28+
* search user's confusion
29+
*/
30+
if (/cloud rest api/i.test(fileAbsolutePath)) {
31+
// eslint-disable-next-line no-console
32+
console.log('exluded from algolia indecies pages:', fileAbsolutePath);
33+
return [];
34+
}
35+
2636
const strippedDirectory = stripDirectoryPath(fileAbsolutePath, 'docs');
2737
// cut the last piece (the actual name of a file) to match the generation
2838
// in node

0 commit comments

Comments
 (0)