@dosgato/templating 0.0.129 → 0.0.131

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.
@@ -344,11 +344,15 @@ export interface PageRecord<DataType extends PageData = PageData> {
344
344
  id: string;
345
345
  name: string;
346
346
  linkId: string;
347
+ fallbackTitle: string;
347
348
  createdAt: Date;
348
349
  modifiedAt: Date;
349
350
  publishedAt?: Date;
350
351
  path: string;
351
352
  data: DataType;
353
+ pagetree: {
354
+ id: string;
355
+ };
352
356
  site: SiteInfo;
353
357
  }
354
358
  export interface PageRecordOptionalData<DataType extends PageData = PageData> extends Omit<PageRecord<DataType>, 'data'> {
package/dist/render.d.ts CHANGED
@@ -105,6 +105,18 @@ export interface APIClient {
105
105
  absolute?: boolean;
106
106
  extension?: string;
107
107
  }) => Promise<string | undefined>;
108
+ /**
109
+ * Exactly like resolveLink but also returns the title of the target page, if the target page
110
+ * is internal to the CMS. If the target is a random web page outside the CMS, title will be
111
+ * undefined. Perhaps in the future title could be scraped from the page HTML.
112
+ */
113
+ resolveLinkAndTitle: (lnk: string | LinkDefinition | undefined, opts?: {
114
+ absolute?: boolean;
115
+ extension?: string;
116
+ }) => Promise<{
117
+ href?: string;
118
+ title?: string;
119
+ }>;
108
120
  /**
109
121
  * Get a link href for a page
110
122
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dosgato/templating",
3
- "version": "0.0.129",
3
+ "version": "0.0.131",
4
4
  "description": "A library to support building templates for dosgato CMS.",
5
5
  "type": "module",
6
6
  "exports": {