File tree Expand file tree Collapse file tree 5 files changed +15
-3
lines changed
site-content/site/_includes/layouts Expand file tree Collapse file tree 5 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,16 @@ module.exports = {
99 const { renderPage} = await import (
1010 '@webcomponents/internal-site-server/lib/templates/base.js'
1111 ) ;
12- return [ ...renderPage ( data ) ] . join ( '' ) ;
12+ // TODO (justinfagnani): move the top-bar to a real template or
13+ // back into the base template when we enable 11ty / Lit SSR integration
14+ return [
15+ ...renderPage ( {
16+ ...data ,
17+ content : `
18+ <wco-top-bar></wco-top-bar>
19+ ${ data . content }
20+ ` ,
21+ } ) ,
22+ ] . join ( '' ) ;
1323 } ,
1424} ;
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ export const handleCatalogRoute = async (
2222 '/js/catalog.js'
2323 ] ,
2424 content : `
25+ <wco-top-bar></wco-top-bar>
2526 <h1>Catalog</h1>
2627 <wco-catalog-search></wco-catalog-search>
2728 ` ,
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ import {Readable} from 'stream';
88import { gql } from '@apollo/client/core/index.js' ;
99import Router from '@koa/router' ;
1010import { render } from '@lit-labs/ssr/lib/render-with-global-dom-shim.js' ;
11- import '@webcomponents/internal-site-client/lib/entrypoints/element.js' ;
1211
1312import { renderPage } from '../../../templates/base.js' ;
1413import { client } from '../../graphql.js' ;
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import {
1212 resolveReference ,
1313 normalizeModulePath ,
1414} from '@webcomponents/custom-elements-manifest-tools' ;
15+ import '@webcomponents/internal-site-client/lib/entrypoints/element.js' ;
1516
1617export const renderElement = ( {
1718 packageName,
@@ -57,6 +58,7 @@ export const renderElement = ({
5758 }
5859
5960 return html `
61+ < wco-top-bar > </ wco-top-bar >
6062 < h1 > ${ packageName } /${ elementName } </ h1 >
6163 ${ declaration . description }
6264 < h2 > Usage</ h2 >
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ export function* renderPage(data: {
5252 <title>${ escapeHTML ( data . title ) } </title>
5353 </head>
5454 <body>
55- <wco-top-bar></wco-top-bar> `;
55+ ` ;
5656 if ( typeof data . content === 'string' ) {
5757 yield data . content ;
5858 } else {
You can’t perform that action at this time.
0 commit comments