瀏覽代碼

astro: root_page

Simon Legner 1 年之前
父節點
當前提交
951bbb623d
共有 2 個文件被更改,包括 3 次插入0 次删除
  1. 2 0
      lib/docs/filters/astro/clean_html.rb
  2. 1 0
      lib/docs/filters/astro/entries.rb

+ 2 - 0
lib/docs/filters/astro/clean_html.rb

@@ -2,6 +2,8 @@ module Docs
   class Astro
     class CleanHtmlFilter < Filter
       def call
+        return '<h1>Astro</h1><p> Astro is a website build tool for the modern web — powerful developer experience meets lightweight output.</p>' if root_page?
+
         @doc = at_css('main')
 
         css('.anchor-link').remove

+ 1 - 0
lib/docs/filters/astro/entries.rb

@@ -15,6 +15,7 @@ module Docs
       end
 
       def additional_entries
+        return [] if root_page?
         return [] if slug.start_with?('guides/deploy')
         return [] if slug.start_with?('guides/integrations-guide')