File tree Expand file tree Collapse file tree 1 file changed +17
-13
lines changed
packages/site-server/src/catalog/routes/catalog Expand file tree Collapse file tree 1 file changed +17
-13
lines changed Original file line number Diff line number Diff line change 44 * SPDX-License-Identifier: Apache-2.0
55 */
66
7- import Router from '@koa/router' ;
8- import { renderPage } from '../../../templates/base.js' ;
97import { DefaultContext , DefaultState , ParameterizedContext } from 'koa' ;
8+ import { html } from 'lit' ;
109import { Readable } from 'stream' ;
10+ import Router from '@koa/router' ;
11+ import { render } from '@lit-labs/ssr/lib/render-with-global-dom-shim.js' ;
12+
13+ import '@webcomponents/internal-site-client/lib/entrypoints/catalog.js' ;
14+ import { renderPage } from '../../../templates/base.js' ;
1115
1216export const handleCatalogRoute = async (
1317 context : ParameterizedContext <
@@ -16,17 +20,17 @@ export const handleCatalogRoute = async (
1620 unknown
1721 >
1822) => {
19- context . body = Readable . from ( renderPage ( {
20- title : `Web Components Catalog` ,
21- scripts : [
22- '/js/catalog.js'
23- ] ,
24- content : `
25- <wco-top-bar></wco-top-bar >
26- <h1>Catalog</h1 >
27- <wco-catalog-search></wco-catalog-search>
28- ` ,
29- } ) ) ;
23+ context . body = Readable . from (
24+ renderPage ( {
25+ title : `Web Components Catalog` ,
26+ scripts : [ '/js/hydrate.js' , '/js/ catalog.js'] ,
27+ content : render ( html `
28+ < wco-top-bar > </ wco-top-bar >
29+ < h1 > Catalog </ h1 >
30+ < wco-catalog-search > </ wco-catalog-search >
31+ ` ) ,
32+ } )
33+ ) ;
3034 context . type = 'html' ;
3135 context . status = 200 ;
3236} ;
You can’t perform that action at this time.
0 commit comments