Skip to content

Commit

Permalink
Add Fleek CI pipeline.
Browse files Browse the repository at this point in the history
  • Loading branch information
polymutex committed Feb 6, 2025
1 parent 482e7e8 commit b4f8536
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 17 deletions.
1 change: 1 addition & 0 deletions .github/workflows/fleek-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ jobs:
FLEEK_TOKEN: ${{ secrets.FLEEK_TOKEN }}
FLEEK_PROJECT_ID: ${{ secrets.FLEEK_PROJECT_ID }}
NEXT_TELEMETRY_DISABLED: '1'
WALLETBEAT_URL_ROOT: 'https://beta.walletbeat.eth.limo'
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
File renamed without changes
File renamed without changes.
File renamed without changes
7 changes: 5 additions & 2 deletions src/app/wallet/[wallet]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import '../../global.css';
import type React from 'react';
import type { Metadata } from 'next';
import { generateBasicMetadata } from '@/components/metadata';
import { betaSiteRoot } from '@/constants';
import { betaImagesRoot, betaSiteRoot } from '@/constants';

interface WalletUrlParams {
wallet: string;
Expand Down Expand Up @@ -37,7 +37,10 @@ export async function generateMetadata({
title: `${walletMetadata.displayName} - Walletbeat`,
description: `How does ${walletMetadata.displayName} stack up as an Ethereum wallet?`,
route: `${betaSiteRoot}/wallet/${walletMetadata.id}`,
icons: `/images/wallets/${walletMetadata.id}.${walletMetadata.iconExtension}`,
mainIcon: {
url: `${betaImagesRoot}/wallets/${walletMetadata.id}.${walletMetadata.iconExtension}`,
},
favIcon: `${betaImagesRoot}/wallets/${walletMetadata.id}.${walletMetadata.iconExtension}`,
keywordsBefore: [
walletName,
walletMetadata.displayName,
Expand Down
40 changes: 25 additions & 15 deletions src/components/metadata.ts
Original file line number Diff line number Diff line change
@@ -1,52 +1,62 @@
import { getBaseUrl } from '@/base-url';
import type { Metadata } from 'next';
import type { Icons } from 'next/dist/lib/metadata/types/metadata-types';
import { betaImagesRoot } from '../constants';
import type { IconDescriptor } from 'next/dist/lib/metadata/types/metadata-types';

const siteName = 'Walletbeat';
const siteDescription =
'Walletbeat is an Ethereum wallet rating site. It aims to provide a trustworthy, up-to-date source of information about the state of the Ethereum wallet ecosystem';
const defaultKeywords = ['walletbeat', 'ethereum', 'wallet', 'wallets', 'wallet beat', 'evm'];
const defaultIcons: Icons = {
icon: [
{
url: `${betaImagesRoot}/favicon.ico`,
sizes: '16x16',
},
{
url: `${betaImagesRoot}/icon.jpg`,
},
],
const defaultFavicon: IconDescriptor = {
url: '/images/favicon.ico',
sizes: '16x16',
};
const defaultMainIcon: IconDescriptor = {
url: '/images/icon.jpg',
};
const locale = 'en-US';

export function generateBasicMetadata({
title,
route,
description = undefined,
icons = undefined,
mainIcon = undefined,
favIcon = undefined,
keywordsBefore = undefined,
keywordsAfter = undefined,
}: {
title: string;
route: string;
icons?: Metadata['icons'];
mainIcon?: IconDescriptor;
favIcon?: string;
description?: string;
keywordsBefore?: string[];
keywordsAfter?: string[];
}): Metadata {
let favIconDescriptor = defaultFavicon;
if (favIcon !== undefined) {
favIconDescriptor = { ...defaultFavicon, url: favIcon };
}
const mainIconDescriptor = mainIcon ?? defaultMainIcon;
const urlRoot = getBaseUrl();
return {
title,
applicationName: siteName,
description: description ?? siteDescription,
keywords: (keywordsBefore ?? []).concat(defaultKeywords).concat(keywordsAfter ?? []),
icons: icons ?? defaultIcons,
icons: [favIconDescriptor, mainIconDescriptor],
openGraph: {
type: 'website',
determiner: '',
url: `${urlRoot}${route}`,
title,
description: description ?? siteDescription,
siteName,
locale,
images: {
url: `${urlRoot}${mainIconDescriptor.url}`,
secureUrl: `${urlRoot}${mainIconDescriptor.url}`,
alt: title,
},
},
};
}

0 comments on commit b4f8536

Please sign in to comment.