From c17e3b20c8f7dc09241c539a7136d3164d77080d Mon Sep 17 00:00:00 2001 From: readme Date: Fri, 6 Mar 2020 19:44:46 +0100 Subject: [PATCH] update --- build.js | 222 +++++++++--------- build/article/future/index.html | 12 +- build/article/gotchas/index.html | 12 +- build/article/gulp/index.html | 12 +- build/article/index.html | 10 +- build/article/usage/index.html | 12 +- build/boxes/index.html | 84 +++++++ build/contact/index.html | 10 +- build/css/styles.css | 5 +- build/{start => docs}/build/index.html | 24 +- build/{start => docs}/index.html | 34 ++- build/{start => docs}/installation/index.html | 24 +- .../page-definitions/index.html | 24 +- build/{start => docs}/plugins/index.html | 22 +- build/{start => docs}/site-files/index.html | 24 +- build/index.html | 12 +- build/rss.xml | 60 ++++- build/sitemap.xml | 16 +- build/tutorials/index.html | 84 +++++++ src/assets/css/styles.css | 5 +- src/html/boxes/index.md | 6 + src/html/contact/index.md | 2 +- src/html/{start => docs}/build.md | 0 src/html/{start => docs}/index.md | 2 +- src/html/{start => docs}/installation.md | 0 src/html/{start => docs}/page-definitions.md | 0 src/html/{start => docs}/plugins.md | 0 src/html/{start => docs}/site-files.md | 0 src/html/index.md | 2 +- src/html/tutorials/index.md | 6 + src/partials/footer.html | 10 +- src/partials/navsub.html | 3 +- 32 files changed, 540 insertions(+), 199 deletions(-) create mode 100644 build/boxes/index.html rename build/{start => docs}/build/index.html (77%) rename build/{start => docs}/index.html (77%) rename build/{start => docs}/installation/index.html (77%) rename build/{start => docs}/page-definitions/index.html (83%) rename build/{start => docs}/plugins/index.html (80%) rename build/{start => docs}/site-files/index.html (77%) create mode 100644 build/tutorials/index.html create mode 100644 src/html/boxes/index.md rename src/html/{start => docs}/build.md (100%) rename src/html/{start => docs}/index.md (86%) rename src/html/{start => docs}/installation.md (100%) rename src/html/{start => docs}/page-definitions.md (100%) rename src/html/{start => docs}/plugins.md (100%) rename src/html/{start => docs}/site-files.md (100%) create mode 100644 src/html/tutorials/index.md diff --git a/build.js b/build.js index 519f899..65cf2ac 100644 --- a/build.js +++ b/build.js @@ -7,28 +7,28 @@ var pkg = require('./package.json'); // main directories dir = { - base: __dirname + '/', - lib: __dirname + '/lib/', - source: './src/', - dest: './build/' + base: __dirname + '/', + lib: __dirname + '/lib/', + source: './src/', + dest: './build/' }; siteMeta = { - devBuild: devBuild, - version: pkg.version, - name: 'dashdevs-suite', - desc: 'dashdevs-suite metalsmith website', - author: 'dashdevs', - contact: 'https://chat.dashdevs.org', - domain: devBuild ? 'http://127.0.0.1' : 'https://dashdev-suite.github.io', // set domain - rootpath: devBuild ? null : '/dashdev-website/build/' // set absolute path (null for relative) + devBuild: devBuild, + version: pkg.version, + name: 'dashdevs-suite', + desc: 'dashdevs-suite metalsmith website', + author: 'dashdevs', + contact: 'https://chat.dashdevs.org', + domain: devBuild ? 'http://127.0.0.1' : 'https://dashdev-suite.github.io', // set domain + rootpath: devBuild ? null : '/dashdev-website/build/' // set absolute path (null for relative) }; templateConfig = { - engine: 'handlebars', - directory: 'template/', - partials: 'partials/', - default: 'page.html' + engine: 'handlebars', + directory: 'template/', + partials: 'partials/', + default: 'page.html' }; // metalsmith @@ -62,103 +62,115 @@ console.log((devBuild ? 'Development' : 'Production'), 'build, version', pkg.ver // instantiate var metalsmith = Metalsmith(__dirname) - .clean(true) // clean folder before a production build - .source(dir.source + 'html/') // source folder (src/) - .destination(dir.dest) // build folder (build/) - .metadata(siteMeta) // add meta data to every page - .use(publish()) // draft, private, future-dated - .use(discoverPartials({ // needed for markdownPrecompiler - directory: 'partials', - pattern: /\.hbs$/ // original partials .html but exactly these parameters work - })) - // .use(json_to_files({ - // source_path: './box/' - // })) - .use(paths()) - .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: './../src/layouts/article.hbs' // default is /layouts - } - }, - article: { - pattern: 'article/**/*', - sortBy: 'date', - reverse: true, - refer: true, - limit: 50, - metadata: { - layout: './../src/layouts/article.hbs' - } - } - })) - .use(markdownPrecompiler({ // convert {{> navmain}} in header.html - engine: "handlebars", - pattern: /\.md$/, // regex; no idea why .md works, check discoverPartials above - partialsPath: './../partials', - partials: ['navmain', 'navsub', 'footer', 'header', 'meta', 'pagelist'] - })) - .use(markdown()) // convert markdown - .use(permalinks({ // generate permalinks - pattern: ':mainCollection/:title' - })) - .use(wordcount({ // word count - raw: true - })) - .use(moremeta()) // determine root paths and navigation, TODO check remove - // .use(inplace({ - // //engineOptions: {}, - // pattern: `partials.hbs/**` - // })) - .use(layouts({ - //engineOptions: {}, - pattern: `**/index.*`, - default: './../src/layouts/page.hbs' - })) -// .use(layouts({ -// //engineOptions: {}, -// pattern: `article/**`, -// default: 'article.hbs' -// })) + .clean(true) // clean folder before a production build + .source(dir.source + 'html/') // source folder (src/) + .destination(dir.dest) // build folder (build/) + .metadata(siteMeta) // add meta data to every page + .use(publish()) // draft, private, future-dated + .use(discoverPartials({ // needed for markdownPrecompiler + directory: 'partials', + pattern: /\.hbs$/ // original partials .html but exactly these parameters work + })) + // .use(json_to_files({ + // source_path: './box/' + // })) + .use(paths()) + .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 + }, + docs: { + pattern: 'docs/**/*', + sortBy: 'priority', + reverse: true, + refer: true, + metadata: { + layout: './../src/layouts/article.hbs' // default is /layouts + } + }, + article: { + pattern: 'article/**/*', + sortBy: 'date', + reverse: true, + refer: true, + limit: 50, + metadata: { + layout: './../src/layouts/article.hbs' + } + }, + tutorials: { + pattern: 'tutorials/**/*', + sortBy: 'priority', + reverse: true, + refer: true, + limit: 50, + }, + boxes: { + pattern: 'boxes/**/*', + sortBy: 'date', + reverse: true, + refer: true, + limit: 50, + } + })) + .use(markdownPrecompiler({ // convert {{> navmain}} in header.html + engine: "handlebars", + pattern: /\.md$/, // regex; no idea why .md works, check discoverPartials above + partialsPath: './../partials', + partials: ['navmain', 'navsub', 'footer', 'header', 'meta', 'pagelist'] + })) + .use(markdown()) // convert markdown + .use(permalinks({ // generate permalinks + pattern: ':mainCollection/:title' + })) + .use(wordcount({ // word count + raw: true + })) + .use(moremeta()) // determine root paths and navigation, TODO check remove + // .use(inplace({ + // //engineOptions: {}, + // pattern: `partials.hbs/**` + // })) + .use(layouts({ + //engineOptions: {}, + pattern: `**/index.*`, + default: './../src/layouts/page.hbs' + })) + // .use(layouts({ + // //engineOptions: {}, + // pattern: `article/**`, + // default: 'article.hbs' + // })) if (htmlmin) metalsmith.use(htmlmin()); // minify production HTML if (debug) metalsmith.use(debug()); // output page debugging information if (browsersync) metalsmith.use(browsersync({ // start test server - server: dir.dest, - files: [dir.source + '**/*'] + server: dir.dest, + files: [dir.source + '**/*'] })); metalsmith - .use(sitemap({ // generate sitemap.xml - hostname: siteMeta.domain + (siteMeta.rootpath || ''), - omitIndex: true // replace any paths ending in index.html with ''. Useful when you're using metalsmith-permalinks. - })) - .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: './' - })) + .use(sitemap({ // generate sitemap.xml + hostname: siteMeta.domain + (siteMeta.rootpath || ''), + omitIndex: true // replace any paths ending in index.html with ''. Useful when you're using metalsmith-permalinks. + })) + .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(function(err) { if (err) throw err; - }); - - +}); \ No newline at end of file diff --git a/build/article/future/index.html b/build/article/future/index.html index 26da338..18ccdf6 100644 --- a/build/article/future/index.html +++ b/build/article/future/index.html @@ -30,11 +30,17 @@ Home
  • - Start + docs
  • Articles
  • +
  • + tutorials +
  • +
  • + boxes +
  • Contact
  • @@ -64,7 +70,7 @@ Gulp
  • - Future publication + Future publication
  • @@ -105,6 +111,8 @@

    Help make this page better. Edit here >>

    + + diff --git a/build/article/gotchas/index.html b/build/article/gotchas/index.html index 29a026d..cc64cce 100644 --- a/build/article/gotchas/index.html +++ b/build/article/gotchas/index.html @@ -30,11 +30,17 @@ Home
  • - Start + docs
  • Articles
  • +
  • + tutorials +
  • +
  • + boxes +
  • Contact
  • @@ -58,7 +64,7 @@ Usage options
  • - Gotchas + Gotchas
  • Gulp @@ -114,6 +120,8 @@

    Help make this page better. Edit here >>

    + + diff --git a/build/article/gulp/index.html b/build/article/gulp/index.html index 3adf57d..2d47fad 100644 --- a/build/article/gulp/index.html +++ b/build/article/gulp/index.html @@ -30,11 +30,17 @@ Home
  • - Start + docs
  • Articles
  • +
  • + tutorials +
  • +
  • + boxes +
  • Contact
  • @@ -61,7 +67,7 @@ Gotchas
  • - Gulp + Gulp
  • Future publication @@ -131,6 +137,8 @@ gulp.task('html', function() {

    Help make this page better. Edit here >>

    + + diff --git a/build/article/index.html b/build/article/index.html index be45e9f..918037c 100644 --- a/build/article/index.html +++ b/build/article/index.html @@ -30,11 +30,17 @@ Home
  • - Start + docs
  • Articles
  • +
  • + tutorials +
  • +
  • + boxes +
  • Contact
  • @@ -133,6 +139,8 @@

    Help make this page better. Edit here >>

    + + diff --git a/build/article/usage/index.html b/build/article/usage/index.html index 269d99e..d2349ed 100644 --- a/build/article/usage/index.html +++ b/build/article/usage/index.html @@ -30,11 +30,17 @@ Home
  • - Start + docs
  • Articles
  • +
  • + tutorials +
  • +
  • + boxes +
  • Contact
  • @@ -55,7 +61,7 @@
    • - Usage options + Usage options
    • Gotchas @@ -115,6 +121,8 @@

      Help make this page better. Edit here >>

      + + diff --git a/build/boxes/index.html b/build/boxes/index.html new file mode 100644 index 0000000..8de75b9 --- /dev/null +++ b/build/boxes/index.html @@ -0,0 +1,84 @@ + + + + + + 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 index 0877493..1387c71 100644 --- a/build/contact/index.html +++ b/build/contact/index.html @@ -30,11 +30,17 @@ Home
    • - Start + docs
    • Articles
    • +
    • + tutorials +
    • +
    • + boxes +
    • Contact
    • @@ -69,6 +75,8 @@

      Help make this page better. Edit here >>

      + + --> diff --git a/build/css/styles.css b/build/css/styles.css index e58a810..8bff457 100644 --- a/build/css/styles.css +++ b/build/css/styles.css @@ -366,7 +366,7 @@ footer a:hover { } main { /* global template */ - position: static; + /* position: static; */ /* margin-top: 60px; */ /* min-height: 100%; */ /* margin: 0px 0px 0px 0px; */ @@ -378,13 +378,14 @@ footer a:hover { /* 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%; */ + min-width: 100%; } .subpages .nav.sub { /* article template */ diff --git a/build/start/build/index.html b/build/docs/build/index.html similarity index 77% rename from build/start/build/index.html rename to build/docs/build/index.html index 3a0de54..88da906 100644 --- a/build/start/build/index.html +++ b/build/docs/build/index.html @@ -30,11 +30,17 @@ Home
    • - Start + docs
    • Articles
    • +
    • + tutorials +
    • +
    • + boxes +
    • Contact
    • @@ -55,19 +61,19 @@ @@ -93,10 +99,10 @@