Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
Create custom site document; use default layout
Browse files Browse the repository at this point in the history
  • Loading branch information
zarathustra323 committed Oct 12, 2021
1 parent 6364d05 commit fcea1a1
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 2 deletions.
2 changes: 2 additions & 0 deletions services/example-website/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const { startServer } = require('@parameter1/base-cms-marko-web');

const document = require('./server/components/document');
const coreConfig = require('./config/core');
const siteConfig = require('./config/site');
const routes = require('./server/routes');
Expand All @@ -8,6 +9,7 @@ const { log } = console;

module.exports = startServer({
rootDir: __dirname,
document,
coreConfig,
siteConfig,
routes,
Expand Down
15 changes: 15 additions & 0 deletions services/example-website/server/components/document.marko
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<marko-web-document ...input>
<@head>
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<${input.head} />
</@head>
<@above-container>
<${input.aboveContainer} />
</@above-container>
<@below-container>
<${input.belowContainer} />
</@below-container>
</marko-web-document>
15 changes: 14 additions & 1 deletion services/example-website/server/components/marko.json
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
{}
{
"<site-document>": {
"template": "./document.marko",
"<head>": {},
"<above-container>": {},
"<container>": {
"<above-page>": {},
"<page>": {},
"<below-page>": {}
},
"<below-container>": {},
"<foot>": {}
}
}
10 changes: 9 additions & 1 deletion services/example-website/server/templates/index.marko
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
<h1>Hello World!</h1>
<marko-web-default-page-layout
type="test"
title="Test Page"
description="This is a test page."
>
<@page>
<h1>Hello World!</h1>
</@page>
</marko-web-default-page-layout>

0 comments on commit fcea1a1

Please sign in to comment.