@voidzero-dev/vitepress-theme 4.6.0 → 4.7.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.
package/README.md CHANGED
@@ -4,14 +4,11 @@ Shared VitePress theme for VoidZero projects, including Vite+, Vite, Vitest, Rol
4
4
 
5
5
  ## Publishing package
6
6
 
7
- Make to sure to in latest commit
8
-
9
- 1. Update version in `package.json` and commit it (don't push yet)
10
- 2. Add tag locally `git tag vx.y.z` (matching version in package.json)
11
- 3. Push changes `git push origin`
12
- 4. Push to remote `git push origin vx.y.z`
13
- 5. Go to GitHub UI > "Releases" > "Tags" > Click the latest tag > "Create release from tag"
14
- 6. Click "Publish release"
7
+ ```bash
8
+ pnpm release <version> # e.g. pnpm release 4.6.1
9
+ ```
10
+
11
+ This updates `package.json`, commits, tags, and pushes. CI publishes to npm and creates the GitHub release.
15
12
 
16
13
  ## Developing locally
17
14
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voidzero-dev/vitepress-theme",
3
- "version": "4.6.0",
3
+ "version": "4.7.0",
4
4
  "description": "Shared VitePress theme for VoidZero projects",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
@@ -38,5 +38,8 @@
38
38
  "devDependencies": {
39
39
  "@types/mark.js": "^8.11.12",
40
40
  "typescript": "^5.9.3"
41
+ },
42
+ "scripts": {
43
+ "release": "node scripts/release.ts"
41
44
  }
42
45
  }
@@ -1,4 +1,5 @@
1
1
  <script setup>
2
+ import { Icon } from '@iconify/vue'
2
3
  import { useData } from 'vitepress'
3
4
 
4
5
  const { frontmatter } = useData()
@@ -7,11 +8,12 @@ const { frontmatter } = useData()
7
8
  <template>
8
9
  <section v-if="frontmatter.features"
9
10
  class="wrapper wrapper--ticks border-t grid md:grid-cols-2 divide-x divide-y divide-nickel">
10
- <div v-for="feature in frontmatter.features" :key="feature.icon"
11
+ <div v-for="feature in frontmatter.features" :key="feature.icon || feature.iconify"
11
12
  class="flex flex-col gap-3 justify-between border-r-0 md:odd:border-r md:nth-last-2:border-b-0">
12
13
  <div class="px-10 py-8 sm:px-15 sm:py-12 flex flex-col gap-3">
13
14
  <p class="text-2xl">
14
- {{ feature.icon }}
15
+ <Icon v-if="feature.iconify" :icon="feature.iconify" width="1em" height="1em" />
16
+ <template v-else>{{ feature.icon }}</template>
15
17
  </p>
16
18
  <h5 class="text-balance sm:text-pretty text-white">
17
19
  {{ feature.title }}
@@ -1,6 +1,10 @@
1
- <script setup>
1
+ <script setup lang="ts">
2
2
  import { useData } from 'vitepress'
3
3
 
4
+ const props = defineProps<{
5
+ background?: string
6
+ }>()
7
+
4
8
  const { frontmatter } = useData()
5
9
  </script>
6
10
 
@@ -27,9 +31,11 @@ const { frontmatter } = useData()
27
31
  </div>
28
32
  </div>
29
33
  </div>
30
- <div class="flex flex-col">
34
+ <div class="flex flex-col bg-cover bg-center" :style="props.background ? { backgroundImage: `url(${props.background})` } : undefined">
31
35
  <div class="relative px-10 pb-10 md:pt-10 h-full flex flex-col justify-center overflow-clip">
32
- <img :src="frontmatter.hero.image.src" :alt="frontmatter.hero.image.alt" class="max-h-[20rem]">
36
+ <slot name="hero-image">
37
+ <img v-if="frontmatter.hero.image?.src" :src="frontmatter.hero.image.src" :alt="frontmatter.hero.image.alt" class="max-h-[20rem]">
38
+ </slot>
33
39
  </div>
34
40
  </div>
35
41
  </div>