@hagicode/hagilight-starlight 0.4.1-dev.60.1.9bbf68a → 0.4.2-dev.62.1.e263aaa

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/Footer.astro CHANGED
@@ -2,6 +2,7 @@
2
2
  import Copyright from '@hagicode/hagilight-core/Copyright';
3
3
  import DefaultFooter from '@astrojs/starlight/components/Footer.astro';
4
4
  import { resolveSiteLinks, type SiteLinksOptions } from '@hagicode/hagilight-core/links';
5
+ import manifest from './package.json';
5
6
 
6
7
  interface Props {
7
8
  locale?: string;
@@ -16,6 +17,9 @@ const {
16
17
  rssFeedUrl,
17
18
  rssLocaleFeedUrls,
18
19
  } = Astro.props;
20
+ if (typeof manifest.version !== 'string' || manifest.version.trim().length === 0) {
21
+ throw new Error('@hagicode/hagilight-starlight requires a nonempty string version in its package.json.');
22
+ }
19
23
  const currentLanguage = Astro.locals?.starlightRoute?.lang;
20
24
  const sitemapOverride = links?.overrides?.sitemap;
21
25
  const resolvedLinks = resolveSiteLinks(currentLanguage ?? locale, {
@@ -83,7 +87,11 @@ const resolvedLinks = resolveSiteLinks(currentLanguage ?? locale, {
83
87
  ))}
84
88
  </nav>
85
89
  </div>
86
- <p class="hagilight-copyright"><Copyright name="HagiCode" /></p>
90
+ <p class="hagilight-copyright">
91
+ <Copyright name="HagiCode" />
92
+ {' | '}
93
+ <span class="hagilight-copyright__attribution">power by hagilight-starlight@{manifest.version}</span>
94
+ </p>
87
95
 
88
96
  <style>
89
97
  .hagilight-site-links {
@@ -139,4 +147,8 @@ const resolvedLinks = resolveSiteLinks(currentLanguage ?? locale, {
139
147
  font-size: var(--sl-text-xs);
140
148
  text-align: center;
141
149
  }
150
+
151
+ .hagilight-copyright__attribution {
152
+ overflow-wrap: anywhere;
153
+ }
142
154
  </style>
package/README.md CHANGED
@@ -29,4 +29,8 @@ export default defineConfig({
29
29
 
30
30
  The plugin also exposes `@hagicode/hagilight-starlight/schema` for optional SEO frontmatter and individual Astro components such as `/Header` and `/MarkdownContent` for custom Starlight overrides. Configure features through the typed `HagilightStarlightOptions` passed to `hagilight()`.
31
31
 
32
+ The plugin footer and direct `/Footer` and `/PromotoFooter` components append
33
+ the literal `power by hagilight-starlight@<version>`. The version comes from
34
+ this package's own manifest at build time, not from Astro or Starlight.
35
+
32
36
  See the [repository documentation](https://github.com/HagiCode-org/hagilight#readme) for schema setup and feature options.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hagicode/hagilight-starlight",
3
- "version": "0.4.1-dev.60.1.9bbf68a",
3
+ "version": "0.4.2-dev.62.1.e263aaa",
4
4
  "type": "module",
5
5
  "description": "Starlight plugin and components for HagiCode documentation",
6
6
  "repository": {
@@ -48,7 +48,7 @@
48
48
  "assets/*.png"
49
49
  ],
50
50
  "dependencies": {
51
- "@hagicode/hagilight-core": "0.4.1-dev.60.1.9bbf68a"
51
+ "@hagicode/hagilight-core": "0.4.2-dev.62.1.e263aaa"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "@astrojs/starlight": "^0.42.4",