fixed scripts and replaced consts

This commit is contained in:
kilyabin
2025-11-18 04:13:20 +04:00
parent 0bb41c897c
commit 327f143a29
10 changed files with 72 additions and 13 deletions

View File

@@ -6,6 +6,7 @@ import { NextSerialized, nextDeserialized, nextSerialized } from '@/app/utils/da
import { NavBar } from '@/widgets/navbar'
import { LastUpdateAt } from '@/entities/last-update-at'
import { groups } from '@/shared/data/groups'
import { SITE_URL } from '@/shared/constants/urls'
import crypto from 'crypto'
import React from 'react'
import { getDayOfWeek } from '@/shared/utils'
@@ -47,7 +48,7 @@ export default function HomePage(props: NextSerialized<PageProps>) {
<>
<Head>
<title>{`Группа ${group.name} — Расписание занятий в Колледже Связи`}</title>
<link rel="canonical" href={`https://kspsuti.ru/${group.id}`} />
<link rel="canonical" href={`${SITE_URL}/${group.id}`} />
<meta name="description" content={`Расписание занятий группы ${group.name} на неделю в Колледже Связи ПГУТИ. Расписание пар, материалы для подготовки и изменения в расписании.`} />
<meta property="og:title" content={`Группа ${group.name} — Расписание занятий в Колледже Связи`} />
<meta property="og:description" content={`Расписание занятий группы ${group.name} на неделю в Колледже Связи ПГУТИ. Расписание пар, материалы для подготовки и изменения в расписании.`} />

View File

@@ -1,13 +1,12 @@
import { ISitemapField, getServerSideSitemapLegacy } from 'next-sitemap'
import { GetServerSideProps } from 'next'
import { groups } from '@/shared/data/groups'
import { SITEMAP_SITE_URL } from '@/shared/constants/urls'
export const getServerSideProps: GetServerSideProps = async (ctx) => {
const siteURL = 'https://kspsuti.ru'
const fields = Object.keys(groups).map<ISitemapField>(group => (
{
loc: `${siteURL}/${group}`,
loc: `${SITEMAP_SITE_URL}/${group}`,
changefreq: 'weekly',
priority: 0.8
}