ソースを参照

Finish Koa scraper

Thibaut Courouble 7 年 前
コミット
ad7be4d061

+ 1 - 1
assets/javascripts/news.json

@@ -1,7 +1,7 @@
 [
   [
     "2018-07-08",
-    "New documentations: <a href=\"/leaflet/\">Leaflet</a>, <a href=\"/terraform/\">Terraform</a>"
+    "New documentations: <a href=\"/leaflet/\">Leaflet</a>, <a href=\"/terraform/\">Terraform</a> and <a href=\"/koa/\">Koa</a>"
   ], [
     "2018-03-26",
     "DevDocs is joining the freeCodeCamp community. Read the announcement <a href=\"https://medium.freecodecamp.org/devdocs-is-joining-the-freecodecamp-community-ae185a1c14a6\" target=\"_blank\">here</a>."

+ 5 - 0
assets/javascripts/templates/pages/about_tmpl.coffee

@@ -365,6 +365,11 @@ credits = [
     'Steven Sanderson, the Knockout.js team, and other contributors',
     'MIT',
     'https://raw.githubusercontent.com/knockout/knockout/master/LICENSE'
+  ], [
+    'Koa',
+    '2018 Koa contributors',
+    'MIT',
+    'https://raw.githubusercontent.com/koajs/koa/master/LICENSE'
   ], [
     'Kotlin',
     '2010-2018 JetBrains s.r.o.',

+ 1 - 0
assets/stylesheets/global/_icons.scss

@@ -93,6 +93,7 @@
 ._icon-svg:before           { background-position: -5rem -5rem; }
 ._icon-marionette:before    { background-position: -6rem -5rem; }
 ._icon-jsdoc:before,
+._icon-koa:before,
 ._icon-mongoose:before      { background-position: -7rem -5rem; }
 ._icon-phpunit:before       { background-position: -8rem -5rem; }
 ._icon-nokogiri:before      { background-position: -9rem -5rem; @extend %darkIconFix !optional; }

+ 1 - 1
lib/docs/filters/koa/entries.rb

@@ -15,7 +15,7 @@ module Docs
               (slug.include?('index') && !node.content.include?('.'))
           end
           .map do |node|
-            name = node.content.sub(/\(.*\)$/, '')
+            name = node.content.strip.sub(/\(.*\)\z/, '()')
             type = 'API' if type == @root_type && name.include?('.')
             [name, node['id'], type]
           end

+ 2 - 2
lib/docs/scrapers/koa.rb

@@ -3,7 +3,7 @@
 module Docs
   class Koa < Github
     self.base_url = 'https://github.com/koajs/koa/blob/master/docs/'
-    self.release = '2.4.1'
+    self.release = '2.5.1'
 
     self.root_path = 'api/index.md'
     self.initial_paths = %w[
@@ -31,7 +31,7 @@ module Docs
     options[:container] = '.markdown-body'
 
     options[:attribution] = <<-HTML
-      &copy; 2017 Koa contributors<br>
+      &copy; 2018 Koa contributors<br>
       Licensed under the MIT License.
     HTML
   end

BIN
public/icons/docs/koa/16.png


BIN
public/icons/docs/koa/16@2x.png


+ 0 - 1
public/icons/docs/koa/SOURCE

@@ -1 +0,0 @@
-https://github.com/github/explore/blob/db7f2f28385d413ba9e03a635009b3434c9710fc/topics/koa/koa.png