mdorigin 0.1.3 → 0.1.4

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
@@ -77,6 +77,8 @@ Current stable hooks are:
77
77
  - `renderPage(page, context, next)`
78
78
  - `transformHtml(html, context)`
79
79
 
80
+ All render hooks that receive a `RenderHookContext` (`renderHeader`, `renderFooter`, `renderPage`, and `transformHtml`) can read the normalized markdown frontmatter for the current document via `context.page.meta`, including custom fields such as `syndication`.
81
+
80
82
  The intended boundary is:
81
83
 
82
84
  - `mdorigin` owns routing and normalized content semantics
@@ -1,4 +1,4 @@
1
- import type { ManagedIndexEntry } from './markdown.js';
1
+ import type { ManagedIndexEntry, ParsedDocumentMeta } from './markdown.js';
2
2
  import type { EditLinkConfig, ResolvedSiteConfig, SiteLogo, SiteNavItem, SiteSocialLink } from './site-config.js';
3
3
  import type { TemplateName } from '../html/template-kind.js';
4
4
  import type { BuiltInThemeName } from '../html/theme.js';
@@ -21,6 +21,7 @@ export interface PageRenderModel {
21
21
  socialImage?: string;
22
22
  logo?: SiteLogo;
23
23
  title: string;
24
+ meta: ParsedDocumentMeta;
24
25
  bodyHtml: string;
25
26
  summary?: string;
26
27
  date?: string;
@@ -150,6 +150,7 @@ function buildPageRenderModel(options) {
150
150
  socialImage: options.siteConfig.socialImage,
151
151
  logo: options.siteConfig.logo,
152
152
  title: getDocumentTitle(options.parsed),
153
+ meta: options.parsed.meta,
153
154
  bodyHtml: options.renderedBodyHtml,
154
155
  summary: options.siteConfig.showSummary === false
155
156
  ? undefined
package/dist/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export { defineConfig, type SiteConfig, type UserSiteConfig, type SiteNavItem, type SiteLogo, type SiteSocialLink, type EditLinkConfig, } from './core/site-config.js';
2
2
  export type { MdoPlugin, PageRenderModel, RenderHookContext, IndexTransformContext, } from './core/extensions.js';
3
+ export type { ParsedDocumentMeta } from './core/markdown.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mdorigin",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "type": "module",
5
5
  "description": "Markdown-first publishing for humans and agents.",
6
6
  "repository": {