@erudit-js/core 4.3.0-dev.1 → 4.3.1-dev.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/dist/eruditConfig/seo.d.ts +35 -5
- package/package.json +1 -1
|
@@ -1,10 +1,40 @@
|
|
|
1
|
+
export type EruditSeoOgImageManual = {
|
|
2
|
+
type: 'manual';
|
|
3
|
+
src: string;
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
};
|
|
7
|
+
export type EruditSeoOgImageAuto = {
|
|
8
|
+
type: 'auto';
|
|
9
|
+
/** Path to the logotype image. Can be relative to project root or absolute. */
|
|
10
|
+
logotype: string;
|
|
11
|
+
/** Hex color for the OG image accent (e.g. `'#4aa44c'`). */
|
|
12
|
+
siteColor: string;
|
|
13
|
+
/** Site name displayed on the OG image. */
|
|
14
|
+
siteName: string;
|
|
15
|
+
/** Short site description displayed on the OG image. */
|
|
16
|
+
siteShort: string;
|
|
17
|
+
/**
|
|
18
|
+
* Button label(s) on the OG image.
|
|
19
|
+
*
|
|
20
|
+
* - A single string — used for all buttons.
|
|
21
|
+
* - `{ learn, open }` — `learn` for content pages, `open` for site pages.
|
|
22
|
+
*/
|
|
23
|
+
phrases: string | {
|
|
24
|
+
learn: string;
|
|
25
|
+
open: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
1
28
|
export type EruditSeo = Partial<{
|
|
2
29
|
siteTitle: string;
|
|
3
30
|
/** When possible, use book title instead of site title in SEO. */
|
|
4
31
|
useBookSiteTitle?: boolean;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
32
|
+
/**
|
|
33
|
+
* OG image configuration.
|
|
34
|
+
*
|
|
35
|
+
* - `undefined` — no OG images.
|
|
36
|
+
* - `{ type: 'manual', src, width, height }` — use a custom provided image for all pages.
|
|
37
|
+
* - `{ type: 'auto', logotype, siteColor, siteName, siteShort, phrases }` — autogenerate OG images with the specified parameters.
|
|
38
|
+
*/
|
|
39
|
+
ogImage: EruditSeoOgImageManual | EruditSeoOgImageAuto;
|
|
10
40
|
}>;
|