@dogsbay/format-hugo 0.2.0-beta.127 → 0.2.0-beta.129

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/dist/builtins.js +4 -1
  2. package/package.json +3 -3
package/dist/builtins.js CHANGED
@@ -53,7 +53,10 @@ export const BUILTIN_SHORTCODES = {
53
53
  // `{{< youtube dQw4w9WgXcQ >}}` — 15 uses. `id=` is also accepted.
54
54
  youtube: (node) => {
55
55
  const id = arg(node.args, "id") ?? "";
56
- return id ? directive("youtube", attrBlock({ id }), "") : null;
56
+ // A video has no body, so it is the leaf `::youtube{…}`, not a block (plans/youtube-leaf.md).
57
+ // A leaf must be a paragraph of its own (it cannot interrupt one, as a `:::` block can, and
58
+ // tidy() only breaks lines before `:::`), so it is written between blank lines
59
+ return id ? `\n\n::youtube${attrBlock({ id })}\n\n` : null;
57
60
  },
58
61
  // `{{< param "version" >}}` / `{{< param version.next >}}` — 120 uses.
59
62
  // Substitutes from site params. An unresolved param must be RECORDED, never
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dogsbay/format-hugo",
3
- "version": "0.2.0-beta.127",
3
+ "version": "0.2.0-beta.129",
4
4
  "description": "Hugo format plugin for Dogsbay — imports Hugo/Docsy sites into TreeNode[] by scanning shortcodes and translating them to Dogsbay-MD.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -22,8 +22,8 @@
22
22
  "dependencies": {
23
23
  "smol-toml": "^1.4.2",
24
24
  "yaml": "^2.9.0",
25
- "@dogsbay/format-dogsbay-md": "0.2.0-beta.127",
26
- "@dogsbay/types": "0.2.0-beta.127"
25
+ "@dogsbay/format-dogsbay-md": "0.2.0-beta.129",
26
+ "@dogsbay/types": "0.2.0-beta.129"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@types/node": "^25.9.5",