This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {% comment %} | |
| # | |
| # Explanation: | |
| # | |
| # This include splits the content of {{ content }} into | |
| # two parts if Jekyll finds an excerpt separator. This allows | |
| # extra styling of the first part to enlarge the the fontsize | |
| # of the teaser for example. | |
| # | |
| # The excerpt separator can be defined directly in your |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Delete CSS | |
| gulp.task('clean:styles', function(callback) { | |
| del([paths.jekyllCssFiles + 'main.css', | |
| paths.siteCssFiles + 'main.css', | |
| '_includes/critical.css' | |
| ]); | |
| callback(); | |
| }); | |
| // Delete processed JS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Concatenate and uglify global JS files and output the result to the | |
| // appropriate location | |
| gulp.task('build:scripts:global', function() { | |
| return gulp.src([ | |
| paths.jsFiles + '/lib' + paths.jsPattern, | |
| paths.jsFiles + '/*.js' | |
| ]) | |
| .pipe(concat('main.js')) | |
| .pipe(uglify()) | |
| .pipe(gulp.dest(paths.jekyllJsFiles)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Create and process critical CSS file to be included in head | |
| gulp.task('build:styles:critical', function() { | |
| return sass(paths.sassFiles + '/critical.scss', { | |
| style: 'compressed', | |
| trace: true, | |
| loadPath: [paths.sassFiles] | |
| }).pipe(postcss([ autoprefixer({ browsers: ['last 2 versions'] }), cssnano()])) | |
| .pipe(gulp.dest('_includes')) | |
| .on('error', gutil.log); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Process styles, add vendor-prefixes, minify, then | |
| // output the file to the appropriate location | |
| gulp.task('build:styles:main', () => { | |
| return sass(paths.sassFiles + '/main.scss', { | |
| style: 'compressed', | |
| trace: true, | |
| loadPath: [paths.sassFiles] | |
| }).pipe(postcss([autoprefixer({ browsers: ['last 2 versions']}), cssnano()])) | |
| .pipe(gulp.dest(paths.jekyllCssFiles)) | |
| .pipe(gulp.dest(paths.siteCssFiles)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var paths = {}; | |
| // Directory locations. | |
| paths.assetsDir = '_assets/'; // The files Gulp will handle. | |
| paths.jekyllDir = ''; // The files Jekyll will handle. | |
| paths.jekyllAssetsDir = 'assets/'; // The asset files Jekyll will handle. | |
| paths.siteDir = '_site/'; // The resulting static site. | |
| paths.siteAssetsDir = '_site/assets/'; // The resulting static site's assets. | |
| // Folder naming conventions. | |
| paths.postFolder = '_posts'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Gulpfile.js | |
| const autoprefixer = require('autoprefixer'); | |
| const browserSync = require('browser-sync').create(); | |
| const concat = require('gulp-concat'); | |
| const cssnano = require('cssnano'); | |
| const del = require('del'); | |
| const gulp = require('gulp'); | |
| const gutil = require('gulp-util'); | |
| const imagemin = require('gulp-imagemin'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # frozen_string_literal: true | |
| require "jekyll" | |
| module Jekyll | |
| class CategorizePageGenerator < Jekyll::Generator | |
| safe true | |
| def get_collection(name) | |
| @site.collections[name] ? @site.collections[name].docs : [] | |
| end |