-
-
Notifications
You must be signed in to change notification settings - Fork 290
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
switch jump links to use identifiers #1497
Comments
@zkamvar thislooks like within page jump links are not being processed the same as they did before. |
Oh that's an interesting feature/bug! It looks like pandoc's
I believe the solution is for me to update {sandpaper} to use the As for why |
Another solution before I fix carpentries/sandpaper#403 is to add identifiers to these sections: 1. [Make a small contribution to a lesson or glossary](#contributions).
2. [Take part in an online community discussion session](#discussion).
3. [Take part in an online teaching demonstration session](#demonstration).
## 1\. Lesson Contributions {#contributions}
...
## 2\. Community Discussion {#discussion}
...
## 3\. Teaching Demonstration {#demonstration} |
I personally like the identifiers because it makes the links more explicit and decouples the linking from the displayed title (eg we can make an update to the section headers without having to update the links) but I am interested in what other @carpentries/instructor-training-maintainers think on this, especially @karenword because in practice she does the most writing in the curriculum. |
I'd second the preference to decouple links from titles/headers as a way to make our code more robust and reduce the need to adjust multiple things at once when changes/maintenance happen. |
Using identifiers makes sense to me. I was only using headers because that's what I knew how to do. :) Happy to learn a better way! |
I'm going to update the title of this issue to match the required action, of switching to identifiers. We will need to fix this at least in this section, but should probably also search through the curriculum for similar cases, but I am not exactly sure how to search for this issue... |
I've gone ahead and searched for you (which also highlights some work I need to do with the validators), and there are no other links like this across the lesson that need to be fixed. library("pegboard")
library("purrr") # for map_dfr
it <- get_lesson("carpentries/instructor-training", jekyll = FALSE)
#> Loading required namespace: gert
extra_links <- purrr::map_dfr(it$extra, function(x) x$validate_links())
#
# [lots of output here revealing http links that Zhian missed during conversions]
#
extra_links[grepl("^[0-9]", extra_links$fragment), c("orig", "text", "sourcepos", "filepath")]
#> orig
#> 190 #1-lesson-contributions
#> 191 #2-community-discussion
#> 192 #3-teaching-demonstration
#> text sourcepos
#> 190 Make a small contribution to a lesson or glossary 14
#> 191 Take part in an online community discussion session 15
#> 192 Take part in an online teaching demonstration session 16
#> filepath
#> 190 learners/checkout.md
#> 191 learners/checkout.md
#> 192 learners/checkout.md
links <- it$validate_links()
links[grepl("^[0-9]", links$fragment), c("orig", "text", "sourcepos", "filepath")]
#> [1] orig text sourcepos filepath
#> <0 rows> (or 0-length row.names) Created on 2023-03-09 with reprex v2.0.2 |
One little update on this, while I was fixing the instructor view, I found that there are empty ID anchors that can be switched to use the curly anchor syntax in demo_lessons:
The empty anchors were a bit of a workaround to allow creation of a table of contents: a30a340 |
During my processing of this lesson, I had not enabled link validation of the auxilary markdown files (that is, non-episode files), so a lot of them had https links and sneaky ways of creating anchor links that were not accessible (see #1497 (comment)) As of the update to {pegboard} 0.5.0, these external files are now processed.
I have updated the anchor links in instructor notes and checkout so that they will be consistent This will fix #1497
Note: https://preview.carpentries.org/instructor-training/instructor/checkout.html#id_1-lesson-contributions Instructor teaching demo link is broken.
The text was updated successfully, but these errors were encountered: