chore: bump changelog sidebar
This commit is contained in:
parent
a91a95cdd7
commit
b53541b2a4
@ -1,13 +1,13 @@
|
||||
---
|
||||
sidebar_position: 16
|
||||
slug: /changelog/changelog-v0.2.0
|
||||
---
|
||||
# v0.2.0
|
||||
|
||||
For more details, [GitHub Issues](https://github.com/janhq/jan/releases/tag/v0.2.0)
|
||||
|
||||
Highlighted Issue: [Issue #342: feat: Add Jan Hacker House event page to Docs](https://github.com/janhq/jan/pull/342)
|
||||
|
||||
---
|
||||
sidebar_position: 17
|
||||
slug: /changelog/changelog-v0.2.0
|
||||
---
|
||||
# v0.2.0
|
||||
|
||||
For more details, [GitHub Issues](https://github.com/janhq/jan/releases/tag/v0.2.0)
|
||||
|
||||
Highlighted Issue: [Issue #342: feat: Add Jan Hacker House event page to Docs](https://github.com/janhq/jan/pull/342)
|
||||
|
||||
## Changes
|
||||
|
||||
- feat: Add Jan Hacker House event page to Docs @dan-jan (#342)
|
||||
@ -44,4 +44,4 @@ Highlighted Issue: [Issue #342: feat: Add Jan Hacker House event page to Docs](
|
||||
## Contributor
|
||||
|
||||
@0xSage, @Its-Alamin-H, @dan-jan, @drakehere, @hiento09, @hientominh, @louis-jan, @namchuai, Hien To and James
|
||||
|
||||
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
---
|
||||
sidebar_position: 15
|
||||
slug: /changelog/changelog-v0.2.1
|
||||
---
|
||||
# v0.2.1
|
||||
|
||||
For more details, [GitHub Issues](https://github.com/janhq/jan/releases/tag/v0.2.1)
|
||||
|
||||
Highlighted Issue: [Issue #446: fix: model is started but the indicator is not stopped loading](https://github.com/janhq/jan/pull/446)
|
||||
|
||||
---
|
||||
sidebar_position: 16
|
||||
slug: /changelog/changelog-v0.2.1
|
||||
---
|
||||
# v0.2.1
|
||||
|
||||
For more details, [GitHub Issues](https://github.com/janhq/jan/releases/tag/v0.2.1)
|
||||
|
||||
Highlighted Issue: [Issue #446: fix: model is started but the indicator is not stopped loading](https://github.com/janhq/jan/pull/446)
|
||||
|
||||
## Changes
|
||||
|
||||
- fix: model is started but the indicator is not stopped loading @louis-jan (#446)
|
||||
@ -90,4 +90,4 @@ Highlighted Issue: [Issue #446: fix: model is started but the indicator is not
|
||||
## Contributor
|
||||
|
||||
@0xSage, @dan-jan, @hiento09, @jan-service-account, @louis-jan, @nam-john-ho, @namchuai, @tikikun, @urmauur, @vuonghoainam and Hien To
|
||||
|
||||
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
---
|
||||
sidebar_position: 14
|
||||
slug: /changelog/changelog-v0.2.2
|
||||
---
|
||||
# v0.2.2
|
||||
|
||||
For more details, [GitHub Issues](https://github.com/janhq/jan/releases/tag/v0.2.2)
|
||||
|
||||
Highlighted Issue: [Issue #469: chore: plugin and app version dependency](https://github.com/janhq/jan/pull/469)
|
||||
|
||||
---
|
||||
sidebar_position: 15
|
||||
slug: /changelog/changelog-v0.2.2
|
||||
---
|
||||
# v0.2.2
|
||||
|
||||
For more details, [GitHub Issues](https://github.com/janhq/jan/releases/tag/v0.2.2)
|
||||
|
||||
Highlighted Issue: [Issue #469: chore: plugin and app version dependency](https://github.com/janhq/jan/pull/469)
|
||||
|
||||
## Changes
|
||||
|
||||
- chore: plugin and app version dependency @louis-jan (#469)
|
||||
@ -40,4 +40,4 @@ Highlighted Issue: [Issue #469: chore: plugin and app version dependency](https
|
||||
## Contributor
|
||||
|
||||
@hiento09, @jan-service-account, @louis-jan, @namchuai, @urmauur and @vuonghoainam
|
||||
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
---
|
||||
sidebar_position: 13
|
||||
sidebar_position: 14
|
||||
slug: /changelog/changelog-v0.2.3
|
||||
---
|
||||
# v0.2.3
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
---
|
||||
sidebar_position: 12
|
||||
sidebar_position: 13
|
||||
slug: /changelog/changelog-v0.3.0
|
||||
---
|
||||
# v0.3.0
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
---
|
||||
sidebar_position: 11
|
||||
sidebar_position: 12
|
||||
slug: /changelog/changelog-v0.3.1
|
||||
---
|
||||
# v0.3.1
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
---
|
||||
sidebar_position: 10
|
||||
sidebar_position: 11
|
||||
slug: /changelog/changelog-v0.3.2
|
||||
---
|
||||
# v0.3.2
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
---
|
||||
sidebar_position: 9
|
||||
sidebar_position: 10
|
||||
slug: /changelog/changelog-v0.3.3
|
||||
---
|
||||
# v0.3.3
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
---
|
||||
sidebar_position: 8
|
||||
sidebar_position: 9
|
||||
slug: /changelog/changelog-v0.4.0
|
||||
---
|
||||
# v0.4.0
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
---
|
||||
sidebar_position: 7
|
||||
sidebar_position: 8
|
||||
slug: /changelog/changelog-v0.4.1
|
||||
---
|
||||
# v0.4.1
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
---
|
||||
sidebar_position: 6
|
||||
sidebar_position: 7
|
||||
slug: /changelog/changelog-v0.4.2
|
||||
---
|
||||
# v0.4.2
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
---
|
||||
sidebar_position: 5
|
||||
sidebar_position: 6
|
||||
slug: /changelog/changelog-v0.4.3
|
||||
---
|
||||
# v0.4.3
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
---
|
||||
sidebar_position: 4
|
||||
sidebar_position: 5
|
||||
slug: /changelog/changelog-v0.4.4
|
||||
---
|
||||
# v0.4.4
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
sidebar_position: 4
|
||||
slug: /changelog/changelog-v0.4.5
|
||||
---
|
||||
# v0.4.5
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
sidebar_position: 3
|
||||
slug: /changelog/changelog-v0.4.6
|
||||
---
|
||||
# v0.4.6
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
sidebar_position: 2
|
||||
slug: /changelog/changelog-v0.4.7
|
||||
---
|
||||
# v0.4.7
|
||||
|
||||
@ -68,6 +68,36 @@ async function fetchData(siteConfig, forceRefresh = false) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if there are new releases
|
||||
const newReleases = releases.filter(release => {
|
||||
const version = release.tag_name;
|
||||
const existingChangelogPath = path.join(outputDirectory, `changelog-${version}.mdx`);
|
||||
return !fs.existsSync(existingChangelogPath);
|
||||
});
|
||||
|
||||
// If there are new releases, update existing changelog files' sidebar positions
|
||||
if (newReleases.length > 0) {
|
||||
console.log(`Updating sidebar positions for ${newReleases.length} new releases...`);
|
||||
const existingChangelogFiles = fs.readdirSync(outputDirectory)
|
||||
.filter(file => file.startsWith('changelog-'));
|
||||
|
||||
existingChangelogFiles.forEach((filename, index) => {
|
||||
const version = filename.substring(10, filename.length - 4);
|
||||
const existingChangelogPath = path.join(outputDirectory, filename);
|
||||
const content = fs.readFileSync(existingChangelogPath, 'utf-8');
|
||||
const sidebarPositionMatch = content.match(/sidebar_position: (\d+)/);
|
||||
let sidebarPosition = index + 1;
|
||||
|
||||
if (sidebarPositionMatch) {
|
||||
sidebarPosition = parseInt(sidebarPositionMatch[1]);
|
||||
}
|
||||
|
||||
const updatedContent = content.replace(/sidebar_position: (\d+)/, `sidebar_position: ${sidebarPosition}`);
|
||||
fs.writeFileSync(existingChangelogPath, updatedContent, 'utf-8');
|
||||
console.log(`Sidebar position updated for changelog-${version}`);
|
||||
});
|
||||
}
|
||||
|
||||
// Process the GitHub releases data here
|
||||
for (const release of releases) {
|
||||
const version = release.tag_name;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user