willamette 0.5.2 → 0.6.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 +4 -4
- data/CHANGELOG.md +6 -1
- data/Gemfile.lock +1 -1
- data/automations/components.automation.rb +2 -2
- data/automations/layouts.automation.rb +4 -9
- data/components/willamette/post_metadata.erb +15 -0
- data/components/willamette/post_metadata.rb +5 -0
- data/layouts/willamette/default.erb +10 -5
- data/lib/willamette/version.rb +1 -1
- data/lib/willamette.rb +2 -2
- data/package.json +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b14600bc1b9466fbdeaae3e1add8e22c329a429809c59a352078980a79f12632
|
|
4
|
+
data.tar.gz: f5df323495a95da1c249714d97872e0e0502ca7804927988f8e6396a46d5d4b9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5fd4dff6fc3f50dab2807d5a55b03219a9e7c84fcf40f9a8782f7826162676dc4157447bf7b14cfc87a5a10803f3cd663f4aabbfbac0edcccc1a462720405953
|
|
7
|
+
data.tar.gz: b7d4a23d04a9490b52d2eb139bbc0127b81a3f9b3a9725ca830c66c590e1b9d0e4bed76a96b1a11741390db5cda0d63a566a4b0760726c7d09a264ac8700788e
|
data/CHANGELOG.md
CHANGED
|
@@ -9,7 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
9
9
|
|
|
10
10
|
- ...
|
|
11
11
|
|
|
12
|
-
## [0.
|
|
12
|
+
## [0.6.0] - 2026-04-23
|
|
13
|
+
|
|
14
|
+
- Clean up layout settings, improve blockquotes and image bleeds
|
|
15
|
+
- Add post metadata component, icons, improved styles
|
|
16
|
+
|
|
17
|
+
## [0.5.2] - 2026-04-03
|
|
13
18
|
|
|
14
19
|
- Add `author_name` resource extension method
|
|
15
20
|
|
data/Gemfile.lock
CHANGED
|
@@ -70,7 +70,7 @@ create_file "src/_components/shared/sidebar.erb" do <<~HTML
|
|
|
70
70
|
|
|
71
71
|
<% if strategy.explore? %>
|
|
72
72
|
<details open>
|
|
73
|
-
<summary><h2><wa-icon class="show-
|
|
73
|
+
<summary><h2><wa-icon class="show-small-screen" name="bars"></wa-icon>
|
|
74
74
|
<%= t "documentation.explore" %>
|
|
75
75
|
</h2></summary>
|
|
76
76
|
|
|
@@ -82,7 +82,7 @@ create_file "src/_components/shared/sidebar.erb" do <<~HTML
|
|
|
82
82
|
|
|
83
83
|
<% if strategy.follow? %>
|
|
84
84
|
<details open>
|
|
85
|
-
<summary><h2><wa-icon class="show-
|
|
85
|
+
<summary><h2><wa-icon class="show-small-screen" name="bars"></wa-icon> <%= t "marketing.follow" %></h2></summary>
|
|
86
86
|
|
|
87
87
|
<nav>
|
|
88
88
|
<%= strategy.follow_links %>
|
|
@@ -40,22 +40,17 @@ create_file "src/_layouts/post.erb" do <<~ERB
|
|
|
40
40
|
image_alt = data.image.is_a?(String) ? t("content.featured_post_image") : data.image.alt
|
|
41
41
|
image_caption = data.image.is_a?(String) ? nil : data.image.caption
|
|
42
42
|
%>
|
|
43
|
-
<figure class="
|
|
43
|
+
<figure class="<%= data.image_bleed ? "inline-bleed" : "" %>">
|
|
44
44
|
<img src="<%= image_path %>" alt="" />
|
|
45
45
|
<% if image_caption %>
|
|
46
46
|
<figcaption><%= markdownify image_caption %></figcaption>
|
|
47
47
|
<% end %>
|
|
48
48
|
</figure>
|
|
49
49
|
<% end %>
|
|
50
|
-
|
|
50
|
+
|
|
51
51
|
<%= yield %>
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
<wa-icon class="article-metadata" name="newspaper"></wa-icon>
|
|
56
|
-
<p class="article-metadata"><article-author>by So and So</article-author></p>
|
|
57
|
-
<p class="article-metadata"><time><%= pipe(resource.date) { to_date | l(format: :long) } %></time></p>
|
|
58
|
-
<p class="article-metadata"><article-tags>#foo #BarBaz</article-tags></p>
|
|
52
|
+
|
|
53
|
+
<%= render Willamette::PostMetadata.new(post: resource) %>
|
|
59
54
|
|
|
60
55
|
</article>
|
|
61
56
|
ERB
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<wll-post-metadata>
|
|
2
|
+
<wa-icon class="wll-decoration" name="newspaper"></wa-icon>
|
|
3
|
+
<p><wa-icon name="calendar"></wa-icon> <time><%= pipe(@post.date) { to_date | l(format: :long) } %></time></p>
|
|
4
|
+
<p><wa-icon name="user-pen"></wa-icon> <wll-post-author>by <%= @post.author_name %></wll-post-author></p>
|
|
5
|
+
<% if @post.data.categories.length.positive? %>
|
|
6
|
+
<p><wa-icon name="paperclip"></wa-icon> <% @post.data.categories.each do |category| %>
|
|
7
|
+
<wll-post-category><%= t("categories.#{category}", default: category) %></wll-post-category>
|
|
8
|
+
<% end %></p>
|
|
9
|
+
<% end %>
|
|
10
|
+
<% if @post.data.tags.length.positive? %>
|
|
11
|
+
<p><wa-icon name="tags"></wa-icon> <% @post.data.tags.each do |tag| %>
|
|
12
|
+
<wll-post-tag>#<%= tag %></wll-post-tag>
|
|
13
|
+
<% end %></p>
|
|
14
|
+
<% end %>
|
|
15
|
+
</wll-post-metadata>
|
|
@@ -3,14 +3,18 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<%= render "head", metadata: site.metadata, title: data.title %>
|
|
5
5
|
</head>
|
|
6
|
-
<body class="
|
|
6
|
+
<body class="<%=
|
|
7
|
+
class_map("wll-grid-lines": site.config.willamette.layout.grid_lines, "wll-code-dark": site.config.willamette.layout.code_dark)
|
|
8
|
+
%> <%= data.layout %> <%= data.page_class %>">
|
|
7
9
|
<%= dsd do %>
|
|
8
10
|
<%= render Willamette::HolyGrailLayout.new %>
|
|
9
11
|
<% end %>
|
|
10
12
|
<%= render Shared::Navbar.new(metadata: site.metadata, resource:) %>
|
|
11
13
|
|
|
12
14
|
<main slot="content" id="content">
|
|
13
|
-
<div hidden class="show-
|
|
15
|
+
<div hidden class="show-mid-screen">
|
|
16
|
+
<button type="button" class="wa-outlined" onclick="document.body.classList.toggle('sidebar-end-open')"><wa-icon name="list"></wa-icon></button>
|
|
17
|
+
</div>
|
|
14
18
|
|
|
15
19
|
<main-contents <%= "data-pagefind-body" unless data.exclude_from_pagefind %>>
|
|
16
20
|
<%= yield %>
|
|
@@ -26,15 +30,16 @@
|
|
|
26
30
|
</aside>
|
|
27
31
|
|
|
28
32
|
<aside slot="sidebar-end" hidden>
|
|
29
|
-
|
|
30
|
-
|
|
33
|
+
<div class="show-mid-screen">
|
|
34
|
+
<button type="button" class="wa-outlined" onclick="document.body.classList.toggle('sidebar-end-open')"><wa-icon name="close"></wa-icon></button>
|
|
35
|
+
</div>
|
|
31
36
|
<h2><%= t "documentation.contents" %></h2>
|
|
32
37
|
|
|
33
38
|
<%= slotted :toc %>
|
|
34
39
|
|
|
35
40
|
<hr />
|
|
36
41
|
|
|
37
|
-
<!-- TOC
|
|
42
|
+
<!-- TOC insertion -->
|
|
38
43
|
</aside>
|
|
39
44
|
|
|
40
45
|
<%= render "footer", metadata: site.metadata %>
|
data/lib/willamette/version.rb
CHANGED
data/lib/willamette.rb
CHANGED
|
@@ -29,14 +29,14 @@ Kramdown::Converter::Html.class_eval do
|
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
# @param config [Bridgetown::Configuration::ConfigurationDSL]
|
|
32
|
-
Bridgetown.initializer :willamette do |config, docs_url_segment: "docs"|
|
|
32
|
+
Bridgetown.initializer :willamette do |config, docs_url_segment: "docs", layout: {}|
|
|
33
33
|
# Add code here which will run when a site includes
|
|
34
34
|
# `init :willamette`
|
|
35
35
|
# in its configuration
|
|
36
36
|
|
|
37
37
|
# Add default configuration data:
|
|
38
38
|
config.willamette ||= {}
|
|
39
|
-
config.willamette.
|
|
39
|
+
config.willamette.layout ||= layout
|
|
40
40
|
|
|
41
41
|
# Register your builders:
|
|
42
42
|
config.builder Willamette::Builders::AuthorExtension
|
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.
|
|
4
|
+
version: 0.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Bridgetown Team
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-04-
|
|
10
|
+
date: 2026-04-24 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: bridgetown
|
|
@@ -101,6 +101,8 @@ files:
|
|
|
101
101
|
- components/willamette/pagination.rb
|
|
102
102
|
- components/willamette/post_item.css
|
|
103
103
|
- components/willamette/post_item.rb
|
|
104
|
+
- components/willamette/post_metadata.erb
|
|
105
|
+
- components/willamette/post_metadata.rb
|
|
104
106
|
- components/willamette/previous_next.erb
|
|
105
107
|
- components/willamette/previous_next.rb
|
|
106
108
|
- components/willamette/search_dialog.rb
|