mirror of
https://github.com/seigler/dashdev-website
synced 2025-07-26 22:36:09 +00:00
add and include frontpage .hbs file and change background color inside .hbs
This commit is contained in:
parent
27e371d2fb
commit
543713440f
3 changed files with 62 additions and 2 deletions
10
build.js
10
build.js
|
@ -86,6 +86,15 @@ var metalsmith = Metalsmith(__dirname)
|
|||
reverse: true,
|
||||
refer: false
|
||||
},
|
||||
frontpage: {
|
||||
pattern: 'index.*',
|
||||
sortBy: 'priority',
|
||||
reverse: true,
|
||||
refer: false,
|
||||
metadata: {
|
||||
layout: './../src/layouts/frontpage.hbs' // default is <root>/layouts
|
||||
}
|
||||
},
|
||||
docs: {
|
||||
pattern: 'docs/**/*',
|
||||
sortBy: 'priority',
|
||||
|
@ -138,6 +147,7 @@ var metalsmith = Metalsmith(__dirname)
|
|||
// //engineOptions: {},
|
||||
// pattern: `partials.hbs/**`
|
||||
// }))
|
||||
// define default (add additional rules in collections plugin )
|
||||
.use(layouts({
|
||||
//engineOptions: {},
|
||||
pattern: `**/index.*`,
|
||||
|
|
|
@ -4,9 +4,15 @@ description: A static HTML-only website generated using Metalsmith.io.
|
|||
priority: 1.0
|
||||
---
|
||||
|
||||
<span style="color:red"> *some emphasized markdown text*</span>
|
||||
|
||||
<font color='blue'>test blue color font</font>
|
||||
|
||||
<span style="background-color: #FFFF00">Marked text</span>
|
||||
|
||||
[](http://dash.org/)
|
||||
|
||||
This is a static website generated using the Node.js-powered **[Metalsmith](http://metalsmith.io)** and various published and custom plugins.
|
||||
ffThis is a static website generated using the Node.js-powered **[Metalsmith](http://metalsmith.io)** and various published and custom plugins.
|
||||
|
||||
This is a demonstration rather than a recommended way to build a static site. Your requirements will be different. Please use any part of the code as you wish.
|
||||
|
||||
|
@ -19,4 +25,4 @@ Metalsmith could be used to create:
|
|||
* application prototypes
|
||||
* build tools or project scaffolding
|
||||
|
||||
[Get started…]({{ root }}docs/)
|
||||
[Get started…]({{ root }}docs/)
|
44
src/layouts/frontpage.hbs
Normal file
44
src/layouts/frontpage.hbs
Normal file
|
@ -0,0 +1,44 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
{{> meta }}
|
||||
<style>
|
||||
main {background-color: #111833;}
|
||||
h1 {color: blue;}
|
||||
p {color: red;}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
{{> header }}
|
||||
|
||||
{{!-- removed since there is no navsub (sidebar) in page layout --}}
|
||||
{{!-- <main{{#if navsub}} class="subpages"{{/if}}> --}}
|
||||
<main>
|
||||
|
||||
<div class="content">
|
||||
|
||||
{{!-- {{> navsub }} --}}
|
||||
|
||||
<article>
|
||||
|
||||
{{#if title}}
|
||||
<h1>{{ title }}</h1>
|
||||
{{/if}}
|
||||
|
||||
{{{ contents }}}
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
</main>
|
||||
|
||||
{{!-- {{> footer template='page' }} --}}
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue