Skip to content

Commit

Permalink
First cut of pagebreak on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
bglw committed Sep 1, 2021
1 parent 785d125 commit 5d1f55b
Show file tree
Hide file tree
Showing 15 changed files with 1,046 additions and 17 deletions.
20 changes: 19 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
node_modules
node_modules
.DS_Store
.jekyll-cache
_site
*.gem
*.tgz
package/
yarn-error.log
package-lock.json
**/.yarn/*
!**/.yarn/patches
!**/.yarn/releases
!**/.yarn/plugins
!**/.yarn/sdks
!**/.yarn/versions
.pnp.*
.nyc_output
coverage
target
4 changes: 4 additions & 0 deletions generator-plugins/jekyll/.rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require: rubocop-jekyll

inherit_gem:
rubocop-jekyll: .rubocop.yml
5 changes: 5 additions & 0 deletions generator-plugins/jekyll/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# frozen_string_literal: true

source "https://rubygems.org"

gemspec
3 changes: 3 additions & 0 deletions generator-plugins/jekyll/Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# frozen_string_literal: true

require "bundler/gem_tasks"
Binary file added generator-plugins/jekyll/exe/pagebreak
Binary file not shown.
22 changes: 22 additions & 0 deletions generator-plugins/jekyll/jekyll-pagebreak.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# frozen_string_literal: true

$LOAD_PATH.unshift File.expand_path("lib", __dir__)
require "jekyll-pagebreak/version"

Gem::Specification.new do |spec|
spec.name = "jekyll-pagebreak"
spec.version = JekyllPagebreak::VERSION
spec.authors = ["Liam Bigelow"]
spec.email = ["liam@cloudcannon.com"]
spec.homepage = "https://github.com/CloudCannon/pagebreak"
spec.summary = "A Jekyll plugin to paginate the output of any static site generator"

spec.files = `git ls-files lib exe`.split("\n")
spec.platform = Gem::Platform::RUBY
spec.require_paths = ["lib"]
spec.license = "MIT"

spec.add_dependency "jekyll", ">= 3.7", "< 5.0"
spec.add_development_dependency "rake", ">= 12.3.3"
spec.add_development_dependency "rubocop-jekyll", "~> 0.5.1"
end
10 changes: 10 additions & 0 deletions generator-plugins/jekyll/lib/jekyll-pagebreak.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# frozen_string_literal: true

require "jekyll"

Jekyll::Hooks.register :site, :post_write do |site|
puts "Running pagebreak in-place"
executable = File.expand_path("../../exe/pagebreak", __FILE__)
system("#{executable} -s #{site.dest} -o #{site.dest}")
end

5 changes: 5 additions & 0 deletions generator-plugins/jekyll/lib/jekyll-pagebreak/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# frozen_string_literal: true

module JekyllPagebreak
VERSION = "0.1.0"
end
5 changes: 0 additions & 5 deletions index.js

This file was deleted.

11 changes: 0 additions & 11 deletions package.json

This file was deleted.

Loading

0 comments on commit 5d1f55b

Please sign in to comment.