add frontpage images
remove build-old.js
144
build-old.js
|
@ -1,144 +0,0 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
/*
|
||||
Metalsmith build file
|
||||
Build site with `node ./build.js` or `npm start`
|
||||
Build production site with `npm run production`
|
||||
*/
|
||||
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
// defaults
|
||||
consoleLog = false, // set true for metalsmith file and meta content logging
|
||||
devBuild = ((process.env.NODE_ENV || '').trim().toLowerCase() !== 'production'),
|
||||
pkg = require('./package.json'),
|
||||
|
||||
// main directories
|
||||
dir = {
|
||||
base: __dirname + '/',
|
||||
lib: __dirname + '/lib/',
|
||||
source: './src/',
|
||||
dest: './build/'
|
||||
},
|
||||
|
||||
// modules
|
||||
metalsmith = require('metalsmith'),
|
||||
markdown = require('metalsmith-markdown'),
|
||||
publish = require('metalsmith-publish'),
|
||||
wordcount = require("metalsmith-word-count"),
|
||||
collections = require('metalsmith-collections'),
|
||||
permalinks = require('metalsmith-permalinks'),
|
||||
// jstransformer = require('metalsmith-jstransformer'),
|
||||
inplace = require('metalsmith-in-place'),
|
||||
layouts = require('metalsmith-layouts'),
|
||||
sitemap = require('metalsmith-mapsite'),
|
||||
rssfeed = require('metalsmith-feed'),
|
||||
assets = require('metalsmith-assets'),
|
||||
htmlmin = devBuild ? null : require('metalsmith-html-minifier'),
|
||||
browsersync = devBuild ? require('metalsmith-browser-sync') : null,
|
||||
// handlebars = require('jstransformer')(require('jstransformer-handlebars')),
|
||||
|
||||
// custom plugins
|
||||
setdate = require(dir.lib + 'metalsmith-setdate'),
|
||||
moremeta = require(dir.lib + 'metalsmith-moremeta'),
|
||||
debug = consoleLog ? require(dir.lib + 'metalsmith-debug') : null,
|
||||
|
||||
siteMeta = {
|
||||
devBuild: devBuild,
|
||||
version: pkg.version,
|
||||
name: 'dashdev-website',
|
||||
desc: 'metalsmith website',
|
||||
author: 'dashdevs',
|
||||
contact: 'https://chat.dashdevs.org',
|
||||
domain: devBuild ? 'http://127.0.0.1' : 'https://rawgit.com', // set domain
|
||||
rootpath: devBuild ? null : '/dashdev-suite/dashdev-website/master/build/' // set absolute path (null for relative)
|
||||
},
|
||||
|
||||
templateConfig = {
|
||||
engine: 'handlebars',
|
||||
directory: 'template/',
|
||||
partials: 'partials/',
|
||||
default: 'page.html'
|
||||
};
|
||||
|
||||
console.log((devBuild ? 'Development' : 'Production'), 'build, version', pkg.version);
|
||||
|
||||
var ms = metalsmith(dir.base)
|
||||
.clean(!devBuild) // clean folder before a production build
|
||||
.source(dir.source + 'html/') // source folder (src/html/)
|
||||
.destination(dir.dest) // build folder (build/)
|
||||
.metadata(siteMeta) // add meta data to every page
|
||||
.use(publish()) // draft, private, future-dated
|
||||
.use(setdate()) // set date on every page if not set in front-matter
|
||||
.use(collections({ // determine page collection/taxonomy
|
||||
page: {
|
||||
pattern: '**/index.*',
|
||||
sortBy: 'priority',
|
||||
reverse: true,
|
||||
refer: false
|
||||
},
|
||||
start: {
|
||||
pattern: 'start/**/*',
|
||||
sortBy: 'priority',
|
||||
reverse: true,
|
||||
refer: true,
|
||||
metadata: {
|
||||
layout: 'article.html'
|
||||
}
|
||||
},
|
||||
article: {
|
||||
pattern: 'article/**/*',
|
||||
sortBy: 'date',
|
||||
reverse: true,
|
||||
refer: true,
|
||||
limit: 50,
|
||||
metadata: {
|
||||
layout: 'article.html'
|
||||
}
|
||||
}
|
||||
}))
|
||||
.use(markdown()) // convert markdown
|
||||
.use(permalinks({ // generate permalinks
|
||||
pattern: ':mainCollection/:title'
|
||||
}))
|
||||
.use(wordcount({
|
||||
raw: true
|
||||
})) // word count
|
||||
.use(moremeta()) // determine root paths and navigation
|
||||
// .use(jstransformer({
|
||||
// 'pattern': '**',
|
||||
// 'layoutPattern': './src/html/**',
|
||||
// 'defaultLayout': null
|
||||
// }))
|
||||
.use(inplace(templateConfig)) // in-page templating
|
||||
.use(layouts(templateConfig)); // layout templating
|
||||
|
||||
if (htmlmin) ms.use(htmlmin()); // minify production HTML
|
||||
|
||||
if (debug) ms.use(debug()); // output page debugging information
|
||||
|
||||
if (browsersync) ms.use(browsersync({ // start test server
|
||||
server: dir.dest,
|
||||
files: [dir.source + '**/*']
|
||||
}));
|
||||
|
||||
ms
|
||||
.use(sitemap({ // generate sitemap.xml
|
||||
hostname: siteMeta.domain + (siteMeta.rootpath || ''),
|
||||
omitIndex: true
|
||||
}))
|
||||
.use(rssfeed({ // generate RSS feed for articles
|
||||
collection: 'article',
|
||||
site_url: siteMeta.domain + (siteMeta.rootpath || ''),
|
||||
title: siteMeta.name,
|
||||
description: siteMeta.desc
|
||||
}))
|
||||
.use(assets({ // copy assets: CSS, images etc.
|
||||
source: dir.source + 'assets/',
|
||||
destination: './'
|
||||
}))
|
||||
.build(function (err) { // build
|
||||
if (err) throw err;
|
||||
});
|
|
@ -181,7 +181,6 @@ p.articleinfo {
|
|||
main {
|
||||
/* for page and article template */
|
||||
clear: both;
|
||||
background-color: #fff;
|
||||
background-color: #f7f2ea;
|
||||
overflow: auto;
|
||||
min-height: 100%;
|
||||
|
@ -195,12 +194,23 @@ main {
|
|||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.frontpage {
|
||||
.frontpage>main {
|
||||
background-color: #111833;
|
||||
}
|
||||
|
||||
.frontpage p {
|
||||
color: red;
|
||||
/* color: red; */
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.frontpage>main img {
|
||||
float: left;
|
||||
width: auto;
|
||||
height: auto;
|
||||
width: 33.333%;
|
||||
margin-top: 15em;
|
||||
margin-left: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
article {
|
||||
|
|
BIN
src/assets/images/dashbox-front-red.png
Normal file
After Width: | Height: | Size: 217 KiB |
BIN
src/assets/images/dashbox-front.png
Normal file
After Width: | Height: | Size: 217 KiB |
BIN
src/assets/images/dpreact-front-darkyellow.png
Normal file
After Width: | Height: | Size: 208 KiB |
BIN
src/assets/images/dpreact-front-lightred.png
Normal file
After Width: | Height: | Size: 203 KiB |
BIN
src/assets/images/dpreact-front-red.png
Normal file
After Width: | Height: | Size: 202 KiB |
BIN
src/assets/images/dpreact-front-yellow1.png
Normal file
After Width: | Height: | Size: 210 KiB |
BIN
src/assets/images/dpreact-front.png
Normal file
After Width: | Height: | Size: 210 KiB |
BIN
src/assets/images/explorer-front.png
Normal file
After Width: | Height: | Size: 215 KiB |
BIN
src/assets/images/tinker-v1.png
Normal file
After Width: | Height: | Size: 204 KiB |
|
@ -1,28 +1,15 @@
|
|||
---
|
||||
title:
|
||||
description: A static HTML-only website generated using Metalsmith.io.
|
||||
description: Frontpage
|
||||
priority: 1.0
|
||||
---
|
||||
[]({{ root }}docs/)
|
||||
[]({{ root }}docs/)
|
||||
[]({{ root }}docs/)
|
||||
|
||||
<span style="color:red"> *some emphasized markdown text*</span>
|
||||
<!-- [](http://dash.org/) -->
|
||||
<!-- [](http://dash.org/) -->
|
||||
|
||||
<font color='blue'>test blue color font</font>
|
||||
|
||||
<span style="background-color: #FFFF00">Marked text</span>
|
||||
|
||||
[](http://dash.org/)
|
||||
|
||||
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.
|
||||
|
||||
## Where could you use Metalsmith?
|
||||
Metalsmith could be used to create:
|
||||
|
||||
* a fast static website with minimal server-side requirements
|
||||
* technical documentation
|
||||
* an eBook
|
||||
* application prototypes
|
||||
* build tools or project scaffolding
|
||||
|
||||
[Get started…]({{ root }}docs/)
|
||||
<!-- [Get started…]({{ root }}docs/) -->
|
||||
<!-- <span style="color:red"> [Get started…]({{ root }}docs/) </span> -->
|
|
@ -11,15 +11,10 @@
|
|||
|
||||
{{> header }}
|
||||
|
||||
{{!-- removed since there is no navsub (sidebar) in page layout --}}
|
||||
{{!-- <main{{#if navsub}} class="subpages"{{/if}}> --}}
|
||||
<main>
|
||||
|
||||
<div class="frontpage">
|
||||
|
||||
{{!-- {{> navsub }} --}}
|
||||
<main>
|
||||
|
||||
<article>
|
||||
|
||||
{{#if title}}
|
||||
<h1>{{ title }}</h1>
|
||||
|
@ -27,13 +22,10 @@
|
|||
|
||||
{{{ contents }}}
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
</main>
|
||||
|
||||
{{!-- {{> footer template='page' }} --}}
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
|
|