Skip to content

Commit b537449

Browse files
committed
website: updates
1 parent a170d63 commit b537449

File tree

9 files changed

+4685
-2179
lines changed

9 files changed

+4685
-2179
lines changed

website/blog/2022-10-21-realpath-v9-1-0-1-released.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
23
title: xPack GNU realpath v9.1.0-1 released
34
seo_title: Version 9.1.0-1 released
45
description: Version 9.1.0-1 is the first release of xPack GNU realpath.

website/blog/2023-01-29-realpath-v9-1-0-2-released.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
23
title: xPack GNU realpath v9.1.0-2 released
34
seo_title: Version 9.1.0-2 released
45
description: Version 9.1.0-2 is a maintenance release of xPack GNU realpath.

website/blog/2023-09-05-realpath-v9-4-0-1-released.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
23
title: xPack GNU realpath v9.4.0-1 released
34
seo_title: Version 9.4.0-1 released
45
description: Version 9.4.0-1 is a new release of xPack GNU realpath.
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
/*
2+
* This file is part of the xPack project (http://xpack.github.io).
3+
* Copyright (c) 2024 Liviu Ionescu. All rights reserved.
4+
*
5+
* Permission to use, copy, modify, and/or distribute this software
6+
* for any purpose is hereby granted, under the terms of the MIT license.
7+
*
8+
* If a copy of the license was not distributed with this file, it can
9+
* be obtained from https://opensource.org/licenses/MIT/.
10+
*/
11+
12+
import util from 'node:util';
13+
14+
export const redirects = {
15+
// fromExtensions: ['html', 'htm'], // /myPage.html -> /myPage
16+
// toExtensions: ['exe', 'zip'], // /myAsset -> /myAsset.zip (if latter exists)
17+
redirects: [
18+
// // /docs/oldDoc -> /docs/newDoc
19+
// {
20+
// to: '/docs/newDoc',
21+
// from: '/docs/oldDoc',
22+
// },
23+
// // Redirect from multiple old paths to the new path
24+
// {
25+
// to: '/docs/newDoc2',
26+
// from: ['/docs/oldDocFrom2019', '/docs/legacyDocFrom2016'],
27+
// },
28+
29+
{
30+
from: '/docs/developer-info',
31+
to: '/docs/developer',
32+
},
33+
{
34+
from: '/docs/maintainer-info',
35+
to: '/docs/maintainer',
36+
},
37+
{
38+
from: '/docs/user-info',
39+
to: '/docs/user',
40+
}
41+
],
42+
createRedirects(existingPath) {
43+
console.log(existingPath);
44+
// if (existingPath.includes('/evenimente')) {
45+
// // console.log(`to ${existingPath} from ${existingPath.replace('/evenimente', '/events')}`);
46+
// // Redirect from /events/X to /evenimente/X
47+
// return [
48+
// existingPath.replace('/evenimente', '/events')
49+
// ];
50+
// } else if (existingPath.includes('/amintiri')) {
51+
// // console.log(`to ${existingPath} from ${existingPath.replace('/amintiri', '/blog')}`);
52+
// // Redirect from /blog/Z to /amintiri/X
53+
// return [
54+
// existingPath.replace('/amintiri', '/blog')
55+
// ];
56+
// }
57+
// return undefined; // Return a falsy value: no redirect created
58+
// },
59+
60+
if (existingPath.includes('/user-info')) {
61+
return [
62+
existingPath.replace('/user-info', '/user')
63+
];
64+
} else if (existingPath.includes('/developer-info')) {
65+
return [
66+
existingPath.replace('/developer-info', '/developer')
67+
];
68+
} else if (existingPath.includes('/maintainer-info')) {
69+
return [
70+
existingPath.replace('/maintainer-info', '/maintainer')
71+
];
72+
}
73+
}
74+
}

website/docusaurus.config.ts

Lines changed: 10 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
import {themes as prismThemes} from 'prism-react-renderer';
55
import type {Config} from '@docusaurus/types';
66
import type * as Preset from '@docusaurus/preset-classic';
7-
import logger from '@docusaurus/logger';
7+
// import logger from '@docusaurus/logger';
8+
import util from 'node:util';
9+
10+
import {redirects} from './docusaurus-config-redirects'
811

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

2023
function getCustomFields() {
2124
const pwd = fileURLToPath(import.meta.url);
22-
// logger.info(pwd);
25+
// console.log(pwd);
2326

2427
// First get the version from the top package.json.
2528
const topFilePath = path.join(path.dirname(path.dirname(pwd)), 'package.json');
26-
// logger.info(filePath);
29+
// console.log(filePath);
2730
const topFileContent = fs.readFileSync(topFilePath);
2831

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

32-
logger.info(`package version: ${topPackageJson.version}`);
35+
console.log(`package version: ${topPackageJson.version}`);
3336

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

8386
const customFields = getCustomFields();
84-
logger.info(customFields);
87+
console.log('customFields: ' + util.inspect(customFields));
8588

8689
// ----------------------------------------------------------------------------
8790

@@ -182,65 +185,7 @@ const config: Config = {
182185
[
183186
// https://docusaurus.io/docs/next/api/plugins/@docusaurus/plugin-client-redirects#redirects
184187
'@docusaurus/plugin-client-redirects',
185-
{
186-
// fromExtensions: ['html', 'htm'], // /myPage.html -> /myPage
187-
// toExtensions: ['exe', 'zip'], // /myAsset -> /myAsset.zip (if latter exists)
188-
redirects: [
189-
// // /docs/oldDoc -> /docs/newDoc
190-
// {
191-
// to: '/docs/newDoc',
192-
// from: '/docs/oldDoc',
193-
// },
194-
// // Redirect from multiple old paths to the new path
195-
// {
196-
// to: '/docs/newDoc2',
197-
// from: ['/docs/oldDocFrom2019', '/docs/legacyDocFrom2016'],
198-
// },
199-
{
200-
to: '/docs/developer',
201-
from: '/docs/developer-info'
202-
},
203-
{
204-
to: '/docs/maintainer',
205-
from: '/docs/maintainer-info'
206-
},
207-
{
208-
to: '/docs/user',
209-
from: '/docs/user-info'
210-
}
211-
],
212-
createRedirects(existingPath) {
213-
logger.info(existingPath);
214-
// if (existingPath.includes('/evenimente')) {
215-
// // logger.info(`to ${existingPath} from ${existingPath.replace('/evenimente', '/events')}`);
216-
// // Redirect from /events/X to /evenimente/X
217-
// return [
218-
// existingPath.replace('/evenimente', '/events')
219-
// ];
220-
// } else if (existingPath.includes('/amintiri')) {
221-
// // logger.info(`to ${existingPath} from ${existingPath.replace('/amintiri', '/blog')}`);
222-
// // Redirect from /blog/Z to /amintiri/X
223-
// return [
224-
// existingPath.replace('/amintiri', '/blog')
225-
// ];
226-
// }
227-
// return undefined; // Return a falsy value: no redirect created
228-
// },
229-
if (existingPath.includes('/user-info')) {
230-
return [
231-
existingPath.replace('/user-info', '/user')
232-
];
233-
} else if (existingPath.includes('/developer-info')) {
234-
return [
235-
existingPath.replace('/developer-info', '/developer')
236-
];
237-
} else if (existingPath.includes('/maintainer-info')) {
238-
return [
239-
existingPath.replace('/maintainer-info', '/maintainer')
240-
];
241-
}
242-
}
243-
}
188+
redirects
244189
],
245190
'./src/plugins/SelectReleasesPlugin',
246191
],

0 commit comments

Comments
 (0)