mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 17:56:16 +00:00
remove dependency on aquarium
This commit is contained in:
parent
ebd48d9321
commit
c4eeec986d
1 changed files with 15 additions and 13 deletions
|
@ -1,6 +1,5 @@
|
||||||
require 'open-uri'
|
require 'open-uri'
|
||||||
require 'json'
|
require 'json'
|
||||||
require 'aquarium'
|
|
||||||
require 'yaml'
|
require 'yaml'
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
|
@ -36,18 +35,21 @@ module Jekyll
|
||||||
end
|
end
|
||||||
|
|
||||||
def generate(site)
|
def generate(site)
|
||||||
@contributors = merge_contributors(fetch_contributors(), site.config['aliases']).sort_by{|c| - c['contributions']}
|
class << site
|
||||||
@primary_devs = JSON.parse(open("https://api.github.com/repos/bitcoin/bitcoin/collaborators").read)
|
attr_accessor :primary_devs, :contributors
|
||||||
|
|
||||||
Aquarium::Aspects::Aspect.new :around, :invoking => :site_payload, :on_type => Site do |execution_point, site, *args|
|
def site_payload
|
||||||
result = execution_point.proceed
|
result = super
|
||||||
result['site']['project'] = {
|
result['site']['project'] = {
|
||||||
"primary_devs" => @primary_devs,
|
"primary_devs" => self.primary_devs,
|
||||||
"contributors" => @contributors
|
"contributors" => self.contributors
|
||||||
}
|
}
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
site.primary_devs = JSON.parse(open("https://api.github.com/repos/bitcoin/bitcoin/collaborators").read)
|
||||||
|
site.contributors = merge_contributors(fetch_contributors(), site.config['aliases']).sort_by{|c| - c['contributions']}
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue