willamette 0.9.3 → 0.10.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 241a44f5f27cc4a7e24cebb6bca2e10af1c50b264e3d77e33dc89fdd732f4492
4
- data.tar.gz: be3eb2f192c2794a6da37d3ecef4fac95974b2ac0e2d9ff058f3c55b20de9615
3
+ metadata.gz: cf281f7a1d1e3c61fa0fa0d5daa8fc14a9d8d681999b46fd5970815a91e46ec8
4
+ data.tar.gz: 40bed820b2a9fe5adfafefa47c1e8f80ecff471350203ba2ef973bfd9ba71754
5
5
  SHA512:
6
- metadata.gz: 9c76fb3068735c824fdd3fca3ec5263ba482f3e4872314313c4ab19fc6ce932d1f70e5834ce17c4eaed284eab4192ae5948059bbcaaaba98801cc7be8628e0ab
7
- data.tar.gz: 37021f7423e72911c1a3a50dcf1fb016d1500a05e2819bcb7d909fbe36220ffc2a1e3689e6ba8e904d605fc89918487b20e22cdff9b46be976f8210a390bc021
6
+ metadata.gz: ef7c7e8084b7fe822147cab2fefaa32f5c1993a1b5502eb35fea1c3ce1ed0caa96d06ded6bb35280d1ffa5f609c62177a5a0e52683fb60e96ff8ca48ca608226
7
+ data.tar.gz: 202a9c2b2bf1ad83afeea8a92d95e69533f503fbd3c952cdcc9504257823e0e6dafa312ee321d2737a0afb093eb206a7d5065d02b0bade0d55fd467e285f66a6
data/CHANGELOG.md CHANGED
@@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
 
10
10
  - ...
11
11
 
12
+ ## [0.10.0] - 2026-05-24
13
+
14
+ - HTML enhancements can now be switched off in front matter
15
+ - Added content for style guide
16
+ - Right sidebar ToC is now `position: sticky`
17
+
12
18
  ## [0.9.3] - 2026-05-07
13
19
 
14
20
  - Fix contents menu button on mobile so page titles don't overlay
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- willamette (0.9.3)
4
+ willamette (0.10.0)
5
5
  bridgetown (>= 2.1, < 3.0)
6
6
  nokolexbor (>= 0.6)
7
7
 
@@ -169,8 +169,48 @@ And of course, code snippets.
169
169
 
170
170
  ## Images & Figures
171
171
 
172
- ==WIP==
172
+ Plain `<img>` with `width: 400px`:
173
+
174
+ ![Yaquina Bay Bridge](/willamette/yaquina-bay-bridge.jpg){: style="width: 400px"}
175
+
176
+ Image within a `<figure>`:
177
+
178
+ <figure>
179
+ <img src="/willamette/yaquina-bay-bridge.jpg" alt="Yaquina Bay Bridge" />
180
+ <figcaption>Yaquina Bay Bridge (© 2024 Jared White)</figcaption>
181
+ </figure>
173
182
 
174
183
  ## Tables
175
184
 
176
- ==WIP==
185
+ <table>
186
+ <caption><b>Optical angles and visual fields</b>
187
+ </caption>
188
+ <tbody><tr>
189
+ <th>
190
+ </th>
191
+ <th>Angle between eyes
192
+ </th>
193
+ <th>Binocular field
194
+ </th>
195
+ <th>Combined field<div style="clear:both;" class=""></div>(binocular + periphery)
196
+ </th></tr>
197
+ <tr>
198
+ <th>Lemurs
199
+ </th>
200
+ <td>10–15°
201
+ </td>
202
+ <td>114–130°
203
+ </td>
204
+ <td>250–280°
205
+ </td></tr>
206
+ <tr>
207
+ <th>Anthropoid primates
208
+ </th>
209
+ <td>0°
210
+ </td>
211
+ <td>140–160°
212
+ </td>
213
+ <td>180–190°
214
+ </td></tr></tbody></table>
215
+
216
+ <p style="text-align: right"><small><a href="https://en.wikipedia.org/wiki/Lemur#senses">Reproduced from Wikipedia</a></small></p>
@@ -4,7 +4,9 @@ module Willamette
4
4
  # TODO: make these all optional/configurable
5
5
 
6
6
  # Open external links in new windows
7
- inspect_html do |document|
7
+ inspect_html do |document, resource|
8
+ next if resource.data.dig(:willamette, :external_links_target) == false
9
+
8
10
  document.query_selector_all("a").each do |anchor|
9
11
  next if anchor[:target]
10
12
 
@@ -17,7 +19,9 @@ module Willamette
17
19
  end
18
20
 
19
21
  # Add visible hash anchors for headings
20
- inspect_html do |document|
22
+ inspect_html do |document, resource|
23
+ next if resource.data.dig(:willamette, :heading_anchors) == false
24
+
21
25
  document.query_selector_all("article h2[id], article h3[id]").each do |heading|
22
26
  heading << document.create_text_node(" ")
23
27
  heading << document.create_element(
@@ -29,7 +33,9 @@ module Willamette
29
33
  end
30
34
 
31
35
  # Lazy-load images by default
32
- inspect_html do |document|
36
+ inspect_html do |document, resource|
37
+ next if resource.data.dig(:willamette, :lazy_loaded_images) == false
38
+
33
39
  main = document.query_selector("main")
34
40
 
35
41
  main.query_selector_all("img").each do |img|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Willamette
4
- VERSION = "0.9.3"
4
+ VERSION = "0.10.0"
5
5
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "willamette",
3
- "version": "0.9.3",
3
+ "version": "0.10.0",
4
4
  "main": "frontend/javascript/index.js",
5
5
  "repository": {
6
6
  "type": "git",
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.3
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bridgetown Team
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-05-17 00:00:00.000000000 Z
10
+ date: 2026-05-25 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: bridgetown
@@ -110,6 +110,7 @@ files:
110
110
  - content/search.erb
111
111
  - content/willamette/bridgetown-avatar.svg
112
112
  - content/willamette/style-guide.md
113
+ - content/willamette/yaquina-bay-bridge.jpg
113
114
  - layouts/willamette/default.erb
114
115
  - lib/willamette.rb
115
116
  - lib/willamette/builders/author_extension.rb