@anglefeint/astro-theme 0.1.36 → 0.1.37
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/README.md +1 -1
- package/package.json +1 -1
- package/src/config/theme.ts +7 -0
- package/src/layouts/BlogPost.astro +7 -7
package/README.md
CHANGED
|
@@ -54,7 +54,7 @@ This package reads site-specific config from alias imports:
|
|
|
54
54
|
|
|
55
55
|
In the starter/site project, map these aliases to `src/config/*` and `src/i18n/*` in both Vite and TS config.
|
|
56
56
|
|
|
57
|
-
Giscus comments are configured from site-side `theme.comments` (
|
|
57
|
+
Giscus comments are configured from site-side `theme.comments` (core IDs + behavior fields like `mapping`, `inputPosition`, `theme`, and `lang`). If required core fields are not set, comments are not rendered.
|
|
58
58
|
|
|
59
59
|
## CLI
|
|
60
60
|
|
package/package.json
CHANGED
package/src/config/theme.ts
CHANGED
|
@@ -34,7 +34,14 @@ export const THEME = {
|
|
|
34
34
|
REPO_ID: '',
|
|
35
35
|
CATEGORY: '',
|
|
36
36
|
CATEGORY_ID: '',
|
|
37
|
+
MAPPING: 'pathname',
|
|
38
|
+
STRICT: '0',
|
|
39
|
+
REACTIONS_ENABLED: '1',
|
|
40
|
+
EMIT_METADATA: '0',
|
|
41
|
+
INPUT_POSITION: 'bottom',
|
|
37
42
|
THEME: 'dark',
|
|
38
43
|
LANG: 'en',
|
|
44
|
+
LOADING: 'lazy',
|
|
45
|
+
CROSSORIGIN: 'anonymous',
|
|
39
46
|
},
|
|
40
47
|
} as const;
|
|
@@ -289,15 +289,15 @@ const hasCommentsConfig = Boolean(
|
|
|
289
289
|
data-repo-id={comments.REPO_ID}
|
|
290
290
|
data-category={comments.CATEGORY}
|
|
291
291
|
data-category-id={comments.CATEGORY_ID}
|
|
292
|
-
data-mapping=
|
|
293
|
-
data-strict=
|
|
294
|
-
data-reactions-enabled=
|
|
295
|
-
data-emit-metadata=
|
|
296
|
-
data-input-position=
|
|
292
|
+
data-mapping={comments.MAPPING}
|
|
293
|
+
data-strict={comments.STRICT}
|
|
294
|
+
data-reactions-enabled={comments.REACTIONS_ENABLED}
|
|
295
|
+
data-emit-metadata={comments.EMIT_METADATA}
|
|
296
|
+
data-input-position={comments.INPUT_POSITION}
|
|
297
297
|
data-theme={comments.THEME}
|
|
298
298
|
data-lang={comments.LANG || resolvedLocale}
|
|
299
|
-
data-loading=
|
|
300
|
-
crossorigin=
|
|
299
|
+
data-loading={comments.LOADING}
|
|
300
|
+
crossorigin={comments.CROSSORIGIN}
|
|
301
301
|
async
|
|
302
302
|
/>
|
|
303
303
|
</section>
|