Skip to content
This repository was archived by the owner on Nov 1, 2017. It is now read-only.

Commit 0bffd03

Browse files
committed
Merge pull request #767 from github/html-pipeline
Remove Kramdown and bring in HTML::Pipeline
2 parents a058bd5 + d31cc43 commit 0bffd03

166 files changed

Lines changed: 2242 additions & 2169 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Gemfile

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
source 'http://rubygems.org'
22
ruby '2.2.3'
33

4-
gem 'builder'
5-
gem 'kramdown', '~> 1.8'
64
gem 'nanoc', '~> 4.0'
75
gem 'nokogiri', '~> 1.6.0'
8-
gem 'rouge', '~> 1.4'
6+
7+
# rendering
8+
gem 'nanoc-html-pipeline', '0.3.3'
9+
gem 'gemoji', '2.1.0'
10+
gem 'github-markdown', '0.6.9'
11+
gem 'html-pipeline-rouge_filter', '~> 1.0'
12+
gem 'extended-markdown-filter', '0.4.3'
13+
gem 'page-toc-filter', '~> 0.0.1'
14+
15+
# for sitemap
16+
gem 'builder', '~> 3.2'
917

1018
group :development do
1119
gem 'rake', '10.3.2'
12-
gem 'adsf'
13-
gem 'fssm'
14-
gem 'guard-nanoc'
20+
gem 'awesome_print', '1.6.1'
1521
end
1622

1723
group :staging do

Gemfile.lock

Lines changed: 35 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -8,36 +8,30 @@ GEM
88
thread_safe (~> 0.3, >= 0.3.4)
99
tzinfo (~> 1.1)
1010
addressable (2.3.8)
11-
adsf (1.2.0)
12-
rack (>= 1.0.0)
11+
awesome_print (1.6.1)
1312
builder (3.2.2)
14-
coderay (1.1.0)
1513
colorator (0.1)
1614
colored (1.2)
1715
cri (2.7.0)
1816
colored (~> 1.2)
1917
dotenv (2.0.2)
2018
ethon (0.8.0)
2119
ffi (>= 1.3.0)
20+
extended-markdown-filter (0.4.3)
21+
html-pipeline (~> 2.0)
22+
nokogiri (~> 1.6.4)
2223
faraday (0.9.2)
2324
multipart-post (>= 1.2, < 3)
2425
ffi (1.9.10)
25-
formatador (0.2.5)
26-
fssm (0.2.10)
27-
guard (2.13.0)
28-
formatador (>= 0.2.4)
29-
listen (>= 2.7, <= 4.0)
30-
lumberjack (~> 1.0)
31-
nenv (~> 0.1)
32-
notiffany (~> 0.0)
33-
pry (>= 0.9.12)
34-
shellany (~> 0.0)
35-
thor (>= 0.18.1)
36-
guard-compat (1.2.1)
37-
guard-nanoc (2.0.0)
38-
guard (~> 2.8)
39-
guard-compat (~> 1.0)
40-
nanoc (~> 4.0)
26+
gemoji (2.1.0)
27+
github-markdown (0.6.9)
28+
html-pipeline (2.2.2)
29+
activesupport (>= 2, < 5)
30+
nokogiri (>= 1.4)
31+
html-pipeline-rouge_filter (1.0.2)
32+
activesupport
33+
html-pipeline (>= 1.11)
34+
rouge (~> 1.8)
4135
html-proofer (2.5.2)
4236
addressable (~> 2.3)
4337
colored (~> 1.2)
@@ -47,7 +41,7 @@ GEM
4741
typhoeus (~> 0.7)
4842
yell (~> 2.0)
4943
i18n (0.7.0)
50-
jekyll (3.0.0)
44+
jekyll (3.0.1)
5145
colorator (~> 0.1)
5246
jekyll-sass-converter (~> 1.0)
5347
jekyll-watch (~> 1.1)
@@ -74,30 +68,26 @@ GEM
7468
json (1.8.3)
7569
kramdown (1.9.0)
7670
liquid (3.0.6)
77-
listen (3.0.4)
71+
listen (3.0.5)
7872
rb-fsevent (>= 0.9.3)
7973
rb-inotify (>= 0.9)
80-
lumberjack (1.0.9)
8174
mercenary (0.3.5)
82-
method_source (0.8.2)
83-
mini_portile (0.6.2)
84-
minitest (5.8.2)
75+
mini_portile2 (2.0.0)
76+
minitest (5.8.3)
8577
multipart-post (2.0.0)
86-
nanoc (4.0.0)
78+
nanoc (4.0.2)
8779
cri (~> 2.3)
88-
nenv (0.2.0)
89-
nokogiri (1.6.6.4)
90-
mini_portile (~> 0.6.0)
91-
notiffany (0.0.8)
92-
nenv (~> 0.1)
93-
shellany (~> 0.0)
94-
octokit (4.1.1)
80+
nanoc-html-pipeline (0.3.3)
81+
html-pipeline (~> 2.0)
82+
nanoc (>= 3.1, < 5.0)
83+
nokogiri (1.6.7)
84+
mini_portile2 (~> 2.0.0.rc2)
85+
octokit (4.2.0)
9586
sawyer (~> 0.6.0, >= 0.5.3)
87+
page-toc-filter (0.0.1)
88+
html-pipeline (~> 2.0)
89+
nokogiri (~> 1.6.4)
9690
parallel (1.6.1)
97-
pry (0.10.3)
98-
coderay (~> 1.1.0)
99-
method_source (~> 0.8.1)
100-
slop (~> 3.4)
10191
rack (1.6.4)
10292
rack-protection (1.5.3)
10393
rack
@@ -112,7 +102,6 @@ GEM
112102
sawyer (0.6.0)
113103
addressable (~> 2.3.5)
114104
faraday (~> 0.8, < 0.10)
115-
shellany (0.0.1)
116105
sinatra (1.4.6)
117106
rack (~> 1.4)
118107
rack-protection (~> 1.4)
@@ -122,8 +111,6 @@ GEM
122111
sinatra_auth_github (1.2.0)
123112
sinatra (~> 1.0)
124113
warden-github (~> 1.2.0)
125-
slop (3.6.0)
126-
thor (0.19.1)
127114
thread_safe (0.3.5)
128115
tilt (2.0.1)
129116
typhoeus (0.8.0)
@@ -142,17 +129,19 @@ PLATFORMS
142129
ruby
143130

144131
DEPENDENCIES
145-
adsf
146-
builder
147-
fssm
148-
guard-nanoc
132+
awesome_print (= 1.6.1)
133+
builder (~> 3.2)
134+
extended-markdown-filter (= 0.4.3)
135+
gemoji (= 2.1.0)
136+
github-markdown (= 0.6.9)
137+
html-pipeline-rouge_filter (~> 1.0)
149138
html-proofer (~> 2.5)
150139
jekyll-auth (~> 2.0)
151-
kramdown (~> 1.8)
152140
nanoc (~> 4.0)
141+
nanoc-html-pipeline (= 0.3.3)
153142
nokogiri (~> 1.6.0)
143+
page-toc-filter (~> 0.0.1)
154144
rake (= 10.3.2)
155-
rouge (~> 1.4)
156145

157146
BUNDLED WITH
158147
1.10.6

README.md

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ API docs should look like:
3131

3232
# API title
3333

34-
* TOC
3534
{:toc}
3635

3736
## API endpoint title
@@ -77,27 +76,22 @@ Some actions return arrays. You can modify the JSON by passing a block:
7776

7877
### Terminal blocks
7978

80-
You can specify terminal blocks by prefacing a [block element][block boundaries] with `{:.terminal}`.
79+
You can specify terminal blocks by using the `command-line` syntax highlighting.
8180

82-
```markdown
83-
{:.terminal}
81+
``` command-line
8482
$ curl foobar
85-
```
86-
87-
Alternatively, you can use plain html and use `pre.terminal` elements.
88-
(If, for example, you need to emphasis text with `<em>`)
83+
```
8984

90-
```html
91-
<pre class="terminal">
92-
$ curl <em>foobar<em>
93-
....
94-
</pre>
95-
```
85+
You can use certain characters, like `$` and `#`, to emphasize different parts
86+
of commands.
9687

97-
This is not a `curl` tutorial though. Not every API call needs
98-
to show how to access it with `curl`.
88+
``` command-line
89+
# call foobar
90+
$ curl <em>foobar<em>
91+
....
92+
```
9993

100-
[block boundaries]: http://kramdown.gettalong.org/syntax.html#block-boundaries
94+
For more information, see [the reference documentation](https://github.com/gjtorikian/extended-markdown-filter#command-line-highlighting).
10195

10296
## Development
10397

Rules

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -12,74 +12,53 @@ preprocess do
1212
generate_redirects(config[:redirects])
1313
end
1414

15-
compile '/static/**/*' do
16-
end
17-
1815
passthrough '/CNAME'
1916

2017
compile '/feed.*' do
2118
filter :erb
22-
filter :kramdown, :toc_levels => [2]
19+
filter :html_pipeline, @config[:pipeline_config]
2320
end
2421

2522
compile '/integrations-directory/*' do
2623
filter :erb
27-
filter :kramdown, :toc_levels => [2]
28-
filter :tip_filter
29-
filter :colorize_syntax,
30-
:colorizers => {:javascript => :rouge}
24+
filter :html_pipeline, @config[:pipeline_config]
3125
layout item[:layout] || '/integrations-directory.*'
3226
end
3327

3428
compile '/v3{.*,/**/*}' do
3529
filter :search
3630
filter :erb
37-
filter :kramdown, :toc_levels => [2]
31+
filter :html_pipeline, @config[:pipeline_config]
3832
filter :enterprise_only_filter
3933
filter :not_enterprise_filter
40-
filter :tip_filter
41-
filter :colorize_syntax,
42-
:colorizers => {:javascript => :rouge}
4334
layout(item[:layout] ? "/#{item[:layout]}.*" : '/api.*')
4435
end
4536

4637
compile "/changes/20*" do
4738
filter :erb
48-
filter :kramdown, :toc_levels => [2]
49-
filter :colorize_syntax,
50-
:colorizers => {:javascript => :rouge}
39+
filter :html_pipeline, @config[:pipeline_config]
5140
layout '/changes.*'
5241
layout(item[:layout] ? "/#{item[:layout]}.*" : '/blog.*')
5342
end
5443

5544
compile '/guides/**/*' do
56-
filter :kramdown, :toc_levels => [2]
57-
filter :tip_filter
45+
filter :html_pipeline, @config[:pipeline_config]
5846
filter :erb
59-
filter :colorize_syntax, :default_colorizer => :rouge
6047
layout(item[:layout] ? "/#{item[:layout]}.*" : '/guides.*')
6148
end
6249

6350
compile '/webhooks/**/*' do
64-
filter :kramdown, :toc_levels => [2]
65-
filter :tip_filter
6651
filter :erb
67-
filter :colorize_syntax, :default_colorizer => :rouge
52+
filter :html_pipeline, @config[:pipeline_config]
6853
layout(item[:layout] ? "/#{item[:layout]}.*" : '/webhooks.*')
6954
end
7055

7156
compile '/**/*' do
7257
filter :erb
73-
filter :kramdown, :toc_levels => [2]
74-
filter :colorize_syntax,
75-
:colorizers => {:javascript => :rouge}
58+
filter :html_pipeline, @config[:pipeline_config]
7659
layout(item[:layout] ? "/#{item[:layout]}.*" : '/default.*')
7760
end
7861

79-
route '/static/**/*' do
80-
item.identifier.to_s.sub(/\A\/static/, '')
81-
end
82-
8362
route '/feed.*' do
8463
'/changes.atom'
8564
end

assets/javascripts/documentation.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,6 @@ $(function() {
8484
}
8585
})
8686

87-
// Dynamic year for footer copyright
88-
var currentYear = (new Date).getFullYear();
89-
$.each($(".js-year"), (function() { $(this).text( currentYear ) }));
90-
9187
// Grab API status
9288
$.getJSON('https://status.github.com/api/status.json?callback=?', function(data) {
9389
if(data) {
@@ -100,14 +96,6 @@ $(function() {
10096
}
10197
});
10298

103-
// Add link anchors for headers with IDs
104-
$(".content h1, .content h2, .content h3, .content h4").each(function(e){
105-
var id = $(this).attr("id");
106-
if (!id) return;
107-
108-
$(this).prepend("<a class='header-anchor' href='#" + id + "'></a>");
109-
});
110-
11199
// #### Search ####
112100
var searchIndex,
113101
searchHits;

0 commit comments

Comments
 (0)