-
Notifications
You must be signed in to change notification settings - Fork 490
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* og improvements * update review configs * review fix * review fix 2
- Loading branch information
Showing
19 changed files
with
139 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import app from './app'; | ||
import { getEnvValue, getExternalAssetFilePath } from './utils'; | ||
|
||
const defaultImageUrl = app.baseUrl + '/static/og_placeholder.png'; | ||
|
||
const meta = Object.freeze({ | ||
promoteBlockscoutInTitle: getEnvValue(process.env.NEXT_PUBLIC_PROMOTE_BLOCKSCOUT_IN_TITLE) || 'true', | ||
og: { | ||
description: getEnvValue(process.env.NEXT_PUBLIC_OG_DESCRIPTION) || '', | ||
imageUrl: getExternalAssetFilePath('NEXT_PUBLIC_OG_IMAGE_URL', process.env.NEXT_PUBLIC_OG_IMAGE_URL) || defaultImageUrl, | ||
}, | ||
}); | ||
|
||
export default meta; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import type { Route } from 'nextjs-routes'; | ||
|
||
type OGPageType = 'Homepage' | 'Root page' | 'Regular page'; | ||
|
||
const OG_TYPE_DICT: Record<Route['pathname'], OGPageType> = { | ||
'/': 'Homepage', | ||
'/txs': 'Root page', | ||
'/tx/[hash]': 'Regular page', | ||
'/blocks': 'Root page', | ||
'/block/[height_or_hash]': 'Regular page', | ||
'/accounts': 'Root page', | ||
'/address/[hash]': 'Regular page', | ||
'/verified-contracts': 'Root page', | ||
'/address/[hash]/contract-verification': 'Regular page', | ||
'/tokens': 'Root page', | ||
'/token/[hash]': 'Regular page', | ||
'/token/[hash]/instance/[id]': 'Regular page', | ||
'/apps': 'Root page', | ||
'/apps/[id]': 'Regular page', | ||
'/stats': 'Root page', | ||
'/api-docs': 'Regular page', | ||
'/graphiql': 'Regular page', | ||
'/search-results': 'Regular page', | ||
'/auth/profile': 'Root page', | ||
'/account/watchlist': 'Regular page', | ||
'/account/api-key': 'Regular page', | ||
'/account/custom-abi': 'Regular page', | ||
'/account/public-tags-request': 'Regular page', | ||
'/account/tag-address': 'Regular page', | ||
'/account/verified-addresses': 'Root page', | ||
'/withdrawals': 'Root page', | ||
'/visualize/sol2uml': 'Regular page', | ||
'/csv-export': 'Regular page', | ||
'/l2-deposits': 'Root page', | ||
'/l2-output-roots': 'Root page', | ||
'/l2-txn-batches': 'Root page', | ||
'/l2-withdrawals': 'Root page', | ||
'/404': 'Regular page', | ||
|
||
// service routes, added only to make typescript happy | ||
'/login': 'Regular page', | ||
'/api/media-type': 'Regular page', | ||
'/api/proxy': 'Regular page', | ||
'/api/csrf': 'Regular page', | ||
'/api/healthz': 'Regular page', | ||
'/auth/auth0': 'Regular page', | ||
'/auth/unverified-email': 'Regular page', | ||
}; | ||
|
||
export default function getPageOgType(pathname: Route['pathname']) { | ||
return OG_TYPE_DICT[pathname]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.