@x-wave/blog 2.4.0 → 2.4.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.
package/README.md CHANGED
@@ -233,8 +233,14 @@ Optional YAML at the top of your MDX file:
233
233
  ```mdx
234
234
  ---
235
235
  title: Getting Started
236
+ description: Learn the basics in 5 minutes
236
237
  author: Jane Doe
237
238
  date: 2026-02-23
239
+ keywords:
240
+ - getting started
241
+ - tutorial
242
+ - basics
243
+ ogImage: getting-started.png
238
244
  hasAdvanced: true
239
245
  tags:
240
246
  - tutorial
@@ -253,6 +259,7 @@ Regular content here.
253
259
  | `author` | `string` | Author name. Displayed below the page title with a user icon. |
254
260
  | `date` | `string` | Publication or update date. Displayed below the page title with "Last edited" label and calendar icon (i18n supported). |
255
261
  | `keywords` | `string[] \| string` | Optional array of keywords or comma-separated string for SEO. Inserted into the page `<meta name="keywords">` tag. |
262
+ | `ogImage` | `string` | Optional dedicated Open Graph image filename for the article. Used in the page `<meta property="og:image">` tag for social media sharing. If not provided, falls back to site-level og image if available. |
256
263
  | `hasAdvanced` | `boolean` | Enables Simple/Advanced mode toggle. Requires a `-advanced.mdx` variant. |
257
264
  | `tags` | `string[]` | Array of tag strings for categorizing content. Tags are automatically indexed by the framework when you pass `mdxFiles` to BlogProvider. Tags are clickable and show search results. |
258
265
 
@@ -269,6 +276,100 @@ src/docs/
269
276
 
270
277
  Set `hasAdvanced: true` in the simple version's frontmatter, and the framework automatically shows a toggle.
271
278
 
279
+ ### Supported Markdown
280
+
281
+ The blog system supports standard Markdown and extended syntax via GitHub Flavored Markdown (GFM). Here's what you can use:
282
+
283
+ #### Headings
284
+
285
+ ```mdx
286
+ # Heading 1
287
+ ## Heading 2
288
+ ### Heading 3
289
+ #### Heading 4
290
+ ##### Heading 5
291
+ ###### Heading 6
292
+ ```
293
+
294
+ #### Text Styling
295
+
296
+ ```mdx
297
+ **bold text**
298
+ *italic text*
299
+ ***bold and italic***
300
+ ~~strikethrough~~
301
+ ```
302
+
303
+ #### Lists
304
+
305
+ **Unordered lists:**
306
+ ```mdx
307
+ - Item 1
308
+ - Item 2
309
+ - Nested item
310
+ ```
311
+
312
+ **Ordered lists:**
313
+ ```mdx
314
+ 1. First item
315
+ 2. Second item
316
+ 1. Nested item
317
+ ```
318
+
319
+ #### Links
320
+
321
+ ```mdx
322
+ [External link](https://example.com)
323
+ [Internal link](./getting-started)
324
+ ```
325
+
326
+ Internal links using relative paths (starting with `./`) will automatically be configured with the correct language prefix and base path.
327
+
328
+ #### Code
329
+
330
+ **Inline code:**
331
+ ```mdx
332
+ Use the `createBlogUtils()` function to setup your blog.
333
+ ```
334
+
335
+ **Code blocks:**
336
+ ````mdx
337
+ ```
338
+ const blog = createBlogUtils(mdxFiles)
339
+ ```
340
+ ````
341
+
342
+ Code blocks accept generic fenced code without language specifiers.
343
+
344
+ #### Blockquotes
345
+
346
+ ```mdx
347
+ > This is a blockquote.
348
+ >
349
+ > It can span multiple lines.
350
+ ```
351
+
352
+ #### Tables
353
+
354
+ ```mdx
355
+ | Column 1 | Column 2 | Column 3 |
356
+ |----------|----------|----------|
357
+ | Cell 1 | Cell 2 | Cell 3 |
358
+ | Cell 4 | Cell 5 | Cell 6 |
359
+ ```
360
+
361
+ #### Images
362
+
363
+ ```mdx
364
+ ![Alt text](./image.png)
365
+ ```
366
+
367
+ Images support automatic dark mode variants. If a dark variant exists at `image-dark.png`, it will automatically be used when the dark theme is active.
368
+
369
+ ---
370
+
371
+ > **Note**: Additional markdown features may be added in the future. Check back for updates.
372
+
272
373
  ## API reference
273
374
 
274
375
  ### Components
@@ -384,6 +485,26 @@ Available CSS variables include:
384
485
 
385
486
  All CSS variables are scoped to `.xw-blog-root` for isolation and to prevent conflicts with your application styles.
386
487
 
488
+ ### Link color overrides (light/dark)
489
+
490
+ Link color is controlled through CSS variables in the consuming app.
491
+
492
+ - `--xw-link-light`: used in light theme
493
+ - `--xw-link-dark`: used in dark theme
494
+
495
+ Set them on `.xw-blog-root` (or a parent scope) to override defaults:
496
+
497
+ ```css
498
+ /* In your app.css */
499
+ .xw-blog-root {
500
+ --xw-link-light: oklch(0.62 0.16 252);
501
+ --xw-link-dark: oklch(0.78 0.12 252);
502
+ }
503
+ ```
504
+
505
+ If either variable is not set, the framework falls back to its built-in value from `packages/styles/main.scss`.
506
+ This override is intentionally CSS-based and is not passed through `BlogProvider`.
507
+
387
508
  ### Config options
388
509
 
389
510
  **BlogConfig** properties:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@x-wave/blog",
3
- "version": "2.4.0",
3
+ "version": "2.4.2",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
package/styles/index.css CHANGED
@@ -161,7 +161,8 @@
161
161
  --xw-border: oklch(0.922 0 0);
162
162
  --xw-input: oklch(0.922 0 0);
163
163
  --xw-ring: oklch(0.708 0 0);
164
- --xw-link: rgb(211, 48, 121);
164
+ /* Consumers can override link colors with --xw-link-light / --xw-link-dark. */
165
+ --xw-link: var(--xw-link-light, oklch(0.6 0 0));
165
166
  --xw-chart-1: oklch(0.646 0.222 41.116);
166
167
  --xw-chart-2: oklch(0.6 0.118 184.704);
167
168
  --xw-chart-3: oklch(0.398 0.07 227.392);
@@ -199,7 +200,7 @@
199
200
  --xw-border: oklch(1 0 0 / 10%);
200
201
  --xw-input: oklch(1 0 0 / 15%);
201
202
  --xw-ring: oklch(0.556 0 0);
202
- --xw-link: rgb(211, 48, 121);
203
+ --xw-link: var(--xw-link-dark, oklch(0.738 0 0));
203
204
  --xw-chart-1: oklch(0.488 0.243 264.376);
204
205
  --xw-chart-2: oklch(0.696 0.17 162.48);
205
206
  --xw-chart-3: oklch(0.769 0.188 70.08);