Skip to content

Commit 1aa3f2e

Browse files
authored
Merge pull request #23 from oddbird/v0.5.3
Fix issue with slides data format
2 parents d063f07 + ef95ba9 commit 1aa3f2e

5 files changed

Lines changed: 11 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## v0.5.3 - 2026-02-02
2+
3+
- Fix: Previous version broke notes for `*.slides` data format.
4+
15
## v0.5.2 - 2026-02-02
26

37
- New: The `*.deck` template uses the `*.11tydata.slides` format,
@@ -7,8 +11,7 @@
711
inside `slide.html` and `slide.code` properties,
812
so that it's possible to include HTML-shaped code comments
913
- New: Add basic HTML highlighting to the prism defaults
10-
- Breaking: Change default view to `article`,
11-
with `defaultView` property to override.
14+
- Breaking: Change default view to `article`
1215

1316
## v0.5.1 - 2026-01-14
1417

components/deck/build-deck.webc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
webc:import="npm:@oddbird/slide-deck"
33
:id="this.id || 'slides'"
44
:@slides="this.slides"
5-
:slide-view="this.defaultView || 'article'"
5+
slide-view="article"
66
key-control
77
follow-active
88
>

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export default async function(eleventyConfig, options) {
5858

5959
eleventyConfig.addTemplateFormats("deck");
6060
eleventyConfig.addExtension("deck", {
61-
getData: async (inputPath) => slideDataParser(inputPath, 'deck'),
61+
getData: async (inputPath) => slideDataParser(inputPath),
6262
compile: async (inputContent) => {
6363
let output = options.markdownFunctions.block(inputContent);
6464
return async () => { return output; };

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@oddbird/eleventy-plugin-slide-deck",
33
"description": "Build customizable presentations in eleventy",
4-
"version": "0.5.2",
4+
"version": "0.5.3",
55
"type": "module",
66
"main": "index.js",
77
"publishConfig": {

utils/slides.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import doxray from "doxray";
2+
import path from 'node:path';
23

34
const slideFormat = {
45
opening: /<!--\s*@slide[^\n]*\n/m,
@@ -17,8 +18,9 @@ const doxOptions = {
1718

1819
const unescapeHtmlComments = (content) => content.replace('--\\\>', '-->');
1920

20-
export const slideDataParser = (filePath, format = 'slides') => {
21+
export const slideDataParser = (filePath) => {
2122
const data = doxray(filePath, doxOptions);
23+
const format = path.extname(filePath).slice(1);
2224

2325
data.patterns.map((slide) => {
2426
slide.note = slide[format];

0 commit comments

Comments
 (0)