We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8196a4d commit 4a5b9feCopy full SHA for 4a5b9fe
prember-urls.js
@@ -5,7 +5,22 @@ module.exports = function () {
5
6
const urls = [];
7
8
- projects.forEach((p) => urls.push(`/${p}/release`));
+ projects.forEach((p) => {
9
+ // add release for each of the projects
10
+ urls.push(`/${p}/release`);
11
+
12
+ // add landing page for each of the projects versions
13
+ const projectVersions = readdirSync(`ember-api-docs-data/json-docs/${p}`)
14
+ .filter((v) => v.match(/\d+\.\d+\.\d+/))
15
+ .map((v) => {
16
+ let [, major, minor] = v.match(/(\d+)\.(\d+)\.\d+/);
17
+ return `${major}.${minor}`;
18
+ }); // uniq
19
20
+ [...new Set(projectVersions)].forEach((v) => {
21
+ urls.push(`/${p}/${v}`);
22
+ });
23
24
25
return urls;
26
};
0 commit comments