diff --git a/build.js b/build.js index a87c714..e4ff353 100644 --- a/build.js +++ b/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 /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.*`, diff --git a/src/html/index.md b/src/html/index.md index 435fe3b..dc51ee3 100644 --- a/src/html/index.md +++ b/src/html/index.md @@ -4,9 +4,15 @@ description: A static HTML-only website generated using Metalsmith.io. priority: 1.0 --- + *some emphasized markdown text* + +test blue color font + +Marked text + [![Node.js]({{ root }}images/nodejs.png)](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/) \ No newline at end of file diff --git a/src/layouts/frontpage.hbs b/src/layouts/frontpage.hbs new file mode 100644 index 0000000..cc8f932 --- /dev/null +++ b/src/layouts/frontpage.hbs @@ -0,0 +1,44 @@ + + + + + {{> meta }} + + + + + + + {{> header }} + + {{!-- removed since there is no navsub (sidebar) in page layout --}} + {{!-- --}} +
+ +
+ + {{!-- {{> navsub }} --}} + +
+ + {{#if title}} +

{{ title }}

+ {{/if}} + + {{{ contents }}} + +
+ +
+ +
+ + {{!-- {{> footer template='page' }} --}} + + + + \ No newline at end of file