浏览代码

add categories

Gergely Gombos 1 年之前
父节点
当前提交
df398bd145
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      lib/docs/filters/react/entries_react_dev.rb

+ 3 - 2
lib/docs/filters/react/entries_react_dev.rb

@@ -4,11 +4,12 @@ module Docs
       def get_name
       def get_name
         canary_copy = '- This feature is available in the latest Canary'
         canary_copy = '- This feature is available in the latest Canary'
         name = at_css('article h1').content
         name = at_css('article h1').content
-        return name.sub(canary_copy, ' (experimental)')
+        return name.sub(canary_copy, ' (Experimental)')
       end
       end
 
 
       def get_type
       def get_type
-        return 'TODO add types'
+        breadcrumb_nodes = css('a.tracking-wide')
+        return breadcrumb_nodes.last.content || 'Miscellaneous'
       end
       end
     end
     end
   end
   end