@sarimarcus/content-sites-core 0.15.1 → 0.16.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,10 @@
|
|
|
2
2
|
|
|
3
3
|
All packages in the platform release in lockstep; entries are per release version.
|
|
4
4
|
|
|
5
|
+
## 0.16.0 (2026-10-01)
|
|
6
|
+
|
|
7
|
+
- `./config`: `PAGEFIND_EXCLUDE_SELECTORS`, the selectors `defineSiteConfig` passes to Pagefind, now exported (SLA-2735).
|
|
8
|
+
|
|
5
9
|
## 0.15.1 (2026-10-01)
|
|
6
10
|
|
|
7
11
|
- No changes; lockstep release with ui (SLA-2736).
|
package/dist/config/index.d.ts
CHANGED
|
@@ -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';
|
package/dist/config/index.js
CHANGED
|
@@ -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: [
|
|
150
|
+
excludeSelectors: [...PAGEFIND_EXCLUDE_SELECTORS],
|
|
149
151
|
forceLanguage: opts.language ?? 'en',
|
|
150
152
|
},
|
|
151
153
|
}),
|
package/package.json
CHANGED
package/src/config/index.ts
CHANGED
|
@@ -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';
|
package/src/config/siteConfig.ts
CHANGED
|
@@ -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: [
|
|
182
|
+
excludeSelectors: [...PAGEFIND_EXCLUDE_SELECTORS],
|
|
180
183
|
forceLanguage: opts.language ?? 'en',
|
|
181
184
|
},
|
|
182
185
|
}),
|