@sarimarcus/content-sites-ui 0.60.0 → 0.60.1
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,12 @@
|
|
|
2
2
|
|
|
3
3
|
All packages in the platform release in lockstep; entries are per release version.
|
|
4
4
|
|
|
5
|
+
## 0.60.1 (2026-11-06)
|
|
6
|
+
|
|
7
|
+
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`).
|
|
8
|
+
|
|
9
|
+
- `ArticleTopicPage`, `ArticleTagPage`: new optional `routes` prop, passed to their `ArticleCategoryNav`, so a site with `routes.articleTopic` links its topic nav to its own hubs.
|
|
10
|
+
|
|
5
11
|
## 0.60.0 (2026-11-06)
|
|
6
12
|
|
|
7
13
|
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.1",
|
|
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.1"
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -11,6 +11,7 @@ import Chip from '../primitives/Chip.astro';
|
|
|
11
11
|
import { getLabels } from '../internal/labels';
|
|
12
12
|
import ArticlesListingPage from './ArticlesListingPage.astro';
|
|
13
13
|
import ArticleCategoryNav from './ArticleCategoryNav.astro';
|
|
14
|
+
import type { SiteRoutes } from '@sarimarcus/content-sites-core/url';
|
|
14
15
|
import type { ArticleCategoryMeta } from './types';
|
|
15
16
|
|
|
16
17
|
export interface ArticleTagPill {
|
|
@@ -34,6 +35,8 @@ interface Props {
|
|
|
34
35
|
relatedTagsLimit?: number;
|
|
35
36
|
showRelatedTags?: boolean;
|
|
36
37
|
locale?: string;
|
|
38
|
+
/** Overrides of the article routes (`articles`, `articleTopic`), for the topic nav. */
|
|
39
|
+
routes?: SiteRoutes;
|
|
37
40
|
}
|
|
38
41
|
|
|
39
42
|
const {
|
|
@@ -48,6 +51,7 @@ const {
|
|
|
48
51
|
relatedTagsLimit,
|
|
49
52
|
showRelatedTags = true,
|
|
50
53
|
locale,
|
|
54
|
+
routes,
|
|
51
55
|
} = Astro.props;
|
|
52
56
|
const l = getLabels(locale).articleTagPage;
|
|
53
57
|
const resolvedEyebrow = eyebrow === false ? undefined : (eyebrow ?? l.eyebrow);
|
|
@@ -63,7 +67,7 @@ const countWord = count === 1 ? l.countOne : l.countMany;
|
|
|
63
67
|
|
|
64
68
|
<Container>
|
|
65
69
|
{categories && articles.length > 0 && (
|
|
66
|
-
<ArticleCategoryNav articles={articles} categories={categories} class="mb-8" />
|
|
70
|
+
<ArticleCategoryNav articles={articles} categories={categories} routes={routes} class="mb-8" />
|
|
67
71
|
)}
|
|
68
72
|
|
|
69
73
|
{showRelatedTags && relatedTags.length > 1 && (
|
|
@@ -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>
|