📝 priettier check
All checks were successful
PR Checks / lint-and-build (pull_request) Successful in 18s
All checks were successful
PR Checks / lint-and-build (pull_request) Successful in 18s
This commit is contained in:
@@ -3,16 +3,9 @@
|
||||
* Ensures all required environment variables are set before deployment
|
||||
*/
|
||||
|
||||
const requiredEnvVars = [
|
||||
'NEXT_PUBLIC_SITE_URL',
|
||||
'NODE_ENV',
|
||||
] as const
|
||||
const requiredEnvVars = ['NEXT_PUBLIC_SITE_URL', 'NODE_ENV'] as const
|
||||
|
||||
const optionalEnvVars = [
|
||||
'PORT',
|
||||
'HOSTNAME',
|
||||
'NEXT_PUBLIC_GA_ID',
|
||||
] as const
|
||||
const optionalEnvVars = ['PORT', 'HOSTNAME', 'NEXT_PUBLIC_GA_ID'] as const
|
||||
|
||||
export function validateEnvironment() {
|
||||
const missingVars: string[] = []
|
||||
|
||||
10
lib/tags.ts
10
lib/tags.ts
@@ -65,7 +65,11 @@ export async function getPopularTags(locale: string = 'en', limit = 10): Promise
|
||||
return allTags.slice(0, limit)
|
||||
}
|
||||
|
||||
export async function getRelatedTags(tagSlug: string, locale: string = 'en', limit = 5): Promise<TagInfo[]> {
|
||||
export async function getRelatedTags(
|
||||
tagSlug: string,
|
||||
locale: string = 'en',
|
||||
limit = 5
|
||||
): Promise<TagInfo[]> {
|
||||
const posts = await getPostsByTag(tagSlug, locale)
|
||||
const relatedTagMap = new Map<string, number>()
|
||||
|
||||
@@ -107,7 +111,9 @@ export function validateTags(tags: any): string[] {
|
||||
return validTags
|
||||
}
|
||||
|
||||
export async function getTagCloud(locale: string = 'en'): Promise<Array<TagInfo & { size: 'sm' | 'md' | 'lg' | 'xl' }>> {
|
||||
export async function getTagCloud(
|
||||
locale: string = 'en'
|
||||
): Promise<Array<TagInfo & { size: 'sm' | 'md' | 'lg' | 'xl' }>> {
|
||||
const tags = await getAllTags(locale)
|
||||
if (tags.length === 0) return []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user