Skip to content

Instantly share code, notes, and snippets.

View VacantFuture's full-sized avatar

James Nobles VacantFuture

  • NNY Digital
  • Potsdam, NY
View GitHub Profile
@VacantFuture
VacantFuture / automatic_post_excerpt_for_post_pages.liquid
Created November 12, 2020 17:56 — forked from Phlow/automatic_post_excerpt_for_post_pages.liquid
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.
{% 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
@VacantFuture
VacantFuture / Gulpfile-pt8.js
Created September 25, 2020 17:40 — forked from tterb/Gulpfile-pt8.js
Gulpfile clean
// Delete CSS
gulp.task('clean:styles', function(callback) {
del([paths.jekyllCssFiles + 'main.css',
paths.siteCssFiles + 'main.css',
'_includes/critical.css'
]);
callback();
});
// Delete processed JS
@VacantFuture
VacantFuture / Gulpfile-pt4.js
Created September 25, 2020 17:39 — forked from tterb/Gulpfile-pt4.js
Gulpfile scripts
// 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))
@VacantFuture
VacantFuture / Gulpfile-pt3.js
Created September 25, 2020 17:39 — forked from tterb/Gulpfile-pt3.js
Gulpfile critical
// 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);
});
@VacantFuture
VacantFuture / Gulpfile-pt2.js
Created September 25, 2020 17:37 — forked from tterb/Gulpfile-pt2.js
Gulpfile stylesheets
// 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))
@VacantFuture
VacantFuture / paths.js
Created September 25, 2020 17:34 — forked from tterb/paths.js
Jekyll paths
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';
@VacantFuture
VacantFuture / Gulpfile.js
Created September 25, 2020 17:21 — forked from tterb/Gulpfile.js
An updated gulpfile for tterb.github.io
// 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');
@VacantFuture
VacantFuture / plugin.rb
Created May 4, 2020 18:53 — forked from bsubedi26/plugin.rb
jekyll categorize collections
# 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
@VacantFuture
VacantFuture / _vars-social-colors.scss
Created December 11, 2017 17:36 — forked from koycarraway/_vars-social-colors.scss
Sass color variables for popular brands and social media.
// Social Colors
// ====================================================================
$facebook_color : hsla(222, 47%, 40%, 1); // #365397
$twitter_color : hsla(198, 100%, 47%, 1); // #00a9f1
$linkedin_color : hsla(203, 100%, 35%, 1); // #006db3
$apple_color : hsla(0, 0%, 45%, 1); // #737373
$google_color : hsla(217, 89%, 61%, 1); // #4285f4
$google_plus_color : hsla(8, 74%, 53%, 1); // #e0452c