@riebeckite/plugin-marp 0.0.27 → 0.0.29
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 +1 -1
- package/README_ja.md +1 -1
- package/dist/index.js +9 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -116,7 +116,7 @@ An unknown theme falls back to the default theme and emits a diagnostic with `so
|
|
|
116
116
|
- No client-side slide editing or paging UI; this only produces static HTML/CSS at build time.
|
|
117
117
|
- Only themes registered in Marp Core are available; loading arbitrary theme CSS is not supported.
|
|
118
118
|
- `inlineSVG: false` emits bare `<section>` elements without the SVG wrapper, and the generated CSS changes to match that structure.
|
|
119
|
-
- Whole-document decks bypass the normal Markdown pipeline, so Obsidian `` image embeds are not resolved inside slides. Use regular Markdown image syntax with paths that exist on the published site, mirroring how Marp Slides itself does not support wiki links.
|
|
120
120
|
|
|
121
121
|
## Exports
|
|
122
122
|
|
package/README_ja.md
CHANGED
|
@@ -45,7 +45,7 @@ paginate: true
|
|
|
45
45
|
|
|
46
46
|
文書全体(directive として `theme` や `paginate` を効かせるため frontmatter を含む)を、ページ本文を置き換える 1 つの `<figure class="rb-marp">` デッキとして描画します。スライドの区切りは Marp と同じく `---` / `===` です。フラグも `marp` コードブロックもないノートは変更しません。
|
|
47
47
|
|
|
48
|
-
>
|
|
48
|
+
> **アクティベーションの条件.** Riebeckite は Obsidian プラグインと同じ方法ではアクティベートされません。Obsidian でスライドとして表示されていたノート(プレビューを開いたノート)も、frontmatter に `marp: true` がなければここではデッキとして描画されません。そのような Vault に必要な変更はこの 1 行の追加だけです。デッキの本体(セパレータ、`theme` / `paginate` などの directive、標準 Marp 構文)は保存された内容をそのまま使います。つまり、出力は Marp の意味論に従いますが、プラグインの設定不要なプラグインレベルでのアクティベーションは再現しません。完全なドロップイン互換ではなく「コンテンツ互換」として扱ってください。
|
|
49
49
|
|
|
50
50
|
## インラインデッキ
|
|
51
51
|
|
package/dist/index.js
CHANGED
|
@@ -100,6 +100,8 @@ var init_hast = __esm({
|
|
|
100
100
|
});
|
|
101
101
|
|
|
102
102
|
// src/render.ts
|
|
103
|
+
import { createRequire } from "node:module";
|
|
104
|
+
import path from "node:path";
|
|
103
105
|
async function renderMarpDeck(markdown, request) {
|
|
104
106
|
try {
|
|
105
107
|
const Marp = await loadMarpCore();
|
|
@@ -142,12 +144,17 @@ async function loadMarpCore() {
|
|
|
142
144
|
}
|
|
143
145
|
return Marp;
|
|
144
146
|
}
|
|
145
|
-
function importMarpCore() {
|
|
147
|
+
async function importMarpCore() {
|
|
146
148
|
const importModule = new Function(
|
|
147
149
|
"specifier",
|
|
148
150
|
"return import(specifier)"
|
|
149
151
|
);
|
|
150
|
-
|
|
152
|
+
try {
|
|
153
|
+
return await importModule("@marp-team/marp-core");
|
|
154
|
+
} catch {
|
|
155
|
+
const require2 = createRequire(path.join(process.cwd(), "package.json"));
|
|
156
|
+
return require2("@marp-team/marp-core");
|
|
157
|
+
}
|
|
151
158
|
}
|
|
152
159
|
function countSlides(html) {
|
|
153
160
|
const slides = html.match(/data-marpit-svg/g);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riebeckite/plugin-marp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.29",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@marp-team/marp-core": "^4.4.0",
|
|
19
|
-
"@riebeckite/core": "0.0.
|
|
19
|
+
"@riebeckite/core": "0.0.29"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"tsx": "^4.22.4"
|