Skip to content

Commit

Permalink
fix(v2): reduce number of versions to be built
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunattam committed Dec 8, 2020
1 parent 5af26a3 commit b257c7d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
5 changes: 3 additions & 2 deletions v2/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@ module.exports = {
algolia: {
apiKey: 'c85f496c6eea71808027d42111ac550c',
indexName: 'playwright',
contextualSearch: true,
// searchParameters: {},
// Disabling contextual search to ensure search works
// even if the latest version is not indexed (there seems to be >24h delay).
// contextualSearch: true,
},
},
presets: [
Expand Down
6 changes: 0 additions & 6 deletions v2/scripts/fetchAll.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,12 @@ const versions = [
"1.6.1",
"1.6.0",
"1.5.2",
"1.5.1",
"1.5.0",
"1.4.2",
"1.4.1",
"1.4.0",
"1.3.0",
"1.2.1",
"1.2.0",
"1.1.1",
"1.1.0",
"1.0.2",
"1.0.1",
"1.0.0",
"0.18.0",
];
Expand Down
3 changes: 0 additions & 3 deletions v2/scripts/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ function removeHeadingLine(contents) {

function writeFrontmatter(filePath) {
const contents = fse.readFileSync(filePath).toString();
console.log('frontmatter....');
const title = getTitle(contents);
const fileName = path.basename(filePath, path.extname(filePath));
const fm = `---\nid: ${fileName}\ntitle: "${title}"\n---\n\n`;
Expand Down Expand Up @@ -121,7 +120,6 @@ function splitApi(contents, destDir) {
fse.mkdirpSync(path.join(destDir, "api"));
const contentLines = [...lines.slice(start, end), ...footerLines];
const contents = contentLines.join("\n");
console.log('pairs....')
const title = getTitle(contents);
const slug = slugger(title);
const relativePath = path.join("api", `${slug}.md`);
Expand All @@ -136,7 +134,6 @@ function splitApi(contents, destDir) {
const pairHeadings = headings.filter(
(t) => t.map[0] >= start && t.map[0] <= end
);
console.log('internal headings....', destDir);
const internalHeadings = pairHeadings
.map((t) => getTitle(lines[t.map[0]]))
.map((t) => slugger(t));
Expand Down

0 comments on commit b257c7d

Please sign in to comment.