Skip to content

Commit

Permalink
Merge branch 'master' into markup-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
benbalter committed Apr 11, 2018
2 parents 7bf831d + 6ee9693 commit d69ddf2
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 22 deletions.
6 changes: 6 additions & 0 deletions .rubocop.yml
@@ -0,0 +1,6 @@
AllCops:
Exclude:
- _site/**/*

Metrics/LineLength:
Enabled: false
2 changes: 1 addition & 1 deletion _layouts/default.html
Expand Up @@ -17,7 +17,7 @@
<h1><a href="{{ "/" | absolute_url }}">{{ site.title | default: site.github.repository_name }}</a></h1>

{% if site.logo %}
<img src="{{site.logo | relative_url}}" alt="Logo"></img>
<img src="{{site.logo | relative_url}}" alt="Logo" />
{% endif %}

<p>{{ site.description | default: site.github.project_tagline }}</p>
Expand Down
18 changes: 9 additions & 9 deletions index.md
Expand Up @@ -4,23 +4,23 @@ layout: default

Text can be **bold**, _italic_, or ~~strikethrough~~.

[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.
Expand All @@ -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 |
|:-------------|:------------------|:------|
Expand Down Expand Up @@ -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.
Expand Down
25 changes: 13 additions & 12 deletions jekyll-theme-minimal.gemspec
@@ -1,19 +1,20 @@
# encoding: utf-8

Gem::Specification.new do |s|
s.name = "jekyll-theme-minimal"
s.version = "0.1.0"
s.license = "CC0-1.0"
s.authors = ["Steve Smith", "GitHub, Inc."]
s.email = ["opensource+jekyll-theme-minimal@github.com"]
s.homepage = "https://github.com/pages-themes/minimal"
s.summary = "Minimal is a Jekyll theme for GitHub Pages"
s.name = 'jekyll-theme-minimal'
s.version = '0.1.0'
s.license = 'CC0-1.0'
s.authors = ['Steve Smith', 'GitHub, Inc.']
s.email = ['opensource+jekyll-theme-minimal@github.com']
s.homepage = 'https://github.com/pages-themes/minimal'
s.summary = 'Minimal 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
3 changes: 3 additions & 0 deletions script/cibuild
Expand Up @@ -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-minimal.gemspec
27 changes: 27 additions & 0 deletions script/validate-html
@@ -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'

0 comments on commit d69ddf2

Please sign in to comment.