Skip to content

Commit 8b73e88

Browse files
committed
website: updates
1 parent 28d3f74 commit 8b73e88

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

website/src/components/HomepageTools/index.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,13 @@ function Tool({ appName, appLcName }) {
126126
<>
127127
<div className="padding-vert--sm">
128128
<div>
129-
<b><Link to={'https://xpack-dev-tools.github.io/' + appLcName + '-xpack'}>{appLcName}</Link></b> - <b>xPack {appName}</b>
129+
<b><Link to={'https://xpack-dev-tools.github.io/' + appLcName + '-xpack/'}>{appLcName}</Link></b> - <b>xPack {appName}</b>
130130
</div>
131131
<div className="padding-top--xs">
132132
<Link to={'https://github.com/xpack-dev-tools/' + appLcName + '-xpack/releases/'}><img alt="GitHub Release" src={'https://img.shields.io/github/v/release/xpack-dev-tools/' + appLcName + '-xpack'} /></Link>
133133
&nbsp;<Link to={'https://github.com/xpack-dev-tools/' + appLcName + '-xpack/releases/'}><img alt="GitHub Release Date" src={'https://img.shields.io/github/release-date/xpack-dev-tools/' + appLcName + '-xpack?label=date&color=YellowGreen'} /></Link>
134134
&nbsp;<Link to={'https://github.com/xpack-dev-tools/' + appLcName + '-xpack/releases/'}><img alt="GitHub Downloads (all assets, all releases)" src={'https://img.shields.io/github/downloads/xpack-dev-tools/' + appLcName + '-xpack/total.svg'} /></Link>
135+
&nbsp;<Link to={'https://github.com/xpack-dev-tools/' + appLcName + '-xpack/'}><img alt="GitHub Repo stars" src={'https://img.shields.io/github/stars/xpack-dev-tools/' + appLcName + '-xpack'} /></Link>
135136
</div>
136137
</div>
137138
</>
@@ -142,7 +143,7 @@ function ToolWork({ appName, appLcName }) {
142143
return (
143144
<>
144145
<div>
145-
<b><Link to={'https://xpack-dev-tools.github.io/' + appLcName + '-xpack'}>{appLcName}</Link></b> - <b>xPack {appName}</b>
146+
<b><Link to={'https://xpack-dev-tools.github.io/' + appLcName + '-xpack/'}>{appLcName}</Link></b> - <b>xPack {appName}</b>
146147
</div>
147148
</>
148149
)

website/src/plugins/SelectReleasesPlugin.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
*/
1414

1515
// import util from 'util'
16-
// import logger from '@docusaurus/logger'
16+
import logger from '@docusaurus/logger'
1717

1818
// https://github.com/facebook/docusaurus/pull/9931
1919

2020
export default async function SelectReleasesPlugin(context, options) {
2121
return {
2222
name: 'select-releases',
23-
async allContentLoaded({allContent, actions}) {
23+
async allContentLoaded({ allContent, actions }) {
2424

2525
const allBlogs = allContent['docusaurus-plugin-content-blog']
2626
// logger.info('SelectReleasesPlugin 1 ' + util.inspect(allBlogs))
@@ -33,9 +33,13 @@ export default async function SelectReleasesPlugin(context, options) {
3333
// logger.info('SelectReleasesPlugin 3 ' + util.inspect(post.metadata.tags))
3434
post.metadata.tags.forEach(tag => {
3535
if (tag.label === 'releases') {
36+
const permalink = post.metadata.permalink.endsWith('/') ?
37+
post.metadata.permalink :
38+
post.metadata.permalink + '/'
39+
// logger.info(permalink)
3640
releasesTable.push({
3741
title: post.metadata.title,
38-
permalink: post.metadata.permalink,
42+
permalink,
3943
downloadUrl: post.metadata.frontMatter['download_url']
4044
})
4145
}
@@ -44,7 +48,7 @@ export default async function SelectReleasesPlugin(context, options) {
4448

4549
// logger.info('SelectReleasesPlugin 4 ' + util.inspect(releasesTable))
4650

47-
actions.setGlobalData({releasesTable: releasesTable})
51+
actions.setGlobalData({ releasesTable: releasesTable })
4852
},
4953
};
5054
}

0 commit comments

Comments
 (0)