From fa235c7ab80dd9b2b73312968a19322140351f0c Mon Sep 17 00:00:00 2001 From: Quarto GHA Workflow Runner Date: Tue, 26 Nov 2024 00:11:26 +0000 Subject: [PATCH] Built site for gh-pages --- .nojekyll | 2 +- features.html | 4 +- flight-rules.html | 4 +- flow.html | 4 +- hotfixes.html | 4 +- index.html | 4 +- intro.html | 4 +- pegboard/intro.html | 4 +- references.html | 4 +- releases.html | 4 +- remote/deploy.html | 4 +- remote/intro.html | 4 +- remote/pull-request.html | 4 +- sandpaper/building-html.html | 6 +-- sandpaper/global-state.html | 16 +++---- sandpaper/intro.html | 4 +- sandpaper/package-cache.html | 4 +- sandpaper/testing.html | 4 +- search.json | 6 +-- setup.html | 4 +- ...ting-23b5d515405460ba008ebd3366b1cbf2.css} | 2 +- sitemap.xml | 44 +++++++++---------- sop.html | 4 +- summary.html | 4 +- testing.html | 4 +- varnish/intro.html | 4 +- 26 files changed, 78 insertions(+), 78 deletions(-) rename site_libs/quarto-html/{quarto-syntax-highlighting-01c78b5cd655e4cd89133cf59d535862.css => quarto-syntax-highlighting-23b5d515405460ba008ebd3366b1cbf2.css} (97%) diff --git a/.nojekyll b/.nojekyll index 5865d6a..48d4064 100644 --- a/.nojekyll +++ b/.nojekyll @@ -1 +1 @@ -5e5503fb \ No newline at end of file +cd8d37fd \ No newline at end of file diff --git a/features.html b/features.html index be7893a..56f722d 100644 --- a/features.html +++ b/features.html @@ -2,7 +2,7 @@ - + @@ -38,7 +38,7 @@ - + diff --git a/flight-rules.html b/flight-rules.html index cba73ad..365fbf0 100644 --- a/flight-rules.html +++ b/flight-rules.html @@ -2,7 +2,7 @@ - + @@ -71,7 +71,7 @@ - + diff --git a/flow.html b/flow.html index 9bc38f8..f02108b 100644 --- a/flow.html +++ b/flow.html @@ -2,7 +2,7 @@ - + @@ -38,7 +38,7 @@ - + diff --git a/hotfixes.html b/hotfixes.html index 31e3708..8b2a3dc 100644 --- a/hotfixes.html +++ b/hotfixes.html @@ -2,7 +2,7 @@ - + @@ -72,7 +72,7 @@ - + diff --git a/index.html b/index.html index da74e9e..1732e61 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,7 @@ - + @@ -59,7 +59,7 @@ - + diff --git a/intro.html b/intro.html index b41c280..68fdeb0 100644 --- a/intro.html +++ b/intro.html @@ -2,7 +2,7 @@ - + @@ -38,7 +38,7 @@ - + diff --git a/pegboard/intro.html b/pegboard/intro.html index b072f48..ea71774 100644 --- a/pegboard/intro.html +++ b/pegboard/intro.html @@ -2,7 +2,7 @@ - + @@ -38,7 +38,7 @@ - + diff --git a/references.html b/references.html index 9ddfd45..66955fe 100644 --- a/references.html +++ b/references.html @@ -2,7 +2,7 @@ - + @@ -57,7 +57,7 @@ - + diff --git a/releases.html b/releases.html index 9b709fe..08271d2 100644 --- a/releases.html +++ b/releases.html @@ -2,7 +2,7 @@ - + @@ -72,7 +72,7 @@ - + diff --git a/remote/deploy.html b/remote/deploy.html index b7e1405..f310a75 100644 --- a/remote/deploy.html +++ b/remote/deploy.html @@ -2,7 +2,7 @@ - + @@ -72,7 +72,7 @@ - + diff --git a/remote/intro.html b/remote/intro.html index 33d2bb2..e69d25a 100644 --- a/remote/intro.html +++ b/remote/intro.html @@ -2,7 +2,7 @@ - + @@ -72,7 +72,7 @@ - + diff --git a/remote/pull-request.html b/remote/pull-request.html index a85216c..36c51aa 100644 --- a/remote/pull-request.html +++ b/remote/pull-request.html @@ -2,7 +2,7 @@ - + @@ -38,7 +38,7 @@ - + diff --git a/sandpaper/building-html.html b/sandpaper/building-html.html index 2801133..7bc1203 100644 --- a/sandpaper/building-html.html +++ b/sandpaper/building-html.html @@ -2,7 +2,7 @@ - + @@ -72,7 +72,7 @@ - + @@ -687,7 +687,7 @@

- + @@ -72,7 +72,7 @@ - + @@ -418,7 +418,7 @@

@@ -457,7 +457,7 @@

@@ -472,13 +472,13 @@

< .build_paths$source <- root_path(path) %||% .build_paths$source invisible(.build_paths$source) } -<bytecode: 0x5600f1d28ef0> +<bytecode: 0x5641121984d8> <environment: namespace:sandpaper>
-
time elapsed: 2.156072 secs
+
time elapsed: 3.046802 secs
@@ -495,13 +495,13 @@

< { .build_paths$source <- NULL } -<bytecode: 0x5600f25d1d78> +<bytecode: 0x564112a44338> <environment: namespace:sandpaper>

-
time elapsed: 1.088229 secs
+
time elapsed: 1.094981 secs
diff --git a/sandpaper/intro.html b/sandpaper/intro.html index 7b4694b..7356b99 100644 --- a/sandpaper/intro.html +++ b/sandpaper/intro.html @@ -2,7 +2,7 @@ - + @@ -38,7 +38,7 @@ - + diff --git a/sandpaper/package-cache.html b/sandpaper/package-cache.html index d82366d..a6b5f7e 100644 --- a/sandpaper/package-cache.html +++ b/sandpaper/package-cache.html @@ -2,7 +2,7 @@ - + @@ -92,7 +92,7 @@ - + diff --git a/sandpaper/testing.html b/sandpaper/testing.html index d496426..cfa4221 100644 --- a/sandpaper/testing.html +++ b/sandpaper/testing.html @@ -2,7 +2,7 @@ - + @@ -38,7 +38,7 @@ - + diff --git a/search.json b/search.json index 9a88643..dee5ee2 100644 --- a/search.json +++ b/search.json @@ -448,7 +448,7 @@ "href": "sandpaper/global-state.html", "title": "8  The global state in {sandpaper}", "section": "", - "text": "8.1 When {sandpaper} is loaded\nWhen {sandpaper} is loaded (either by attatchment with library() or invocation with ::, a function called .onLoad() (which lives in R/zzz.R) is evaluated:\nsandpaper:::.onLoad\n\nfunction (libname, pkgname) \n{\n ns <- asNamespace(pkgname)\n delayedAssign(\"GITIGNORED\", gitignore_items(), eval.env = ns, \n assign.env = ns)\n op <- getOption(\"sandpaper.use_renv\")\n if (is.null(op)) {\n try_use_renv()\n }\n establish_translation_vars()\n invisible()\n}\n<bytecode: 0x5600efbc48b8>\n<environment: namespace:sandpaper>\nThis does a few things:", + "text": "8.1 When {sandpaper} is loaded\nWhen {sandpaper} is loaded (either by attatchment with library() or invocation with ::, a function called .onLoad() (which lives in R/zzz.R) is evaluated:\nsandpaper:::.onLoad\n\nfunction (libname, pkgname) \n{\n ns <- asNamespace(pkgname)\n delayedAssign(\"GITIGNORED\", gitignore_items(), eval.env = ns, \n assign.env = ns)\n op <- getOption(\"sandpaper.use_renv\")\n if (is.null(op)) {\n try_use_renv()\n }\n establish_translation_vars()\n invisible()\n}\n<bytecode: 0x5641100348f0>\n<environment: namespace:sandpaper>\nThis does a few things:", "crumbs": [ "{sandpaper} User Interface", "8  The global state in {sandpaper}" @@ -470,7 +470,7 @@ "href": "sandpaper/global-state.html#building-the-lesson", "title": "8  The global state in {sandpaper}", "section": "8.2 Building the lesson", - "text": "8.2 Building the lesson\nAll functions that build a lesson go through build_lesson():\n\nsandpaper::build_lesson\n\nfunction (path = \".\", rebuild = FALSE, quiet = !interactive(), \n preview = TRUE, override = list()) \n{\n check_pandoc()\n slugpath <- get_build_slug(path, quiet = quiet)\n slug <- slugpath$slug\n path <- slugpath$path\n on.exit({\n reset_build_paths()\n })\n validate_lesson(path, quiet = quiet)\n built <- build_markdown(path = path, rebuild = rebuild, quiet = quiet, \n slug = slug)\n build_site(path = path, quiet = quiet, preview = preview, \n override = override, slug = slug, built = built)\n}\n<bytecode: 0x5600f39eeda0>\n<environment: namespace:sandpaper>\n\n\n\n8.2.1 Step 1: set an anchor\nBecause all of the lesson functions need to understand where the lesson exists on the file system, we want to record the root path while a lesson is being deployed. When build_lesson() is run, it calls the set_source_path() function, which records the root of the lesson (as determined by the presence of an “episodes” directory, OR a “site” directory, OR a “learners” directory, OR an “instructors” directory, OR a “profiles” directory) in a global envioronment called .build_paths$source:\n\nsandpaper:::set_source_path\n\nfunction (path) \n{\n .build_paths$source <- root_path(path) %||% .build_paths$source\n invisible(.build_paths$source)\n}\n<bytecode: 0x5600f1d28ef0>\n<environment: namespace:sandpaper>\n\n\n\n\ntime elapsed: 2.156072 secs\n\n\n\n\n\nset_source_path() establishes the root of the lesson\n\n\nWhen the function exits, the reset_build_paths() function is called to reset the build path to NULL so that it could be used for a new lesson.\n\nsandpaper:::reset_build_paths\n\nfunction () \n{\n .build_paths$source <- NULL\n}\n<bytecode: 0x5600f25d1d78>\n<environment: namespace:sandpaper>\n\n\n\n\ntime elapsed: 1.088229 secs\n\n\n\n\n\nreset_build_paths() establishes the root of the lesson\n\n\n\n\n8.2.2 Step 2: Validate and setup global variables\nWhen validate_lesson() is called, it kicks off a cascade that stores lesson-specific variables and strings for {varnish} into the language of the lesson. This process is described in The Data Flow vingette for {sandpaper}", + "text": "8.2 Building the lesson\nAll functions that build a lesson go through build_lesson():\n\nsandpaper::build_lesson\n\nfunction (path = \".\", rebuild = FALSE, quiet = !interactive(), \n preview = TRUE, override = list()) \n{\n check_pandoc()\n slugpath <- get_build_slug(path, quiet = quiet)\n slug <- slugpath$slug\n path <- slugpath$path\n on.exit({\n reset_build_paths()\n })\n validate_lesson(path, quiet = quiet)\n built <- build_markdown(path = path, rebuild = rebuild, quiet = quiet, \n slug = slug)\n build_site(path = path, quiet = quiet, preview = preview, \n override = override, slug = slug, built = built)\n}\n<bytecode: 0x564113e5f630>\n<environment: namespace:sandpaper>\n\n\n\n8.2.1 Step 1: set an anchor\nBecause all of the lesson functions need to understand where the lesson exists on the file system, we want to record the root path while a lesson is being deployed. When build_lesson() is run, it calls the set_source_path() function, which records the root of the lesson (as determined by the presence of an “episodes” directory, OR a “site” directory, OR a “learners” directory, OR an “instructors” directory, OR a “profiles” directory) in a global envioronment called .build_paths$source:\n\nsandpaper:::set_source_path\n\nfunction (path) \n{\n .build_paths$source <- root_path(path) %||% .build_paths$source\n invisible(.build_paths$source)\n}\n<bytecode: 0x5641121984d8>\n<environment: namespace:sandpaper>\n\n\n\n\ntime elapsed: 3.046802 secs\n\n\n\n\n\nset_source_path() establishes the root of the lesson\n\n\nWhen the function exits, the reset_build_paths() function is called to reset the build path to NULL so that it could be used for a new lesson.\n\nsandpaper:::reset_build_paths\n\nfunction () \n{\n .build_paths$source <- NULL\n}\n<bytecode: 0x564112a44338>\n<environment: namespace:sandpaper>\n\n\n\n\ntime elapsed: 1.094981 secs\n\n\n\n\n\nreset_build_paths() establishes the root of the lesson\n\n\n\n\n8.2.2 Step 2: Validate and setup global variables\nWhen validate_lesson() is called, it kicks off a cascade that stores lesson-specific variables and strings for {varnish} into the language of the lesson. This process is described in The Data Flow vingette for {sandpaper}", "crumbs": [ "{sandpaper} User Interface", "8  The global state in {sandpaper}" @@ -558,7 +558,7 @@ "href": "sandpaper/building-html.html#post-processing-with-xpath", "title": "10  Building HTML", "section": "10.3 Post-processing with XPath", - "text": "10.3 Post-processing with XPath\nBefore the HTML can be passed to the template, it needs to be tweaked a bit. There are two reasons why we would need to tweak the HTML:\n\nWe want to add a feature that is not supported in pandoc (or at least older versions)\nWe need to structurally rearrange pandoc defaults to match our template\n\nTo do this, we read in the HTML with xml2::read_html() and then manipulate it using the sandpaper internal function fix_nodes(), which is called by the following functions:\n\n\n\nfix_nodes() depends on build_site()\n\n\nIn turn, fix_nodes() will call this cascade of XML manipulating functions:\n\nsandpaper:::fix_nodes\n\nfunction (nodes = NULL) \n{\n if (length(nodes) == 0) \n return(nodes)\n translate_overview(nodes)\n fix_headings(nodes)\n fix_accordions(nodes)\n fix_callouts(nodes)\n fix_codeblocks(nodes)\n fix_figures(nodes)\n fix_setup_link(nodes)\n}\n<bytecode: 0x555a6a932678>\n<environment: namespace:sandpaper>\n\n\n\n\n\nCall tree for fix_nodes()\n\n\nI will show the effects of each of these functions one by one, but first, here’s a couple of functions that will help me demonstrate so I don’t have to keep retyping an copying/pasting:\n\nrender_and_parse <- function(txt) {\n tmp <- tempfile()\n writeLines(txt, tmp)\n return(xml2::read_html(sandpaper:::render_html(tmp)))\n}\n\nprint_html <- function(html, xpath = \".//body/*\") {\n writeLines(as.character(xml2::xml_find_all(html, xpath)))\n}\n\n\n10.3.1 translate_overview()\nThe Overview card is produced by the Lua filter, combining the objectives and questions fenced divs into one entity:\n\novr <- \"\n::: objectives\n\n- one\n\n:::\n::: questions\n\n- one?\n\n:::\"\n\nrender_and_parse(ovr) |> \n print_html()\n\n<div class=\"overview card\">\n<h2 class=\"card-header\">Overview</h2>\n<div class=\"row g-0\">\n<div class=\"col-md-4\">\n<div class=\"card-body\">\n<div class=\"inner\">\n<h3 class=\"card-title\">Questions</h3>\n<ul>\n<li>one?</li>\n</ul>\n</div>\n</div>\n</div>\n<div class=\"col-md-8\">\n<div class=\"card-body\">\n<div class=\"inner bordered\">\n<h3 class=\"card-title\">Objectives</h3>\n<ul>\n<li>one</li>\n</ul>\n</div>\n</div>\n</div>\n</div>\n</div>\n\n\nThe only purpose for translate_overview() is to translate the entities for this card into different languages, so if we use it in an English context, nothing happens, but if we use it in a Japanese context, the the translation appears:\n\nwithr::with_language(\"ja\", {\n render_and_parse(ovr) |> \n sandpaper:::translate_overview() |> \n print_html()\n})\n\n<div class=\"overview card\">\n<h2 class=\"card-header\">Overview</h2>\n<div class=\"row g-0\">\n<div class=\"col-md-4\">\n<div class=\"card-body\">\n<div class=\"inner\">\n<h3 class=\"card-title\">Questions</h3>\n<ul>\n<li>one?</li>\n</ul>\n</div>\n</div>\n</div>\n<div class=\"col-md-8\">\n<div class=\"card-body\">\n<div class=\"inner bordered\">\n<h3 class=\"card-title\">Objectives</h3>\n<ul>\n<li>one</li>\n</ul>\n</div>\n</div>\n</div>\n</div>\n</div>\n\n\n\n\n10.3.2 fix_headings()\nHeadings in The Workbench need a couple of things done:\n\nThe parent div needs to be a <section> tag\nThey need anchor links added to the headings (we took ours from {pkdown})\nThe section element needed to be a section-heading class and there needed to be an <hr> element underneath the <h2> tags.\n\nBehold!\n\nheads <- \"\n## Heading 2 {#i-am-a-section-link}\n\n### Heading 3 \n\nThis is in a section, but it's not a section\n\n## Heading 2\n\nThis is a new section\n\"\nrender_and_parse(heads) |> print_html()\n\n<div id=\"i-am-a-section-link\" class=\"section level2\">\n<h2>Heading 2</h2>\n<div id=\"heading-3\" class=\"section level3\">\n<h3>Heading 3</h3>\n<p>This is in a section, but it’s not a section</p>\n</div>\n</div>\n<div id=\"heading-2\" class=\"section level2\">\n<h2>Heading 2</h2>\n<p>This is a new section</p>\n</div>\n\nrender_and_parse(heads) |> sandpaper:::fix_headings() |> print_html()\n\n<section id=\"i-am-a-section-link\">\n<h2 class=\"section-heading\">Heading 2</h2>\n<hr class=\"half-width\">\n<div id=\"heading-3\" class=\"section level3\">\n<h3>Heading 3</h3>\n<p>This is in a section, but it’s not a section</p>\n</div>\n</section>\n<section id=\"heading-2\">\n<h2 class=\"section-heading\">Heading 2</h2>\n<hr class=\"half-width\">\n<p>This is a new section</p>\n</section>\n\n\n\n\n10.3.3 fix_accordions()\nThe only thing that happens with accordions is that they get translated:\n\naccord <- \"\n::: instructor\n\ndrink water\n\n:::\n\"\nrender_and_parse(accord) |> print_html(\".//h3/text()\")\n\n\n \n\n Instructor Note\n \n\nwithr::with_language(\"ja\", {\n render_and_parse(accord) |> \n sandpaper:::fix_accordions() |> \n print_html(\".//h3/text()\")\n})\n\n \n Instructor Note \n\n\n\n\n10.3.4 fix_callouts()\nCallouts need to have translations applied and ids adjusted:\n\nkeyps <- \"\n::: keypoints\n\n - hydrate\n\n:::\"\nrender_and_parse(keyps) |> print_html()\n\n<div id=\"keypoints1\" class=\"callout keypoints\">\n<div class=\"callout-square\">\n<i class=\"callout-icon\" data-feather=\"key\"></i>\n</div>\n<div class=\"section level3 callout-title callout-inner\">\n<h3 class=\"callout-title\">Keypoints</h3>\n<div class=\"callout-content\">\n<ul>\n<li>hydrate</li>\n</ul>\n</div>\n</div>\n</div>\n\nrender_and_parse(keyps) |> sandpaper:::fix_callouts() |> print_html()\n\n<div id=\"keypoints1\" class=\"callout keypoints\">\n<div class=\"callout-square\">\n<i class=\"callout-icon\" data-feather=\"key\"></i>\n</div>\n<div class=\"callout-inner\">\n<h3 class=\"callout-title\">Key Points</h3>\n<div class=\"callout-content\">\n<ul>\n<li>hydrate</li>\n</ul>\n</div>\n</div>\n</div>\n\n\nThe translations are also applied:\n\nwithr::with_language(\"ja\", {\n render_and_parse(keyps) |> \n sandpaper:::fix_callouts() |> \n print_html(\".//h3/text()\")\n})\n\nKey Points\n\n\n\n\n10.3.5 fix_codeblocks()\nCodeblocks have a phantom H3 attached\n\ncodes <- \"\n```r\ncat('mouse')\n```\"\nrender_and_parse(codes) |> print_html()\n\n<div class=\"sourceCode\" id=\"cb1\"><pre class=\"sourceCode r\"><code class=\"sourceCode r\"><span id=\"cb1-1\"><a href=\"#cb1-1\" tabindex=\"-1\"></a><span class=\"fu\">cat</span>(<span class=\"st\">'mouse'</span>)</span></code></pre></div>\n\nrender_and_parse(codes) |> sandpaper:::fix_codeblocks() |> print_html()\n\n<div class=\"codewrapper sourceCode\" id=\"cb1\">\n<h3 class=\"code-label\">R<i aria-hidden=\"true\" data-feather=\"chevron-left\"></i><i aria-hidden=\"true\" data-feather=\"chevron-right\"></i>\n</h3>\n<pre class=\"sourceCode r\" tabindex=\"0\"><code class=\"sourceCode r\"><span id=\"cb1-1\"><a href=\"#cb1-1\" tabindex=\"-1\"></a><span class=\"fu\">cat</span>(<span class=\"st\">'mouse'</span>)</span></code></pre>\n</div>\n\n\n\n\n10.3.6 fix_figures()\nFigures need semantic HTML <figure>, not <div> and lone images with no captions should still be figures.\n\nfigs <- \"\n![](lone-img.png){alt='tumbleweed'}\n\n![Just Sayin', Breakfast Plums, So Cold](papa-eating-plums.png){alt='an empty icebox, plums gone'}\n\"\nrender_and_parse(figs) |> print_html()\n\n<p><img src=\"lone-img.png\" alt=\"tumbleweed\"></p>\n<div class=\"float\">\n<img src=\"papa-eating-plums.png\" alt=\"an empty icebox, plums gone\"><div class=\"figcaption\">Just Sayin’, Breakfast Plums, So Cold</div>\n</div>\n\nrender_and_parse(figs) |> sandpaper:::fix_figures() |> print_html()\n\n<figure><img src=\"lone-img.png\" alt=\"tumbleweed\" class=\"figure mx-auto d-block\"></figure>\n<figure>\n<img src=\"papa-eating-plums.png\" alt=\"an empty icebox, plums gone\" class=\"figure mx-auto d-block\"><div class=\"figcaption\">Just Sayin’, Breakfast Plums, So Cold</div>\n</figure>\n\n\n\n\n10.3.7 fix_setup_link()\nWhen someone writes the link to setup.html, it needs to be transmogrified to be index.html#setup\n\nstp <- \"\n[setup](../learners/setup.html) \n\nwith [macOS](../learners/setup.html#macos)\"\n\nrender_and_parse(stp) |> print_html()\n\n<p><a href=\"setup.html\">setup</a></p>\n<p>with <a href=\"setup.html#macos\">macOS</a></p>\n\nrender_and_parse(stp) |> sandpaper:::fix_setup_link() |> print_html()\n\n<p><a href=\"index.html#setup\">setup</a></p>\n<p>with <a href=\"index.html#macos\">macOS</a></p>", + "text": "10.3 Post-processing with XPath\nBefore the HTML can be passed to the template, it needs to be tweaked a bit. There are two reasons why we would need to tweak the HTML:\n\nWe want to add a feature that is not supported in pandoc (or at least older versions)\nWe need to structurally rearrange pandoc defaults to match our template\n\nTo do this, we read in the HTML with xml2::read_html() and then manipulate it using the sandpaper internal function fix_nodes(), which is called by the following functions:\n\n\n\nfix_nodes() depends on build_site()\n\n\nIn turn, fix_nodes() will call this cascade of XML manipulating functions:\n\nsandpaper:::fix_nodes\n\nfunction (nodes = NULL) \n{\n if (length(nodes) == 0) \n return(nodes)\n translate_overview(nodes)\n fix_headings(nodes)\n fix_accordions(nodes)\n fix_callouts(nodes)\n fix_codeblocks(nodes)\n fix_figures(nodes)\n fix_setup_link(nodes)\n}\n<bytecode: 0x559544c22758>\n<environment: namespace:sandpaper>\n\n\n\n\n\nCall tree for fix_nodes()\n\n\nI will show the effects of each of these functions one by one, but first, here’s a couple of functions that will help me demonstrate so I don’t have to keep retyping an copying/pasting:\n\nrender_and_parse <- function(txt) {\n tmp <- tempfile()\n writeLines(txt, tmp)\n return(xml2::read_html(sandpaper:::render_html(tmp)))\n}\n\nprint_html <- function(html, xpath = \".//body/*\") {\n writeLines(as.character(xml2::xml_find_all(html, xpath)))\n}\n\n\n10.3.1 translate_overview()\nThe Overview card is produced by the Lua filter, combining the objectives and questions fenced divs into one entity:\n\novr <- \"\n::: objectives\n\n- one\n\n:::\n::: questions\n\n- one?\n\n:::\"\n\nrender_and_parse(ovr) |> \n print_html()\n\n<div class=\"overview card\">\n<h2 class=\"card-header\">Overview</h2>\n<div class=\"row g-0\">\n<div class=\"col-md-4\">\n<div class=\"card-body\">\n<div class=\"inner\">\n<h3 class=\"card-title\">Questions</h3>\n<ul>\n<li>one?</li>\n</ul>\n</div>\n</div>\n</div>\n<div class=\"col-md-8\">\n<div class=\"card-body\">\n<div class=\"inner bordered\">\n<h3 class=\"card-title\">Objectives</h3>\n<ul>\n<li>one</li>\n</ul>\n</div>\n</div>\n</div>\n</div>\n</div>\n\n\nThe only purpose for translate_overview() is to translate the entities for this card into different languages, so if we use it in an English context, nothing happens, but if we use it in a Japanese context, the the translation appears:\n\nwithr::with_language(\"ja\", {\n render_and_parse(ovr) |> \n sandpaper:::translate_overview() |> \n print_html()\n})\n\n<div class=\"overview card\">\n<h2 class=\"card-header\">Overview</h2>\n<div class=\"row g-0\">\n<div class=\"col-md-4\">\n<div class=\"card-body\">\n<div class=\"inner\">\n<h3 class=\"card-title\">Questions</h3>\n<ul>\n<li>one?</li>\n</ul>\n</div>\n</div>\n</div>\n<div class=\"col-md-8\">\n<div class=\"card-body\">\n<div class=\"inner bordered\">\n<h3 class=\"card-title\">Objectives</h3>\n<ul>\n<li>one</li>\n</ul>\n</div>\n</div>\n</div>\n</div>\n</div>\n\n\n\n\n10.3.2 fix_headings()\nHeadings in The Workbench need a couple of things done:\n\nThe parent div needs to be a <section> tag\nThey need anchor links added to the headings (we took ours from {pkdown})\nThe section element needed to be a section-heading class and there needed to be an <hr> element underneath the <h2> tags.\n\nBehold!\n\nheads <- \"\n## Heading 2 {#i-am-a-section-link}\n\n### Heading 3 \n\nThis is in a section, but it's not a section\n\n## Heading 2\n\nThis is a new section\n\"\nrender_and_parse(heads) |> print_html()\n\n<div id=\"i-am-a-section-link\" class=\"section level2\">\n<h2>Heading 2</h2>\n<div id=\"heading-3\" class=\"section level3\">\n<h3>Heading 3</h3>\n<p>This is in a section, but it’s not a section</p>\n</div>\n</div>\n<div id=\"heading-2\" class=\"section level2\">\n<h2>Heading 2</h2>\n<p>This is a new section</p>\n</div>\n\nrender_and_parse(heads) |> sandpaper:::fix_headings() |> print_html()\n\n<section id=\"i-am-a-section-link\">\n<h2 class=\"section-heading\">Heading 2</h2>\n<hr class=\"half-width\">\n<div id=\"heading-3\" class=\"section level3\">\n<h3>Heading 3</h3>\n<p>This is in a section, but it’s not a section</p>\n</div>\n</section>\n<section id=\"heading-2\">\n<h2 class=\"section-heading\">Heading 2</h2>\n<hr class=\"half-width\">\n<p>This is a new section</p>\n</section>\n\n\n\n\n10.3.3 fix_accordions()\nThe only thing that happens with accordions is that they get translated:\n\naccord <- \"\n::: instructor\n\ndrink water\n\n:::\n\"\nrender_and_parse(accord) |> print_html(\".//h3/text()\")\n\n\n \n\n Instructor Note\n \n\nwithr::with_language(\"ja\", {\n render_and_parse(accord) |> \n sandpaper:::fix_accordions() |> \n print_html(\".//h3/text()\")\n})\n\n \n Instructor Note \n\n\n\n\n10.3.4 fix_callouts()\nCallouts need to have translations applied and ids adjusted:\n\nkeyps <- \"\n::: keypoints\n\n - hydrate\n\n:::\"\nrender_and_parse(keyps) |> print_html()\n\n<div id=\"keypoints1\" class=\"callout keypoints\">\n<div class=\"callout-square\">\n<i class=\"callout-icon\" data-feather=\"key\"></i>\n</div>\n<div class=\"section level3 callout-title callout-inner\">\n<h3 class=\"callout-title\">Keypoints</h3>\n<div class=\"callout-content\">\n<ul>\n<li>hydrate</li>\n</ul>\n</div>\n</div>\n</div>\n\nrender_and_parse(keyps) |> sandpaper:::fix_callouts() |> print_html()\n\n<div id=\"keypoints1\" class=\"callout keypoints\">\n<div class=\"callout-square\">\n<i class=\"callout-icon\" data-feather=\"key\"></i>\n</div>\n<div class=\"callout-inner\">\n<h3 class=\"callout-title\">Key Points</h3>\n<div class=\"callout-content\">\n<ul>\n<li>hydrate</li>\n</ul>\n</div>\n</div>\n</div>\n\n\nThe translations are also applied:\n\nwithr::with_language(\"ja\", {\n render_and_parse(keyps) |> \n sandpaper:::fix_callouts() |> \n print_html(\".//h3/text()\")\n})\n\nKey Points\n\n\n\n\n10.3.5 fix_codeblocks()\nCodeblocks have a phantom H3 attached\n\ncodes <- \"\n```r\ncat('mouse')\n```\"\nrender_and_parse(codes) |> print_html()\n\n<div class=\"sourceCode\" id=\"cb1\"><pre class=\"sourceCode r\"><code class=\"sourceCode r\"><span id=\"cb1-1\"><a href=\"#cb1-1\" tabindex=\"-1\"></a><span class=\"fu\">cat</span>(<span class=\"st\">'mouse'</span>)</span></code></pre></div>\n\nrender_and_parse(codes) |> sandpaper:::fix_codeblocks() |> print_html()\n\n<div class=\"codewrapper sourceCode\" id=\"cb1\">\n<h3 class=\"code-label\">R<i aria-hidden=\"true\" data-feather=\"chevron-left\"></i><i aria-hidden=\"true\" data-feather=\"chevron-right\"></i>\n</h3>\n<pre class=\"sourceCode r\" tabindex=\"0\"><code class=\"sourceCode r\"><span id=\"cb1-1\"><a href=\"#cb1-1\" tabindex=\"-1\"></a><span class=\"fu\">cat</span>(<span class=\"st\">'mouse'</span>)</span></code></pre>\n</div>\n\n\n\n\n10.3.6 fix_figures()\nFigures need semantic HTML <figure>, not <div> and lone images with no captions should still be figures.\n\nfigs <- \"\n![](lone-img.png){alt='tumbleweed'}\n\n![Just Sayin', Breakfast Plums, So Cold](papa-eating-plums.png){alt='an empty icebox, plums gone'}\n\"\nrender_and_parse(figs) |> print_html()\n\n<p><img src=\"lone-img.png\" alt=\"tumbleweed\"></p>\n<div class=\"float\">\n<img src=\"papa-eating-plums.png\" alt=\"an empty icebox, plums gone\"><div class=\"figcaption\">Just Sayin’, Breakfast Plums, So Cold</div>\n</div>\n\nrender_and_parse(figs) |> sandpaper:::fix_figures() |> print_html()\n\n<figure><img src=\"lone-img.png\" alt=\"tumbleweed\" class=\"figure mx-auto d-block\"></figure>\n<figure>\n<img src=\"papa-eating-plums.png\" alt=\"an empty icebox, plums gone\" class=\"figure mx-auto d-block\"><div class=\"figcaption\">Just Sayin’, Breakfast Plums, So Cold</div>\n</figure>\n\n\n\n\n10.3.7 fix_setup_link()\nWhen someone writes the link to setup.html, it needs to be transmogrified to be index.html#setup\n\nstp <- \"\n[setup](../learners/setup.html) \n\nwith [macOS](../learners/setup.html#macos)\"\n\nrender_and_parse(stp) |> print_html()\n\n<p><a href=\"setup.html\">setup</a></p>\n<p>with <a href=\"setup.html#macos\">macOS</a></p>\n\nrender_and_parse(stp) |> sandpaper:::fix_setup_link() |> print_html()\n\n<p><a href=\"index.html#setup\">setup</a></p>\n<p>with <a href=\"index.html#macos\">macOS</a></p>", "crumbs": [ "{sandpaper} User Interface", "10  Building HTML" diff --git a/setup.html b/setup.html index d3e4d30..f63be48 100644 --- a/setup.html +++ b/setup.html @@ -2,7 +2,7 @@ - + @@ -72,7 +72,7 @@ - + diff --git a/site_libs/quarto-html/quarto-syntax-highlighting-01c78b5cd655e4cd89133cf59d535862.css b/site_libs/quarto-html/quarto-syntax-highlighting-23b5d515405460ba008ebd3366b1cbf2.css similarity index 97% rename from site_libs/quarto-html/quarto-syntax-highlighting-01c78b5cd655e4cd89133cf59d535862.css rename to site_libs/quarto-html/quarto-syntax-highlighting-23b5d515405460ba008ebd3366b1cbf2.css index 0e72458..58fe2cc 100644 --- a/site_libs/quarto-html/quarto-syntax-highlighting-01c78b5cd655e4cd89133cf59d535862.css +++ b/site_libs/quarto-html/quarto-syntax-highlighting-23b5d515405460ba008ebd3366b1cbf2.css @@ -202,4 +202,4 @@ code span.kw { content: " https://carpentries.github.io/workbench-dev/index.html - 2024-11-19T00:09:19.165Z + 2024-11-26T00:09:28.175Z https://carpentries.github.io/workbench-dev/intro.html - 2024-11-19T00:09:19.165Z + 2024-11-26T00:09:28.175Z https://carpentries.github.io/workbench-dev/setup.html - 2024-11-19T00:09:19.185Z + 2024-11-26T00:09:28.191Z https://carpentries.github.io/workbench-dev/testing.html - 2024-11-19T00:09:19.185Z + 2024-11-26T00:09:28.191Z https://carpentries.github.io/workbench-dev/flow.html - 2024-11-19T00:09:19.161Z + 2024-11-26T00:09:28.175Z https://carpentries.github.io/workbench-dev/features.html - 2024-11-19T00:09:19.161Z + 2024-11-26T00:09:28.171Z https://carpentries.github.io/workbench-dev/sandpaper/intro.html - 2024-11-19T00:09:19.181Z + 2024-11-26T00:09:28.187Z https://carpentries.github.io/workbench-dev/sandpaper/testing.html - 2024-11-19T00:09:19.185Z + 2024-11-26T00:09:28.191Z https://carpentries.github.io/workbench-dev/sandpaper/global-state.html - 2024-11-19T00:09:19.177Z + 2024-11-26T00:09:28.187Z https://carpentries.github.io/workbench-dev/sandpaper/package-cache.html - 2024-11-19T00:09:19.181Z + 2024-11-26T00:09:28.187Z https://carpentries.github.io/workbench-dev/sandpaper/building-html.html - 2024-11-19T00:09:19.177Z + 2024-11-26T00:09:28.183Z https://carpentries.github.io/workbench-dev/pegboard/intro.html - 2024-11-19T00:09:19.165Z + 2024-11-26T00:09:28.175Z https://carpentries.github.io/workbench-dev/varnish/intro.html - 2024-11-19T00:09:19.185Z + 2024-11-26T00:09:28.191Z https://carpentries.github.io/workbench-dev/releases.html - 2024-11-19T00:09:19.165Z + 2024-11-26T00:09:28.175Z https://carpentries.github.io/workbench-dev/hotfixes.html - 2024-11-19T00:09:19.161Z + 2024-11-26T00:09:28.175Z https://carpentries.github.io/workbench-dev/remote/intro.html - 2024-11-19T00:09:19.165Z + 2024-11-26T00:09:28.175Z https://carpentries.github.io/workbench-dev/remote/deploy.html - 2024-11-19T00:09:19.165Z + 2024-11-26T00:09:28.175Z https://carpentries.github.io/workbench-dev/remote/pull-request.html - 2024-11-19T00:09:19.173Z + 2024-11-26T00:09:28.179Z https://carpentries.github.io/workbench-dev/summary.html - 2024-11-19T00:09:19.185Z + 2024-11-26T00:09:28.191Z https://carpentries.github.io/workbench-dev/references.html - 2024-11-19T00:09:19.165Z + 2024-11-26T00:09:28.175Z https://carpentries.github.io/workbench-dev/sop.html - 2024-11-19T00:09:19.185Z + 2024-11-26T00:09:28.191Z https://carpentries.github.io/workbench-dev/flight-rules.html - 2024-11-19T00:09:19.161Z + 2024-11-26T00:09:28.171Z diff --git a/sop.html b/sop.html index aaad38a..fc80f0e 100644 --- a/sop.html +++ b/sop.html @@ -2,7 +2,7 @@ - + @@ -38,7 +38,7 @@ - + diff --git a/summary.html b/summary.html index b00589c..e5851a7 100644 --- a/summary.html +++ b/summary.html @@ -2,7 +2,7 @@ - + @@ -38,7 +38,7 @@ - + diff --git a/testing.html b/testing.html index d87ec18..0696c42 100644 --- a/testing.html +++ b/testing.html @@ -2,7 +2,7 @@ - + @@ -38,7 +38,7 @@ - + diff --git a/varnish/intro.html b/varnish/intro.html index fe85f4f..ffacfa8 100644 --- a/varnish/intro.html +++ b/varnish/intro.html @@ -2,7 +2,7 @@ - + @@ -38,7 +38,7 @@ - +