History

Update htmx documentation (2.0.7)

Simon Legner committed 9 months ago

Commit 2a240121 parent 68b412d2 files · +19 −10Browse files

Unified · Split

2 files
  1. lib/docs/filters/htmx/clean_html.rb +1 −0
  2. lib/docs/scrapers/htmx.rb +18 −10
lib/docs/filters/htmx/clean_html.rb+1−0
@@ -2,6 +2,7 @@ module Docs · 1 unmodified line
2 class Htmx2 class Htmx
3 class CleanHtmlFilter < Filter3 class CleanHtmlFilter < Filter
4 def call4 def call
5 css('.ad').remove
5 css('.zola-anchor').remove6 css('.zola-anchor').remove
6 doc.prepend_child("<h1>htmx</h1>") if root_page?7 doc.prepend_child("<h1>htmx</h1>") if root_page?
7 css('div:contains("NEWS:")').remove8 css('div:contains("NEWS:")').remove
lib/docs/scrapers/htmx.rb+18−10
@@ -7,27 +7,35 @@ module Docs · 6 unmodified lines
7 home: 'https://htmx.org/',7 home: 'https://htmx.org/',
8 code: 'https://github.com/bigskysoftware/htmx'8 code: 'https://github.com/bigskysoftware/htmx'
9 }9 }
10 self.release = '1.9.10'
11 self.base_url = "https://htmx.org/"
12 self.initial_paths = %w(reference/)10 self.initial_paths = %w(reference/)
13 11
14 html_filters.push 'htmx/entries', 'htmx/clean_html'12 html_filters.push 'htmx/entries', 'htmx/clean_html'
15 13
16 options[:trailing_slash] = true14 options[:trailing_slash] = true
17 options[:container] = '.content'15 options[:container] = '.content'
18 options[:download_images] = false16 options[:download_images] = false
19 options[:skip_patterns] = [17 options[:skip_patterns] = [
20 /\Aessays/,18 /\Aessays/,
21 /\Aexamples/,19 /\Aexamples/,
22 /\Amigration-guide/,20 /\Amigration-guide/,
23 /\Aposts/,21 /\Aposts/,
24 ]22 ]
25 23
26 # https://github.com/bigskysoftware/htmx/blob/master/LICENSE24 # https://github.com/bigskysoftware/htmx/blob/master/LICENSE
27 options[:attribution] = <<-HTML25 options[:attribution] = <<-HTML
28 Licensed under the Zero-Clause BSD License.26 Licensed under the Zero-Clause BSD License.
29 HTML27 HTML
30 28
29 version do
30 self.release = '2.0.7'
31 self.base_url = "https://htmx.org/"
32 end
33
34 version '1' do
35 self.release = '1.9.12'
36 self.base_url = "https://v1.htmx.org/"
37 end
38
31 def get_latest_version(opts)39 def get_latest_version(opts)
32 get_npm_version('htmx.org', opts)40 get_npm_version('htmx.org', opts)
33 end41 end

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t