-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We think it might really help our SEO to have guide content on one page. The how to vote page is particularly interesting because we have some data about searching intents that might bring people to this page. We also think that amending this format to a single page might benefit voice answers. There are some existing issues with guides having multiple h1 tags on a page. This PR doesn't attempt to fix it (and in a way makes it worse) because we have more h1s on the page than we used to. I'm led to believe that this is not relevant to WCAG by this [trello card on the GOV.UK accessibility backlog](https://trello.com/c/LzxvPjUz/117-fix-multiple-h1-heading-structure). Other than that, this has been mostly stolen from the existing guide layout, only including all of the parts.
- Loading branch information
Showing
4 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<% content_for :extra_head_content do %> | ||
<%= machine_readable_metadata( | ||
schema: :article, | ||
canonical_url: @content_item.canonical_url, | ||
body: @content_item.current_part_body | ||
) %> | ||
<% end %> | ||
|
||
<script type="application/ld+json"> | ||
<%= raw MachineReadable::GuideFaqPageSchemaPresenter.new(@content_item).structured_data.to_json %> | ||
</script> | ||
|
||
<% content_for :simple_header, true %> | ||
|
||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
<%= render 'govuk_publishing_components/components/title', { title: @content_item.content_title } %> | ||
|
||
<% if @content_item.show_guide_navigation? %> | ||
<aside class="part-navigation-container" role="complementary"> | ||
<%= render "govuk_publishing_components/components/contents_list", aria_label: 'Pages in this guide', contents: @content_item.part_link_elements, underline_links: true %> | ||
</aside> | ||
<% end %> | ||
</div> | ||
|
||
<div class="govuk-grid-column-two-thirds"> | ||
<% if @content_item.has_parts? %> | ||
|
||
<% @content_item.parts.each do |part| %> | ||
<h1 id=<%= part["slug"] %> class="part-title"> | ||
<%= part["title"] %> | ||
</h1> | ||
|
||
<%= render 'govuk_publishing_components/components/govspeak', | ||
content: part["body"].html_safe, | ||
direction: page_text_direction, | ||
disable_youtube_expansions: true %> | ||
|
||
<% end %> | ||
<%= render 'components/print-link', href: @content_item.print_link, link_text: t("multi_page.print_entire_guide") %> | ||
<% end %> | ||
</div> | ||
|
||
<%= render 'shared/sidebar_navigation' %> | ||
</div> | ||
|
||
<%= render 'shared/footer_navigation' %> |