@myst-theme/common 0.8.2 → 0.9.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/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +6 -2
- package/package.json +4 -4
package/dist/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAkB,UAAU,EAAE,MAAM,YAAY,CAAC;AAMnF,KAAK,eAAe,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AAG7D,wBAAgB,UAAU,CACxB,MAAM,CAAC,EAAE,YAAY,EACrB,WAAW,CAAC,EAAE,MAAM,GACnB,eAAe,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAkB,UAAU,EAAE,MAAM,YAAY,CAAC;AAMnF,KAAK,eAAe,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AAG7D,wBAAgB,UAAU,CACxB,MAAM,CAAC,EAAE,YAAY,EACrB,WAAW,CAAC,EAAE,MAAM,GACnB,eAAe,GAAG,SAAS,CAM7B;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,YAAY,EACpB,WAAW,CAAC,EAAE,MAAM,EACpB,IAAI,GAAE;IAAE,SAAS,EAAE,OAAO,CAAA;CAAyB,GAClD,OAAO,EAAE,GAAG,SAAS,CA0BvB;AAeD,wBAAgB,cAAc,CAC5B,MAAM,CAAC,EAAE,YAAY,EACrB,WAAW,CAAC,EAAE,MAAM,EACpB,IAAI,CAAC,EAAE,MAAM,GACZ,WAAW,CAab;AAED,KAAK,SAAS,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;AAEzC,wBAAgB,oCAAoC,CAClD,IAAI,EAAE,YAAY,EAClB,SAAS,EAAE,SAAS,GACnB,YAAY,CAkEd;AAED,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,GAAG,UAAU,CAkD/F;AAED,wBAAgB,UAAU,CAAC,MAAM,CAAC,EAAE,YAAY,GAAG,OAAO,CAEzD"}
|
package/dist/utils.js
CHANGED
|
@@ -4,9 +4,11 @@ export function getProject(config, projectSlug) {
|
|
|
4
4
|
var _a, _b;
|
|
5
5
|
if (!config)
|
|
6
6
|
return undefined;
|
|
7
|
+
if (!config.projects || config.projects.length === 0)
|
|
8
|
+
return undefined;
|
|
7
9
|
if (!projectSlug)
|
|
8
|
-
return
|
|
9
|
-
const project = (_b = config.projects) === null ||
|
|
10
|
+
return config.projects[0];
|
|
11
|
+
const project = (_b = (_a = config.projects) === null || _a === void 0 ? void 0 : _a.find((p) => p.slug === projectSlug)) !== null && _b !== void 0 ? _b : config.projects[0];
|
|
10
12
|
return project;
|
|
11
13
|
}
|
|
12
14
|
export function getProjectHeadings(config, projectSlug, opts = { addGroups: false }) {
|
|
@@ -111,6 +113,8 @@ export function updateSiteManifestStaticLinksInplace(data, updateUrl) {
|
|
|
111
113
|
data.options.logo = updateUrl(data.options.logo);
|
|
112
114
|
if (data.options.logo_dark)
|
|
113
115
|
data.options.logo_dark = updateUrl(data.options.logo_dark);
|
|
116
|
+
if (data.options.favicon)
|
|
117
|
+
data.options.favicon = updateUrl(data.options.favicon);
|
|
114
118
|
// Update the thumbnails to point at the CDN
|
|
115
119
|
(_c = data.projects) === null || _c === void 0 ? void 0 : _c.forEach((project) => {
|
|
116
120
|
if (project.banner)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myst-theme/common",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"build": "npm-run-all -l clean -p build:esm"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"myst-common": "^1.
|
|
23
|
-
"myst-config": "^1.
|
|
24
|
-
"myst-spec-ext": "^1.
|
|
22
|
+
"myst-common": "^1.3.0",
|
|
23
|
+
"myst-config": "^1.3.0",
|
|
24
|
+
"myst-spec-ext": "^1.3.0",
|
|
25
25
|
"nbtx": "^0.2.3",
|
|
26
26
|
"unist-util-select": "^4.0.3"
|
|
27
27
|
}
|