@dosgato/templating 0.0.60 → 0.0.61

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.
@@ -209,6 +209,9 @@ export interface PageRecord<DataType extends PageData = PageData> {
209
209
  data: DataType;
210
210
  site: SiteInfo;
211
211
  }
212
+ export interface PageRecordOptionalData<DataType extends PageData = PageData> extends Omit<PageRecord<DataType>, 'data'> {
213
+ data?: DataType;
214
+ }
212
215
  export interface ComponentData {
213
216
  templateKey: string;
214
217
  areas?: Record<string, ComponentData[]>;
package/dist/render.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ContextBase, DataData, PageData, PageRecord } from './component.js';
1
+ import { ContextBase, DataData, PageData, PageRecord, PageRecordOptionalData } from './component.js';
2
2
  import { AssetLink, DataFolderLink, DataLink, LinkDefinition, PageLink } from './links.js';
3
3
  export declare function printHeader(ctx: ContextBase, content: string): string;
4
4
  export declare function advanceHeader(ctx: ContextBase, content?: string): {
@@ -57,7 +57,7 @@ export interface APIClient {
57
57
  * absolute: true to generate a full URL suitable for a backend http request or non-HTML document
58
58
  * like an RSS feed.
59
59
  */
60
- getHref: (page: PageRecord, opts?: {
60
+ getHref: (page: PageRecordOptionalData, opts?: {
61
61
  absolute?: boolean;
62
62
  extension?: string;
63
63
  }) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dosgato/templating",
3
- "version": "0.0.60",
3
+ "version": "0.0.61",
4
4
  "description": "A library to support building templates for dosgato CMS.",
5
5
  "type": "module",
6
6
  "exports": {