add frontpage images

remove build-old.js
This commit is contained in:
readme 2020-03-22 13:34:25 +01:00
parent 8aafb09320
commit 07b8e87030
13 changed files with 24 additions and 179 deletions

View file

@ -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;
});

View file

@ -181,7 +181,6 @@ p.articleinfo {
main { main {
/* for page and article template */ /* for page and article template */
clear: both; clear: both;
background-color: #fff;
background-color: #f7f2ea; background-color: #f7f2ea;
overflow: auto; overflow: auto;
min-height: 100%; min-height: 100%;
@ -195,12 +194,23 @@ main {
padding-top: 10px; padding-top: 10px;
} }
.frontpage { .frontpage>main {
background-color: #111833; background-color: #111833;
} }
.frontpage p { .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 { article {

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB

View file

@ -1,28 +1,15 @@
--- ---
title: title:
description: A static HTML-only website generated using Metalsmith.io. description: Frontpage
priority: 1.0 priority: 1.0
--- ---
[![dashbox]({{ root }}images/dashbox-front.png)]({{ root }}docs/)
[![dashbox]({{ root }}images/explorer-front.png)]({{ root }}docs/)
[![dashbox]({{ root }}images/dpreact-front.png)]({{ root }}docs/)
<span style="color:red"> *some emphasized markdown text*</span> <!-- [![dashbox]({{ root }}images/tinker-v1.png)](http://dash.org/) -->
<!-- [![dashbox]({{ root }}images/myArt1.png)](http://dash.org/) -->
<font color='blue'>test blue color font</font>
<span style="background-color: #FFFF00">Marked text</span> <!-- [Get started&hellip;]({{ root }}docs/) -->
<!-- <span style="color:red"> [Get started&hellip;]({{ root }}docs/) </span> -->
[![Node.js]({{ root }}images/nodejs.png)](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&hellip;]({{ root }}docs/)

View file

@ -11,15 +11,10 @@
{{> header }} {{> header }}
{{!-- removed since there is no navsub (sidebar) in page layout --}}
{{!-- <main{{#if navsub}} class="subpages"{{/if}}> --}}
<main>
<div class="frontpage"> <div class="frontpage">
{{!-- {{> navsub }} --}} <main>
<article>
{{#if title}} {{#if title}}
<h1>{{ title }}</h1> <h1>{{ title }}</h1>
@ -27,13 +22,10 @@
{{{ contents }}} {{{ contents }}}
</article>
</div>
</main> </main>
{{!-- {{> footer template='page' }} --}} </div>
</body> </body>