Skip to content

Commit 3fb682d

Browse files
committed
Homepage: add development tools
1 parent 3da0b8c commit 3fb682d

1 file changed

Lines changed: 39 additions & 8 deletions

File tree

  • website/src/components/HomepageTools

website/src/components/HomepageTools/index.tsx

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import Link from '@docusaurus/Link';
2020
const coreTools = [
2121
{
2222
gitHubBaseUrl: 'xpack/xpm-js',
23-
webBaseUrl: 'xpm',
23+
webUrl: 'https://xpack.github.io/xpm/',
2424
npmScope: '',
2525
npmName: 'xpm',
2626
permalinkName: 'xpm',
@@ -31,7 +31,7 @@ const coreTools = [
3131
},
3232
{
3333
gitHubBaseUrl: 'xpack/xcdl-cli-ts',
34-
webBaseUrl: 'xcdl',
34+
webUrl: 'https://xpack.github.io/xcdl/',
3535
npmScope: '',
3636
npmName: 'xcdl',
3737
permalinkName: 'xcdl',
@@ -45,47 +45,71 @@ const coreTools = [
4545
const npmModules = [
4646
{
4747
gitHubBaseUrl: 'xpack/logger-ts',
48-
webBaseUrl: 'logger-ts',
48+
webUrl: 'https://xpack.github.io/logger-ts/',
4949
npmScope: 'xpack',
5050
npmName: 'logger',
5151
permalinkName: '@xpack/logger',
5252
descriptiveName: 'The xPack Logger'
5353
},
5454
{
5555
gitHubBaseUrl: 'xpack/mock-console-ts',
56-
webBaseUrl: 'mock-console-ts',
56+
webUrl: 'https://xpack.github.io/mock-console-ts/',
5757
npmScope: 'xpack',
5858
npmName: 'mock-console',
5959
permalinkName: '@xpack/mock-console',
6060
descriptiveName: 'The xPack Mock Console'
6161
},
6262
{
6363
gitHubBaseUrl: 'xpack/update-checker-ts',
64-
webBaseUrl: 'update-checker-ts',
64+
webUrl: 'https://xpack.github.io/update-checker-ts/',
6565
npmScope: 'xpack',
6666
npmName: 'update-checker',
6767
permalinkName: '@xpack/update-checker',
6868
descriptiveName: 'The xPack Update Checker'
6969
},
7070
{
7171
gitHubBaseUrl: 'xpack/xpm-lib-ts',
72-
webBaseUrl: 'xpm-lib-ts',
72+
webUrl: 'https://xpack.github.io/xpm-lib-ts/',
7373
npmScope: 'xpack',
7474
npmName: 'xpm-lib',
7575
permalinkName: '@xpack/xpm-lib',
7676
descriptiveName: 'The xpm core library'
7777
},
7878
]
7979

80+
const documentationTools = [
81+
{
82+
gitHubBaseUrl: 'xpack/doxygen2docusaurus-cli-ts',
83+
webUrl: 'https://xpack.github.io/doxygen2docusaurus/',
84+
npmScope: 'xpack',
85+
npmName: 'doxygen2docusaurus',
86+
permalinkName: 'doxygen2docusaurus',
87+
descriptiveName: 'Doxygen to Docusaurus converter',
88+
isWindows: true,
89+
isMacOS: true,
90+
isLinux: true,
91+
},
92+
{
93+
gitHubBaseUrl: 'xpack/tsdoc2docusaurus-cli-ts',
94+
webUrl: 'https://github.io/xpack/tsdoc2docusaurus-cli-ts/', // no web yet
95+
npmScope: 'xpack',
96+
npmName: 'tsdoc2docusaurus-cli',
97+
permalinkName: 'tsdoc2docusaurus',
98+
descriptiveName: 'TSDoc to Docusaurus converter',
99+
isWindows: true,
100+
isMacOS: true,
101+
isLinux: true,
102+
},
103+
]
80104

81-
function NpmModule({ gitHubBaseUrl, webBaseUrl, npmScope, npmName, permalinkName, descriptiveName, isWindows, isMacOS, isLinux }) {
105+
function NpmModule({ gitHubBaseUrl, webUrl, npmScope, npmName, permalinkName, descriptiveName, isWindows, isMacOS, isLinux }) {
82106
const badgeName=(npmScope ? `%40${npmScope}%2F${npmName}` : npmName);
83107
const npmScopedName=(npmScope ? `@${npmScope}/${npmName}` : npmName);
84108
return (
85109
<>
86110
<div className="padding-vert--sm">
87111
<div>
88-
<b><Link to={'https://xpack.github.io/' + webBaseUrl + '/'}><span className="sub-web-home-link">{permalinkName}</span></Link></b> - <b>{descriptiveName}</b>
112+
<b><Link to={webUrl}><span className="sub-web-home-link">{permalinkName}</span></Link></b> - <b>{descriptiveName}</b>
89113
<span className="margin-left-platforms">
90114
{isWindows ? (<span className="platform-windows"></span>) : (<></>)}
91115
{isMacOS ? (<span className="platform-apple"></span>) : (<></>)}
@@ -120,6 +144,13 @@ function ToolsLeft() {
120144
<NpmModule {...props} />
121145
))}
122146
</div>
147+
<hr className="hero__hr2 hero__hr2_margin" />
148+
<div className="text--center padding-horiz--md padding-vert--md">
149+
<Heading as="h2">Documentation Tools</Heading>
150+
{documentationTools.map((props, idx) => (
151+
<NpmModule {...props} />
152+
))}
153+
</div>
123154
</div>
124155
);
125156
}

0 commit comments

Comments
 (0)