Skip to content

Commit

Permalink
website: updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ilg-ul committed Dec 22, 2024
1 parent 10f761a commit 5ab16d1
Show file tree
Hide file tree
Showing 38 changed files with 4,594 additions and 2,077 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

title: GNU MCU Eclipse RISC-V Embedded GCC v7.1.1-1-20170702-* released
seo_title: Version 7.1.1-1-20170702-* released
description: Version 7.1.1-1-20170702-0625 is the first release of GNU MCU Eclipse RISC-V Embedded GCC.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

title: GNU MCU Eclipse RISC-V Embedded GCC v7.1.1-2-20170912-* released
seo_title: Version 7.1.1-2-20170912-* released
description: Version 7.1.1-2-20170912-2255 is a new release of GNU MCU Eclipse RISC-V Embedded GCC.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

title: GNU MCU Eclipse RISC-V Embedded GCC v7.2.0-1-20171109 released
seo_title: Version 7.2.0-1-20171109 released
description: Version 7.2.0-1-20171109 is a new release of GNU MCU Eclipse RISC-V Embedded GCC.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

title: GNU MCU Eclipse RISC-V Embedded GCC v7.2.0-2-20180111 released
seo_title: Version 7.2.0-2-20180111 released
description: Version 7.2.0-2-20180111 is a maintenance release of GNU MCU Eclipse RISC-V Embedded GCC.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

title: GNU MCU Eclipse RISC-V Embedded GCC v7.2.0-3-20180506 released
seo_title: Version 7.2.0-3-20180506 released
description: Version 7.2.0-3-20180506 is a maintenance release of GNU MCU Eclipse RISC-V Embedded GCC.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

title: GNU MCU Eclipse RISC-V Embedded GCC v7.2.0-4-20180606 released
seo_title: Version 7.2.0-4-20180606 released
description: Version 7.2.0-4-20180606 is a maintenance release of GNU MCU Eclipse RISC-V Embedded GCC.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

title: GNU MCU Eclipse RISC-V Embedded GCC v8.1.0-2-20181019 released
seo_title: Version 8.1.0-2-20181019 released
description: Version 8.1.0-2-20181019 is a maintenance release of GNU MCU Eclipse RISC-V Embedded GCC.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

title: GNU MCU Eclipse RISC-V Embedded GCC v8.2.0-2.1 20190425 released
seo_title: Version 8.2.0-2.1 20190425 released
description: Version 8.2.0-2.1-20190425 is a maintenance release of GNU MCU Eclipse RISC-V Embedded GCC.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

title: GNU MCU Eclipse RISC-V Embedded GCC v8.2.0-2.2 20190521 released
seo_title: Version 8.2.0-2.2 20190521 released
description: Version 8.2.0-2.2-20190521 is a maintenance release of GNU MCU Eclipse RISC-V Embedded GCC.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

title: xPack GNU RISC-V Embedded GCC v8.2.0-3.1 released
seo_title: Version 8.2.0-3.1 released
description: Version 8.2.0-3.1 is a new release of xPack GNU RISC-V Embedded GCC.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

title: xPack GNU RISC-V Embedded GCC v8.3.0-1.1 released
seo_title: Version 8.3.0-1.1 released
description: Version 8.3.0-1.1 is a new release of xPack GNU RISC-V Embedded GCC.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

title: xPack GNU RISC-V Embedded GCC v8.3.0-1.2 released
seo_title: Version 8.3.0-1.2 released
description: Version 8.3.0-1.2 is a maintenance release of xPack GNU RISC-V Embedded GCC.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

title: xPack GNU RISC-V Embedded GCC v8.3.0-2.1 released
seo_title: Version 8.3.0-2.1 released
description: Version 8.3.0-2.1 is a new release of xPack GNU RISC-V Embedded GCC.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

title: xPack GNU RISC-V Embedded GCC v8.3.0-2.2 released
seo_title: Version 8.3.0-2.2 released
description: Version 8.3.0-2.2 is a maintenance release of xPack GNU RISC-V Embedded GCC.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

title: xPack GNU RISC-V Embedded GCC v8.3.0-2.3 released
seo_title: Version 8.3.0-2.3 released
description: Version 8.3.0-2.3 is a maintenance release of xPack GNU RISC-V Embedded GCC.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

title: xPack GNU RISC-V Embedded GCC v10.1.0-1.1 released
seo_title: Version 10.1.0-1.1 released
description: Version 10.1.0-1.1 is a new release of xPack GNU RISC-V Embedded GCC.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

title: xPack GNU RISC-V Embedded GCC v10.1.0-1.2 released
seo_title: Version 10.1.0-1.2 released
description: Version 10.1.0-1.2 is a maintenance release of xPack GNU RISC-V Embedded GCC.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

title: xPack GNU RISC-V Embedded GCC v10.2.0-1.1 released
seo_title: Version 10.2.0-1.1 released
description: Version 10.2.0-1.1 is a new release of xPack GNU RISC-V Embedded GCC.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

title: xPack GNU RISC-V Embedded GCC v10.2.0-1.2 released
seo_title: Version 10.2.0-1.2 released
description: Version 10.2.0-1.2 is a maintenance release of xPack GNU RISC-V Embedded GCC.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

title: xPack GNU RISC-V Embedded GCC v11.3.0-1 released
seo_title: Version 11.3.0-1 released
description: Version 11.3.0-1 is a new release of xPack GNU RISC-V Embedded GCC.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

title: xPack GNU RISC-V Embedded GCC v12.1.0-1 released
seo_title: Version 12.1.0-1 released
description: Version 12.1.0-1 is a new release of xPack GNU RISC-V Embedded GCC.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

title: xPack GNU RISC-V Embedded GCC v12.1.0-2 released
seo_title: Version 12.1.0-2 released
description: Version 12.1.0-2 is a new release of xPack GNU RISC-V Embedded GCC.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

title: xPack GNU RISC-V Embedded GCC v12.2.0-1 released
seo_title: Version 12.2.0-1 released
description: Version 12.2.0-1 is a new release of xPack GNU RISC-V Embedded GCC.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

title: xPack GNU RISC-V Embedded GCC v12.2.0-3 released
seo_title: Version 12.2.0-3 released
description: Version 12.2.0-3 is a maintenance release of xPack GNU RISC-V Embedded GCC.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

title: xPack GNU RISC-V Embedded GCC v13.2.0-1 released
seo_title: Version 13.2.0-1 released
description: Version 13.2.0-1 is a new release of xPack GNU RISC-V Embedded GCC.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

title: xPack GNU RISC-V Embedded GCC v12.3.0-1 released
seo_title: Version 12.3.0-1 released
description: Version 12.3.0-1 is a new release of xPack GNU RISC-V Embedded GCC.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

title: xPack GNU RISC-V Embedded GCC v12.3.0-2 released
seo_title: Version 12.3.0-2 released
description: Version 12.3.0-2 is a maintenance release of xPack GNU RISC-V Embedded GCC.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

title: xPack GNU RISC-V Embedded GCC v13.2.0-2 released
seo_title: Version 13.2.0-2 released
description: Version 13.2.0-2 is a maintenance release of xPack GNU RISC-V Embedded GCC.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

title: xPack GNU RISC-V Embedded GCC v14.1.0-1 released
seo_title: Version 14.1.0-1 released
description: Version 14.1.0-1 is a new release of xPack GNU RISC-V Embedded GCC.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

title: xPack GNU RISC-V Embedded GCC v13.3.0-1 released
seo_title: Version 13.3.0-1 released
description: Version 13.3.0-1 is a new release of xPack GNU RISC-V Embedded GCC.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

title: xPack GNU RISC-V Embedded GCC v12.4.0-1 released
seo_title: Version 12.4.0-1 released
description: Version 12.4.0-1 is a new release of xPack GNU RISC-V Embedded GCC.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

title: xPack GNU RISC-V Embedded GCC v11.5.0-1 released
seo_title: Version 11.5.0-1 released
description: Version 11.5.0-1 is a new release of xPack GNU RISC-V Embedded GCC.
Expand Down
74 changes: 74 additions & 0 deletions website/docusaurus-config-redirects.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/*
* This file is part of the xPack project (http://xpack.github.io).
* Copyright (c) 2024 Liviu Ionescu. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software
* for any purpose is hereby granted, under the terms of the MIT license.
*
* If a copy of the license was not distributed with this file, it can
* be obtained from https://opensource.org/licenses/MIT/.
*/

import util from 'node:util';

export const redirects = {
// fromExtensions: ['html', 'htm'], // /myPage.html -> /myPage
// toExtensions: ['exe', 'zip'], // /myAsset -> /myAsset.zip (if latter exists)
redirects: [
// // /docs/oldDoc -> /docs/newDoc
// {
// to: '/docs/newDoc',
// from: '/docs/oldDoc',
// },
// // Redirect from multiple old paths to the new path
// {
// to: '/docs/newDoc2',
// from: ['/docs/oldDocFrom2019', '/docs/legacyDocFrom2016'],
// },

{
from: '/docs/developer-info',
to: '/docs/developer',
},
{
from: '/docs/maintainer-info',
to: '/docs/maintainer',
},
{
from: '/docs/user-info',
to: '/docs/user',
}
],
createRedirects(existingPath) {
console.log(existingPath);
// if (existingPath.includes('/evenimente')) {
// // console.log(`to ${existingPath} from ${existingPath.replace('/evenimente', '/events')}`);
// // Redirect from /events/X to /evenimente/X
// return [
// existingPath.replace('/evenimente', '/events')
// ];
// } else if (existingPath.includes('/amintiri')) {
// // console.log(`to ${existingPath} from ${existingPath.replace('/amintiri', '/blog')}`);
// // Redirect from /blog/Z to /amintiri/X
// return [
// existingPath.replace('/amintiri', '/blog')
// ];
// }
// return undefined; // Return a falsy value: no redirect created
// },

if (existingPath.includes('/user-info')) {
return [
existingPath.replace('/user-info', '/user')
];
} else if (existingPath.includes('/developer-info')) {
return [
existingPath.replace('/developer-info', '/developer')
];
} else if (existingPath.includes('/maintainer-info')) {
return [
existingPath.replace('/maintainer-info', '/maintainer')
];
}
}
}
75 changes: 10 additions & 65 deletions website/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
import {themes as prismThemes} from 'prism-react-renderer';
import type {Config} from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';
import logger from '@docusaurus/logger';
// import logger from '@docusaurus/logger';
import util from 'node:util';

import {redirects} from './docusaurus-config-redirects'

// The node.js modules cannot be used in modules imported in browser code:
// webpack < 5 used to include polyfills for node.js core modules by default.
Expand All @@ -19,17 +22,17 @@ import fs from 'node:fs';

function getCustomFields() {
const pwd = fileURLToPath(import.meta.url);
// logger.info(pwd);
// console.log(pwd);

// First get the version from the top package.json.
const topFilePath = path.join(path.dirname(path.dirname(pwd)), 'package.json');
// logger.info(filePath);
// console.log(filePath);
const topFileContent = fs.readFileSync(topFilePath);

const topPackageJson = JSON.parse(topFileContent.toString());
const jsonVersion = topPackageJson.version.replace(/[.-]pre/, '');

logger.info(`package version: ${topPackageJson.version}`);
console.log(`package version: ${topPackageJson.version}`);

// Remove the first part, up to the last dot.
const npmSubversion = jsonVersion.replace(/^.*[.]/, '');
Expand All @@ -46,7 +49,7 @@ function getCustomFields() {
let rootPackageJson
try {
const rootFilePath = path.join(path.dirname(path.dirname(pwd)), 'build-assets', 'package.json');
// logger.info(filePath);
// console.log(filePath);
const rootFileContent = fs.readFileSync(rootFilePath);
rootPackageJson = JSON.parse(rootFileContent.toString());
} catch (error) {
Expand Down Expand Up @@ -81,7 +84,7 @@ function getCustomFields() {
// ----------------------------------------------------------------------------

const customFields = getCustomFields();
logger.info(customFields);
console.log('customFields: ' + util.inspect(customFields));

// ----------------------------------------------------------------------------

Expand Down Expand Up @@ -182,65 +185,7 @@ const config: Config = {
[
// https://docusaurus.io/docs/next/api/plugins/@docusaurus/plugin-client-redirects#redirects
'@docusaurus/plugin-client-redirects',
{
// fromExtensions: ['html', 'htm'], // /myPage.html -> /myPage
// toExtensions: ['exe', 'zip'], // /myAsset -> /myAsset.zip (if latter exists)
redirects: [
// // /docs/oldDoc -> /docs/newDoc
// {
// to: '/docs/newDoc',
// from: '/docs/oldDoc',
// },
// // Redirect from multiple old paths to the new path
// {
// to: '/docs/newDoc2',
// from: ['/docs/oldDocFrom2019', '/docs/legacyDocFrom2016'],
// },
{
to: '/docs/developer',
from: '/docs/developer-info'
},
{
to: '/docs/maintainer',
from: '/docs/maintainer-info'
},
{
to: '/docs/user',
from: '/docs/user-info'
}
],
createRedirects(existingPath) {
logger.info(existingPath);
// if (existingPath.includes('/evenimente')) {
// // logger.info(`to ${existingPath} from ${existingPath.replace('/evenimente', '/events')}`);
// // Redirect from /events/X to /evenimente/X
// return [
// existingPath.replace('/evenimente', '/events')
// ];
// } else if (existingPath.includes('/amintiri')) {
// // logger.info(`to ${existingPath} from ${existingPath.replace('/amintiri', '/blog')}`);
// // Redirect from /blog/Z to /amintiri/X
// return [
// existingPath.replace('/amintiri', '/blog')
// ];
// }
// return undefined; // Return a falsy value: no redirect created
// },
if (existingPath.includes('/user-info')) {
return [
existingPath.replace('/user-info', '/user')
];
} else if (existingPath.includes('/developer-info')) {
return [
existingPath.replace('/developer-info', '/developer')
];
} else if (existingPath.includes('/maintainer-info')) {
return [
existingPath.replace('/maintainer-info', '/maintainer')
];
}
}
}
redirects
],
'./src/plugins/SelectReleasesPlugin',
],
Expand Down
Loading

0 comments on commit 5ab16d1

Please sign in to comment.