Skip to content

Commit

Permalink
Merge branch 'master' into theme-color
Browse files Browse the repository at this point in the history
  • Loading branch information
Parker Moore authored Jul 16, 2021
2 parents 697146f + b37cc36 commit 4eff3e0
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ branch_protection:
required_status_checks:
strict: true
contexts:
- "continuous-integration/travis-ci"
- "script/cibuild" # GitHub Actions CI workflow
required_pull_request_reviews:
require_code_owner_reviews: true
8 changes: 6 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
on: push
on:
push:
pull_request:
types: [opened, synchronize]
jobs:
build:
runs-on: ubuntu-latest
name: script/cibuild
steps:
- uses: actions/checkout@v2
- uses: actions/setup-ruby@v1
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true
- name: build
run: script/bootstrap
- name: test
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ _site
.sass-cache
Gemfile.lock
*.gem
.jekyll-cache
10 changes: 6 additions & 4 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
inherit_gem:
rubocop-github:
- config/default.yml

AllCops:
Exclude:
- _site/**/*
- vendor/**/*

Metrics/LineLength:
Enabled: false

Gemspec/RequiredRubyVersion:
Layout/LineLength:
Enabled: false
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

source 'https://rubygems.org'
source "https://rubygems.org"

gemspec
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The Hacker theme

[![Build Status](https://travis-ci.org/pages-themes/hacker.svg?branch=master)](https://travis-ci.org/pages-themes/hacker) [![Gem Version](https://badge.fury.io/rb/jekyll-theme-hacker.svg)](https://badge.fury.io/rb/jekyll-theme-hacker)
[Build Status](https://github.com/pages-themes/hacker/actions/workflows/ci.yaml) [![Gem Version](https://badge.fury.io/rb/jekyll-theme-hacker.svg)](https://badge.fury.io/rb/jekyll-theme-hacker)

*Hacker is a Jekyll theme for GitHub Pages. You can [preview the theme to see what it looks like](http://pages-themes.github.io/hacker), or even [use it today](#usage).*

Expand Down
26 changes: 14 additions & 12 deletions jekyll-theme-hacker.gemspec
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
# frozen_string_literal: true

Gem::Specification.new do |s|
s.name = 'jekyll-theme-hacker'
s.version = '0.1.2'
s.license = 'CC0-1.0'
s.authors = ['Jason Costello', 'GitHub, Inc.']
s.email = ['opensource+jekyll-theme-hacker@github.com']
s.homepage = 'https://github.com/pages-themes/hacker'
s.summary = 'Hacker is a Jekyll theme for GitHub Pages'
s.name = "jekyll-theme-hacker"
s.version = "0.1.2"
s.license = "CC0-1.0"
s.authors = ["Jason Costello", "GitHub, Inc."]
s.email = ["opensource+jekyll-theme-hacker@github.com"]
s.homepage = "https://github.com/pages-themes/hacker"
s.summary = "Hacker is a Jekyll theme for GitHub Pages"

s.files = `git ls-files -z`.split("\x0").select do |f|
f.match(%r{^((_includes|_layouts|_sass|assets)/|(LICENSE|README)((\.(txt|md|markdown)|$)))}i)
end

s.required_ruby_version = ">= 2.4.0"

s.platform = Gem::Platform::RUBY
s.add_runtime_dependency 'jekyll', '> 3.5', '< 5.0'
s.add_runtime_dependency 'jekyll-seo-tag', '~> 2.0'
s.add_development_dependency 'html-proofer', '~> 3.0'
s.add_development_dependency 'rubocop', '~> 0.50'
s.add_development_dependency 'w3c_validators', '~> 1.3'
s.add_runtime_dependency "jekyll", "> 3.5", "< 5.0"
s.add_runtime_dependency "jekyll-seo-tag", "~> 2.0"
s.add_development_dependency "html-proofer", "~> 3.0"
s.add_development_dependency "rubocop-github", "~> 0.16"
s.add_development_dependency "w3c_validators", "~> 1.3"
end
2 changes: 1 addition & 1 deletion script/cibuild
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ set -e

bundle exec jekyll build
bundle exec htmlproofer ./_site --check-html --check-sri
bundle exec rubocop -D
bundle exec rubocop -D --config .rubocop.yml
bundle exec script/validate-html
gem build jekyll-theme-hacker.gemspec
12 changes: 6 additions & 6 deletions script/validate-html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

require 'w3c_validators'
require "w3c_validators"

def validator(file)
extension = File.extname(file)
if extension == '.html'
if extension == ".html"
W3CValidators::NuValidator.new
elsif extension == '.css'
elsif extension == ".css"
W3CValidators::CSSValidator.new
end
end
Expand All @@ -18,11 +18,11 @@ def validate(file)
path = File.expand_path "../_site/#{file}", __dir__
results = validator(file).validate_file(path)

return puts 'Valid!' if results.errors.empty?
return puts "Valid!" if results.errors.empty?

results.errors.each { |err| puts err.to_s }
exit 1
end

validate 'index.html'
validate File.join 'assets', 'css', 'style.css'
validate "index.html"
validate File.join "assets", "css", "style.css"

0 comments on commit 4eff3e0

Please sign in to comment.