create-modulo
Version:
Starter projects for Modulo.html - Ready for all uses - Markdown-SSG / SSR / API-backed SPA
26 lines (21 loc) • 697 B
HTML
<script src=../Modulo.html></script><template type=f>
<!-- Component Registration - replace / modify existing, add your components here! -->
<Component
name="App"
-src="App.html"
></Component>
<Component
name="Page"
mode="vanish"
-src="Page.html"
></Component>
<!-- Finally, load the <x-Page> component, but only if it's a "type=f" page -->
<script Configuration>
if (modulo.DEV) {
const content = modulo.stores.CACHE.getItem(window.location + '')
if (content) { // Viewing a content file: Parse content as "global.page"
modulo.page = modulo.contentType.MD(content)
document.body.innerHTML = '<x-Page>'
}
}
</script>