1
0
mirror of https://github.com/bigchaindb/site.git synced 2024-12-24 02:16:10 +01:00

refactoring to get basic site running with jekyll serve (#76)

This commit is contained in:
Matthias Kretschmann 2016-10-13 13:53:26 +02:00 committed by GitHub
parent ec7d6c1928
commit 466492f22a
15 changed files with 53 additions and 62 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@ Gemfile.lock
.jekyll-metadata
_dist
.awspublish*
.sass-cache

View File

@ -87,3 +87,15 @@ gulp build --production
# deploy contents of /_dist to live
gulp deploy --live
```
## `_assets` & `assets`, WTF?
Basically:
- `_assets`: its content won't be copied over to generated site but handled by Gulp during build process.
- `assets`: its content is copied over to generated site and processed by Jekyll's assets pipeline
The site avoids using Jekyll's builtin assets pipeline for various reasons and all assets are handled and compiled by Gulp during the build process.
This has one important drawback: it limits the use of 3rd-party tools providing a UI for Jekyll-based sites cause all of those tools depend on a simple `jekyll serve` to show a preview of edited content. To work around that, the `assets` folder holds all assets which are merely copied, rather than processed (`fonts` & `videos`). As for the styles, the `css/` folder holds a collection file importing all our main styles. This file then gets processed by Jekyll's assets pipeline so at least styles work when doing a `jekyll serve`. Additionally, this `assets` folder holds a precompiled sprite sheet of the interface assets.

View File

@ -57,6 +57,9 @@ redcarpet:
source: ./_src
destination: ./_dist
sass:
sass_dir: _assets/styles
# Plugins
# --------------------

View File

@ -4,10 +4,6 @@
// bigchain.io
//
// Normalize all the things
@import '../../../node_modules/normalize-css/normalize';
@import '../../../node_modules/normalize-opentype.css/normalize-opentype.scss';
// Variables & Mixins
@import 'bigchain/_variables';
@import 'bigchain/_mixins';

View File

@ -15,6 +15,7 @@ html {
}
body {
margin: 0;
font-family: $font-family-base;
font-size: $font-size-base;
font-weight: $font-weight-base;
@ -33,9 +34,6 @@ body {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-moz-font-feature-settings: 'liga', 'kern';
// remove old style numerals
font-feature-settings: "kern" 1, "liga" 1, "calt" 1, "pnum" 1, "tnum" 0, "onum" 0, "lnum" 0, "dlig" 1;
}
// Reset fonts for relevant elements

View File

@ -1,36 +1,34 @@
main:
- title: How it works
url: /features/
- title: Whitepaper
url: /whitepaper/
- title: Community
url: /community/
- title: Docs
url: https://docs.bigchaindb.com/
- title: How it works
url: /features/
- title: Whitepaper
url: /whitepaper/
- title: Community
url: /community/
- title: Docs
url: 'https://docs.bigchaindb.com/'
- title: Contact
url: /contact/
secondary:
- title: About
url: /about/
- title: Contact
url: /contact/
- title: Blog
url: https://medium.com/the-bigchaindb-blog
- title: About
url: /about/
- title: Contact
url: /contact/
- title: Blog
url: 'https://medium.com/the-bigchaindb-blog'
community:
- title: GitHub
url: https://github.com/bigchaindb
- title: Twitter
url: https://twitter.com/BigchainDB
- title: Gitter
url: https://gitter.im/bigchaindb/bigchaindb
- title: Google Group
url: https://groups.google.com/forum/#!forum/bigchaindb
- title: GitHub
url: 'https://github.com/bigchaindb'
- title: Twitter
url: 'https://twitter.com/BigchainDB'
- title: Gitter
url: 'https://gitter.im/bigchaindb/bigchaindb'
- title: Google Group
url: 'https://groups.google.com/forum/#!forum/bigchaindb'
legal:
- title: Terms
url: /terms/
- title: Privacy
url: /privacy/
- title: Imprint
url: /imprint/
- title: Terms
url: /terms/
- title: Privacy
url: /privacy/
- title: Imprint
url: /imprint/

View File

@ -0,0 +1,4 @@
---
---
@import "bigchain";

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 169 KiB

View File

@ -212,25 +212,6 @@ gulp.task('images', function() {
});
//
// Copy Fonts
//
gulp.task('fonts', function() {
return gulp.src(SRC + '_assets/fonts/**/*')
.pipe($.rename({dirname: ''}))
.pipe(gulp.dest(DIST + 'assets/fonts/'));
});
//
// Copy Videos
//
gulp.task('videos', function() {
return gulp.src(SRC + '_assets/videos/**/*')
.pipe(gulp.dest(DIST + 'assets/videos/'));
});
//
// Revision static assets
//
@ -288,7 +269,6 @@ gulp.task('default', ['build', 'server'], function() {
gulp.watch([SRC + '_assets/javascripts/**/*.js'], ['js', browser.reload]);
gulp.watch([SRC + '_assets/images/**/*.{png,jpg,jpeg,gif,webp}'], ['images', browser.reload]);
gulp.watch([SRC + '_assets/images/**/*.{svg}'], ['svg', browser.reload]);
gulp.watch([SRC + '_assets/videos/**/*.{mp4,webm}'], ['videos', browser.reload]);
gulp.watch([SRC + '**/*.{html,xml,json,txt,md,yml}', './_config.yml', SRC + '_includes/svg/*'], ['build', browser.reload]);
});
@ -308,7 +288,7 @@ gulp.task('build', function(done) {
runSequence(
'clean',
'jekyll',
['html', 'css', 'js', 'images', 'fonts', 'videos', 'svg'],
['html', 'css', 'js', 'images', 'svg'],
'rev',
'rev:replace',
done

View File

@ -15,8 +15,6 @@
},
"dependencies": {
"jquery": "^2.1.4",
"normalize-css": ">=2.3.1",
"normalize-opentype.css": ">=0.2.4",
"parsleyjs": "^2.0.7",
"svg4everybody": "^2.0.0",
"vivus": "^0.2.2",