@fifthbell/brokaw 0.1.51 → 0.1.52

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.
@@ -1,5 +1,5 @@
1
- export { render, liveProgramPageHtml, liveProgramPageAsset, liveProgramPageFiles } from './renderer.node.js';
2
- export type { LiveProgramFileEntry } from './renderer.node.js';
1
+ export { render, liveProgramPageHtml, liveProgramPageAsset, liveProgramPageFiles, fontFiles } from './renderer.node.js';
2
+ export type { LiveProgramFileEntry, FontFileEntry } from './renderer.node.js';
3
3
  export { buildInstagramImageHtml, type InstagramImageTemplateParams } from './instagram-image-template.js';
4
4
  export { outletConfig } from './outlet-config.js';
5
5
  export { version } from './version.js';
package/dist/renderer.js CHANGED
@@ -1,4 +1,4 @@
1
- export { render, liveProgramPageHtml, liveProgramPageAsset, liveProgramPageFiles } from './renderer.node.js';
1
+ export { render, liveProgramPageHtml, liveProgramPageAsset, liveProgramPageFiles, fontFiles } from './renderer.node.js';
2
2
  export { buildInstagramImageHtml } from './instagram-image-template.js';
3
3
  export { outletConfig } from './outlet-config.js';
4
4
  export { version } from './version.js';
@@ -105,6 +105,15 @@ export function fontFiles() {
105
105
  contentType: contentTypeForFile(item.name),
106
106
  });
107
107
  }
108
+ // Also include fonts.css
109
+ const cssPath = path.join(dir, 'fonts.css');
110
+ if (fs.existsSync(cssPath)) {
111
+ entries.push({
112
+ key: 'content/fonts/fonts.css',
113
+ body: fs.readFileSync(cssPath),
114
+ contentType: 'text/css',
115
+ });
116
+ }
108
117
  return entries;
109
118
  }
110
119
  export function liveProgramPageAsset(filename) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fifthbell/brokaw",
3
3
  "description": "Server-side Handlebars renderer and templates for fifthbell pages.",
4
- "version": "0.1.51",
4
+ "version": "0.1.52",
5
5
  "license": "MIT",
6
6
  "author": "fifthbell",
7
7
  "repository": {
@@ -4,11 +4,14 @@
4
4
  <meta charset='UTF-8' />
5
5
  <meta name='viewport' content='width=device-width, initial-scale=1' />
6
6
  <link href='https://cdn.fifthbell.com/content/fonts/fonts.css' rel='stylesheet' />
7
- {{#if featuredImage.url}}
8
- <link rel='preload' as='image' href='{{featuredImage.url}}' fetchpriority='high' />
9
- {{/if}}
10
- {{#if hero.url}}
11
- <link rel='preload' as='image' href='{{hero.url}}' fetchpriority='high' />
7
+ {{#if (eq layout 'homepage')}}
8
+ {{#if hero.url}}
9
+ <link rel='preload' as='image' href='{{hero.url}}' fetchpriority='high' />
10
+ {{/if}}
11
+ {{else}}
12
+ {{#if featuredImage.url}}
13
+ <link rel='preload' as='image' href='{{featuredImage.url}}' fetchpriority='high' />
14
+ {{/if}}
12
15
  {{/if}}
13
16
  <meta name='description' content='{{#if seo.metaDescription}}{{seo.metaDescription}}{{else if excerpt}}{{excerpt}}{{else}}{{resolveHeadTitle this}}{{/if}}' />
14
17
  <link rel='canonical' href='{{canonicalUrl}}' />