astro-blog-kit 0.2.2 → 0.2.3
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/bin/cli.js +1 -0
- package/cli.ts +3 -0
- package/package.json +1 -1
- package/templates/blog-index.astro.template +1 -1
package/bin/cli.js
CHANGED
|
@@ -89,6 +89,7 @@ async function main() {
|
|
|
89
89
|
DEFAULT_LAYOUT: answers.defaultLayout,
|
|
90
90
|
LOCALE: answers.locale,
|
|
91
91
|
LAYOUT_IMPORT: layoutPath ? `import Layout from "${layoutPath}";` : "",
|
|
92
|
+
LAYOUT_IMPORT_PAGE: layoutPath ? `import Layout from "../${layoutPath}";` : "",
|
|
92
93
|
LAYOUT_OPEN: layoutPath ? `<Layout>` : `<html lang={config.locale ?? "en"}>
|
|
93
94
|
<head>
|
|
94
95
|
<meta charset="UTF-8" />
|
package/cli.ts
CHANGED
|
@@ -127,6 +127,9 @@ async function main() {
|
|
|
127
127
|
LAYOUT_IMPORT: layoutPath
|
|
128
128
|
? `import Layout from "${layoutPath}";`
|
|
129
129
|
: "",
|
|
130
|
+
LAYOUT_IMPORT_PAGE: layoutPath
|
|
131
|
+
? `import Layout from "../${layoutPath}";`
|
|
132
|
+
: "",
|
|
130
133
|
LAYOUT_OPEN: layoutPath
|
|
131
134
|
? `<Layout>`
|
|
132
135
|
: `<html lang={config.locale ?? "en"}>\n <head>\n <meta charset="UTF-8" />\n <meta name="viewport" content="width=device-width, initial-scale=1.0" />\n <title>Blog</title>\n </head>\n <body>`,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { BlogList } from "astro-blog-kit/components";
|
|
3
3
|
import { createWPClient } from "astro-blog-kit/utils";
|
|
4
|
-
import config from "
|
|
4
|
+
import config from "../../../blog.config";
|
|
5
5
|
__LAYOUT_IMPORT__
|
|
6
6
|
|
|
7
7
|
const wp = createWPClient(config.wpUrl);
|