From 10a63346501befb44dea63f18a0718d2d36d8dee Mon Sep 17 00:00:00 2001 From: aodhan Date: Mon, 29 Jan 2024 16:13:28 -0800 Subject: [PATCH] files --- assets/javascripts/news.json | 4 ++++ lib/docs/filters/nextjs/clean_html.rb | 14 ++++++++++++++ lib/docs/filters/nextjs/entries.rb | 13 +++++++++++++ lib/docs/scrapers/nextjs.rb | 10 ++++++++++ public/icons/docs/nextjs/16.png | Bin 0 -> 537 bytes public/icons/docs/nextjs/16@2x.png | Bin 0 -> 1359 bytes public/icons/docs/nextjs/SOURCE | 2 ++ 7 files changed, 43 insertions(+) create mode 100644 lib/docs/filters/nextjs/clean_html.rb create mode 100644 lib/docs/filters/nextjs/entries.rb create mode 100644 lib/docs/scrapers/nextjs.rb create mode 100644 public/icons/docs/nextjs/16.png create mode 100644 public/icons/docs/nextjs/16@2x.png create mode 100644 public/icons/docs/nextjs/SOURCE diff --git a/assets/javascripts/news.json b/assets/javascripts/news.json index 043a0401..435ecaa5 100644 --- a/assets/javascripts/news.json +++ b/assets/javascripts/news.json @@ -1,4 +1,8 @@ [ + [ + "2024-01-24", + "New documentation: Nextjs" + ], [ "2024-01-12", "New documentation: Hammerspoon" diff --git a/lib/docs/filters/nextjs/clean_html.rb b/lib/docs/filters/nextjs/clean_html.rb new file mode 100644 index 00000000..2897b002 --- /dev/null +++ b/lib/docs/filters/nextjs/clean_html.rb @@ -0,0 +1,14 @@ +module Docs + class Nextjs + class CleanHtmlFilter < Filter + def call + css('.zola-anchor').remove + doc.prepend_child("

htmx

") if root_page? + css('div:contains("NEWS:")').remove + css('h2:contains("sponsors"), #sponsor-table').remove + end + doc + + end + end +end diff --git a/lib/docs/filters/nextjs/entries.rb b/lib/docs/filters/nextjs/entries.rb new file mode 100644 index 00000000..ab14276b --- /dev/null +++ b/lib/docs/filters/nextjs/entries.rb @@ -0,0 +1,13 @@ +module Docs + class Nextjs + class EntriesFilter < Docs::EntriesFilter + def get_name + at_css('h1').content + end + + def get_type + get_name + end + end + end +end \ No newline at end of file diff --git a/lib/docs/scrapers/nextjs.rb b/lib/docs/scrapers/nextjs.rb new file mode 100644 index 00000000..b678caa4 --- /dev/null +++ b/lib/docs/scrapers/nextjs.rb @@ -0,0 +1,10 @@ +module Docs + class Nextjs < UrlScraper + 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' + end +end \ No newline at end of file diff --git a/public/icons/docs/nextjs/16.png b/public/icons/docs/nextjs/16.png new file mode 100644 index 0000000000000000000000000000000000000000..41e7ff4d90fad34bed25a719a9dad73d249dc750 GIT binary patch literal 537 zcmV+!0_OdRP)^uQ+Emx|^rzrzwfZbck`o4oU6LfHTCF|@z_nT}{V(9h zCO(sTy^c&KGkq)&MUnA59{@$8QO0qcA7``KscD+vDW#>|ZufF$BZ?yS`#naZ5jc(m z0B{_K`FsvpmVMUS?e@jTt=tU@#E!kiR<<1$CT11+qQeqH0>Cs z?>G+2=kx4vIIv2k!T_*#yUj#V42-2|n!^L&KKqr;W`kz4iOFPwWHO1xVgX8NxQy|l zD87EB3(K-F91bxakFj2_10($1*Bh@W$}d95?J?nbp8xLm`*2+s-EKDkCWPD+MH%pd zApBNU_5GeWpU=qUa=2VB0D#-=hDM`-LZN_SvFJBQr_=9*kQD$x*Y$6Oq^c@wwOT9^ ziQI*x{|{>3+wf|f6lJ!{$Px8iA3Tx9*++QAuG$W b0`-3YOiJ%0RMtZJ00000NkvXXu0mjfzh?b} literal 0 HcmV?d00001 diff --git a/public/icons/docs/nextjs/16@2x.png b/public/icons/docs/nextjs/16@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..e35d18e294a4deb1ca68e615990f0eaf473914c4 GIT binary patch literal 1359 zcmV-V1+e;wP)sU&PRW_dGiB19;ORR=niNPo<>cV_NB2#sKWulptUW$wA>`|i2t+_{IK z0YoAZkq{CvO>?+VC=5|by8$pk5EeyIe8O?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Tbo}mgI>$`Y zT&&fcHgv|3NW{i*Tu|5b;bO5kxY?c)K@b+LR_kM)=cgEB^Ut0=`=?%?{{nQb|7?XQ RH8lVL002ovPDHLkV1kzqn0o*K literal 0 HcmV?d00001 diff --git a/public/icons/docs/nextjs/SOURCE b/public/icons/docs/nextjs/SOURCE new file mode 100644 index 00000000..178b8630 --- /dev/null +++ b/public/icons/docs/nextjs/SOURCE @@ -0,0 +1,2 @@ +https://assets.vercel.com/image/upload/v1662130559/nextjs/Icon_dark_background.png +https://github.com/vercel/next.js/blob/canary/examples/cms-enterspeed/public/favicon/favicon.ico \ No newline at end of file