govuk_tech_docs 6.6.0.1 → 6.6.0.2.rc
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 +3 -0
- data/lib/govuk_tech_docs/table_of_contents/helpers.rb +6 -3
- data/lib/govuk_tech_docs/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d6e328084d2f13b8f8e68129ba49e81d665d6ec8f72ee36124744b3d59ee2746
|
|
4
|
+
data.tar.gz: 677f49e76228b855545387d892f598e99dab171faf26f4bb4b57fb334ad02d39
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4e027b5f33816e9e0e892acb272bd70326d761fda26c3b3d92b7f56a085d5bebf81060e60d1bf31f12580c23dc5f1f87bb4c13ead563189f2c2650309c67f16c
|
|
7
|
+
data.tar.gz: 2df2a47ac7fc68b6231ff86abaef8c229c1ffac8bf9ef71980e6a1997f8d433492fa9ff6034f654f37288d04122c6c64a7b68596c5dcc7a25d7251acca262b12
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
## Unreleased changes
|
|
2
2
|
|
|
3
|
+
## 6.6.0.2.rc
|
|
4
|
+
- Fix missing top-level pages in multipage navigation when a custom `http_prefix` is configured ([issue 488](https://github.com/alphagov/tech-docs-gem/issues/488)).
|
|
5
|
+
|
|
3
6
|
## 6.6.0.1
|
|
4
7
|
|
|
5
8
|
- Fix sticky TOC fighting page scroll: keep the active nav item visible by scrolling only the sidebar pane, not the window, so a long table of contents no longer blocks reaching the footer
|
|
@@ -30,14 +30,17 @@ module GovukTechDocs
|
|
|
30
30
|
.to_a
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
-
def select_top_level_html_files(resources)
|
|
33
|
+
def select_top_level_html_files(resources, config = nil)
|
|
34
|
+
http_prefix = config&.[](:http_prefix).to_s
|
|
35
|
+
home_url = http_prefix.end_with?("/") ? http_prefix : "#{http_prefix}/"
|
|
36
|
+
|
|
34
37
|
resources
|
|
35
|
-
.select { |r| r.path.end_with?(".html") && (r.parent.nil? || r.parent.url ==
|
|
38
|
+
.select { |r| r.path.end_with?(".html") && (r.parent.nil? || r.parent.url == home_url) }
|
|
36
39
|
end
|
|
37
40
|
|
|
38
41
|
def multi_page_table_of_contents(resources, current_page, config, current_page_html = nil, include_child_resources: true)
|
|
39
42
|
resources = sort_resources_stably(
|
|
40
|
-
select_top_level_html_files(resources),
|
|
43
|
+
select_top_level_html_files(resources, config),
|
|
41
44
|
)
|
|
42
45
|
|
|
43
46
|
render_page_tree(resources, current_page, config, current_page_html, include_child_resources:)
|