Merge branch 'master' into blank-layout
This commit is contained in:
commit
3aa8ab709b
6
.rubocop.yml
Normal file
6
.rubocop.yml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
AllCops:
|
||||||
|
Exclude:
|
||||||
|
- _site/**/*
|
||||||
|
|
||||||
|
Metrics/LineLength:
|
||||||
|
Enabled: false
|
@ -2,7 +2,7 @@
|
|||||||
<html lang="{{ site.lang | default: "en-US" }}">
|
<html lang="{{ site.lang | default: "en-US" }}">
|
||||||
<head>
|
<head>
|
||||||
<meta charset='utf-8'>
|
<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">
|
<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 }}">
|
<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
|
||||||
|
|
||||||
@ -33,7 +33,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if site.google_analytics %}
|
{% 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(){
|
(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),
|
(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)
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||||
|
@ -155,7 +155,7 @@ pre {
|
|||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: #b5e853;
|
color: #b5e853;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
text-wrap: normal;
|
word-wrap: normal;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
}
|
}
|
||||||
|
18
index.md
18
index.md
@ -4,23 +4,23 @@ layout: default
|
|||||||
|
|
||||||
Text can be **bold**, _italic_, ~~strikethrough~~ or `keyword`.
|
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.
|
||||||
|
|
||||||
There should be whitespace between paragraphs. We recommend including a README, or a file with information about your project.
|
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.
|
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.
|
> This is a blockquote following a header.
|
||||||
>
|
>
|
||||||
> When something is important enough, you do it even if the odds are not in your favor.
|
> When something is important enough, you do it even if the odds are not in your favor.
|
||||||
|
|
||||||
### [](#header-3)Header 3
|
### Header 3
|
||||||
|
|
||||||
```js
|
```js
|
||||||
// Javascript code with syntax highlighting.
|
// Javascript code with syntax highlighting.
|
||||||
@ -37,19 +37,19 @@ GitHubPages::Dependencies.gems.each do |gem, version|
|
|||||||
end
|
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.
|
* 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.
|
1. This is an ordered list following a header.
|
||||||
2. 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.
|
3. This is an ordered list following a header.
|
||||||
|
|
||||||
###### [](#header-6)Header 6
|
###### Header 6
|
||||||
|
|
||||||
| head1 | head two | three |
|
| head1 | head two | three |
|
||||||
|:-------------|:------------------|:------|
|
|:-------------|:------------------|:------|
|
||||||
@ -94,11 +94,11 @@ end
|
|||||||
|
|
||||||
### Small image
|
### Small image
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### Large image
|
### Large image
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
### Definition lists can be used with HTML syntax.
|
### Definition lists can be used with HTML syntax.
|
||||||
|
@ -1,19 +1,20 @@
|
|||||||
# encoding: utf-8
|
|
||||||
|
|
||||||
Gem::Specification.new do |s|
|
Gem::Specification.new do |s|
|
||||||
s.name = "jekyll-theme-hacker"
|
s.name = 'jekyll-theme-hacker'
|
||||||
s.version = "0.1.0"
|
s.version = '0.1.0'
|
||||||
s.license = "CC0-1.0"
|
s.license = 'CC0-1.0'
|
||||||
s.authors = ["Jason Costello", "GitHub, Inc."]
|
s.authors = ['Jason Costello', 'GitHub, Inc.']
|
||||||
s.email = ["opensource+jekyll-theme-hacker@github.com"]
|
s.email = ['opensource+jekyll-theme-hacker@github.com']
|
||||||
s.homepage = "https://github.com/pages-themes/hacker"
|
s.homepage = 'https://github.com/pages-themes/hacker'
|
||||||
s.summary = "Hacker is a Jekyll theme for GitHub Pages"
|
s.summary = 'Hacker is a Jekyll theme for GitHub Pages'
|
||||||
|
|
||||||
s.files = `git ls-files -z`.split("\x0").select do |f|
|
s.files = `git ls-files -z`.split("\x0").select do |f|
|
||||||
f.match(%r{^((_includes|_layouts|_sass|assets)/|(LICENSE|README)((\.(txt|md|markdown)|$)))}i)
|
f.match(%r{^((_includes|_layouts|_sass|assets)/|(LICENSE|README)((\.(txt|md|markdown)|$)))}i)
|
||||||
end
|
end
|
||||||
|
|
||||||
s.platform = Gem::Platform::RUBY
|
s.platform = Gem::Platform::RUBY
|
||||||
s.add_runtime_dependency "jekyll", "~> 3.5"
|
s.add_runtime_dependency 'jekyll', '~> 3.5'
|
||||||
s.add_runtime_dependency "jekyll-seo-tag", "~> 2.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'
|
||||||
end
|
end
|
||||||
|
@ -3,4 +3,7 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
bundle exec jekyll build
|
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
|
gem build jekyll-theme-hacker.gemspec
|
||||||
|
27
script/validate-html
Executable file
27
script/validate-html
Executable 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'
|
Loading…
x
Reference in New Issue
Block a user