willamette 0.9.1 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +4 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +1 -1
- data/automations/components.automation.rb +2 -2
- data/automations/frontend.automation.rb +0 -3
- data/automations/layouts.automation.rb +3 -3
- data/lib/willamette/builders/inspectors.rb +20 -1
- data/lib/willamette/strategies/base.rb +1 -1
- data/lib/willamette/version.rb +1 -1
- data/package.json +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bd618dd52310a190a7592ac6ed51b60e0a03ea6e17a929da4b387311e8a6704d
|
|
4
|
+
data.tar.gz: 8f456abadabac5a51693bb77ea7da330ec3b6c4138ea1c41e004350980860040
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2a1c4daf43c9da9bf1cf5b9345ee29c29fc890c9dd7045eda27f74df8a5627cebb879892fb6595a3e4176b306407ee5cfbee3cce211144fd67f8af799ded758c
|
|
7
|
+
data.tar.gz: 23b6212410320068828225f25a2f5777b3e9e6fd81d35adcad61d175ab1cc789e3277a9b613202e2884d0590983b953d5fd92e212a83e45b10da113098a69c0c
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
9
9
|
|
|
10
10
|
- ...
|
|
11
11
|
|
|
12
|
+
## [0.9.2] - 2026-05-07
|
|
13
|
+
|
|
14
|
+
- Keep explore menu open on mobile if previously opened
|
|
15
|
+
- Fix some HTML title escaping issues
|
|
16
|
+
|
|
12
17
|
## [0.9.1] - 2026-05-07
|
|
13
18
|
|
|
14
19
|
- Make search icon truly optional, clean up TOC appearance
|
data/Gemfile.lock
CHANGED
|
@@ -90,7 +90,7 @@ create_file "src/_components/shared/sidebar.erb" do <<~HTML
|
|
|
90
90
|
<% end %>
|
|
91
91
|
|
|
92
92
|
<% if strategy.explore? %>
|
|
93
|
-
<details open>
|
|
93
|
+
<details id="explore-menu" open>
|
|
94
94
|
<summary><h2><wa-icon class="show-small-screen" name="bars"></wa-icon>
|
|
95
95
|
<%= t "documentation.explore" %>
|
|
96
96
|
</h2></summary>
|
|
@@ -102,7 +102,7 @@ create_file "src/_components/shared/sidebar.erb" do <<~HTML
|
|
|
102
102
|
<% end %>
|
|
103
103
|
|
|
104
104
|
<% if strategy.follow? %>
|
|
105
|
-
<details open>
|
|
105
|
+
<details id="follow-menu" open>
|
|
106
106
|
<summary><h2><wa-icon class="show-small-screen" name="bars"></wa-icon> <%= t "marketing.follow" %></h2></summary>
|
|
107
107
|
|
|
108
108
|
<nav>
|
|
@@ -5,9 +5,6 @@ javascript_import do <<~JS
|
|
|
5
5
|
JS
|
|
6
6
|
end
|
|
7
7
|
|
|
8
|
-
# gsub_file "frontend/javascript/index.js", %(import "@awesome.me/webawesome/dist/components/button/button.js"\n), ""
|
|
9
|
-
# gsub_file "frontend/javascript/index.js", %(import "@awesome.me/webawesome/dist/components/icon/icon.js"\n), ""
|
|
10
|
-
|
|
11
8
|
css = <<~CSS
|
|
12
9
|
/* Import the base Web Awesome stylesheet: */
|
|
13
10
|
@import "@awesome.me/webawesome/dist/styles/webawesome.css";
|
|
@@ -19,7 +19,7 @@ create_file "src/_layouts/page.erb" do <<~ERB
|
|
|
19
19
|
|
|
20
20
|
<article class="<%= data.willamette&.article_classes %>">
|
|
21
21
|
|
|
22
|
-
<h1><%= pipe(data.title) { strip_html | smartify } %></h1>
|
|
22
|
+
<h1><%= pipe(data.title) { strip_html | smartify | safe } %></h1>
|
|
23
23
|
|
|
24
24
|
<%= yield %>
|
|
25
25
|
|
|
@@ -35,7 +35,7 @@ create_file "src/_layouts/post.erb" do <<~ERB
|
|
|
35
35
|
|
|
36
36
|
<article class="<%= data.willamette&.article_classes %>">
|
|
37
37
|
|
|
38
|
-
<h1><%= pipe(data.title) { strip_html | smartify } %></h1>
|
|
38
|
+
<h1><%= pipe(data.title) { strip_html | smartify | safe } %></h1>
|
|
39
39
|
|
|
40
40
|
<%
|
|
41
41
|
if data.image
|
|
@@ -66,7 +66,7 @@ create_file "src/_layouts/documentation.erb" do <<~ERB
|
|
|
66
66
|
|
|
67
67
|
<article class="<%= data.willamette&.article_classes %>">
|
|
68
68
|
|
|
69
|
-
<h1><%= pipe(data.title) { strip_html | smartify } %></h1>
|
|
69
|
+
<h1><%= pipe(data.title) { strip_html | smartify | safe } %></h1>
|
|
70
70
|
|
|
71
71
|
<%= yield %>
|
|
72
72
|
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
module Willamette
|
|
2
2
|
class Builders::Inspectors < Bridgetown::Builder
|
|
3
|
-
def build # rubocop:disable Metrics
|
|
3
|
+
def build # rubocop:disable Metrics
|
|
4
|
+
# TODO: make these all optional/configurable
|
|
5
|
+
|
|
6
|
+
# Open external links in new windows
|
|
4
7
|
inspect_html do |document|
|
|
5
8
|
document.query_selector_all("a").each do |anchor|
|
|
6
9
|
next if anchor[:target]
|
|
@@ -13,6 +16,7 @@ module Willamette
|
|
|
13
16
|
end
|
|
14
17
|
end
|
|
15
18
|
|
|
19
|
+
# Add visible hash anchors for headings
|
|
16
20
|
inspect_html do |document|
|
|
17
21
|
document.query_selector_all("article h2[id], article h3[id]").each do |heading|
|
|
18
22
|
heading << document.create_text_node(" ")
|
|
@@ -23,6 +27,21 @@ module Willamette
|
|
|
23
27
|
)
|
|
24
28
|
end
|
|
25
29
|
end
|
|
30
|
+
|
|
31
|
+
# Lazy-load images by default
|
|
32
|
+
inspect_html do |document|
|
|
33
|
+
main = document.query_selector("main")
|
|
34
|
+
|
|
35
|
+
main.query_selector_all("img").each do |img|
|
|
36
|
+
# TODO: evaluate if this fix should belong here or in Bridgetown Core
|
|
37
|
+
#if img[:src].start_with?("./")
|
|
38
|
+
# img[:src] = resource.relative_url + img[:src].delete_prefix(".")
|
|
39
|
+
#end
|
|
40
|
+
next if img[:loading]
|
|
41
|
+
|
|
42
|
+
img[:loading] = :lazy
|
|
43
|
+
end
|
|
44
|
+
end
|
|
26
45
|
end
|
|
27
46
|
end
|
|
28
47
|
end
|
data/lib/willamette/version.rb
CHANGED
data/package.json
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: willamette
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.9.
|
|
4
|
+
version: 0.9.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Bridgetown Team
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-05-
|
|
10
|
+
date: 2026-05-17 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: bridgetown
|