@leadertechie/personal-site-kit 0.1.0-alpha.22 → 0.1.0-alpha.23
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/chunks/{template-Lmx7Dxoc.js → template-VrYrCcQL.js} +8 -7
- package/dist/index.js +1 -1
- package/dist/prerender.js +3 -3
- package/dist/shared/__tests__/router.test.d.ts +2 -0
- package/dist/shared/__tests__/router.test.d.ts.map +1 -0
- package/dist/shared/router.d.ts.map +1 -1
- package/dist/shared.js +1 -1
- package/package.json +1 -1
|
@@ -129,7 +129,7 @@ const generatePageContent = (pathname, routes, footerLinks, data) => {
|
|
|
129
129
|
canonicalUrl,
|
|
130
130
|
content: mainContent
|
|
131
131
|
};
|
|
132
|
-
} else if (pathname === "/about
|
|
132
|
+
} else if (pathname === "/about") {
|
|
133
133
|
const apiBaseUrl = data?.apiUrl || "";
|
|
134
134
|
const mainContent = `
|
|
135
135
|
${bannerTemplate}
|
|
@@ -166,14 +166,15 @@ class Router {
|
|
|
166
166
|
this.logo = "/api/logo";
|
|
167
167
|
this.appElement = null;
|
|
168
168
|
const store = ui.getStore();
|
|
169
|
-
const
|
|
170
|
-
|
|
169
|
+
const storeConfig = store.getConfig();
|
|
170
|
+
const uiConfig = ui.getConfig();
|
|
171
|
+
this.routes = uiConfig.routes?.length ? uiConfig.routes : [
|
|
171
172
|
{ link: "/", text: "Home" },
|
|
172
173
|
{ link: "/blogs", text: "Blogs" },
|
|
173
174
|
{ link: "/stories", text: "Stories" },
|
|
174
|
-
{ link: "/about
|
|
175
|
+
{ link: "/about", text: "About" }
|
|
175
176
|
];
|
|
176
|
-
this.apiUrl =
|
|
177
|
+
this.apiUrl = storeConfig.apiUrl;
|
|
177
178
|
}
|
|
178
179
|
get config() {
|
|
179
180
|
return this.ui.getStore().getConfig();
|
|
@@ -253,7 +254,7 @@ class Router {
|
|
|
253
254
|
case "/":
|
|
254
255
|
await this.renderHomePage();
|
|
255
256
|
break;
|
|
256
|
-
case "/about
|
|
257
|
+
case "/about":
|
|
257
258
|
this.renderAboutMePage();
|
|
258
259
|
break;
|
|
259
260
|
case "/blogs":
|
|
@@ -337,7 +338,7 @@ class Router {
|
|
|
337
338
|
this.afterRender();
|
|
338
339
|
}
|
|
339
340
|
renderAboutMePage() {
|
|
340
|
-
const pageContent = generatePageContent("/about
|
|
341
|
+
const pageContent = generatePageContent("/about", this.routes, this.footerLinks, {
|
|
341
342
|
siteTitle: this.siteTitle,
|
|
342
343
|
copyright: this.copyright,
|
|
343
344
|
apiUrl: this.apiUrl
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { A, B, M, R, W, c, a, g, b, d, h, e, r, s, v } from "./chunks/website-ap
|
|
|
2
2
|
import { WebsitePrerender } from "./prerender.js";
|
|
3
3
|
import { A as A2, a as a2, b as b2, c as c2, d as d2, e as e2, f, g as g2, h as h2, i, B as B2, F, M as M2, j, S, k } from "./chunks/index-DsRjL9Uy.js";
|
|
4
4
|
import { S as S2, g as g3, i as i2, r as r2 } from "./chunks/site-store-CGV9c2DI.js";
|
|
5
|
-
import { R as R2, T, W as W2, b as b3, c as c3, g as g4, r as r3 } from "./chunks/template-
|
|
5
|
+
import { R as R2, T, W as W2, b as b3, c as c3, g as g4, r as r3 } from "./chunks/template-VrYrCcQL.js";
|
|
6
6
|
export {
|
|
7
7
|
A as AUTH_KV,
|
|
8
8
|
A2 as AdminAboutMeSection,
|
package/dist/prerender.js
CHANGED
|
@@ -302,7 +302,7 @@ const generatePageContent = async (pathname, routes, footerLinks, env) => {
|
|
|
302
302
|
};
|
|
303
303
|
if (pathname === "/" || pathname === "") {
|
|
304
304
|
return strategies.home();
|
|
305
|
-
} else if (pathname === "/about
|
|
305
|
+
} else if (pathname === "/about") {
|
|
306
306
|
return strategies.about();
|
|
307
307
|
} else if (pathname === "/blogs" || pathname === "/blogs/") {
|
|
308
308
|
return strategies.blogsList();
|
|
@@ -325,7 +325,7 @@ class WebsitePrerender {
|
|
|
325
325
|
{ link: "/", text: "Home" },
|
|
326
326
|
{ link: "/blogs", text: "Blogs" },
|
|
327
327
|
{ link: "/stories", text: "Stories" },
|
|
328
|
-
{ link: "/about
|
|
328
|
+
{ link: "/about", text: "About" }
|
|
329
329
|
];
|
|
330
330
|
this.defaultFooterLinks = options.defaultFooterLinks || [
|
|
331
331
|
{ text: "LinkedIn", link: "https://linkedin.com/in/yourname" },
|
|
@@ -500,7 +500,7 @@ class WebsitePrerender {
|
|
|
500
500
|
return fetch(request);
|
|
501
501
|
}
|
|
502
502
|
let hydrationScript = "";
|
|
503
|
-
if (url.pathname === "/about
|
|
503
|
+
if (url.pathname === "/about" || url.pathname === "/about/") {
|
|
504
504
|
const aboutMeData = await this.fetchAboutMeData(apiUrl, env);
|
|
505
505
|
if (aboutMeData) {
|
|
506
506
|
hydrationScript = `<script>window.__HYDRATION_DATA__ = ${JSON.stringify(aboutMeData)};<\/script>`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"router.test.d.ts","sourceRoot":"","sources":["../../../src/shared/__tests__/router.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../src/shared/router.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,qBAAa,MAAM;IAML,OAAO,CAAC,EAAE;IALtB,OAAO,CAAC,MAAM,CAAW;IACzB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,IAAI,CAAuB;IACnC,OAAO,CAAC,UAAU,CAA4B;gBAE1B,EAAE,EAAE,SAAS;
|
|
1
|
+
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../src/shared/router.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,qBAAa,MAAM;IAML,OAAO,CAAC,EAAE;IALtB,OAAO,CAAC,MAAM,CAAW;IACzB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,IAAI,CAAuB;IACnC,OAAO,CAAC,UAAU,CAA4B;gBAE1B,EAAE,EAAE,SAAS;IAgBjC,OAAO,KAAK,MAAM,GAEjB;IAED,OAAO,KAAK,SAAS,GAEpB;IAED,OAAO,KAAK,SAAS,GAEpB;IAED,OAAO,KAAK,WAAW,GAatB;IAEM,IAAI,CAAC,YAAY,GAAE,MAAc;IAWxC,OAAO,CAAC,mBAAmB;IAsCd,QAAQ,CAAC,IAAI,EAAE,MAAM;IA6BlC,OAAO,CAAC,WAAW;IAgCnB;;;OAGG;IACH,OAAO,CAAC,WAAW;YAIL,cAAc;IAmC5B,OAAO,CAAC,iBAAiB;YASX,qBAAqB;YAkBrB,uBAAuB;YAoBvB,eAAe;CAiB9B"}
|
package/dist/shared.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { S, g, i, r } from "./chunks/site-store-CGV9c2DI.js";
|
|
2
|
-
import { R, T, W, b, c, g as g2, r as r2 } from "./chunks/template-
|
|
2
|
+
import { R, T, W, b, c, g as g2, r as r2 } from "./chunks/template-VrYrCcQL.js";
|
|
3
3
|
export {
|
|
4
4
|
R as Router,
|
|
5
5
|
S as SiteStore,
|
package/package.json
CHANGED