@dogsbay/format-dogsbay-md 0.2.0-beta.147 → 0.2.0-beta.149

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/dist/project.d.ts CHANGED
@@ -29,7 +29,7 @@ export declare const MEDIA_EXTS: Set<string>;
29
29
  export declare function carriedFrontmatter(fm: Record<string, unknown> | undefined): Record<string, unknown>;
30
30
  /** Each page as `<slug>.md` and the nav as `nav.json`, relative to the content root. */
31
31
  /** The file a page is written to, relative to the content root (`dogsbayMdPageFiles`). */
32
- export declare function dogsbayMdPagePath(page: Pick<ExportPage, "slug">): string;
32
+ export declare function dogsbayMdPagePath(page: Pick<ExportPage, "slug" | "folderIndex">): string;
33
33
  export declare function dogsbayMdPageFiles(pages: ExportPage[], nav: NavItem[], serialize?: SerializeOptions): Map<string, string>;
34
34
  /** An importer's asset directory, as `ImportResult.assetMounts` declares it, relative to the corpus. */
35
35
  export interface AssetMount {
package/dist/project.js CHANGED
@@ -60,6 +60,10 @@ export function carriedFrontmatter(fm) {
60
60
  /** Each page as `<slug>.md` and the nav as `nav.json`, relative to the content root. */
61
61
  /** The file a page is written to, relative to the content root (`dogsbayMdPageFiles`). */
62
62
  export function dogsbayMdPagePath(page) {
63
+ // A folder's index page keeps its folder form, so a host that serves leaves without a slash
64
+ // still serves it at `/<slug>/`
65
+ if (page.folderIndex && page.slug && page.slug !== "index")
66
+ return `${page.slug}/index.md`;
63
67
  return `${page.slug || "index"}.md`;
64
68
  }
65
69
  export function dogsbayMdPageFiles(pages, nav, serialize) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dogsbay/format-dogsbay-md",
3
- "version": "0.2.0-beta.147",
3
+ "version": "0.2.0-beta.149",
4
4
  "description": "Dogsbay Markdown dialect — canonical format for TreeNode[] with directives, YAML bodies, and intelligent fallbacks",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -40,10 +40,10 @@
40
40
  "markdown-it-footnote": "^4.0.0",
41
41
  "markdown-it-front-matter": "^0.2.4",
42
42
  "pele": "1.6.0",
43
- "@dogsbay/corpus": "0.2.0-beta.147",
44
- "@dogsbay/types": "0.2.0-beta.147",
45
- "@dogsbay/minja": "0.2.0-beta.147",
46
- "@dogsbay/serialize-core": "0.2.0-beta.147"
43
+ "@dogsbay/corpus": "0.2.0-beta.149",
44
+ "@dogsbay/types": "0.2.0-beta.149",
45
+ "@dogsbay/serialize-core": "0.2.0-beta.149",
46
+ "@dogsbay/minja": "0.2.0-beta.149"
47
47
  },
48
48
  "license": "MIT",
49
49
  "repository": {