slidev-prerender 0.0.1-alpha.0 → 0.0.1-alpha.2

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 (2) hide show
  1. package/README.md +27 -17
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  <p align="center">
4
4
  <a href="https://www.npmjs.com/package/slidev-prerender"><img src="https://img.shields.io/npm/v/slidev-prerender.svg" alt="npm version"></a>
5
5
  <a href="https://www.npmjs.com/package/slidev-prerender"><img src="https://img.shields.io/npm/dm/slidev-prerender.svg" alt="npm downloads"></a>
6
- <a href="https://github.com/slidev-prerender/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/slidev-prerender.svg" alt="license"></a>
6
+ <a href="https://github.com/petaxa/slidev-prerender/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="license"></a>
7
7
  </p>
8
8
 
9
9
  <p align="center">
@@ -68,15 +68,16 @@ export default defineConfig({
68
68
  // Output directory for pre-rendered pages
69
69
  outDir: "./dist-prerender",
70
70
 
71
- // Port to use for the local server during rendering (default: 3030)
72
- port: 3030,
71
+ // Port to use for the local server during rendering (default: 4173)
72
+ port: 4173,
73
73
 
74
74
  // Configuration for individual pages
75
75
  pages: [
76
76
  {
77
- id: "1",
77
+ fileName: "1",
78
78
  meta: {
79
- fileName: "Introduction - My Presentation",
79
+ title: "Welcome to My Presentation",
80
+ description: "An introduction to the main topics",
80
81
  seoMeta: {
81
82
  ogTitle: "Welcome to My Presentation",
82
83
  ogDescription: "An introduction to the main topics",
@@ -86,9 +87,10 @@ export default defineConfig({
86
87
  },
87
88
  },
88
89
  {
89
- id: "2",
90
+ fileName: "2",
90
91
  meta: {
91
- fileName: "Key Concepts",
92
+ title: "Understanding the Key Concepts",
93
+ description: "Deep dive into the core ideas",
92
94
  seoMeta: {
93
95
  ogTitle: "Understanding the Key Concepts",
94
96
  ogDescription: "Deep dive into the core ideas",
@@ -108,22 +110,29 @@ export default defineConfig({
108
110
  | ------------ | --------------- | -------------------- | -------------------------------------------- |
109
111
  | `slidevDist` | `string` | `"./dist"` | Path to your Slidev build output directory |
110
112
  | `outDir` | `string` | `"./dist-prerender"` | Output directory for pre-rendered pages |
111
- | `port` | `number` | `3030` | Port for the local server during rendering |
113
+ | `port` | `number` | `4173` | Port for the local server during rendering |
112
114
  | `pages` | `PageConfig[]` | `[]` | Configuration for individual slides |
113
115
 
114
116
  #### `PageConfig`
115
117
 
116
- | Option | Type | Description |
117
- | ------ | ------------------ | ------------------------------------------------- |
118
- | `id` | `string` | Slide number or identifier (e.g., "1", "2", "3") |
119
- | `meta` | `BuildHeadOptions` | Metadata configuration for the slide |
118
+ | Option | Type | Description |
119
+ | ---------- | ------------------ | ------------------------------------------------------------ |
120
+ | `fileName` | `string` | Slide file name without extension (e.g., "1", "2", "3") |
121
+ | `meta` | `BuildHeadOptions` | Metadata configuration for the slide (optional) |
120
122
 
121
123
  #### `BuildHeadOptions`
122
124
 
123
- | Option | Type | Description |
124
- | ---------- | --------- | ------------------------------------ |
125
- | `title` | `string` | Page title (appears in browser tab) |
126
- | `seoMeta` | `SEOMeta` | SEO and social media metadata |
125
+ | Option | Type | Description |
126
+ | ------------- | ------------------ | ------------------------------------------------ |
127
+ | `lang` | `string` | Language attribute for the HTML element |
128
+ | `title` | `string` | Page title (appears in browser tab) |
129
+ | `description` | `string` | Meta description for the page |
130
+ | `canonicalUrl`| `string` | Canonical URL for the page |
131
+ | `ogImage` | `string` | Default Open Graph image URL |
132
+ | `twitterCard` | `string` | Twitter Card type (e.g., "summary_large_image") |
133
+ | `favicon` | `string` | Favicon URL |
134
+ | `webFonts` | `ResolvableLink[]` | Web font links |
135
+ | `seoMeta` | `SEOMeta` | SEO and social media metadata (optional) |
127
136
 
128
137
  #### `SEOMeta`
129
138
 
@@ -133,10 +142,11 @@ export default defineConfig({
133
142
  | `ogDescription` | `string` | Open Graph description |
134
143
  | `ogImage` | `string` | Open Graph image URL |
135
144
  | `ogUrl` | `string` | Open Graph URL |
136
- | `twitterCard` | `string` | Twitter Card type (e.g., "summary_large_image") |
145
+ | `twitterCard` | `string` | Twitter Card type (e.g., "summary_large_image") |
137
146
  | `twitterTitle` | `string` | Twitter title |
138
147
  | `twitterDescription` | `string` | Twitter description |
139
148
  | `twitterImage` | `string` | Twitter image URL |
149
+ | `twitterUrl` | `string` | Twitter URL |
140
150
 
141
151
  ## 🌐 Deployment
142
152
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "slidev-prerender",
3
3
  "type": "module",
4
- "version": "0.0.1-alpha.0",
4
+ "version": "0.0.1-alpha.2",
5
5
  "description": "",
6
6
  "author": "petaxa <soccer.i_y@icloud.com>",
7
7
  "license": "MIT",