From 6d2c067f0d6bc78eef7ececcec3eba71cbb5d80c Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado Date: Tue, 1 Jun 2021 03:21:33 -0600 Subject: add fork awesome, contact and donate pages, update general style and update readme --- .../src/doc/_plugins/all-contributors-generator.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 static/fork-awesome/src/doc/_plugins/all-contributors-generator.rb (limited to 'static/fork-awesome/src/doc/_plugins/all-contributors-generator.rb') diff --git a/static/fork-awesome/src/doc/_plugins/all-contributors-generator.rb b/static/fork-awesome/src/doc/_plugins/all-contributors-generator.rb new file mode 100644 index 0000000..85d0328 --- /dev/null +++ b/static/fork-awesome/src/doc/_plugins/all-contributors-generator.rb @@ -0,0 +1,17 @@ +## +# Generate an all-contributors badge with the number of contributors + +require "json" + +module Jekyll + class AllContributors < Generator + def generate(site) + all_contributors_rc = File.read(File.join(Dir.pwd, '.all-contributorsrc')) + all_contributors = JSON.parse(all_contributors_rc) + total_contributors = all_contributors['contributors'].length + site.pages.each do |page| + page.data['total_contributors'] = total_contributors + end + end + end +end -- cgit v1.2.3-54-g00ecf