-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Allow overview pages #132
Merged
Merged
Allow overview pages #132
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If there is a situation where a lesson contains both a _config.yml and config.yaml, then that's an indication that an upstream conversion did not go well and needs to be investigated.
5 tasks
klbarnes20
reviewed
Aug 28, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tested this and everything seems to work. I have added a few minor non-blocking suggestions.
This makes the statement more clear (thanks to @klbarnes20 for the suggestion)
Co-authored-by: Kelly Barnes <[email protected]>
…d into allow-overview-pages
I had initially tried to design this to account for the librarycarpentry overview lesson, which had episodes, but I realized that it could just be coded as a standard lesson without necessarily gaining overview status and that if they wanted to switch over, it would be a matter of moving the episode subfolders to the top directory and adding the `overview: true` yaml item to the config.
I've added the `reviewed by \@name` syntax to the NEWS items and have added @ErinBecker and @klbarnes20 to their respective reviews
Since Kelly gave it a positive review and the changes were nonblocking I will merge this. Thank you for your review @klbarnes20! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This will allow workshop overview pages to be processed even if they do not have any episodes.
There is a new
$overview
field for theLesson
object that is set toTRUE
if we detect that the lesson is an overview.For lessons built with The Workbench, this requires the
overview: true
YAML item. For lessons built with Jekyll, this inelegantly checks that the folder name ends with-workshop
(which is violated by the LibraryCarpentry lesson using-overview
, but it's moot since that lesson has episodes).This addresses part of carpentries/workbench#65
To review this PR, start by reviewing the changes in the Lesson.R file (note: the
Lesson$new()
is defined by theinitialize
method. This is where everything flows from, which looks like this where new functions are labelled as[NEW]
:I've split out the processing for the sandpaper lessons into its own function because the initializer was a little too complex.
I've also split out the functionality to sort files by the order of the config in read_markdown_files because it was also pretty complext to read initially.
NOTE: I am bumping the minor version number since this is a new feature.
Testing
You can test this version of {pegboard} by using the pull request helpers from the {usethis} package inside your local clone of {pegboard}
When you are finished, run:
If everything works, you should see this output:
Created on 2023-08-08 with reprex v2.0.2
This will fix #118