@dogsbay/docs-layout 0.2.0-beta.26 → 0.2.0-beta.28
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/package.json +3 -3
- package/src/DocsLayout.astro +30 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dogsbay/docs-layout",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.28",
|
|
4
4
|
"description": "Standard documentation layout components for Dogsbay",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"./json-ld": "./src/json-ld.ts"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@dogsbay/ui": "0.2.0-beta.
|
|
33
|
-
"@dogsbay/primitives": "0.2.0-beta.
|
|
32
|
+
"@dogsbay/ui": "0.2.0-beta.28",
|
|
33
|
+
"@dogsbay/primitives": "0.2.0-beta.28"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"vitest": "^3.0.0"
|
package/src/DocsLayout.astro
CHANGED
|
@@ -133,16 +133,25 @@ interface Props {
|
|
|
133
133
|
/** Theme color hint for browsers (hex string) */
|
|
134
134
|
themeColor?: string;
|
|
135
135
|
/**
|
|
136
|
-
* Emit `<meta name="robots"
|
|
136
|
+
* Emit `noindex` in the `<meta name="robots">` directive when
|
|
137
137
|
* true. Tells external search engines (Google, Bing) to skip
|
|
138
|
-
* this page.
|
|
139
|
-
*
|
|
140
|
-
* page
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
138
|
+
* indexing this page. Independent of `nofollow` — common pattern
|
|
139
|
+
* for tag / index pages is noindex + follow (don't list this
|
|
140
|
+
* page in results, but do crawl through to the real content).
|
|
141
|
+
*
|
|
142
|
+
* Has NO effect on in-site Pagefind search — for that, use
|
|
143
|
+
* `excludeFromSearch`. The two are independent: a page can be
|
|
144
|
+
* excluded from external SEs but still appear in Pagefind (e.g.
|
|
145
|
+
* duplicate / old content readers might still want to find when
|
|
146
|
+
* they're already on the site), or vice versa.
|
|
144
147
|
*/
|
|
145
148
|
noindex?: boolean;
|
|
149
|
+
/**
|
|
150
|
+
* Emit `nofollow` in the `<meta name="robots">` directive when
|
|
151
|
+
* true. Tells crawlers not to follow outbound links from this
|
|
152
|
+
* page. Independent of `noindex`. Default false.
|
|
153
|
+
*/
|
|
154
|
+
nofollow?: boolean;
|
|
146
155
|
/**
|
|
147
156
|
* Exclude this page from in-site Pagefind search results.
|
|
148
157
|
*
|
|
@@ -407,6 +416,7 @@ const {
|
|
|
407
416
|
twitterHandle,
|
|
408
417
|
themeColor,
|
|
409
418
|
noindex,
|
|
419
|
+
nofollow,
|
|
410
420
|
excludeFromSearch,
|
|
411
421
|
plausibleDomain,
|
|
412
422
|
plausibleScriptUrl,
|
|
@@ -569,8 +579,19 @@ const siteIcon = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"
|
|
|
569
579
|
{favicon && <link rel="icon" href={favicon} />}
|
|
570
580
|
{themeColor && <meta name="theme-color" content={themeColor} />}
|
|
571
581
|
{/* External search engine directive — orthogonal to in-site
|
|
572
|
-
Pagefind exclusion.
|
|
573
|
-
|
|
582
|
+
Pagefind exclusion. `noindex` + `nofollow` are independent
|
|
583
|
+
bits per the meta-robots spec; emit only the directives that
|
|
584
|
+
are set. Combining them when both are set keeps the tag
|
|
585
|
+
compact (`<meta name="robots" content="noindex, nofollow">`)
|
|
586
|
+
instead of emitting two tags. */}
|
|
587
|
+
{(noindex || nofollow) && (
|
|
588
|
+
<meta
|
|
589
|
+
name="robots"
|
|
590
|
+
content={[noindex && "noindex", nofollow && "nofollow"]
|
|
591
|
+
.filter(Boolean)
|
|
592
|
+
.join(", ")}
|
|
593
|
+
/>
|
|
594
|
+
)}
|
|
574
595
|
|
|
575
596
|
{/* In-site Pagefind exclusion is wired via two coordinated
|
|
576
597
|
attributes on <body> and <main> below — see the prop docs
|