@sarimarcus/content-sites-ui 0.60.0 → 0.60.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
All packages in the platform release in lockstep; entries are per release version.
|
|
4
4
|
|
|
5
|
+
## 0.60.2 (2026-11-06)
|
|
6
|
+
|
|
7
|
+
Tag hubs can carry blocks around their list. Without the new slots the markup is unchanged: `render-diff` against 0.60.1 is identical (`tests/fixtures/render-diff/sla-3900-tag-page-slots.json`, plus `sla-3887-theming.json`).
|
|
8
|
+
|
|
9
|
+
- `ArticleTagPage`: new optional `start-here` (above the list) and `go-deeper` (after it) slots, as on `ArticleTopicPage` (SLA-3900).
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## 0.60.1 (2026-11-06)
|
|
13
|
+
|
|
14
|
+
Completes 0.60.0's nested article URLs: the topic nav inside the hub and tag pages now follows the site's routes. Without `routes` the markup is unchanged: `render-diff` against 0.60.0 is identical (`tests/fixtures/render-diff/article-nav-routes-default.json`).
|
|
15
|
+
|
|
16
|
+
- `ArticleTopicPage`, `ArticleTagPage`: new optional `routes` prop, passed to their `ArticleCategoryNav`, so a site with `routes.articleTopic` links its topic nav to its own hubs.
|
|
17
|
+
|
|
5
18
|
## 0.60.0 (2026-11-06)
|
|
6
19
|
|
|
7
20
|
Article cards and the editorial home lead link through core `articlePath`, so a site's `routes.articleItem` reaches them. Without that route the hrefs are unchanged: `render-diff` against 0.59.0 is identical for both with default routes (`tests/fixtures/render-diff/article-path-default.json`).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sarimarcus/content-sites-ui",
|
|
3
|
-
"version": "0.60.
|
|
3
|
+
"version": "0.60.2",
|
|
4
4
|
"description": "Universal Astro UI components, layout shell and design tokens shared by the content sites.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -51,6 +51,6 @@
|
|
|
51
51
|
"@lucide/astro": "^1.23.0",
|
|
52
52
|
"astro": "^7.0.6",
|
|
53
53
|
"tailwindcss": "^4.1.18",
|
|
54
|
-
"@sarimarcus/content-sites-core": "0.60.
|
|
54
|
+
"@sarimarcus/content-sites-core": "0.60.2"
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -3,14 +3,17 @@
|
|
|
3
3
|
* ArticleTagPage — a controlled tag hub (/articles/tag/<tag>) inside ArticlesListingPage (SLA-3716).
|
|
4
4
|
* Slots:
|
|
5
5
|
* breadcrumb — the site Breadcrumb.
|
|
6
|
+
* start-here — optional blocks above the list (e.g. key figures, a category breakdown).
|
|
6
7
|
* grid — the site's ArticleCardGrid for this tag.
|
|
7
8
|
* pagination — optional pagination.
|
|
9
|
+
* go-deeper — optional related-content blocks after the list.
|
|
8
10
|
*/
|
|
9
11
|
import Container from '../layout/Container.astro';
|
|
10
12
|
import Chip from '../primitives/Chip.astro';
|
|
11
13
|
import { getLabels } from '../internal/labels';
|
|
12
14
|
import ArticlesListingPage from './ArticlesListingPage.astro';
|
|
13
15
|
import ArticleCategoryNav from './ArticleCategoryNav.astro';
|
|
16
|
+
import type { SiteRoutes } from '@sarimarcus/content-sites-core/url';
|
|
14
17
|
import type { ArticleCategoryMeta } from './types';
|
|
15
18
|
|
|
16
19
|
export interface ArticleTagPill {
|
|
@@ -34,6 +37,8 @@ interface Props {
|
|
|
34
37
|
relatedTagsLimit?: number;
|
|
35
38
|
showRelatedTags?: boolean;
|
|
36
39
|
locale?: string;
|
|
40
|
+
/** Overrides of the article routes (`articles`, `articleTopic`), for the topic nav. */
|
|
41
|
+
routes?: SiteRoutes;
|
|
37
42
|
}
|
|
38
43
|
|
|
39
44
|
const {
|
|
@@ -48,6 +53,7 @@ const {
|
|
|
48
53
|
relatedTagsLimit,
|
|
49
54
|
showRelatedTags = true,
|
|
50
55
|
locale,
|
|
56
|
+
routes,
|
|
51
57
|
} = Astro.props;
|
|
52
58
|
const l = getLabels(locale).articleTagPage;
|
|
53
59
|
const resolvedEyebrow = eyebrow === false ? undefined : (eyebrow ?? l.eyebrow);
|
|
@@ -63,7 +69,7 @@ const countWord = count === 1 ? l.countOne : l.countMany;
|
|
|
63
69
|
|
|
64
70
|
<Container>
|
|
65
71
|
{categories && articles.length > 0 && (
|
|
66
|
-
<ArticleCategoryNav articles={articles} categories={categories} class="mb-8" />
|
|
72
|
+
<ArticleCategoryNav articles={articles} categories={categories} routes={routes} class="mb-8" />
|
|
67
73
|
)}
|
|
68
74
|
|
|
69
75
|
{showRelatedTags && relatedTags.length > 1 && (
|
|
@@ -87,9 +93,9 @@ const countWord = count === 1 ? l.countOne : l.countMany;
|
|
|
87
93
|
</div>
|
|
88
94
|
)}
|
|
89
95
|
|
|
90
|
-
<section id="tag-articles">
|
|
96
|
+
<slot name="start-here" /><section id="tag-articles">
|
|
91
97
|
<slot name="grid" />
|
|
92
98
|
<slot name="pagination" />
|
|
93
|
-
</section
|
|
99
|
+
</section><slot name="go-deeper" />
|
|
94
100
|
</Container>
|
|
95
101
|
</ArticlesListingPage>
|
|
@@ -19,6 +19,7 @@ import Callout from '../primitives/Callout.astro';
|
|
|
19
19
|
import type { TrustedHtml } from '../types';
|
|
20
20
|
import ArticlesListingPage from './ArticlesListingPage.astro';
|
|
21
21
|
import ArticleCategoryNav from './ArticleCategoryNav.astro';
|
|
22
|
+
import type { SiteRoutes } from '@sarimarcus/content-sites-core/url';
|
|
22
23
|
import type { ArticleCategoryMeta, TopicAuthorCard } from './types';
|
|
23
24
|
|
|
24
25
|
interface Props {
|
|
@@ -37,9 +38,11 @@ interface Props {
|
|
|
37
38
|
authors?: { heading: string; items: TopicAuthorCard[] };
|
|
38
39
|
/** The site's prose theme modifier for the overview, added to `prose` (a dark site needs its own body colour). */
|
|
39
40
|
proseClass?: string;
|
|
41
|
+
/** Overrides of the article routes (`articles`, `articleTopic`), for the topic nav. */
|
|
42
|
+
routes?: SiteRoutes;
|
|
40
43
|
}
|
|
41
44
|
|
|
42
|
-
const { eyebrow, heading, lede, articles, categories, category, currentPage, listHeading, overview, authors, proseClass = 'prose-lg' } = Astro.props;
|
|
45
|
+
const { eyebrow, heading, lede, articles, categories, category, currentPage, listHeading, overview, authors, proseClass = 'prose-lg', routes } = Astro.props;
|
|
43
46
|
const hub = currentPage === 1;
|
|
44
47
|
// Astro.slots.has() is true for a slotted expression that evaluated to false, so test what it rendered.
|
|
45
48
|
const faqHtml = hub && Astro.slots.has('faq') ? (await Astro.slots.render('faq')).trim() : '';
|
|
@@ -50,7 +53,7 @@ const faqHtml = hub && Astro.slots.has('faq') ? (await Astro.slots.render('faq')
|
|
|
50
53
|
<slot name="breadcrumb" slot="breadcrumb" />
|
|
51
54
|
<slot name="header-extra" slot="header-extra" />
|
|
52
55
|
<Container>
|
|
53
|
-
<ArticleCategoryNav articles={articles} categories={categories} current={category} class="mb-12" />
|
|
56
|
+
<ArticleCategoryNav articles={articles} categories={categories} current={category} routes={routes} class="mb-12" />
|
|
54
57
|
<slot name="start-here" /></Container>
|
|
55
58
|
|
|
56
59
|
{overview && (
|
|
@@ -103,7 +106,7 @@ const faqHtml = hub && Astro.slots.has('faq') ? (await Astro.slots.render('faq')
|
|
|
103
106
|
<ArticlesListingPage eyebrow={eyebrow} heading={heading} lede={lede}>
|
|
104
107
|
<slot name="breadcrumb" slot="breadcrumb" />
|
|
105
108
|
<Container>
|
|
106
|
-
<ArticleCategoryNav articles={articles} categories={categories} current={category} class="mb-10" />
|
|
109
|
+
<ArticleCategoryNav articles={articles} categories={categories} current={category} routes={routes} class="mb-10" />
|
|
107
110
|
<slot name="grid" />
|
|
108
111
|
<slot name="pagination" />
|
|
109
112
|
</Container>
|