Skip to content

Commit 63a7b52

Browse files
committed
Implement on-the-githubs for /authors page
1 parent dde0288 commit 63a7b52

File tree

4 files changed

+1061
-352
lines changed

4 files changed

+1061
-352
lines changed

_octopress/Rakefile

Lines changed: 38 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -242,29 +242,46 @@ task :build do
242242
page_auth.puts "footer: true"
243243
page_auth.puts "---"
244244
page_auth.puts "<!-- Generated by Rakefile:build -->"
245-
page_auth.puts "Checkout the [repository's contributors](https://github.com/kvz/phpjs/graphs/contributors), or browse "
246-
page_auth.puts "these authors that contributed via the old site's commenting system (before we had GitHub :) "
247-
page_auth.puts ""
248-
page_auth.puts ""
249245

250-
authors.sort.map { |author, count|
251-
m = /\s*([^\(]+)(\s*\(([^\(]+)\))?/.match(author)
252-
name = m[1].strip
253-
url = ""
254-
if m[3]
255-
url = m[3].strip
256-
end
257-
strong = ""
258-
if count > 30
259-
strong = "**"
260-
end
261246

262-
if url.length > 0
263-
page_auth.puts " - #{strong}[#{name}](#{url})#{strong} (#{count})"
264-
else
265-
page_auth.puts " - #{strong}#{name}#{strong} (#{count})"
266-
end
267-
}
247+
page_auth.puts ""
248+
page_auth.puts "Here are all people involved with php.js"
249+
page_auth.puts ""
250+
page_auth.puts "{% render_partial _includes/custom/community.html %}"
251+
system "node_modules/on-the-githubs/bin/ghcommunity-cache \
252+
--user kvz \
253+
--repo phpjs \
254+
--format html \
255+
--concurrency 5 \
256+
--output source/_includes/custom/community.html \
257+
--debug"
258+
259+
# page_auth.puts ""
260+
# page_auth.puts "Before Github, we"
261+
# page_auth.puts "Checkout the [repository's contributors](https://github.com/kvz/phpjs/graphs/contributors), or browse "
262+
# page_auth.puts "Checkout the [repository's contributors](https://github.com/kvz/phpjs/graphs/contributors), or browse "
263+
# page_auth.puts "these authors that contributed via the old site's commenting system (before we had GitHub :) "
264+
# page_auth.puts ""
265+
# page_auth.puts ""
266+
267+
# authors.sort.map { |author, count|
268+
# m = /\s*([^\(]+)(\s*\(([^\(]+)\))?/.match(author)
269+
# name = m[1].strip
270+
# url = ""
271+
# if m[3]
272+
# url = m[3].strip
273+
# end
274+
# strong = ""
275+
# if count > 30
276+
# strong = "**"
277+
# end
278+
279+
# if url.length > 0
280+
# page_auth.puts " - #{strong}[#{name}](#{url})#{strong} (#{count})"
281+
# else
282+
# page_auth.puts " - #{strong}#{name}#{strong} (#{count})"
283+
# end
284+
# }
268285
page_auth.close
269286

270287

_octopress/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"dependencies": {
3+
"on-the-githubs": "2.0.0"
4+
}
5+
}

0 commit comments

Comments
 (0)