@hagicode/hagilight-starlight 0.1.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.
Files changed (3) hide show
  1. package/Footer.astro +16 -0
  2. package/index.mjs +21 -0
  3. package/package.json +34 -0
package/Footer.astro ADDED
@@ -0,0 +1,16 @@
1
+ ---
2
+ import Copyright from '@hagicode/hagilight/Copyright';
3
+ import DefaultFooter from '@astrojs/starlight/components/Footer.astro';
4
+ ---
5
+
6
+ <DefaultFooter />
7
+ <p class="hagilight-copyright"><Copyright name="HagiCode" /></p>
8
+
9
+ <style>
10
+ .hagilight-copyright {
11
+ margin-block: 1rem;
12
+ color: var(--sl-color-gray-3);
13
+ font-size: var(--sl-text-xs);
14
+ text-align: center;
15
+ }
16
+ </style>
package/index.mjs ADDED
@@ -0,0 +1,21 @@
1
+ import { fileURLToPath } from 'node:url';
2
+
3
+ export default function hagilight() {
4
+ return {
5
+ name: '@hagicode/hagilight-starlight',
6
+ hooks: {
7
+ 'config:setup'({ config, updateConfig }) {
8
+ if (config.components?.Footer) {
9
+ throw new Error('Hagilight cannot replace an existing Starlight Footer override.');
10
+ }
11
+
12
+ updateConfig({
13
+ components: {
14
+ ...config.components,
15
+ Footer: fileURLToPath(new URL('./Footer.astro', import.meta.url)),
16
+ },
17
+ });
18
+ },
19
+ },
20
+ };
21
+ }
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "@hagicode/hagilight-starlight",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "description": "Starlight customizations for HagiCode documentation",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/HagiCode-org/hagilight.git",
9
+ "directory": "packages/starlight"
10
+ },
11
+ "publishConfig": {
12
+ "access": "public",
13
+ "provenance": true
14
+ },
15
+ "exports": {
16
+ ".": "./index.mjs",
17
+ "./Footer": "./Footer.astro"
18
+ },
19
+ "files": [
20
+ "index.mjs",
21
+ "*.astro"
22
+ ],
23
+ "dependencies": {
24
+ "@hagicode/hagilight": "0.1.0"
25
+ },
26
+ "peerDependencies": {
27
+ "@astrojs/starlight": "^0.42.4",
28
+ "astro": "^7.3.5"
29
+ },
30
+ "keywords": [
31
+ "astro-component",
32
+ "withastro"
33
+ ]
34
+ }