diff --git a/.gitignore b/.gitignore index c9e489c..e934ef8 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,9 @@ Thumbs.db .npm .vscode -node_modules +node_modules/ npm-debug.log* -logs +logs/ *.log + +build/ \ No newline at end of file diff --git a/README.md b/README.md index a61e29a..98f6f09 100644 --- a/README.md +++ b/README.md @@ -43,9 +43,12 @@ npm run production-win The site is built in the `/build` folder. +To deploy the contents of the `/build` folder to Github Pages, run the appropriate production build command, then: + +```bash +npm run deploy +``` + ## Further information The [built site](https://rawgit.com/dashdev-suite/dashdev-website/master/build/) provides further information about site files and settings. - - - diff --git a/build/article/future/index.html b/build/article/future/index.html deleted file mode 100644 index 18ccdf6..0000000 --- a/build/article/future/index.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - Future publication - dashdevs-suite - - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -
- -
- - - - - - -
- -

Future publication

- - - - - -

This article will only appear if the site is built is run after 1 March, 2016.

- - - - - - -
- -
- -
- - - - - \ No newline at end of file diff --git a/build/article/gotchas/index.html b/build/article/gotchas/index.html deleted file mode 100644 index cc64cce..0000000 --- a/build/article/gotchas/index.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - Gotchas - dashdevs-suite - - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -
- -
- - - - - - -
- -

Gotchas

- - - - - -

Not everything is necessarily straight-forward in the Metalsmith world…

-

Incompatible plugins

-

Some plugins clash with another. For example, metalsmith-rootpath which calculates relative roots does not play nicely with metalsmith-permalinks which creates custom folder structures.

-

Note: lib/metalsmith-moremeta in this project sets a correct root variable whether permalinks are used or not.

-

Plugin order can be critical

-

One plugins may depend on another or conflict if placed the wrong way around. For example, the RSS-generating metalsmith-feed plugin must be called after metalsmith-layouts to ensure rss.xml is not generated within a page template.

-

Browsersync build issues

-

When Browsersync is running and files are edited, collections are re-parsed but the old data remains. This can cause menus and next/back links to be incorrect. To fix this, stop and restart the build.

- - - - - - -
- -
- -
- - - - - \ No newline at end of file diff --git a/build/article/gulp/index.html b/build/article/gulp/index.html deleted file mode 100644 index 2d47fad..0000000 --- a/build/article/gulp/index.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - Gulp - dashdevs-suite - - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -
- -
- - - - - - -
- -

Gulp

- - - - - -

Metalsmith has plugins for CSS pre-processing with Sass, image minification, file concatenation, uglification and more. The build code will be familiar to anyone with Gulp experience.

-

Do you still need Gulp?

-

Metalsmith is often enough for simpler workflows. However, Gulp has a more extensive range of plugins and permits complex build activities such as linting and PostCSS processing with auto-prefixer.

-

Metalsmith can be used within any Gulp task, e.g.

-
var
-    gulp       = require('gulp'),
-    metalsmith = require('metalsmith'),
-    publish    = require('metalsmith-publish'),
-    markdown   = require('metalsmith-markdown');
-
-// build HTML files using Metalsmith
-gulp.task('html', function() {
-
-    var ms = metalsmith(dir.base)
-        .clean(false)
-        .source('src/html/')
-        .destination('build')
-        .use(publish())
-        .use(markdown())
-        .build(function(err) {
-            if (err) throw err;
-        });
-
-});

Further Gulp tasks can then be added. Note .clean(false) ensures Metalsmith never wipes the build folder when other tasks are active.

-

There are a number of Gulp/Metalsmith integration plugins although they are rarely necessary.

- - - - - - -
- -
- -
- - - - - \ No newline at end of file diff --git a/build/article/index.html b/build/article/index.html deleted file mode 100644 index 918037c..0000000 --- a/build/article/index.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - Articles - dashdevs-suite - - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -
- -
- - - - - - - - -
- -
- - - - - \ No newline at end of file diff --git a/build/article/usage/index.html b/build/article/usage/index.html deleted file mode 100644 index d2349ed..0000000 --- a/build/article/usage/index.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - Usage options - dashdevs-suite - - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -
- -
- - - - - - -
- -

Usage options

- - - - - -

Metalsmith could be used to create any number of resources, including:

-
    -
  • a fast static website with minimal server-side requirements
  • -
  • technical documentation
  • -
  • an eBook
  • -
  • application prototypes
  • -
  • build tools or project scaffolding
  • -
-

The markdown files can be converted to other files types using plugins such as metalsmith-pandoc or metalsmith-pdf.

- - - - - - -
- -
- -
- - - - - \ No newline at end of file diff --git a/build/boxes/index.html b/build/boxes/index.html deleted file mode 100644 index 8de75b9..0000000 --- a/build/boxes/index.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - boxes - dashdevs-suite - - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -
- -
- - -
- -

boxes

- -

This section provides an overview of core code and concepts.

- - -
- -
- -
- - - - - - \ No newline at end of file diff --git a/build/contact/index.html b/build/contact/index.html deleted file mode 100644 index 1387c71..0000000 --- a/build/contact/index.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - Contact - dashdevs-suite - - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -
- -
- - - - -
- -
- - - - - - \ No newline at end of file diff --git a/build/css/styles.css b/build/css/styles.css deleted file mode 100644 index 8bff457..0000000 --- a/build/css/styles.css +++ /dev/null @@ -1,430 +0,0 @@ -/* basic page styles */ - - -/* current default: 111833 - blue-weak: #1f2833; brown-red: 33111b; - - -/* light yellow: FBF7EB, new lighter: #f7f2ea */ - - -/* light grey: #c5c6c7*/ - - -/* neon green: #66FCF1 */ - -*, -*:before, -*:after { - box-sizing: border-box; - padding: 0; - margin: 0; -} - -body { - /* font-family: georgia, cambria, "times new roman", times, serif; */ - font-family: 'Open Sans', sans-serif; - font-size: 1.05em; - /* only with position static text will auto-format when making window smaller */ - /* position: relative; */ - /* margin-top: 60px; */ - /* margin-left: 310px; */ - /* TODO: not sure this is clean solution */ - /* set background-color for all parts default, specially below content */ - /* background-color: #f7f2ea; */ - /* color: #111833; */ - line-height: 1.5; - /* TODO: put footer at bottom - https://stackoverflow.com/questions/643879/css-to-make-html-page-footer-stay-at-bottom-of-the-page-with-a-minimum-height-b */ - /* min-height: 100%; */ - /* TODO: repair, only scrolling in body possible */ - overflow: auto; - /* padding-top: 30px; */ -} - -article, -aside, -details, -figcaption, -figure, -footer, -header, -main, -nav, -section, -summary { - display: block; -} - -h1, -h2, -.logo { - /* font-family: arial, helvetica, free-sans, sans-serif; */ - font-family: 'Oswald', sans-serif; - font-weight: normal; -} - -h1 { - font-size: 1.6em; - text-transform: uppercase; -} - -h2 { - font-size: 1.4em; - margin: 2rem 0 0 0; -} - -p { - margin: 0 0 1em 0; -} - -ul, -ol { - margin: 1em 0 1.5em 3em; -} - -li { - margin: 0 0 0.75em 0; -} - -img { - float: right; - width: auto; - height: auto; - max-width: 50%; - margin: 0 0 1em 1em; - border: 0 none; -} - -pre { - /* font-size: 1.05em; */ - font-weight: bold; - padding: 0.2em 0.4em; - margin: 1em 0 1.5em 3em; - background-color: #111833; - border-radius: 3px; - overflow: auto; -} - -code { - font-size: 0.88em; - font-family: Consolas, Menlo, "DejaVu Mono", monospace; - color: #E831C1; - background-color: #ddd7d4; - /* CHECK needed for bold, pre not enough!? */ - font-weight: bold; - /* makes single code border round */ - border-radius: 5px; - padding: 0 0.4em; -} - -pre code { - padding: 0; - color: #eff5ef; - background-color: #111833; - padding-left: 8px; - line-height: 2.5; - font-size: 0.82em; - /* TODO make border round */ - /* border-radius: 5px; */ -} - -a:link, -a:visited { - text-decoration: none; - color: #fff; -} - -a:hover, -a:active { - color: #c5c6c7; -} - -.pagelist { - list-style-type: none; - /* TODO: check what flex does here */ - display: flex; - flex-wrap: wrap; - margin: 0; - line-height: 1.3; -} - -.pagelist li { - flex: 1 1 45%; - margin: 0 1em 1em 0; -} - -.pagelist a { - display: block; - height: 100%; - padding: 5px 10px; - border: 1px solid #ccc; - outline: 0 none; - overflow: hidden; - /* color for links in pagelist type page eg "Installation" (1 from 3) */ - color: #111833; -} - -.pagelist a:hover, -.pagelist a:focus { - /* background-color: #5a14dd; */ - border-color: rgb(238, 9, 150); -} - -.pagelist h2, -.pagelist p { - margin: 0; -} - -.pagelist p { - color: #111833; -} - -p.articleinfo { - font-size: 0.8em; - /* currently date */ - color: #111833; -} - - -/* layout */ - -main { - /* for page and article template */ - clear: both; - background-color: #fff; - margin-top: 60px; - /* margin-bottom: 0; */ - background-color: #f7f2ea; - /* min-height: 100%; */ - /* min-width: 100%; */ - overflow: auto; - min-height: 100%; -} - -.content { - /* min-height "influences" the content of navmain=header but it should exclude the
*/ - /* CHECK min-width makes things too wide in the
area */ - /* min-width: 100%; */ - /* TODO: there must be bug in other place! - this is needed to remove scroll in header navigation, so its main navigation header!? */ - /* min-height: 100%; */ - /* overflow: auto; */ - /* move font a little down */ - padding-top: 10px; -} - -article { - /* this only applys to
while .content is also applied */ - /* for page and article template */ - /* Distance left, right 4em */ - padding: 0 4em; - /* Distance top 2em for content */ - padding-top: 2em; -} - -article a:link, -article a:visited, -article a:hover { - color: #2092bc; -} - -article a:hover { - text-decoration: underline; -} - -header { - /* header global */ - clear: both; - width: 100%; - /* eg can overwrite value for "if desktop" below */ - height: 60px; - overflow: auto; - background-color: #111833; - border-bottom: solid; - color: #66fcf1; -} - -footer { - /* footer global */ - /* TODO: move footer bottom when article not end of page */ - clear: both; - /* width: 100%; */ - margin-left: 310px; - height: 70px; - /* margin-top: -70px; */ - /* overflow: auto; */ - background-color: #f7f2ea; -} - -footer { - /* font-family: 'Open Sans', sans-serif; */ - font-size: 0.90em; - padding: 1em; - text-align: center; -} - -footer p { - margin: 0; -} - -footer a:link, -footer a:visited, -footer a:hover { - color: #2092bc; -} - -footer a:hover { - text-decoration: underline; -} - -.logo { - font-size: 1.5em; - margin: 0.2em 0 0 0; -} - -.logo a { - padding: 0.2em 0; - color: #66fcf1; -} - - -/* navigation */ - -.nav ul { - display: flex; - flex-wrap: wrap; - list-style-type: none; - margin: 0; -} - -.nav li { - flex: 1 1 100%; - margin: 0; -} - -.nav a, -.nav strong { - display: block; - text-align: left; - white-space: nowrap; - padding: 0.6em 0; -} - -.nav.main a { - color: #fff; - /* font-size: 1.6em; */ - text-transform: uppercase; - font-weight: bold; - font-family: 'Oswald', sans-serif; -} - -.nav a.active, -.nav strong { - background-color: #111833; -} - -.nav a:hover { - color: #c5c6c7; -} - - -/* this is the prev-next-link at bottom in articles */ - -.nav.page { - margin-top: 1.5em; - border-top: 1px solid #ccc; - border-bottom: 1px solid #ccc; -} - -@media (min-width: 16em) { - .nav li { - flex: 1 1 50%; - } -} - -@media (min-width: 32em) { - header { - /* header global */ - position: fixed; - /* defined global above */ - /* height: 60px; */ - top: 0; - } - .logo { - float: left; - margin-left: 20px; - } - .nav.main { - float: right; - margin-right: 20px; - } - .nav li { - flex: 1 1 auto; - } - .nav.main li { - width: 6em; - } - main { - /* global template */ - /* position: static; */ - /* margin-top: 60px; */ - /* min-height: 100%; */ - /* margin: 0px 0px 0px 0px; */ - /* padding: 3em 0em 2em 0em; */ - /* overflow: auto; */ - /* color: #66fcf1; */ - } - .subpages .content { - /* article template */ - /* CHECK What does flex do?? */ - /* display: flex; */ - /* justify-content: center; */ - margin-left: 310px; - } - .subpages article { - /* article template */ - /* flex: 1 1 70%; */ - /* min-width for text content, eg "next: xxx" */ - min-width: 100%; - } - .subpages .nav.sub { - /* article template */ - height: 100%; - width: 310px; - position: fixed; - /* z-index: 1; */ - top: 0; - left: 0; - background-color: #111833; - overflow-x: hidden; - overflow-y: scroll; - padding-top: 40px; - margin-top: 60px; - color: #fff; - } - .nav.sub ul { - /* margin-top: 1em; */ - flex-direction: column; - /* border above first link */ - /* border-top: 1px solid rgb(185, 27, 27); */ - } - .nav.sub li { - /* put smth around nav.sub links */ - /* border-bottom: 1px solid rgb(58, 17, 17); */ - } - .nav.sub a, - .nav.sub strong { - text-align: left; - padding-left: 0.75em; - font-family: 'Open Sans', sans-serif; - font-size: 1.05em; - } - .nav.page a { - text-align: left; - padding-left: 0.5em; - padding-right: 0.5em; - } - .nav.page a.next { - text-align: right; - } -} \ No newline at end of file diff --git a/build/docs/build/index.html b/build/docs/build/index.html deleted file mode 100644 index 88da906..0000000 --- a/build/docs/build/index.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - Build - dashdevs-suite - - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -
- -
- - - - - - -
- -

Build

- - - - - -

To build and launch the site in a test server using Browsersync:

-
npm start

(Stop the server with Ctrl+C.)

-

To build the site for production and compress HTML files:

-
npm run production

The site is built in the /build folder.

-

Note you may want to change the siteMeta.domain and siteMeta.rootpath on lines 52 and 53 of ./build.js.

- - - - - - -
- -
- -
- - - - - \ No newline at end of file diff --git a/build/docs/index.html b/build/docs/index.html deleted file mode 100644 index 3056d71..0000000 --- a/build/docs/index.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - docs - dashdevs-suite - - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -
- - - -
- - - - - \ No newline at end of file diff --git a/build/docs/installation/index.html b/build/docs/installation/index.html deleted file mode 100644 index cdb09dc..0000000 --- a/build/docs/installation/index.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - Installation - dashdevs-suite - - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -
- -
- - - - - - -
- -

Installation

- - - - - -

Please ensure Node.js and Git are installed on your system.

-

Download the demonstration code and switch to directory:

-

git clone git@github.com:dashdev-suite/dashdev-website.git - cd metalsmith-demo

-

Install dependencies:

-
npm install
- - - - - -
- -
- -
- - - - - \ No newline at end of file diff --git a/build/docs/page-definitions/index.html b/build/docs/page-definitions/index.html deleted file mode 100644 index f391ea5..0000000 --- a/build/docs/page-definitions/index.html +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - Page definitions - dashdevs-suite - - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -
- -
- - - - - - -
- -

Page definitions

- - - - - -

Each sub-folder in src/html is a website section. Pages named index.md are the default page in section. File paths are translated to permalinks, e.g.

-
src/html/article/mypage.md

is rendered to:

-
build/article/mypage/index.html

Pages use YAML front-matter defined at the top. This can be referenced in templates or during the build process, e.g.

-
---
-title: My page title
-description: A description of this page for meta tags and page lists.
-layout: page.html
-priority: 0.9
-publish: 2016-06-01
-date: 2016-06-01
----

All items are optional. Note:

-
    -
  • layout defaults to page.html unless metadata.layout is defined for the page collection (see the use(collections({ ... }) code in build.js).
  • -
  • priority is a number between 0 (low) and 1 (high) which is used to order menus and define XML sitemaps.
  • -
  • publish can be set draft, private or a future date to ensure it is not published until required.
  • -
  • date is the date of the article. If not set, a future publish date or the file creation date is used.
  • -
-

The page content is defined in markdown, HTML syntax or both below the front-matter section. The content can include Handlebars partials from the src/partials folder, e.g.

-
{{> partialname }}

where partialname is the partial filename without its .html extension.

- - - - - - -
- -
- -
- - - - - \ No newline at end of file diff --git a/build/docs/plugins/index.html b/build/docs/plugins/index.html deleted file mode 100644 index fdd97b3..0000000 --- a/build/docs/plugins/index.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - Custom plugins - dashdevs-suite - - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -
- -
- - - - - - -
- -

Custom plugins

- - - - - -

The build.js file defines how the site is built using Metalsmith and various plugins.

-

Several custom plugins have been created specifically for this site:

-
    -
  • lib/metalsmith-debug.js: output debugging information to the console.
  • -
  • lib/metalsmith-setdate.js: ensure each page has a date. If a date is not defined in the page's front-matter, it is presumed to be the publish or file creation date.
  • -
  • lib/metalsmith-moremeta.js: applies further metadata to each page including the root folder, a default layout, primary and secondary navigation.
  • -
- - - - - - -
- -
- -
- - - - - \ No newline at end of file diff --git a/build/docs/site-files/index.html b/build/docs/site-files/index.html deleted file mode 100644 index 39e7fad..0000000 --- a/build/docs/site-files/index.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - Site files - dashdevs-suite - - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -
- -
- - - - - - -
- -

Site files

- - - - - -

All files in the src folder can be edited:

-
    -
  • pages are created as markdown files in the src/html folder and sub-folders.
  • -
  • static assets such as CSS, JavaScript and image files are created in src/assets. These are copied without modification to build/.
  • -
  • page templates are defined in src/template.
  • -
  • reusable partials (chunks of HTML code) are declared in src/partials.
  • -
- - - - - - -
- -
- -
- - - - - \ No newline at end of file diff --git a/build/images/Dash-D-white_on_blue_circle.png b/build/images/Dash-D-white_on_blue_circle.png deleted file mode 100644 index f453990..0000000 Binary files a/build/images/Dash-D-white_on_blue_circle.png and /dev/null differ diff --git a/build/images/dash-D-blue.png b/build/images/dash-D-blue.png deleted file mode 100644 index 1696b18..0000000 Binary files a/build/images/dash-D-blue.png and /dev/null differ diff --git a/build/images/dash_logo_2018_black.png b/build/images/dash_logo_2018_black.png deleted file mode 100644 index 37b9972..0000000 Binary files a/build/images/dash_logo_2018_black.png and /dev/null differ diff --git a/build/images/dash_logo_2018_rgb_for_screens.png b/build/images/dash_logo_2018_rgb_for_screens.png deleted file mode 100644 index a00358a..0000000 Binary files a/build/images/dash_logo_2018_rgb_for_screens.png and /dev/null differ diff --git a/build/images/dash_logo_2018_white.png b/build/images/dash_logo_2018_white.png deleted file mode 100644 index fa74517..0000000 Binary files a/build/images/dash_logo_2018_white.png and /dev/null differ diff --git a/build/images/nodejs.png b/build/images/nodejs.png deleted file mode 100644 index e3af7f9..0000000 Binary files a/build/images/nodejs.png and /dev/null differ diff --git a/build/index.html b/build/index.html deleted file mode 100644 index 0baf25a..0000000 --- a/build/index.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - dashdevs-suite - - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -
- -
- - -
- - -

Node.js

-

This is a static website generated using the Node.js-powered Metalsmith 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…

- - -
- -
- -
- - - - - - \ No newline at end of file diff --git a/build/rss.xml b/build/rss.xml deleted file mode 100644 index 709f831..0000000 --- a/build/rss.xml +++ /dev/null @@ -1,669 +0,0 @@ -<![CDATA[dashdevs-suite]]>http://127.0.0.1metalsmith-feedFri, 06 Mar 2020 18:42:28 GMT<![CDATA[Articles]]> - - - - - Articles - dashdevs-suite - - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -
- - - -
- - - - -]]>
http://127.0.0.1/articlehttp://127.0.0.1/articleWed, 26 Feb 2020 15:41:33 GMT
<![CDATA[Usage options]]> - - - - - Usage options - dashdevs-suite - - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -
- -
- - - - - - -
- -

Usage options

- - - - - -

Metalsmith could be used to create any number of resources, including:

-
    -
  • a fast static website with minimal server-side requirements
  • -
  • technical documentation
  • -
  • an eBook
  • -
  • application prototypes
  • -
  • build tools or project scaffolding
  • -
-

The markdown files can be converted to other files types using plugins such as metalsmith-pandoc or metalsmith-pdf.

- - - - - - -
- -
- -
- - - - -]]>
http://127.0.0.1/article/usagehttp://127.0.0.1/article/usageMon, 14 Mar 2016 00:00:00 GMT
<![CDATA[Gotchas]]> - - - - - Gotchas - dashdevs-suite - - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -
- -
- - - - - - -
- -

Gotchas

- - - - - -

Not everything is necessarily straight-forward in the Metalsmith world…

-

Incompatible plugins

-

Some plugins clash with another. For example, metalsmith-rootpath which calculates relative roots does not play nicely with metalsmith-permalinks which creates custom folder structures.

-

Note: lib/metalsmith-moremeta in this project sets a correct root variable whether permalinks are used or not.

-

Plugin order can be critical

-

One plugins may depend on another or conflict if placed the wrong way around. For example, the RSS-generating metalsmith-feed plugin must be called after metalsmith-layouts to ensure rss.xml is not generated within a page template.

-

Browsersync build issues

-

When Browsersync is running and files are edited, collections are re-parsed but the old data remains. This can cause menus and next/back links to be incorrect. To fix this, stop and restart the build.

- - - - - - -
- -
- -
- - - - -]]>
http://127.0.0.1/article/gotchashttp://127.0.0.1/article/gotchasThu, 10 Mar 2016 00:00:00 GMT
<![CDATA[Gulp]]> - - - - - Gulp - dashdevs-suite - - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -
- -
- - - - - - -
- -

Gulp

- - - - - -

Metalsmith has plugins for CSS pre-processing with Sass, image minification, file concatenation, uglification and more. The build code will be familiar to anyone with Gulp experience.

-

Do you still need Gulp?

-

Metalsmith is often enough for simpler workflows. However, Gulp has a more extensive range of plugins and permits complex build activities such as linting and PostCSS processing with auto-prefixer.

-

Metalsmith can be used within any Gulp task, e.g.

-
var
-    gulp       = require('gulp'),
-    metalsmith = require('metalsmith'),
-    publish    = require('metalsmith-publish'),
-    markdown   = require('metalsmith-markdown');
-
-// build HTML files using Metalsmith
-gulp.task('html', function() {
-
-    var ms = metalsmith(dir.base)
-        .clean(false)
-        .source('src/html/')
-        .destination('build')
-        .use(publish())
-        .use(markdown())
-        .build(function(err) {
-            if (err) throw err;
-        });
-
-});

Further Gulp tasks can then be added. Note .clean(false) ensures Metalsmith never wipes the build folder when other tasks are active.

-

There are a number of Gulp/Metalsmith integration plugins although they are rarely necessary.

- - - - - - -
- -
- -
- - - - -]]>
http://127.0.0.1/article/gulphttp://127.0.0.1/article/gulpWed, 02 Mar 2016 00:00:00 GMT
<![CDATA[Future publication]]> - - - - - Future publication - dashdevs-suite - - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -
- -
- - - - - - -
- -

Future publication

- - - - - -

This article will only appear if the site is built is run after 1 March, 2016.

- - - - - - -
- -
- -
- - - - -]]>
http://127.0.0.1/article/futurehttp://127.0.0.1/article/futureTue, 01 Mar 2016 00:00:00 GMT
\ No newline at end of file diff --git a/build/sitemap.xml b/build/sitemap.xml deleted file mode 100644 index fd9e60c..0000000 --- a/build/sitemap.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - http://127.0.0.1/ 1.0 - http://127.0.0.1/article/future/ - http://127.0.0.1/article/gotchas/ - http://127.0.0.1/article/gulp/ - http://127.0.0.1/article/ 0.8 - http://127.0.0.1/article/usage/ - http://127.0.0.1/boxes/ 0.6 - http://127.0.0.1/contact/ 0.5 - http://127.0.0.1/docs/build/ 0.5 - http://127.0.0.1/docs/ 0.9 - http://127.0.0.1/docs/installation/ 0.5 - http://127.0.0.1/docs/page-definitions/ 0.3 - http://127.0.0.1/docs/plugins/ 0.3 - http://127.0.0.1/docs/site-files/ 0.4 - http://127.0.0.1/tutorials/ 0.7 - \ No newline at end of file diff --git a/build/tutorials/index.html b/build/tutorials/index.html deleted file mode 100644 index eef9e19..0000000 --- a/build/tutorials/index.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - tutorials - dashdevs-suite - - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -
- -
- - -
- -

tutorials

- -

This section provides an overview of core code and concepts.

- - -
- -
- -
- - - - - - \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 6cc86ed..606eb6a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1903,6 +1903,30 @@ "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", "dev": true }, + "git-directory-deploy": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/git-directory-deploy/-/git-directory-deploy-1.5.1.tgz", + "integrity": "sha1-xPrYwnDWeNXzCfvd6sHtpgytf9I=", + "dev": true, + "requires": { + "lodash": "^4.14.2", + "minimist": "^1.1.0" + }, + "dependencies": { + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, "glob": { "version": "7.1.6", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", diff --git a/package.json b/package.json index b2a4dbc..9639ca7 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "start": "node ./build.js", "production": "NODE_ENV=production node ./build.js", "production-win": "set NODE_ENV=production & node ./build.js", + "deploy": "git-directory-deploy --directory build/", "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { @@ -21,24 +22,25 @@ }, "homepage": "https://github.com/dashdev-suite/dashdev-website#readme", "devDependencies": { + "git-directory-deploy": "^1.5.1", "handlebars": "^4.7.3", + "jstransformer-handlebars": "^1.1.0", + "jstransformer-markdown": "^1.2.1", "metalsmith": "^2.3.0", "metalsmith-assets": "^0.1.0", "metalsmith-browser-sync": "^1.1.1", "metalsmith-collections": "^0.9.0", + "metalsmith-discover-partials": "^0.1.2", "metalsmith-feed": "^1.0.0", "metalsmith-html-minifier": "^4.0.1", "metalsmith-layouts": "^2.3.1", "metalsmith-markdown": "^1.3.0", - "metalsmith-permalinks": "^2.2.0", - "metalsmith-publish": "^0.1.5", - "metalsmith-word-count": "0.0.4", - "jstransformer-handlebars": "^1.1.0", - "jstransformer-markdown": "^1.2.1", - "metalsmith-discover-partials": "^0.1.2", "metalsmith-markdown-precompiler": "^1.0.0", "metalsmith-paths": "^3.0.1", - "metalsmith-sitemap": "^1.2.2" + "metalsmith-permalinks": "^2.2.0", + "metalsmith-publish": "^0.1.5", + "metalsmith-sitemap": "^1.2.2", + "metalsmith-word-count": "0.0.4" }, "dependencies": {} } diff --git a/src/assets/css/styles.css b/src/assets/css/styles.css index 8bff457..ca4d4cc 100644 --- a/src/assets/css/styles.css +++ b/src/assets/css/styles.css @@ -15,30 +15,19 @@ *, *:before, *:after { - box-sizing: border-box; + box-sizing: inherit; padding: 0; margin: 0; } body { - /* font-family: georgia, cambria, "times new roman", times, serif; */ font-family: 'Open Sans', sans-serif; font-size: 1.05em; - /* only with position static text will auto-format when making window smaller */ - /* position: relative; */ - /* margin-top: 60px; */ - /* margin-left: 310px; */ - /* TODO: not sure this is clean solution */ - /* set background-color for all parts default, specially below content */ - /* background-color: #f7f2ea; */ - /* color: #111833; */ line-height: 1.5; - /* TODO: put footer at bottom - https://stackoverflow.com/questions/643879/css-to-make-html-page-footer-stay-at-bottom-of-the-page-with-a-minimum-height-b */ - /* min-height: 100%; */ - /* TODO: repair, only scrolling in body possible */ - overflow: auto; - /* padding-top: 30px; */ + box-sizing: border-box; + min-height: 100vh; + display: flex; + flex-direction: column; } article, @@ -185,20 +174,18 @@ p.articleinfo { color: #111833; } - /* layout */ main { /* for page and article template */ clear: both; background-color: #fff; - margin-top: 60px; - /* margin-bottom: 0; */ background-color: #f7f2ea; - /* min-height: 100%; */ - /* min-width: 100%; */ overflow: auto; min-height: 100%; + display: flex; + flex-direction: column; + flex-grow: 1; } .content { @@ -217,9 +204,10 @@ article { /* this only applys to
while .content is also applied */ /* for page and article template */ /* Distance left, right 4em */ - padding: 0 4em; + padding: 0 1em; /* Distance top 2em for content */ padding-top: 2em; + flex-grow: 1; } article a:link, @@ -233,31 +221,19 @@ article a:hover { } header { - /* header global */ - clear: both; - width: 100%; - /* eg can overwrite value for "if desktop" below */ - height: 60px; - overflow: auto; background-color: #111833; border-bottom: solid; color: #66fcf1; + display: flex; + flex-direction: column; + padding: 7px 1em 0; } footer { /* footer global */ - /* TODO: move footer bottom when article not end of page */ clear: both; - /* width: 100%; */ - margin-left: 310px; - height: 70px; - /* margin-top: -70px; */ - /* overflow: auto; */ background-color: #f7f2ea; -} - -footer { - /* font-family: 'Open Sans', sans-serif; */ + margin-top: 2em; font-size: 0.90em; padding: 1em; text-align: center; @@ -336,39 +312,52 @@ footer a:hover { border-bottom: 1px solid #ccc; } +.subpages .nav.sub { + background-color: #111833; + color: #fff; +} + @media (min-width: 16em) { .nav li { flex: 1 1 50%; } } -@media (min-width: 32em) { +main > .content { + display: flex; + flex-direction: column; + flex-grow: 1; + padding-top: 0; +} + +/* styles.css | http://localhost:3000/css/styles.css */ + +@media (min-width: 50em) { header { /* header global */ position: fixed; - /* defined global above */ - /* height: 60px; */ + flex-direction: row; + align-items: center; + width: 100%; + height: 60px; top: 0; - } - .logo { - float: left; - margin-left: 20px; + padding: 0 1em; } .nav.main { - float: right; + margin-left: auto; margin-right: 20px; } .nav li { flex: 1 1 auto; } .nav.main li { - width: 6em; + padding: 0 0.5em; } main { /* global template */ /* position: static; */ - /* margin-top: 60px; */ - /* min-height: 100%; */ + padding-top: 60px; + min-height: 100%; /* margin: 0px 0px 0px 0px; */ /* padding: 3em 0em 2em 0em; */ /* overflow: auto; */ @@ -389,18 +378,15 @@ footer a:hover { } .subpages .nav.sub { /* article template */ - height: 100%; width: 310px; position: fixed; /* z-index: 1; */ - top: 0; + top: 60px; left: 0; - background-color: #111833; + bottom: 0; overflow-x: hidden; overflow-y: scroll; - padding-top: 40px; - margin-top: 60px; - color: #fff; + padding-top: 20px; } .nav.sub ul { /* margin-top: 1em; */ @@ -427,4 +413,8 @@ footer a:hover { .nav.page a.next { text-align: right; } -} \ No newline at end of file + article { + padding-left: 4em; + padding-right: 4em; + } +} diff --git a/src/layouts/article.hbs b/src/layouts/article.hbs index 347d513..b275bc7 100644 --- a/src/layouts/article.hbs +++ b/src/layouts/article.hbs @@ -54,12 +54,12 @@ + {{> footer template='article' }} + - {{> footer template='article' }} - \ No newline at end of file diff --git a/src/partials/header.html b/src/partials/header.html index 7944772..7577c6b 100644 --- a/src/partials/header.html +++ b/src/partials/header.html @@ -1,10 +1,4 @@
- -
- {{> navmain }} - -
-