@apify/docs-theme 1.0.41 → 1.0.42
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 +1 -1
- package/src/theme.js +8 -1
package/package.json
CHANGED
package/src/theme.js
CHANGED
|
@@ -39,11 +39,12 @@ async function copyChangelogFromReleases(paths, repo) {
|
|
|
39
39
|
markdown += release.tag_name && a[i + 1]?.tag_name
|
|
40
40
|
? `## [${release.name}](https://github.com/${repo}/compare/${a[i + 1].tag_name}...${release.tag_name})\n`
|
|
41
41
|
: `## ${release.name}\n`;
|
|
42
|
-
markdown += `${release.body.replaceAll(/(
|
|
42
|
+
markdown += `${release.body.replaceAll(/(^##|\n##)/g, '###')}\n`;
|
|
43
43
|
});
|
|
44
44
|
|
|
45
45
|
paths.forEach((p) => {
|
|
46
46
|
fs.writeFileSync(`${p}/changelog.md`, markdown);
|
|
47
|
+
updateChangelog(`${p}/changelog.md`);
|
|
47
48
|
});
|
|
48
49
|
}
|
|
49
50
|
|
|
@@ -84,6 +85,12 @@ function theme(
|
|
|
84
85
|
),
|
|
85
86
|
];
|
|
86
87
|
|
|
88
|
+
for (const p of pathsToCopyChangelog) {
|
|
89
|
+
// the changelog page has to exist for the sidebar to work - async loadContent() is (apparently) not awaited for by sidebar
|
|
90
|
+
if (fs.existsSync(path.join(p, 'changelog.md'))) continue;
|
|
91
|
+
fs.writeFileSync(`${p}/changelog.md`, 'Changelog placeholder. Please wait...');
|
|
92
|
+
}
|
|
93
|
+
|
|
87
94
|
if (options.changelogFromRoot) {
|
|
88
95
|
copyChangelogFromRoot(pathsToCopyChangelog);
|
|
89
96
|
} else {
|