Skip to content

Commit

Permalink
website: updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ilg-ul committed Oct 12, 2024
1 parent 28d3f74 commit 8b73e88
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
5 changes: 3 additions & 2 deletions website/src/components/HomepageTools/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,13 @@ function Tool({ appName, appLcName }) {
<>
<div className="padding-vert--sm">
<div>
<b><Link to={'https://xpack-dev-tools.github.io/' + appLcName + '-xpack'}>{appLcName}</Link></b> - <b>xPack {appName}</b>
<b><Link to={'https://xpack-dev-tools.github.io/' + appLcName + '-xpack/'}>{appLcName}</Link></b> - <b>xPack {appName}</b>
</div>
<div className="padding-top--xs">
<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>
&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>
&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>
&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>
</div>
</div>
</>
Expand All @@ -142,7 +143,7 @@ function ToolWork({ appName, appLcName }) {
return (
<>
<div>
<b><Link to={'https://xpack-dev-tools.github.io/' + appLcName + '-xpack'}>{appLcName}</Link></b> - <b>xPack {appName}</b>
<b><Link to={'https://xpack-dev-tools.github.io/' + appLcName + '-xpack/'}>{appLcName}</Link></b> - <b>xPack {appName}</b>
</div>
</>
)
Expand Down
12 changes: 8 additions & 4 deletions website/src/plugins/SelectReleasesPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
*/

// import util from 'util'
// import logger from '@docusaurus/logger'
import logger from '@docusaurus/logger'

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

export default async function SelectReleasesPlugin(context, options) {
return {
name: 'select-releases',
async allContentLoaded({allContent, actions}) {
async allContentLoaded({ allContent, actions }) {

const allBlogs = allContent['docusaurus-plugin-content-blog']
// logger.info('SelectReleasesPlugin 1 ' + util.inspect(allBlogs))
Expand All @@ -33,9 +33,13 @@ export default async function SelectReleasesPlugin(context, options) {
// logger.info('SelectReleasesPlugin 3 ' + util.inspect(post.metadata.tags))
post.metadata.tags.forEach(tag => {
if (tag.label === 'releases') {
const permalink = post.metadata.permalink.endsWith('/') ?
post.metadata.permalink :
post.metadata.permalink + '/'
// logger.info(permalink)
releasesTable.push({
title: post.metadata.title,
permalink: post.metadata.permalink,
permalink,
downloadUrl: post.metadata.frontMatter['download_url']
})
}
Expand All @@ -44,7 +48,7 @@ export default async function SelectReleasesPlugin(context, options) {

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

actions.setGlobalData({releasesTable: releasesTable})
actions.setGlobalData({ releasesTable: releasesTable })
},
};
}

0 comments on commit 8b73e88

Please sign in to comment.