Skip to content

Commit 0231e08

Browse files
committed
Rm useless files
1 parent fa97559 commit 0231e08

File tree

4 files changed

+25
-429
lines changed

4 files changed

+25
-429
lines changed

website/build_api_reference.sh

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,4 @@
11
#!/bin/bash
22

3-
# On macOS, sed requires a space between -i and '' to specify no backup should be done
4-
# On Linux, sed requires no space between -i and '' to specify no backup should be done
5-
sed_no_backup() {
6-
if [[ $(uname) = "Darwin" ]]; then
7-
sed -i '' "$@"
8-
else
9-
sed -i'' "$@"
10-
fi
11-
}
12-
13-
# Create docspec dump of this package's source code through pydoc-markdown
14-
pydoc-markdown --quiet --dump > docspec-dump.jsonl
15-
sed_no_backup "s#${PWD}/..#REPO_ROOT_PLACEHOLDER#g" docspec-dump.jsonl
16-
173
# Generate import shortcuts from the modules
184
python generate_module_shortcuts.py
19-
20-
# Transform the docspec dumps into Typedoc-compatible docs tree
21-
node transformDocs.js

website/docusaurus.config.js

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,33 @@ const { join, resolve } = require('node:path');
33
const { config } = require('@apify/docs-theme');
44

55
const { externalLinkProcessor } = require('./tools/utils/externalLink');
6-
const { groupSort } = require('./transformDocs');
76
const versions = require('./versions.json');
87

8+
const GROUP_ORDER = [
9+
'Actor',
10+
'Charging',
11+
'Configuration',
12+
'Event data',
13+
'Event managers',
14+
'Events',
15+
'Request loaders',
16+
'Storage clients',
17+
'Storage data',
18+
'Storages',
19+
];
20+
21+
const groupSort = (g1, g2) => {
22+
const i1 = GROUP_ORDER.indexOf(g1);
23+
const i2 = GROUP_ORDER.indexOf(g2);
24+
// Both known – sort by defined order
25+
if (i1 !== -1 && i2 !== -1) return i1 - i2;
26+
// Unknown groups go after known ones
27+
if (i1 !== -1) return -1;
28+
if (i2 !== -1) return 1;
29+
// Both unknown – alphabetical
30+
return g1.localeCompare(g2);
31+
};
32+
933
const { absoluteUrl } = config;
1034

1135
/** @type {Partial<import('@docusaurus/types').DocusaurusConfig>} */
@@ -114,7 +138,6 @@ module.exports = {
114138
typedocOptions: {
115139
excludeExternals: false,
116140
},
117-
pathToCurrentVersionTypedocJSON: `${__dirname}/api-typedoc-generated.json`,
118141
sortSidebar: groupSort,
119142
routeBasePath: 'reference',
120143
python: true,

website/pydoc-markdown.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)