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

Make sure root_path() always points to lesson root #532

Merged
merged 4 commits into from
Oct 16, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ Authors@R: c(
family = "Gruson",
role = c("ctb"),
email = "hugo.gruson+R@normalesup.org"),
person(given = "Milan",
family = "Malfait",
role = c("ctb"),
email = "milan.malfait94@gmail.com",
comment = c(ORCID = "0000-0001-9144-3701")),
person())
Description: We provide tools to build a Carpentries-themed lesson repository
into an accessible standalone static website. These include local tools and
Expand Down
11 changes: 11 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
# sandpaper 0.14.0.9000 (unreleased)

## NEW FEATURES

* Content for learners now accessible through instructor view. The instructor
view "More" dropdown menu item will now have links to learner view items
appended. Note that when clicking these links, the user will remain in
instructor view. This behaviour may change in future iterations (reported:
@karenword, #394; fixed: @ErinBecker, #530, reviewed: @zkamvar)

## BUG FIX

* Internal `build_status()` function: make sure `root_path()` always points
to lesson root (reported: @milanmlft, #531; fixed: @milanmlft, #532)

## MISC

* Added @milanmlft as contributor

# sandpaper 0.14.0 (2023-10-02)

## NEW FEATURES
Expand Down
6 changes: 1 addition & 5 deletions R/utils-built-db.R
Original file line number Diff line number Diff line change
Expand Up @@ -293,11 +293,7 @@ build_status <- function(sources, db = "site/built/md5sum.txt", rebuild = FALSE,

# If we have a single source passed in, this means that we want to update it
# in the database and force it to rebuild
if (build_one) {
root_path <- root_path(sources)
} else {
root_path <- fs::path_common(sources)
}
root_path <- root_path(fs::path_common(sources)) # ensure we're at the actual lesson root path
sources <- fs::path_rel(sources, start = root_path)

built_path <- fs::path_rel(fs::path_dir(db), root_path)
Expand Down