@sarimarcus/content-sites-core 0.15.1 → 0.17.0

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,14 @@
2
2
 
3
3
  All packages in the platform release in lockstep; entries are per release version.
4
4
 
5
+ ## 0.17.0 (2026-10-01)
6
+
7
+ - No changes; released in lockstep (SLA-2741).
8
+
9
+ ## 0.16.0 (2026-10-01)
10
+
11
+ - `./config`: `PAGEFIND_EXCLUDE_SELECTORS`, the selectors `defineSiteConfig` passes to Pagefind, now exported (SLA-2735).
12
+
5
13
  ## 0.15.1 (2026-10-01)
6
14
 
7
15
  - No changes; lockstep release with ui (SLA-2736).
@@ -1,4 +1,4 @@
1
- export { defineSiteConfig, buildLastmodMap, sitemapSerialize } from './siteConfig.ts';
1
+ export { defineSiteConfig, buildLastmodMap, sitemapSerialize, PAGEFIND_EXCLUDE_SELECTORS } from './siteConfig.ts';
2
2
  export type { SiteConfigOptions, SitemapRule, PagefindIntegration } from './siteConfig.ts';
3
3
  export { outboundLinkRel } from './outboundLinkRel.ts';
4
4
  export type { OutboundLinkRelOptions } from './outboundLinkRel.ts';
@@ -1,4 +1,4 @@
1
1
  // Public surface of @sarimarcus/content-sites-core/config. Node-only: astro.config.mjs imports it.
2
- export { defineSiteConfig, buildLastmodMap, sitemapSerialize } from "./siteConfig.js";
2
+ export { defineSiteConfig, buildLastmodMap, sitemapSerialize, PAGEFIND_EXCLUDE_SELECTORS } from "./siteConfig.js";
3
3
  export { outboundLinkRel } from "./outboundLinkRel.js";
4
4
  export { latestGuideDate, guideDateMap, guidePublishDates } from "./guideDates.js";
@@ -5,6 +5,8 @@ export interface SitemapRule {
5
5
  priority?: number;
6
6
  changefreq?: 'always' | 'hourly' | 'daily' | 'weekly' | 'monthly' | 'yearly' | 'never';
7
7
  }
8
+ /** What Pagefind leaves out of the index on every site: site chrome, breadcrumbs and anything marked ignore. */
9
+ export declare const PAGEFIND_EXCLUDE_SELECTORS: readonly string[];
8
10
  /** astro-pagefind's default export. Passed in: it ships TypeScript source, which plain Node refuses under node_modules. */
9
11
  export type PagefindIntegration = (options: {
10
12
  indexConfig: {
@@ -6,6 +6,8 @@ import sitemap, {} from '@astrojs/sitemap';
6
6
  import { outboundLinkRel } from "./outboundLinkRel.js";
7
7
  import { guideDateMap } from "./guideDates.js";
8
8
  import { EPOCH } from "../dates/lastmod.js";
9
+ /** What Pagefind leaves out of the index on every site: site chrome, breadcrumbs and anything marked ignore. */
10
+ export const PAGEFIND_EXCLUDE_SELECTORS = ['nav', 'footer', '.breadcrumb', '[data-pagefind-ignore]'];
9
11
  // A date-only value is stamped at noon UTC, except today's at midnight: never in the future, and the same on every
10
12
  // build that day. Only a missing date takes the build instant (the lookup always ends at a date).
11
13
  function toDateWithTime(dateStr) {
@@ -145,7 +147,7 @@ export function defineSiteConfig(opts) {
145
147
  sitemap({ serialize: sitemapSerialize(lastmodMap, mostRecent, opts.sitemap) }),
146
148
  opts.pagefind({
147
149
  indexConfig: {
148
- excludeSelectors: ['nav', 'footer', '.breadcrumb', '[data-pagefind-ignore]'],
150
+ excludeSelectors: [...PAGEFIND_EXCLUDE_SELECTORS],
149
151
  forceLanguage: opts.language ?? 'en',
150
152
  },
151
153
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sarimarcus/content-sites-core",
3
- "version": "0.15.1",
3
+ "version": "0.17.0",
4
4
  "description": "Non-visual utilities, Astro config builders and SEO schema assembly shared by the content sites.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1,5 +1,5 @@
1
1
  // Public surface of @sarimarcus/content-sites-core/config. Node-only: astro.config.mjs imports it.
2
- export { defineSiteConfig, buildLastmodMap, sitemapSerialize } from './siteConfig.ts';
2
+ export { defineSiteConfig, buildLastmodMap, sitemapSerialize, PAGEFIND_EXCLUDE_SELECTORS } from './siteConfig.ts';
3
3
  export type { SiteConfigOptions, SitemapRule, PagefindIntegration } from './siteConfig.ts';
4
4
  export { outboundLinkRel } from './outboundLinkRel.ts';
5
5
  export type { OutboundLinkRelOptions } from './outboundLinkRel.ts';
@@ -15,6 +15,9 @@ export interface SitemapRule {
15
15
  changefreq?: 'always' | 'hourly' | 'daily' | 'weekly' | 'monthly' | 'yearly' | 'never';
16
16
  }
17
17
 
18
+ /** What Pagefind leaves out of the index on every site: site chrome, breadcrumbs and anything marked ignore. */
19
+ export const PAGEFIND_EXCLUDE_SELECTORS: readonly string[] = ['nav', 'footer', '.breadcrumb', '[data-pagefind-ignore]'];
20
+
18
21
  /** astro-pagefind's default export. Passed in: it ships TypeScript source, which plain Node refuses under node_modules. */
19
22
  export type PagefindIntegration = (options: { indexConfig: { excludeSelectors: string[]; forceLanguage: string } }) => AstroIntegration;
20
23
 
@@ -176,7 +179,7 @@ export function defineSiteConfig(opts: SiteConfigOptions): AstroUserConfig {
176
179
  sitemap({ serialize: sitemapSerialize(lastmodMap, mostRecent, opts.sitemap) }),
177
180
  opts.pagefind({
178
181
  indexConfig: {
179
- excludeSelectors: ['nav', 'footer', '.breadcrumb', '[data-pagefind-ignore]'],
182
+ excludeSelectors: [...PAGEFIND_EXCLUDE_SELECTORS],
180
183
  forceLanguage: opts.language ?? 'en',
181
184
  },
182
185
  }),