mirror of
https://github.com/seigler/dashdev-website
synced 2025-07-27 06:46: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,
|
reverse: true,
|
||||||
refer: false
|
refer: false
|
||||||
},
|
},
|
||||||
|
frontpage: {
|
||||||
|
pattern: 'index.*',
|
||||||
|
sortBy: 'priority',
|
||||||
|
reverse: true,
|
||||||
|
refer: false,
|
||||||
|
metadata: {
|
||||||
|
layout: './../src/layouts/frontpage.hbs' // default is <root>/layouts
|
||||||
|
}
|
||||||
|
},
|
||||||
docs: {
|
docs: {
|
||||||
pattern: 'docs/**/*',
|
pattern: 'docs/**/*',
|
||||||
sortBy: 'priority',
|
sortBy: 'priority',
|
||||||
|
@ -138,6 +147,7 @@ var metalsmith = Metalsmith(__dirname)
|
||||||
// //engineOptions: {},
|
// //engineOptions: {},
|
||||||
// pattern: `partials.hbs/**`
|
// pattern: `partials.hbs/**`
|
||||||
// }))
|
// }))
|
||||||
|
// define default (add additional rules in collections plugin )
|
||||||
.use(layouts({
|
.use(layouts({
|
||||||
//engineOptions: {},
|
//engineOptions: {},
|
||||||
pattern: `**/index.*`,
|
pattern: `**/index.*`,
|
||||||
|
|
|
@ -4,9 +4,15 @@ description: A static HTML-only website generated using Metalsmith.io.
|
||||||
priority: 1.0
|
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/)
|
[](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.
|
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.
|
||||||
|
|
||||||
|
|
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