ttl2html 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dfd5d041b79e5600dd3ef9beb2f2d41604414cd6d35cbb4a1c34c659a43861ef
4
- data.tar.gz: 39fd23928a3608b9a9dba9d08dcf82034d713d90b8f695e24e735b4bbc46b487
3
+ metadata.gz: 858625044e6a0e9ff78bacc944b6aebb8dc4fb95f07cda76d3eab790d0602163
4
+ data.tar.gz: 0d514bacd1ddd635dfa36ca7aca8e74b2a5ff78e15b16e21a2124eaa04660e40
5
5
  SHA512:
6
- metadata.gz: 63654dfadd4a153c9858c4bff7e6726309d3f472f9887f9a8f343184565e673b83244e2dc98dd05da8c0c1cc629b4388b950da020fd1d78a791a3bbf422020ee
7
- data.tar.gz: 3acab63f0efab2592d4a7423020c495fe0df3af3b8ba53eaad7c73f724a0d0385182732becbdfa0ea5b7e33c7862a8acbc5f9f8b7706a11aafb17fb45559345e
6
+ metadata.gz: 9958babbf93cd931926e4f56cc348fe16130f908a324d1978cd2d2f35c9ebca2646c4b86fa9ef97365377cb4ca23e7365f460e024207a3ccef8439fb545cde92
7
+ data.tar.gz: ceb241313491e6b67c633aa235c9bc74c5e2bf76fc6b4bc1479c9874e9aed07995f0655da48e2e29e36a4a22dc5efa14476e4394fce5b7465a3a3ef759f9990b
@@ -132,7 +132,7 @@ module TTL2HTML
132
132
  end
133
133
  path
134
134
  end
135
- def relative_path_uri(dest_uri, base_uri)
135
+ def relative_path_uri(dest_uri, base_uri = @param[:base_uri])
136
136
  if dest_uri.start_with? base_uri
137
137
  dest = dest_uri.sub(base_uri, "")
138
138
  dest = uri_mapping_to_path(dest, @param, "")
@@ -1 +1 @@
1
- TTL2HTML::VERSION = "2.0.0"
1
+ TTL2HTML::VERSION = "2.0.1"
@@ -10,11 +10,11 @@
10
10
  <div class="col-md-12">
11
11
  <nav aria-label="breadcrumb">
12
12
  <ol class="breadcrumb">
13
- <li class="breadcrumb-item"><a href="./"><i class="bi bi-house-door-fill"></i> Home</a></li>
13
+ <li class="breadcrumb-item"><a href="<%=h relative_path_uri(param[:base_uri]) %>"><i class="bi bi-house-door-fill"></i> Home</a></li>
14
14
  <%- param[:breadcrumbs_items].reverse.each_with_index do |e, i| -%>
15
15
  <li class="breadcrumb-item<%= ' active' if i == param[:breadcrumbs_items].size-1 %>" aria-current="page">
16
16
  <%- if e[:uri] -%>
17
- <a href="<%=h e[:uri] %>"><%=h e[:label] %></a>
17
+ <a href="<%=h relative_path_uri(e[:uri]) %>"><%=h e[:label] %></a>
18
18
  <%- else -%>
19
19
  <%=h e[:label] %>
20
20
  <%- end -%>
@@ -35,7 +35,7 @@
35
35
  <body>
36
36
  <nav class="navbar navbar-expand-lg <%=h param[:navbar_class] || "navbar-light" %>">
37
37
  <%- if param[:logo] -%>
38
- <a class="navbar-brand" href="<%=h relative_path_uri(param[:base_uri], param[:base_uri]) %>">
38
+ <a class="navbar-brand" href="<%=h relative_path_uri(param[:base_uri]) %>">
39
39
  <img src="<%=h relative_path(param[:logo]) %>" style="max-height: 54px" alt="<%=h param[:site_title] %>">
40
40
  </a>
41
41
  <%- end -%>
@@ -45,7 +45,7 @@
45
45
  <div class="collapse navbar-collapse" id="navbarSupportedContent">
46
46
  <ul class="navbar-nav mr-auto">
47
47
  <li class="nav-item<%= ' active' if @template == "index.html.erb" %>">
48
- <a class="nav-link" href="<%=h relative_path_uri(param[:base_uri], param[:base_uri]) %>">Home</a>
48
+ <a class="nav-link" href="<%=h relative_path_uri(param[:base_uri]) %>">Home</a>
49
49
  </li>
50
50
  <li class="nav-item<%= ' active' if @template == "about.html.erb" %>">
51
51
  <a class="nav-link" href="<%=h relative_path(param[:about_file] || "about.html") %>">About</a>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ttl2html
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masao Takaku
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-26 00:00:00.000000000 Z
11
+ date: 2022-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri