Skip to content

Commit 0d9572c

Browse files
sametbasbugclaude
andcommitted
Tighten the archive header and give it its own page size
The heading repeated itself: a kicker reading "Arşiv" sat directly above an h1 reading "Equinox Haber · Arşiv, sayfa 2", on a page whose masthead already carries the publication name. The kicker is gone and the heading is now "Arşiv" or "Arşiv · Sayfa N". Ten stories per archive page instead of twenty. This gets its own constant rather than changing EQUINOX_HABER_PAGE_SIZE, which also feeds the homepage's featured panel — lowering that would have quietly changed which stories lead the front page. 30 archive pages become 59. Also dropped the canonical override on /sayfa/1. It pointed at / on the grounds that the two carried the same stories, which was true when /sayfa/N was the homepage's scroll continuation. The homepage does not use NewsStream at all; it has its own featured layout. The archive's first page is a page in its own right and should be indexable as one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 02c7f27 commit 0d9572c

3 files changed

Lines changed: 21 additions & 17 deletions

File tree

‎src/data/equinoxHaber.ts‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
import { getCollection, type CollectionEntry } from 'astro:content';
22
import { getNewsHomeHref, getNewsStreamPageHref } from './newsSite';
33

4+
/** Ana sayfanın öne çıkan panelini besleyen havuz. */
45
export const EQUINOX_HABER_PAGE_SIZE = 20;
6+
7+
/**
8+
* Arşiv sayfası ayrı bir boyut kullanır: arşivde okunan şey akış değil liste,
9+
* ve on başlık bir ekranda taranabiliyor. Ana sayfanın havuzuyla bağlanmaz —
10+
* o sayının değişmesi öne çıkan haber bileşimini de değiştirirdi.
11+
*/
12+
export const EQUINOX_HABER_ARCHIVE_PAGE_SIZE = 10;
513
export const NEWS_CATEGORIES = ['Siyaset', 'Ekonomi', 'Teknoloji', 'Bilim'] as const;
614

715
export type NewsCategory = (typeof NEWS_CATEGORIES)[number];

‎src/layouts/NewsLayout.astro‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ interface Props {
1616
showFooter?: boolean;
1717
noindex?: boolean;
1818
canonicalPath?: string;
19-
/** Başlığın üstündeki küçük etiket. Yanıp sönen nokta yalnız varsayılan
20-
* "Canlı akış" değerinde gösterilir; arşiv canlı bir yüzey değildir. */
19+
/** Başlığın üstündeki küçük etiket. Boş verilirse hiç basılmaz — arşivde
20+
* başlığın kendisi zaten "Arşiv" diyor, ikisi birden tekrar olurdu. Yanıp
21+
* sönen nokta yalnız varsayılan "Canlı akış" değerinde gösterilir. */
2122
kicker?: string;
2223
ogImage?: string;
2324
ogImageAlt?: string;
@@ -102,10 +103,12 @@ const blogHomeHref = isNewsSubdomainEnabled() ? getMainSiteUrl() : '/';
102103
{!hidePageHero && (
103104
<section class="news-hero">
104105
<div class="news-hero-copy">
105-
<p class="news-kicker">
106-
{isLiveSurface && <span class="news-live-dot" aria-hidden="true"></span>}
107-
{kicker}
108-
</p>
106+
{kicker && (
107+
<p class="news-kicker">
108+
{isLiveSurface && <span class="news-live-dot" aria-hidden="true"></span>}
109+
{kicker}
110+
</p>
111+
)}
109112
{pageTitle && <h1>{pageTitle}</h1>}
110113
{pageDescription && <p class="news-summary">{pageDescription}</p>}
111114
</div>

‎src/pages/sayfa/[page]/index.astro‎

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@ import type { GetStaticPaths, Page } from 'astro';
33
import NewsLayout from '../../../layouts/NewsLayout.astro';
44
import NewsStream from '../../../components/news/NewsStream.astro';
55
import ArchivePagination from '../../../components/news/ArchivePagination.astro';
6-
import { EQUINOX_HABER_PAGE_SIZE, getEquinoxHaberCategories, getPublishedEquinoxHaber, type EquinoxHaberEntry } from '../../../data/equinoxHaber';
7-
import { getNewsHomeHref } from '../../../data/newsSite';
6+
import { EQUINOX_HABER_ARCHIVE_PAGE_SIZE, getEquinoxHaberCategories, getPublishedEquinoxHaber, type EquinoxHaberEntry } from '../../../data/equinoxHaber';
87
98
export const getStaticPaths = (async ({ paginate }) => {
109
const entries = await getPublishedEquinoxHaber();
11-
return paginate(entries, { pageSize: EQUINOX_HABER_PAGE_SIZE });
10+
return paginate(entries, { pageSize: EQUINOX_HABER_ARCHIVE_PAGE_SIZE });
1211
}) satisfies GetStaticPaths;
1312
1413
interface Props {
@@ -21,11 +20,6 @@ const currentPage = page.currentPage;
2120
const totalPages = page.lastPage;
2221
const isFirstPage = currentPage === 1;
2322
24-
// Arşivin ilk sayfası ana sayfayla aynı haberleri taşır. Sayfanın kendisi
25-
// erişilebilir kalır — "Arşiv" bağlantısı bir yere düşmeli — ama kanonik adres
26-
// ana sayfadır; aynı içerik iki adresten indekslenmez.
27-
const canonicalPath = isFirstPage ? getNewsHomeHref() : undefined;
28-
2923
// BaseLayout başlığın önüne yayın adını kendisi ekliyor; buraya tekrar yazmak
3024
// "Equinox Haber | Equinox Haber | ..." üretiyordu.
3125
const title = isFirstPage ? 'Arşiv' : `Arşiv, sayfa ${currentPage}`;
@@ -37,9 +31,8 @@ const description = isFirstPage
3731
<NewsLayout
3832
title={title}
3933
description={description}
40-
canonicalPath={canonicalPath}
41-
kicker="Arşiv"
42-
pageTitle={isFirstPage ? 'Equinox Haber · Arşiv' : `Equinox Haber · Arşiv, sayfa ${currentPage}`}
34+
kicker=""
35+
pageTitle={isFirstPage ? 'Arşiv' : `Arşiv · Sayfa ${currentPage}`}
4336
pageDescription={`Yayımlanmış haberlerin tamamı, en yeniden eskiye. ${totalPages} sayfa.`}
4437
categories={categories}
4538
activeCategory="Tümü"

0 commit comments

Comments
 (0)