@fullstackdatasolutions/articles 1.3.0 → 1.4.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 +16 -0
- package/README.md +12 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js.map +1 -1
- package/dist/nextjs.cjs +23 -25
- package/dist/nextjs.cjs.map +1 -1
- package/dist/nextjs.d.cts +16 -0
- package/dist/nextjs.d.ts +16 -0
- package/dist/nextjs.js +23 -25
- package/dist/nextjs.js.map +1 -1
- package/dist/server.cjs +23 -8
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +16 -0
- package/dist/server.d.ts +16 -0
- package/dist/server.js +23 -8
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/server-articles.test.ts +70 -0
- package/src/articlesConfig.ts +16 -0
- package/src/server-articles.ts +32 -5
package/dist/index.d.cts
CHANGED
|
@@ -591,6 +591,22 @@ interface ArticlesConfig {
|
|
|
591
591
|
* a config is available (i.e. via `getArticleMarkdownResponse`).
|
|
592
592
|
*/
|
|
593
593
|
markdownTwinHeader?: boolean;
|
|
594
|
+
/**
|
|
595
|
+
* Set to `false` to stop serving the `category/`, `authors/`, and `series/`
|
|
596
|
+
* listing twins with `X-Robots-Tag: noindex`. Default: `true`.
|
|
597
|
+
*
|
|
598
|
+
* Only the listing twins are configurable. Article twins are always
|
|
599
|
+
* `noindex`: an article twin is the same text as exactly one HTML article,
|
|
600
|
+
* so indexing it can only ever split that article's own signal between two
|
|
601
|
+
* URLs. A listing twin is a different case - it is a generated index of a
|
|
602
|
+
* category or author rather than a copy of one page - so a site may have a
|
|
603
|
+
* reason to let it rank, and this leaves that open.
|
|
604
|
+
*
|
|
605
|
+
* Either way AI crawlers can still fetch every twin; `noindex` only removes
|
|
606
|
+
* them from search results, and never blocks the fetch that is the point of
|
|
607
|
+
* publishing them.
|
|
608
|
+
*/
|
|
609
|
+
listingTwinNoindex?: boolean;
|
|
594
610
|
/**
|
|
595
611
|
* Vendor-neutral event callback (Phase 27F). Fired by components/hooks at
|
|
596
612
|
* meaningful reader-journey moments (see `ArticleEvent` in `events.ts`).
|
package/dist/index.d.ts
CHANGED
|
@@ -591,6 +591,22 @@ interface ArticlesConfig {
|
|
|
591
591
|
* a config is available (i.e. via `getArticleMarkdownResponse`).
|
|
592
592
|
*/
|
|
593
593
|
markdownTwinHeader?: boolean;
|
|
594
|
+
/**
|
|
595
|
+
* Set to `false` to stop serving the `category/`, `authors/`, and `series/`
|
|
596
|
+
* listing twins with `X-Robots-Tag: noindex`. Default: `true`.
|
|
597
|
+
*
|
|
598
|
+
* Only the listing twins are configurable. Article twins are always
|
|
599
|
+
* `noindex`: an article twin is the same text as exactly one HTML article,
|
|
600
|
+
* so indexing it can only ever split that article's own signal between two
|
|
601
|
+
* URLs. A listing twin is a different case - it is a generated index of a
|
|
602
|
+
* category or author rather than a copy of one page - so a site may have a
|
|
603
|
+
* reason to let it rank, and this leaves that open.
|
|
604
|
+
*
|
|
605
|
+
* Either way AI crawlers can still fetch every twin; `noindex` only removes
|
|
606
|
+
* them from search results, and never blocks the fetch that is the point of
|
|
607
|
+
* publishing them.
|
|
608
|
+
*/
|
|
609
|
+
listingTwinNoindex?: boolean;
|
|
594
610
|
/**
|
|
595
611
|
* Vendor-neutral event callback (Phase 27F). Fired by components/hooks at
|
|
596
612
|
* meaningful reader-journey moments (see `ArticleEvent` in `events.ts`).
|