📝 priettier check
All checks were successful
PR Checks / lint-and-build (pull_request) Successful in 18s

This commit is contained in:
RJ
2025-12-04 15:57:39 +02:00
parent b68325123b
commit 101624c4d5
32 changed files with 185 additions and 172 deletions

View File

@@ -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[] = []

View File

@@ -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 []