Skip to content

Commit 0070f6f

Browse files
authored
Merge pull request #10254 from mcanouil/fix/issue10251
fix: wrong object used in EJS to get logo-alt for sidebar
2 parents cfb0e15 + 876d3a2 commit 0070f6f

File tree

4 files changed

+37
-2
lines changed

4 files changed

+37
-2
lines changed

news/changelog-1.7.md

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ All changes included in 1.7:
1313
## YAML validation
1414

1515
- ([#11654](https://github.com/quarto-dev/quarto-cli/issues/11654)): Allow `page-inset` as value in `column` key for code cells.
16+
- ([#10251](https://github.com/quarto-dev/quarto-cli/issues/10251)): EJS template for website now uses proper object to get alt text for logo in sidebar.
1617
- ([#12151](https://github.com/quarto-dev/quarto-cli/issues/12151)): Fix YAML validation in computations cell on Windows.
1718
- ([#12151](https://github.com/quarto-dev/quarto-cli/pull/12151)): Basic YAML validation is now active in cell for document using Julia engine.
1819

src/resources/projects/website/templates/sidebar.ejs

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<div class="pt-lg-2 mt-2 <%= alignCss %> sidebar-header<%= sidebar.logo && sidebar.title ? ' sidebar-header-stacked' : '' %>">
3737
<% if (sidebar.logo) { %>
3838
<a href="<%- sidebar['logo-href'] || '/index.html' %>" class="sidebar-logo-link">
39-
<img src="<%- sidebar.logo %>" alt="<%- navbar['logo-alt'] || '' %>" class="sidebar-logo py-0 d-lg-inline d-none"/>
39+
<img src="<%- sidebar.logo %>" alt="<%- sidebar['logo-alt'] || '' %>" class="sidebar-logo py-0 d-lg-inline d-none"/>
4040
</a>
4141
<% } %>
4242
<% if (needsTools && toolsLocation === "logo") { %>
@@ -92,4 +92,4 @@
9292
<% } %>
9393

9494
</nav>
95-
<div id="quarto-sidebar-glass" class="quarto-sidebar-collapse-item" data-bs-toggle="collapse" data-bs-target=".quarto-sidebar-collapse-item" ></div>
95+
<div id="quarto-sidebar-glass" class="quarto-sidebar-collapse-item" data-bs-toggle="collapse" data-bs-target=".quarto-sidebar-collapse-item" ></div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
project:
2+
type: website
3+
4+
website:
5+
title: "issue-10251"
6+
navbar:
7+
logo: "https://quarto.org/quarto.png"
8+
logo-alt: "this is the alt text that for the logo in the navbar"
9+
left:
10+
- href: index.qmd
11+
text: Home
12+
sidebar:
13+
logo: "https://quarto.org/quarto.png"
14+
logo-alt: "this is the alt text that for the logo in the sidebar"
15+
16+
format:
17+
html:
18+
theme: cosmo
19+
toc: true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: "issue-10251"
3+
_quarto:
4+
tests:
5+
html:
6+
ensureFileRegexMatches:
7+
- [
8+
'<img src="https://quarto.org/quarto.png" alt="this is the alt text that for the logo in the sidebar" class="sidebar-logo py-0 d-lg-inline d-none">',
9+
'<img src="https://quarto.org/quarto.png" alt="this is the alt text that for the logo in the navbar" class="navbar-logo">'
10+
]
11+
---
12+
13+
This is a Quarto website.
14+
15+
To learn more about Quarto websites visit <https://quarto.org/docs/websites>.

0 commit comments

Comments
 (0)