Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nav titles to not HTML escape #101

Merged
merged 1 commit into from
Nov 8, 2023
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
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Authors@R: c(
family = "Davey",
role = c("ctb"),
email = "[email protected]",
comment = c(ORCID = "0000-0002-5589-7754")),
comment = c(ORCID = "0000-0002-5589-7754")),
person()
)
Description: This package does nothing but contain template HTML CSS and JS files.
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
setting the background-color to #FFFFFF (reported: @sarahmbrown,
https://github.com/carpentries/workbench/issues/76 (#99); fixed
@froggleston, #100)
* Back and forward navigation titles have been fixed to keep raw content and
not escape characters (reported: @tobyhodges,
https://github.com/carpentries/workbench/issues/71 (#98); fixed
@froggleston, #101)

# varnish 0.3.1

Expand Down
8 changes: 4 additions & 4 deletions inst/pkgdown/templates/content-chapter.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
{{#page_back}}
<a class="chapter-link" href="{{#site}}{{root}}{{/site}}{{page_back}}" rel="prev">
<i aria-hidden="true" class="small-arrow" data-feather="arrow-left"></i>
{{#back_title}}Previous: {{back_title}}{{/back_title}}{{^back_title}}Home{{/back_title}}
{{#back_title}}Previous: {{{back_title}}}{{/back_title}}{{^back_title}}Home{{/back_title}}
</a>
{{/page_back}}
{{#page_forward}}
<a class="chapter-link float-end" href="{{#site}}{{root}}{{/site}}{{page_forward}}" rel="next">
{{#forward_title}}Next: {{forward_title}}... {{/forward_title}}{{^forward_title}}Home{{/forward_title}}
{{#forward_title}}Next: {{{forward_title}}}... {{/forward_title}}{{^forward_title}}Home{{/forward_title}}
<i aria-hidden="true" class="small-arrow" data-feather="arrow-right"></i>
</a>
{{/page_forward}}
Expand Down Expand Up @@ -68,12 +68,12 @@ <h1>{{& pagetitle}}</h1>
{{#page_back}}
<a class="chapter-link" href="{{#site}}{{root}}{{/site}}{{page_back}}" rel="prev">
<i aria-hidden="true" class="small-arrow" data-feather="arrow-left"></i>
{{#back_title}}Previous: {{back_title}}{{/back_title}}{{^back_title}}Home{{/back_title}}
{{#back_title}}Previous: {{{back_title}}}{{/back_title}}{{^back_title}}Home{{/back_title}}
</a>
{{/page_back}}
{{#page_forward}}
<a class="chapter-link float-end" href="{{#site}}{{root}}{{/site}}{{page_forward}}" rel="next">
{{#forward_title}}Next: {{forward_title}}... {{/forward_title}}{{^forward_title}}Home{{/forward_title}}
{{#forward_title}}Next: {{{forward_title}}}... {{/forward_title}}{{^forward_title}}Home{{/forward_title}}
<i aria-hidden="true" class="small-arrow" data-feather="arrow-right"></i>
</a>
{{/page_forward}}
Expand Down
4 changes: 2 additions & 2 deletions inst/pkgdown/templates/content-syllabus.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<!-- content for large screens -->
<div class="d-none d-sm-none d-md-block">
{{#page_forward}}
<a class="chapter-link float-end" href="{{#site}}{{root}}{{/site}}{{page_forward}}" rel="next">Next{{#forward_title}}: {{forward_title}}{{/forward_title}}... <i aria-hidden="true" class="small-arrow" data-feather="arrow-right"></i></a>
<a class="chapter-link float-end" href="{{#site}}{{root}}{{/site}}{{page_forward}}" rel="next">Next{{#forward_title}}: {{{forward_title}}}{{/forward_title}}... <i aria-hidden="true" class="small-arrow" data-feather="arrow-right"></i></a>
{{/page_forward}}
</div>
<hr/>
Expand Down Expand Up @@ -50,7 +50,7 @@ <h1 class="schedule-heading">{{{pagetitle}}}</h1>
<!-- content for large screens -->
<div class="d-none d-sm-none d-md-block">
{{#page_forward}}
<a class="chapter-link float-end" href="{{#site}}{{root}}{{/site}}{{page_forward}}" rel="next">Next{{#forward_title}}: {{forward_title}}{{/forward_title}}... <i aria-hidden="true" class="small-arrow" data-feather="arrow-right"></i></a>
<a class="chapter-link float-end" href="{{#site}}{{root}}{{/site}}{{page_forward}}" rel="next">Next{{#forward_title}}: {{{forward_title}}}{{/forward_title}}... <i aria-hidden="true" class="small-arrow" data-feather="arrow-right"></i></a>
{{/page_forward}}
</div>
</nav>
Expand Down
Loading