فهرست منبع

Now generates output, still need to perfect filters

mike 1 سال پیش
والد
کامیت
aafcac1fde
1فایلهای تغییر یافته به همراه14 افزوده شده و 4 حذف شده
  1. 14 4
      lib/docs/scrapers/nextjs.rb

+ 14 - 4
lib/docs/scrapers/nextjs.rb

@@ -1,10 +1,20 @@
 module Docs
     class Nextjs < UrlScraper
-        self.name = 'nextjs`'
+        self.name = 'nextjs'
         self.type = 'simple'
         self.release = 'v14.1.0'
         self.base_url = 'https://nextjs.org/docs'
-            self.initial_paths = %w(reference/)
-            html_filters.push 'nextjs/entries', 'nextjs/clean_html'
+        self.initial_paths = %w(reference/)
+        self.links = {
+          home: 'https://www.nextjs.org/',
+          code: 'https://github.com/vercel/next.js'
+        }
+
+        html_filters.push 'nextjs/entries', 'nextjs/clean_html'
+
+        options[:attribution] = <<-HTML
+          &copy; 2024 Vercel, Inc.
+          Licensed under the MIT License.
+        HTML
     end
-end
+end