Files
explore/lib/metadata/getCanonicalUrl.ts
tom goriunovandGitHub 2e9728ef36 SEO: add canonicals and change meta titles (#1960)
* add canonical link tag

* change title templates

* adjust title for dapps category pages

* change h1 titles

* Revert "adjust title for dapps category pages"

This reverts commit 88ec5228ff839f6559db9bb29922e23334819911.

* fix unit test
2024-05-29 14:37:50 +02:00

25 lines
474 B
TypeScript

import type { Route } from 'nextjs-routes';
import config from 'configs/app';
const CANONICAL_ROUTES: Array<Route['pathname']> = [
'/',
'/txs',
'/ops',
'/verified-contracts',
'/name-domains',
'/withdrawals',
'/tokens',
'/stats',
'/api-docs',
'/graphiql',
'/gas-tracker',
'/apps',
];
export default function getCanonicalUrl(pathname: Route['pathname']) {
if (CANONICAL_ROUTES.includes(pathname)) {
return config.app.baseUrl + pathname;
}
}