Merge branch 'master' into blank-layout

This commit is contained in:
Malik Butler 2018-04-10 14:11:50 -04:00 committed by GitHub
commit 3aa8ab709b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 61 additions and 24 deletions

6
.rubocop.yml Normal file
View File

@ -0,0 +1,6 @@
AllCops:
Exclude:
- _site/**/*
Metrics/LineLength:
Enabled: false

View File

@ -2,7 +2,7 @@
<html lang="{{ site.lang | default: "en-US" }}">
<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
@ -33,7 +33,7 @@
</div>
{% if site.google_analytics %}
<script type="text/javascript">
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)

View File

@ -155,7 +155,7 @@ pre {
font-size: 16px;
color: #b5e853;
border-radius: 2px;
text-wrap: normal;
word-wrap: normal;
overflow: auto;
overflow-y: hidden;
}

View File

@ -4,23 +4,23 @@ layout: default
Text can be **bold**, _italic_, ~~strikethrough~~ or `keyword`.
[Link to another page](another-page).
[Link to another page](./another-page.html).
There should be whitespace between paragraphs.
There should be whitespace between paragraphs. We recommend including a README, or a file with information about your project.
# [](#header-1)Header 1
# Header 1
This is a normal paragraph following a header. GitHub is a code hosting platform for version control and collaboration. It lets you and others work together on projects from anywhere.
## [](#header-2)Header 2
## Header 2
> This is a blockquote following a header.
>
> When something is important enough, you do it even if the odds are not in your favor.
### [](#header-3)Header 3
### Header 3
```js
// Javascript code with syntax highlighting.
@ -37,19 +37,19 @@ GitHubPages::Dependencies.gems.each do |gem, version|
end
```
#### [](#header-4)Header 4
#### Header 4
* This is an unordered list following a header.
* This is an unordered list following a header.
* This is an unordered list following a header.
##### [](#header-5)Header 5
##### Header 5
1. This is an ordered list following a header.
2. This is an ordered list following a header.
3. This is an ordered list following a header.
###### [](#header-6)Header 6
###### Header 6
| head1 | head two | three |
|:-------------|:------------------|:------|
@ -94,11 +94,11 @@ end
### Small image
![](https://assets-cdn.github.com/images/icons/emoji/octocat.png)
![Octocat](https://assets-cdn.github.com/images/icons/emoji/octocat.png)
### Large image
![](https://guides.github.com/activities/hello-world/branching.png)
![Branching](https://guides.github.com/activities/hello-world/branching.png)
### Definition lists can be used with HTML syntax.

View File

@ -1,19 +1,20 @@
# encoding: utf-8
Gem::Specification.new do |s|
s.name = "jekyll-theme-hacker"
s.version = "0.1.0"
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.0'
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.platform = Gem::Platform::RUBY
s.add_runtime_dependency "jekyll", "~> 3.5"
s.add_runtime_dependency "jekyll-seo-tag", "~> 2.0"
s.platform = Gem::Platform::RUBY
s.add_runtime_dependency 'jekyll', '~> 3.5'
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'
end

View File

@ -3,4 +3,7 @@
set -e
bundle exec jekyll build
bundle exec htmlproofer ./_site --check-html --check-sri --disable-external
bundle exec rubocop -D
bundle exec script/validate-html
gem build jekyll-theme-hacker.gemspec

27
script/validate-html Executable file
View File

@ -0,0 +1,27 @@
#!/usr/bin/env ruby
require 'w3c_validators'
def validator(file)
extension = File.extname(file)
if extension == '.html'
W3CValidators::NuValidator.new
elsif extension == '.css'
W3CValidators::CSSValidator.new
end
end
def validate(file)
puts "Checking #{file}..."
path = File.expand_path "../_site/#{file}", __dir__
results = validator(file).validate_file(path)
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'