Skip to content

Commit

Permalink
Merge pull request #366 from carpentries/fix-364
Browse files Browse the repository at this point in the history
fix index title to be clear for learner view
  • Loading branch information
zkamvar authored Nov 14, 2022
2 parents d94acec + 1bd04bf commit 144b044
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ MISC
* Documentation for automated pull requests updated to reflect bots should have
`public_repo` scope.

BUG FIX
-------

* A bug where the index page title was the same for both instructor and learner
view has been fixed (reported: @tobyhodges, #361; fixed @zkamvar, #366)

# sandpaper 0.10.7

CONTINUOUS INTEGRATION
Expand Down
5 changes: 3 additions & 2 deletions R/build_home.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ build_home <- function(pkg, quiet, sidebar = NULL, new_setup = TRUE, next_page =
fix_nodes(setup)

nav <- get_nav_data(idx_file, fs::path_file(idx_file), page_forward = next_page)
needs_title <- nav$pagetitle == ""

if (nav$pagetitle == "") {
if (needs_title) {
nav$pagetitle <- "Summary and Schedule"
}
nav$page_forward <- as_html(nav$page_forward, instructor = TRUE)
Expand All @@ -32,7 +33,7 @@ build_home <- function(pkg, quiet, sidebar = NULL, new_setup = TRUE, next_page =
page_globals$instructor$set("readme", use_instructor(html))
page_globals$instructor$set("setup", use_instructor(setup))

if (nav$pagetitle == "") {
if (needs_title) {
nav$pagetitle <- "Summary and Setup"
}
nav$page_forward <- as_html(nav$page_forward)
Expand Down

0 comments on commit 144b044

Please sign in to comment.