Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/_components/shared/sidebar.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@ side-bar {

aside {
padding: var(--spacing-14) var(--spacing-4);

> button {
display: none;
}
}

:is(h1) {
:is(h2) {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
font-size: var(--text-l);
align-items: baseline;
font-size: var(--text-xl);
margin-block-end: var(--spacing-4);

span {
Expand Down
1 change: 1 addition & 0 deletions src/_components/shared/sidebar.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<svg width="11" height="12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="m10 6 .543.517a.75.75 0 0 0 0-1.034L10 6ZM0 6.75h10v-1.5H0v1.5Zm10.543-1.267-4.762-5-1.086 1.034 4.762 5 1.086-1.034Zm-1.086 0-4.762 5 1.086 1.034 4.762-5-1.086-1.034Z" fill="#025FD7"/></svg>
Hide menu
</button>
<%= slotted :before %>
<ul class="sidebar-list" data-controller="sidebar">
<% @data.each do |page| %>
<li>
Expand Down
2 changes: 1 addition & 1 deletion src/_guides/openapi/specification/v3.1/_defaults.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
sidebar_version: "v3.1"
sidebar_version: "3.1"
sidebar_name: openapi_v3-1
5 changes: 3 additions & 2 deletions src/_layouts/documentation.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ layout: application
<%= render Shared::Sidebar.new(data: @entries, current: resource) do |sidebar| %>
<% if resource.data.sidebar_title.present? %>
<% sidebar.slot :before do %>
<h1>
<h2>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have another h1 in this page ?
It can be a SEO leak to not have a h1

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's because there is already a h1 on this page that I modified to h2

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And before this PR, the 'h1' title with content resource.data.sidebar_title was never rendered (because slot was missing)

<%= resource.data.sidebar_title %>
<% # TODO: replace by select with version v3.2 %>
<span class="version"><%= resource.data.sidebar_version %></span>
</h1>
</h2>
<% end %>
<% end %>
<% if resource.data.display_cta.present? %>
Expand Down