react-cheminfo 0.4.0 → 0.4.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/lib/ecosystem/core/index.d.ts +1 -1
- package/lib/ecosystem/core/index.d.ts.map +1 -1
- package/lib/ecosystem/core/index.js +1 -1
- package/lib/ecosystem/core/index.js.map +1 -1
- package/lib/ecosystem/core/lookup.d.ts +11 -0
- package/lib/ecosystem/core/lookup.d.ts.map +1 -1
- package/lib/ecosystem/core/lookup.js +15 -0
- package/lib/ecosystem/core/lookup.js.map +1 -1
- package/lib/ecosystem/core/sites.d.ts +1 -1
- package/lib/ecosystem/core/sites.d.ts.map +1 -1
- package/lib/ecosystem/core/sites.js +4 -4
- package/lib/ecosystem/core/sites.js.map +1 -1
- package/lib/ecosystem/ui/glyphs.js +1 -1
- package/lib/ecosystem/ui/glyphs.js.map +1 -1
- package/lib/seo/core/index.d.ts +6 -0
- package/lib/seo/core/index.d.ts.map +1 -1
- package/lib/seo/core/index.js +3 -0
- package/lib/seo/core/index.js.map +1 -1
- package/lib/seo/core/pageMeta.d.ts +60 -0
- package/lib/seo/core/pageMeta.d.ts.map +1 -0
- package/lib/seo/core/pageMeta.js +91 -0
- package/lib/seo/core/pageMeta.js.map +1 -0
- package/lib/seo/core/routes.d.ts +52 -0
- package/lib/seo/core/routes.d.ts.map +1 -0
- package/lib/seo/core/routes.js +62 -0
- package/lib/seo/core/routes.js.map +1 -0
- package/lib/seo/core/siteFiles.d.ts +73 -0
- package/lib/seo/core/siteFiles.d.ts.map +1 -0
- package/lib/seo/core/siteFiles.js +100 -0
- package/lib/seo/core/siteFiles.js.map +1 -0
- package/lib/seo/vite/index.d.ts +5 -0
- package/lib/seo/vite/index.d.ts.map +1 -0
- package/lib/seo/vite/index.js +3 -0
- package/lib/seo/vite/index.js.map +1 -0
- package/lib/seo/vite/ogCard.d.ts +33 -0
- package/lib/seo/vite/ogCard.d.ts.map +1 -0
- package/lib/seo/vite/ogCard.js +72 -0
- package/lib/seo/vite/ogCard.js.map +1 -0
- package/lib/seo/vite/prerender.d.ts +58 -0
- package/lib/seo/vite/prerender.d.ts.map +1 -0
- package/lib/seo/vite/prerender.js +76 -0
- package/lib/seo/vite/prerender.js.map +1 -0
- package/lib/vite.d.ts +2 -0
- package/lib/vite.d.ts.map +1 -0
- package/lib/vite.js +2 -0
- package/lib/vite.js.map +1 -0
- package/package.json +7 -2
- package/src/ecosystem/core/index.ts +1 -1
- package/src/ecosystem/core/lookup.ts +16 -0
- package/src/ecosystem/core/sites.ts +5 -5
- package/src/ecosystem/ui/glyphs.tsx +1 -1
- package/src/seo/core/index.ts +20 -0
- package/src/seo/core/pageMeta.ts +127 -0
- package/src/seo/core/routes.ts +79 -0
- package/src/seo/core/siteFiles.ts +150 -0
- package/src/seo/vite/index.ts +4 -0
- package/src/seo/vite/ogCard.ts +92 -0
- package/src/seo/vite/prerender.ts +156 -0
- package/src/vite.ts +1 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { renderEcosystemLinksHtml } from './links.ts';
|
|
2
|
-
export { findSiteByHost, siteById } from './lookup.ts';
|
|
2
|
+
export { findSiteByHost, siteById, siteDisplayName } from './lookup.ts';
|
|
3
3
|
export type { EcosystemSite, SiteId, SiteMarkColors, SiteName, } from './sites.ts';
|
|
4
4
|
export { ECOSYSTEM_SITES, siteUrl } from './sites.ts';
|
|
5
5
|
export { siteThemeColor, siteTokensCss } from './tokens.ts';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACxE,YAAY,EACV,aAAa,EACb,MAAM,EACN,cAAc,EACd,QAAQ,GACT,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { renderEcosystemLinksHtml } from "./links.js";
|
|
2
|
-
export { findSiteByHost, siteById } from "./lookup.js";
|
|
2
|
+
export { findSiteByHost, siteById, siteDisplayName } from "./lookup.js";
|
|
3
3
|
export { ECOSYSTEM_SITES, siteUrl } from "./sites.js";
|
|
4
4
|
export { siteThemeColor, siteTokensCss } from "./tokens.js";
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ecosystem/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ecosystem/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAOxE,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -6,6 +6,17 @@ import type { EcosystemSite, SiteId } from './sites.ts';
|
|
|
6
6
|
* @throws {Error} When no site of the family carries that identifier.
|
|
7
7
|
*/
|
|
8
8
|
export declare function siteById(id: SiteId): EcosystemSite;
|
|
9
|
+
/**
|
|
10
|
+
* The site's name as prose, for a page title, a card or a citation.
|
|
11
|
+
*
|
|
12
|
+
* An address-shaped name is written as the address it is — `3d` and `cheminfo`
|
|
13
|
+
* are two halves of `3d.cheminfo.org`, and joining them would read `3dcheminfo`
|
|
14
|
+
* — while a product-shaped one is its two halves run together, as its wordmark
|
|
15
|
+
* sets them.
|
|
16
|
+
* @param site - The site being named.
|
|
17
|
+
* @returns What the site is called, in one string.
|
|
18
|
+
*/
|
|
19
|
+
export declare function siteDisplayName(site: EcosystemSite): string;
|
|
9
20
|
/**
|
|
10
21
|
* The site a page is being served from, so a header can mark itself as the
|
|
11
22
|
* current one without being told which site it belongs to.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lookup.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/core/lookup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAGxD;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa,CAKlD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAQtE"}
|
|
1
|
+
{"version":3,"file":"lookup.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/core/lookup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAGxD;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa,CAKlD;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CAI3D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAQtE"}
|
|
@@ -12,6 +12,21 @@ export function siteById(id) {
|
|
|
12
12
|
}
|
|
13
13
|
throw new Error(`unknown ecosystem site: ${id}`);
|
|
14
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* The site's name as prose, for a page title, a card or a citation.
|
|
17
|
+
*
|
|
18
|
+
* An address-shaped name is written as the address it is — `3d` and `cheminfo`
|
|
19
|
+
* are two halves of `3d.cheminfo.org`, and joining them would read `3dcheminfo`
|
|
20
|
+
* — while a product-shaped one is its two halves run together, as its wordmark
|
|
21
|
+
* sets them.
|
|
22
|
+
* @param site - The site being named.
|
|
23
|
+
* @returns What the site is called, in one string.
|
|
24
|
+
*/
|
|
25
|
+
export function siteDisplayName(site) {
|
|
26
|
+
return site.name.dot === true
|
|
27
|
+
? site.host
|
|
28
|
+
: `${site.name.lead}${site.name.alt}`;
|
|
29
|
+
}
|
|
15
30
|
/**
|
|
16
31
|
* The site a page is being served from, so a header can mark itself as the
|
|
17
32
|
* current one without being told which site it belongs to.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lookup.js","sourceRoot":"","sources":["../../../src/ecosystem/core/lookup.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CAAC,EAAU;IACjC,KAAK,MAAM,IAAI,IAAI,eAAe,EAAE,CAAC;QACnC,IAAI,IAAI,CAAC,EAAE,KAAK,EAAE;YAAE,OAAO,IAAI,CAAC;IAClC,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,2BAA2B,EAAE,EAAE,CAAC,CAAC;AACnD,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,MAAM,MAAM,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IACnC,IAAI,MAAM,KAAK,EAAE;QAAE,OAAO,SAAS,CAAC;IAEpC,KAAK,MA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CAAC,CAAC;IACnC,IAAI,MAAM,KAAK,EAAE;QAAE,OAAO,SAAS,CAAC;IAEpC,KAAK,MAAM,IAAI,IAAI,eAAe,EAAE,CAAC;QACnC,IAAI,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,MAAM;YAAE,OAAO,IAAI,CAAC;IACvD,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,aAAa,CAAC,IAAY;IACjC,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IACrE,OAAO,WAAW,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;AAC7E,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** The sites the menu links to, in the order they are listed. */
|
|
2
|
-
export type SiteId = 'inchi' | 'vcl' | 'smiles' | 'chemcalc' | 'nmrium' | 'surge' | 'tex' | 'lcao' | 'regexp' | 'pdb' | 'elucidation' | 'equilibrium' | 'polycarp' | '3d' | '
|
|
2
|
+
export type SiteId = 'inchi' | 'vcl' | 'smiles' | 'chemcalc' | 'nmrium' | 'surge' | 'tex' | 'lcao' | 'regexp' | 'pdb' | 'elucidation' | 'equilibrium' | 'polycarp' | '3d' | 'periodic-table';
|
|
3
3
|
export interface SiteName {
|
|
4
4
|
/** First half of the name, set in the site's leading colour. */
|
|
5
5
|
lead: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sites.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/core/sites.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,MAAM,MAAM,MAAM,GACd,OAAO,GACP,KAAK,GACL,QAAQ,GACR,UAAU,GACV,QAAQ,GACR,OAAO,GACP,KAAK,GACL,MAAM,GACN,QAAQ,GACR,KAAK,GACL,aAAa,GACb,aAAa,GACb,UAAU,GACV,IAAI,GACJ,
|
|
1
|
+
{"version":3,"file":"sites.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/core/sites.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,MAAM,MAAM,MAAM,GACd,OAAO,GACP,KAAK,GACL,QAAQ,GACR,UAAU,GACV,QAAQ,GACR,OAAO,GACP,KAAK,GACL,MAAM,GACN,QAAQ,GACR,KAAK,GACL,aAAa,GACb,aAAa,GACb,UAAU,GACV,IAAI,GACJ,gBAAgB,CAAC;AAErB,MAAM,WAAW,QAAQ;IACvB,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,GAAG,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,iEAAiE;IACjE,IAAI,EAAE,QAAQ,CAAC;IACf,yDAAyD;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,4DAA4D;IAC5D,UAAU,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,IAAI,EAAE,cAAc,CAAC;CACtB;AAED,MAAM,WAAW,cAAc;IAC7B,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,aAAa,EAuJnD,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CAEnD"}
|
|
@@ -144,10 +144,10 @@ export const ECOSYSTEM_SITES = [
|
|
|
144
144
|
mark: { plate: '#155e75', accent: '#f97316' },
|
|
145
145
|
},
|
|
146
146
|
{
|
|
147
|
-
id: '
|
|
148
|
-
name: { lead: '
|
|
149
|
-
host: '
|
|
150
|
-
repository: 'https://github.com/cheminfo/
|
|
147
|
+
id: 'periodic-table',
|
|
148
|
+
name: { lead: 'Periodic', alt: 'Table' },
|
|
149
|
+
host: 'periodic-table.cheminfo.org',
|
|
150
|
+
repository: 'https://github.com/cheminfo/periodic-table.cheminfo.org',
|
|
151
151
|
tagline: 'The periodic table, coloured, plotted and taken apart.',
|
|
152
152
|
brand: '#15803d',
|
|
153
153
|
brandAlt: '#a16207',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sites.js","sourceRoot":"","sources":["../../../src/ecosystem/core/sites.ts"],"names":[],"mappings":"AAkEA;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAA6B;IACvD;QACE,EAAE,EAAE,OAAO;QACX,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE;QACnD,IAAI,EAAE,oBAAoB;QAC1B,UAAU,EAAE,gDAAgD;QAC5D,OAAO,EAAE,sDAAsD;QAC/D,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE;KAC9C;IACD;QACE,EAAE,EAAE,KAAK;QACT,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE;QACjD,IAAI,EAAE,kBAAkB;QACxB,UAAU,EAAE,8CAA8C;QAC1D,OAAO,EAAE,uDAAuD;QAChE,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE,EAAE,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E,SAAS;QAChB,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE;KAC9C;IACD;QACE,EAAE,EAAE,gBAAgB;QACpB,IAAI,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,OAAO,EAAE;QACxC,IAAI,EAAE,6BAA6B;QACnC,UAAU,EAAE,yDAAyD;QACrE,OAAO,EAAE,wDAAwD;QACjE,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE;KAC9C;CACF,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,OAAO,CAAC,IAAmB;IACzC,OAAO,WAAW,IAAI,CAAC,IAAI,GAAG,CAAC;AACjC,CAAC"}
|
|
@@ -33,7 +33,7 @@ export const GLYPHS = {
|
|
|
33
33
|
// The stepped corner of the table, with the one cell a visitor has picked
|
|
34
34
|
// carrying the accent — which is what every tool of that site is: the table,
|
|
35
35
|
// and one element read off it.
|
|
36
|
-
|
|
36
|
+
'periodic-table': (alt) => (_jsxs(_Fragment, { children: [_jsxs("g", { fill: "#ffffff", opacity: "0.55", children: [_jsx("rect", { x: "5", y: "6", width: "5", height: "5", rx: "1" }), _jsx("rect", { x: "22", y: "6", width: "5", height: "5", rx: "1" }), _jsx("rect", { x: "5", y: "12.5", width: "5", height: "5", rx: "1" }), _jsx("rect", { x: "11.75", y: "12.5", width: "5", height: "5", rx: "1" }), _jsx("rect", { x: "18.5", y: "12.5", width: "5", height: "5", rx: "1" }), _jsx("rect", { x: "5", y: "19", width: "5", height: "5", rx: "1" }), _jsx("rect", { x: "11.75", y: "19", width: "5", height: "5", rx: "1" })] }), _jsx("rect", { x: "18.5", y: "19", width: "8.5", height: "5", rx: "1", fill: alt })] })),
|
|
37
37
|
// A stereocentre: two bonds in the plane of the drawing and one wedged out
|
|
38
38
|
// of it, which is the whole of what this site does to a flat structure.
|
|
39
39
|
'3d': (alt) => (_jsxs(_Fragment, { children: [_jsx("path", { d: "M16 16 16 5.6M16 16 7.2 21.2", fill: "none", stroke: "#ffffff", strokeWidth: "2.4", strokeLinecap: "round" }), _jsx("path", { d: "M16 16 24.2 24 26.9 19.6Z", fill: alt }), _jsx("circle", { cx: "16", cy: "16", r: "2.9", fill: "#ffffff" })] })),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glyphs.js","sourceRoot":"","sources":["../../../src/ecosystem/ui/glyphs.tsx"],"names":[],"mappings":";AAgBA,4DAA4D;AAC5D,MAAM,CAAC,MAAM,MAAM,GAA+C;IAChE,uEAAuE;IACvE,KAAK,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,CACd,aACE,IAAI,EAAC,MAAM,EACX,MAAM,EAAE,GAAG,EACX,WAAW,EAAC,KAAK,EACjB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,aAEtB,kBAAS,MAAM,EAAC,oDAAoD,GAAG,EACvE,eAAM,CAAC,EAAC,oBAAoB,GAAG,IAC7B,CACL;IACD,sEAAsE;IACtE,GAAG,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,CACZ,8BACE,aACE,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,SAAS,EAChB,WAAW,EAAC,GAAG,EACf,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,aAEtB,eAAM,CAAC,EAAC,0DAA0D,GAAG,EACrE,eAAM,CAAC,EAAC,uDAAuD,GAAG,IAChE,EACJ,iBAAQ,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,KAAK,EAAC,CAAC,EAAC,KAAK,EAAC,IAAI,EAAE,GAAG,GAAI,EAC9C,iBAAQ,EAAE,EAAC,MAAM,EAAC,EAAE,EAAC,MAAM,EAAC,CAAC,EAAC,KAAK,EAAC,IAAI,EAAE,GAAG,GAAI,EACjD,iBAAQ,EAAE,EAAC,KAAK,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AAM,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,IAAI,EAAC,KAAK,EAAC,GAAG,EAAC,MAAM,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,GAAG,IACnD,EACJ,eAAM,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,IAAI,EAAC,KAAK,EAAC,KAAK,EAAC,MAAM,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,IAAI,EAAE,GAAG,GAAI,IAChE,CACJ;IACD,2EAA2E;IAC3E,wEAAwE;IACxE,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,CACb,8BACE,eACE,CAAC,EAAC,8BAA8B,EAChC,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,SAAS,EAChB,WAAW,EAAC,KAAK,EACjB,aAAa,EAAC,OAAO,GACrB,EACF,eAAM,CAAC,EAAC,2BAA2B,EAAC,IAAI,EAAE,GAAG,GAAI,EACjD,iBAAQ,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,KAAK,EAAC,IAAI,EAAC,SAAS,GAAG,IAChD,CACJ;CACF,CAAC"}
|
package/lib/seo/core/index.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
export type { DocumentMeta } from './documentMeta.ts';
|
|
2
2
|
export { canonicalLink, documentTitle, writeDocumentMeta, } from './documentMeta.ts';
|
|
3
|
+
export type { PageMetaOptions } from './pageMeta.ts';
|
|
4
|
+
export { injectPageMeta, insertBeforeHeadEnd, pageDocumentMeta, } from './pageMeta.ts';
|
|
5
|
+
export type { RouteMeta } from './routes.ts';
|
|
6
|
+
export { homeRoute, pageMetaFor, routeFor, trimTrailingSlash, } from './routes.ts';
|
|
7
|
+
export type { SiteFilesOptions, StructuredDataOptions } from './siteFiles.ts';
|
|
8
|
+
export { noscriptIndex, robotsTxt, sitemapXml, structuredDataScript, } from './siteFiles.ts';
|
|
3
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/seo/core/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EACL,aAAa,EACb,aAAa,EACb,iBAAiB,GAClB,MAAM,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/seo/core/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EACL,aAAa,EACb,aAAa,EACb,iBAAiB,GAClB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EACL,SAAS,EACT,WAAW,EACX,QAAQ,EACR,iBAAiB,GAClB,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAC9E,OAAO,EACL,aAAa,EACb,SAAS,EACT,UAAU,EACV,oBAAoB,GACrB,MAAM,gBAAgB,CAAC"}
|
package/lib/seo/core/index.js
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
export { canonicalLink, documentTitle, writeDocumentMeta, } from "./documentMeta.js";
|
|
2
|
+
export { injectPageMeta, insertBeforeHeadEnd, pageDocumentMeta, } from "./pageMeta.js";
|
|
3
|
+
export { homeRoute, pageMetaFor, routeFor, trimTrailingSlash, } from "./routes.js";
|
|
4
|
+
export { noscriptIndex, robotsTxt, sitemapXml, structuredDataScript, } from "./siteFiles.js";
|
|
2
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/seo/core/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EACb,aAAa,EACb,iBAAiB,GAClB,MAAM,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/seo/core/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EACb,aAAa,EACb,iBAAiB,GAClB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,SAAS,EACT,WAAW,EACX,QAAQ,EACR,iBAAiB,GAClB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,aAAa,EACb,SAAS,EACT,UAAU,EACV,oBAAoB,GACrB,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The head of the page a crawler is handed.
|
|
3
|
+
*
|
|
4
|
+
* Googlebot renders JavaScript, but Bing, a Slack unfurl, an LMS preview and
|
|
5
|
+
* every academic indexer read the HTML that came off the wire — so the title,
|
|
6
|
+
* the description and the canonical of a page must already be in it. A site
|
|
7
|
+
* with a server rewrites them per request; a static one writes one file per
|
|
8
|
+
* address at build time. Both call this, which is pure string work: no
|
|
9
|
+
* `window`, no `node:fs`.
|
|
10
|
+
*/
|
|
11
|
+
import type { EcosystemSite, SiteId } from '../../ecosystem/core/sites.ts';
|
|
12
|
+
import type { DocumentMeta } from './documentMeta.ts';
|
|
13
|
+
import type { RouteMeta } from './routes.ts';
|
|
14
|
+
/** Which site is being served, and what it answers. */
|
|
15
|
+
export interface PageMetaOptions {
|
|
16
|
+
/** The site, named or passed. */
|
|
17
|
+
site: EcosystemSite | SiteId;
|
|
18
|
+
/** Every address it answers, each with its title and description. */
|
|
19
|
+
routes: readonly RouteMeta[];
|
|
20
|
+
/** The address being written, query string included. */
|
|
21
|
+
url: string;
|
|
22
|
+
/**
|
|
23
|
+
* Origin every absolute address is built on. A server passes the one the
|
|
24
|
+
* request arrived on; a build leaves it out and the site's own host is used.
|
|
25
|
+
* @default `https://<the site's host>`
|
|
26
|
+
*/
|
|
27
|
+
origin?: string;
|
|
28
|
+
/**
|
|
29
|
+
* The card a link to the page unfurls into, as an absolute address or a path.
|
|
30
|
+
* @default '/og.png'
|
|
31
|
+
*/
|
|
32
|
+
image?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Give a page the title, the description and the canonical address of the route
|
|
36
|
+
* it answers, plus the card a link to it unfurls into.
|
|
37
|
+
* @param html - The built page.
|
|
38
|
+
* @param options - Which site, which address, and where it is served from.
|
|
39
|
+
* @returns The page, with its head rewritten for that route.
|
|
40
|
+
*/
|
|
41
|
+
export declare function injectPageMeta(html: string, options: PageMetaOptions): string;
|
|
42
|
+
/**
|
|
43
|
+
* What the page on screen is called and where it is indexed, for the app to
|
|
44
|
+
* write after an in-app move.
|
|
45
|
+
*
|
|
46
|
+
* The same title and canonical the build wrote into the file it served, so a
|
|
47
|
+
* click that changes the page cannot disagree with the page a crawler fetched.
|
|
48
|
+
* @param options - Which site, which address, and where it is served from.
|
|
49
|
+
* @returns The title, the description and the canonical of that address.
|
|
50
|
+
*/
|
|
51
|
+
export declare function pageDocumentMeta(options: PageMetaOptions): Required<DocumentMeta>;
|
|
52
|
+
/**
|
|
53
|
+
* Put an addition at the end of the head, where a tracking snippet and a
|
|
54
|
+
* structured-data block both belong.
|
|
55
|
+
* @param html - The page.
|
|
56
|
+
* @param addition - The markup to add, taken as written.
|
|
57
|
+
* @returns The page, with the addition before `</head>`.
|
|
58
|
+
*/
|
|
59
|
+
export declare function insertBeforeHeadEnd(html: string, addition: string): string;
|
|
60
|
+
//# sourceMappingURL=pageMeta.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pageMeta.d.ts","sourceRoot":"","sources":["../../../src/seo/core/pageMeta.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAG3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAG7C,uDAAuD;AACvD,MAAM,WAAW,eAAe;IAC9B,iCAAiC;IACjC,IAAI,EAAE,aAAa,GAAG,MAAM,CAAC;IAC7B,qEAAqE;IACrE,MAAM,EAAE,SAAS,SAAS,EAAE,CAAC;IAC7B,wDAAwD;IACxD,GAAG,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,GAAG,MAAM,CAuB7E;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,eAAe,GAAG,QAAQ,CAAC,YAAY,CAAC,CASjF;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAI1E"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The head of the page a crawler is handed.
|
|
3
|
+
*
|
|
4
|
+
* Googlebot renders JavaScript, but Bing, a Slack unfurl, an LMS preview and
|
|
5
|
+
* every academic indexer read the HTML that came off the wire — so the title,
|
|
6
|
+
* the description and the canonical of a page must already be in it. A site
|
|
7
|
+
* with a server rewrites them per request; a static one writes one file per
|
|
8
|
+
* address at build time. Both call this, which is pure string work: no
|
|
9
|
+
* `window`, no `node:fs`.
|
|
10
|
+
*/
|
|
11
|
+
import { siteById, siteDisplayName } from "../../ecosystem/core/lookup.js";
|
|
12
|
+
import { escapeAttribute, escapeText } from "../../share/core/escape.js";
|
|
13
|
+
import { pageMetaFor, trimTrailingSlash } from "./routes.js";
|
|
14
|
+
/**
|
|
15
|
+
* Give a page the title, the description and the canonical address of the route
|
|
16
|
+
* it answers, plus the card a link to it unfurls into.
|
|
17
|
+
* @param html - The built page.
|
|
18
|
+
* @param options - Which site, which address, and where it is served from.
|
|
19
|
+
* @returns The page, with its head rewritten for that route.
|
|
20
|
+
*/
|
|
21
|
+
export function injectPageMeta(html, options) {
|
|
22
|
+
const site = resolveSite(options.site);
|
|
23
|
+
const meta = pageMetaFor(options.routes, options.url);
|
|
24
|
+
const name = siteDisplayName(site);
|
|
25
|
+
const origin = trimTrailingSlash(options.origin ?? `https://${site.host}`);
|
|
26
|
+
const { title, canonical } = pageDocumentMeta(options);
|
|
27
|
+
const image = absolute(options.image ?? '/og.png', origin);
|
|
28
|
+
const head = [
|
|
29
|
+
`<link rel="canonical" href="${escapeAttribute(canonical)}" />`,
|
|
30
|
+
'<meta property="og:type" content="website" />',
|
|
31
|
+
`<meta property="og:site_name" content="${escapeAttribute(name)}" />`,
|
|
32
|
+
`<meta property="og:title" content="${escapeAttribute(title)}" />`,
|
|
33
|
+
`<meta property="og:description" content="${escapeAttribute(meta.description)}" />`,
|
|
34
|
+
`<meta property="og:url" content="${escapeAttribute(canonical)}" />`,
|
|
35
|
+
`<meta property="og:image" content="${escapeAttribute(image)}" />`,
|
|
36
|
+
'<meta name="twitter:card" content="summary_large_image" />',
|
|
37
|
+
].join('\n');
|
|
38
|
+
return insertBeforeHeadEnd(replaceDescription(replaceTitle(html, title), meta.description), head);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* What the page on screen is called and where it is indexed, for the app to
|
|
42
|
+
* write after an in-app move.
|
|
43
|
+
*
|
|
44
|
+
* The same title and canonical the build wrote into the file it served, so a
|
|
45
|
+
* click that changes the page cannot disagree with the page a crawler fetched.
|
|
46
|
+
* @param options - Which site, which address, and where it is served from.
|
|
47
|
+
* @returns The title, the description and the canonical of that address.
|
|
48
|
+
*/
|
|
49
|
+
export function pageDocumentMeta(options) {
|
|
50
|
+
const site = resolveSite(options.site);
|
|
51
|
+
const meta = pageMetaFor(options.routes, options.url);
|
|
52
|
+
const origin = trimTrailingSlash(options.origin ?? `https://${site.host}`);
|
|
53
|
+
return {
|
|
54
|
+
title: `${meta.title} — ${siteDisplayName(site)}`,
|
|
55
|
+
description: meta.description,
|
|
56
|
+
canonical: `${origin}${meta.path}`,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Put an addition at the end of the head, where a tracking snippet and a
|
|
61
|
+
* structured-data block both belong.
|
|
62
|
+
* @param html - The page.
|
|
63
|
+
* @param addition - The markup to add, taken as written.
|
|
64
|
+
* @returns The page, with the addition before `</head>`.
|
|
65
|
+
*/
|
|
66
|
+
export function insertBeforeHeadEnd(html, addition) {
|
|
67
|
+
const head = html.lastIndexOf('</head>');
|
|
68
|
+
if (head === -1)
|
|
69
|
+
return `${html}\n${addition}\n`;
|
|
70
|
+
return `${html.slice(0, head)}${addition}\n${html.slice(head)}`;
|
|
71
|
+
}
|
|
72
|
+
function resolveSite(site) {
|
|
73
|
+
return typeof site === 'string' ? siteById(site) : site;
|
|
74
|
+
}
|
|
75
|
+
function absolute(target, origin) {
|
|
76
|
+
return target.startsWith('/') ? `${origin}${target}` : target;
|
|
77
|
+
}
|
|
78
|
+
function replaceTitle(html, title) {
|
|
79
|
+
const replacement = `<title>${escapeText(title)}</title>`;
|
|
80
|
+
return html.includes('<title>')
|
|
81
|
+
? html.replace(/<title>[\s\S]*?<\/title>/, replacement)
|
|
82
|
+
: insertBeforeHeadEnd(html, replacement);
|
|
83
|
+
}
|
|
84
|
+
function replaceDescription(html, description) {
|
|
85
|
+
const replacement = `<meta name="description" content="${escapeAttribute(description)}" />`;
|
|
86
|
+
const existing = /<meta[^>]*name="description"[^>]*>/;
|
|
87
|
+
return existing.test(html)
|
|
88
|
+
? html.replace(existing, replacement)
|
|
89
|
+
: insertBeforeHeadEnd(html, replacement);
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=pageMeta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pageMeta.js","sourceRoot":"","sources":["../../../src/seo/core/pageMeta.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAE3E,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAIzE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAuB7D;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY,EAAE,OAAwB;IACnE,MAAM,IAAI,GAAG,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,MAAM,IAAI,GAAG,WAAW,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;IACtD,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IACnC,MAAM,MAAM,GAAG,iBAAiB,CAAC,OAAO,CAAC,MAAM,IAAI,WAAW,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IAC3E,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACvD,MAAM,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,KAAK,IAAI,SAAS,EAAE,MAAM,CAAC,CAAC;IAE3D,MAAM,IAAI,GAAG;QACX,+BAA+B,eAAe,CAAC,SAAS,CAAC,MAAM;QAC/D,+CAA+C;QAC/C,0CAA0C,eAAe,CAAC,IAAI,CAAC,MAAM;QACrE,sCAAsC,eAAe,CAAC,KAAK,CAAC,MAAM;QAClE,4CAA4C,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM;QACnF,oCAAoC,eAAe,CAAC,SAAS,CAAC,MAAM;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,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC1D,CAAC;AAED,SAAS,QAAQ,CAAC,MAAc,EAAE,MAAc;IAC9C,OAAO,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC;AAChE,CAAC;AAED,SAAS,YAAY,CAAC,IAAY,EAAE,KAAa;IAC/C,MAAM,WAAW,GAAG,UAAU,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC;IAC1D,OAAO,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;QAC7B,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,0BAA0B,EAAE,WAAW,CAAC;QACvD,CAAC,CAAC,mBAAmB,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;AAC7C,CAAC;AAED,SAAS,kBAAkB,CAAC,IAAY,EAAE,WAAmB;IAC3D,MAAM,WAAW,GAAG,qCAAqC,eAAe,CAAC,WAAW,CAAC,MAAM,CAAC;IAC5F,MAAM,QAAQ,GAAG,oCAAoC,CAAC;IACtD,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;QACxB,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,WAAW,CAAC;QACrC,CAAC,CAAC,mBAAmB,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The addresses a site answers, each with the name and the sentence it is
|
|
3
|
+
* indexed under.
|
|
4
|
+
*
|
|
5
|
+
* One table per site, read by three things: the build, which writes an HTML
|
|
6
|
+
* file per entry and the sitemap listing them; the head injector; and the
|
|
7
|
+
* running app, which retitles the tab after an in-app move. A page missing from
|
|
8
|
+
* the table is a page a search engine only ever sees as the home page.
|
|
9
|
+
*/
|
|
10
|
+
/** A page, as a crawler and a shared card see it. */
|
|
11
|
+
export interface RouteMeta {
|
|
12
|
+
/** Absolute path, without a trailing slash and without a query string. */
|
|
13
|
+
path: string;
|
|
14
|
+
/** Under ~60 characters: the site name is appended to it. */
|
|
15
|
+
title: string;
|
|
16
|
+
/** One sentence, in the words someone would search for. */
|
|
17
|
+
description: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The route an address names.
|
|
21
|
+
* @param routes - Every address the site answers.
|
|
22
|
+
* @param path - Absolute path, without a query string.
|
|
23
|
+
* @returns Its entry, or `undefined` when the site does not know the address.
|
|
24
|
+
*/
|
|
25
|
+
export declare function routeFor(routes: readonly RouteMeta[], path: string): RouteMeta | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* The page an address opens.
|
|
28
|
+
*
|
|
29
|
+
* An address the site does not know is described as the home page rather than
|
|
30
|
+
* invented on the fly, which is what the router does with it too. The query
|
|
31
|
+
* string never reaches the answer: the structure being drawn and the
|
|
32
|
+
* configuration a shared link carries are not pages of their own.
|
|
33
|
+
* @param routes - Every address the site answers.
|
|
34
|
+
* @param url - The address, query string and fragment included.
|
|
35
|
+
* @returns The route it is indexed as.
|
|
36
|
+
* @throws {Error} When the table is empty, so there is no page to fall back to.
|
|
37
|
+
*/
|
|
38
|
+
export declare function pageMetaFor(routes: readonly RouteMeta[], url: string): RouteMeta;
|
|
39
|
+
/**
|
|
40
|
+
* The page an unknown address falls back to.
|
|
41
|
+
* @param routes - Every address the site answers.
|
|
42
|
+
* @returns The `/` entry, or the first one when the table names no root.
|
|
43
|
+
* @throws {Error} When the table is empty.
|
|
44
|
+
*/
|
|
45
|
+
export declare function homeRoute(routes: readonly RouteMeta[]): RouteMeta;
|
|
46
|
+
/**
|
|
47
|
+
* Drop a trailing slash, so `/about/` and `/about` are one page.
|
|
48
|
+
* @param value - A path or an origin.
|
|
49
|
+
* @returns It, without the trailing slash `/` itself keeps.
|
|
50
|
+
*/
|
|
51
|
+
export declare function trimTrailingSlash(value: string): string;
|
|
52
|
+
//# sourceMappingURL=routes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../src/seo/core/routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,qDAAqD;AACrD,MAAM,WAAW,SAAS;IACxB,0EAA0E;IAC1E,IAAI,EAAE,MAAM,CAAC;IACb,6DAA6D;IAC7D,KAAK,EAAE,MAAM,CAAC;IACd,2DAA2D;IAC3D,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CACtB,MAAM,EAAE,SAAS,SAAS,EAAE,EAC5B,IAAI,EAAE,MAAM,GACX,SAAS,GAAG,SAAS,CAMvB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,SAAS,SAAS,EAAE,EAC5B,GAAG,EAAE,MAAM,GACV,SAAS,CAKX;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,SAAS,SAAS,EAAE,GAAG,SAAS,CAIjE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEvD"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The addresses a site answers, each with the name and the sentence it is
|
|
3
|
+
* indexed under.
|
|
4
|
+
*
|
|
5
|
+
* One table per site, read by three things: the build, which writes an HTML
|
|
6
|
+
* file per entry and the sitemap listing them; the head injector; and the
|
|
7
|
+
* running app, which retitles the tab after an in-app move. A page missing from
|
|
8
|
+
* the table is a page a search engine only ever sees as the home page.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* The route an address names.
|
|
12
|
+
* @param routes - Every address the site answers.
|
|
13
|
+
* @param path - Absolute path, without a query string.
|
|
14
|
+
* @returns Its entry, or `undefined` when the site does not know the address.
|
|
15
|
+
*/
|
|
16
|
+
export function routeFor(routes, path) {
|
|
17
|
+
const wanted = trimTrailingSlash(path) || '/';
|
|
18
|
+
for (const route of routes) {
|
|
19
|
+
if (trimTrailingSlash(route.path) === wanted)
|
|
20
|
+
return route;
|
|
21
|
+
}
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The page an address opens.
|
|
26
|
+
*
|
|
27
|
+
* An address the site does not know is described as the home page rather than
|
|
28
|
+
* invented on the fly, which is what the router does with it too. The query
|
|
29
|
+
* string never reaches the answer: the structure being drawn and the
|
|
30
|
+
* configuration a shared link carries are not pages of their own.
|
|
31
|
+
* @param routes - Every address the site answers.
|
|
32
|
+
* @param url - The address, query string and fragment included.
|
|
33
|
+
* @returns The route it is indexed as.
|
|
34
|
+
* @throws {Error} When the table is empty, so there is no page to fall back to.
|
|
35
|
+
*/
|
|
36
|
+
export function pageMetaFor(routes, url) {
|
|
37
|
+
const home = homeRoute(routes);
|
|
38
|
+
const cut = url.search(/[?#]/);
|
|
39
|
+
const path = cut === -1 ? url : url.slice(0, cut);
|
|
40
|
+
return routeFor(routes, path) ?? home;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* The page an unknown address falls back to.
|
|
44
|
+
* @param routes - Every address the site answers.
|
|
45
|
+
* @returns The `/` entry, or the first one when the table names no root.
|
|
46
|
+
* @throws {Error} When the table is empty.
|
|
47
|
+
*/
|
|
48
|
+
export function homeRoute(routes) {
|
|
49
|
+
const first = routes[0];
|
|
50
|
+
if (first === undefined)
|
|
51
|
+
throw new Error('a site answers at least one route');
|
|
52
|
+
return routeFor(routes, '/') ?? first;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Drop a trailing slash, so `/about/` and `/about` are one page.
|
|
56
|
+
* @param value - A path or an origin.
|
|
57
|
+
* @returns It, without the trailing slash `/` itself keeps.
|
|
58
|
+
*/
|
|
59
|
+
export function trimTrailingSlash(value) {
|
|
60
|
+
return value.length > 1 && value.endsWith('/') ? value.slice(0, -1) : value;
|
|
61
|
+
}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KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AAC9E,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The files and blocks a crawler reads besides the head: the sitemap, the
|
|
3
|
+
* robots policy, the structured-data block and the list of addresses a visitor
|
|
4
|
+
* without JavaScript can still follow.
|
|
5
|
+
*
|
|
6
|
+
* All four are derived from the site's own record and its route table, so a
|
|
7
|
+
* page added to the table is added to every one of them at once.
|
|
8
|
+
*/
|
|
9
|
+
import type { EcosystemSite, SiteId } from '../../ecosystem/core/sites.ts';
|
|
10
|
+
import type { RouteMeta } from './routes.ts';
|
|
11
|
+
/** What a crawler is told about the site as a whole. */
|
|
12
|
+
export interface SiteFilesOptions {
|
|
13
|
+
/** The site, named or passed. */
|
|
14
|
+
site: EcosystemSite | SiteId;
|
|
15
|
+
/** Every address it answers. */
|
|
16
|
+
routes: readonly RouteMeta[];
|
|
17
|
+
/**
|
|
18
|
+
* Origin every absolute address is built on.
|
|
19
|
+
* @default `https://<the site's host>`
|
|
20
|
+
*/
|
|
21
|
+
origin?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Every routed address, as the sitemap lists them.
|
|
25
|
+
* @param options - The site and its routes.
|
|
26
|
+
* @returns The `sitemap.xml` document.
|
|
27
|
+
*/
|
|
28
|
+
export declare function sitemapXml(options: SiteFilesOptions): string;
|
|
29
|
+
/**
|
|
30
|
+
* The crawl policy.
|
|
31
|
+
*
|
|
32
|
+
* Our tools are meant to be found, so only the endpoints are disallowed — an
|
|
33
|
+
* API prefix and its documentation are not pages. The sitemap is named only
|
|
34
|
+
* because this module also writes it: a `Sitemap:` line pointing at a 404 is
|
|
35
|
+
* reported as an error on every fetch.
|
|
36
|
+
* @param options - The site and its routes.
|
|
37
|
+
* @param disallow - Address prefixes to keep out of the index.
|
|
38
|
+
* @returns The `robots.txt` document.
|
|
39
|
+
*/
|
|
40
|
+
export declare function robotsTxt(options: SiteFilesOptions, disallow?: readonly string[]): string;
|
|
41
|
+
/** What the structured-data block says the tool is. */
|
|
42
|
+
export interface StructuredDataOptions extends SiteFilesOptions {
|
|
43
|
+
/**
|
|
44
|
+
* The schema.org application category.
|
|
45
|
+
* @default 'EducationalApplication'
|
|
46
|
+
*/
|
|
47
|
+
category?: string;
|
|
48
|
+
/**
|
|
49
|
+
* What the tool needs to run.
|
|
50
|
+
* @default 'Any modern browser'
|
|
51
|
+
*/
|
|
52
|
+
operatingSystem?: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* One `application/ld+json` block describing the tool.
|
|
56
|
+
*
|
|
57
|
+
* It is the same on every page of a site — what varies per page is the head —
|
|
58
|
+
* so it is written into the built page once rather than per route.
|
|
59
|
+
* @param options - The site, and what kind of application it is.
|
|
60
|
+
* @returns The script tag, ready to put in the head.
|
|
61
|
+
*/
|
|
62
|
+
export declare function structuredDataScript(options: StructuredDataOptions): string;
|
|
63
|
+
/**
|
|
64
|
+
* A readable page for a visitor, or a crawler, with no JavaScript.
|
|
65
|
+
*
|
|
66
|
+
* The body of our sites is an empty root element, so this is the only crawl
|
|
67
|
+
* path through them that costs nothing to render — and it is honest: it says
|
|
68
|
+
* the tool needs JavaScript, and links every address it answers.
|
|
69
|
+
* @param options - The site and its routes.
|
|
70
|
+
* @returns The `noscript` block, ready to put in the body.
|
|
71
|
+
*/
|
|
72
|
+
export declare function noscriptIndex(options: SiteFilesOptions): string;
|
|
73
|
+
//# sourceMappingURL=siteFiles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"siteFiles.d.ts","sourceRoot":"","sources":["../../../src/seo/core/siteFiles.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAG3E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAM7C,wDAAwD;AACxD,MAAM,WAAW,gBAAgB;IAC/B,iCAAiC;IACjC,IAAI,EAAE,aAAa,GAAG,MAAM,CAAC;IAC7B,gCAAgC;IAChC,MAAM,EAAE,SAAS,SAAS,EAAE,CAAC;IAC7B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,gBAAgB,GAAG,MAAM,CAa5D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CACvB,OAAO,EAAE,gBAAgB,EACzB,QAAQ,GAAE,SAAS,MAAM,EAAO,GAC/B,MAAM,CAKR;AAED,uDAAuD;AACvD,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;IAC7D;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,qBAAqB,GAAG,MAAM,CAkB3E;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,gBAAgB,GAAG,MAAM,CAe/D"}
|