| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Adds a new tutorial section for “Rewriting git history”, implemented as a Quarto Reveal.js presentation (with a bundled flandersqmd revealjs extension) and an index.md page linking to the rendered presentation.html.
Changes:
Copilot reviewed 11 out of 33 changed files in this pull request and generated 11 comments.
Show a summary per file| File | Description |
|---|---|
| content/tutorials/git_rewrite_history/presentation.qmd | New slide deck content (dot graphs + git guidance). |
| content/tutorials/git_rewrite_history/index.md | Tutorial landing page linking to the generated HTML presentation. |
| content/tutorials/git_rewrite_history/_quarto.yml | Quarto project config for rendering the presentation. |
| content/tutorials/git_rewrite_history/post_render.R | Post-render clean-up/copy script for the generated presentation artifacts. |
| content/tutorials/git_rewrite_history/_extensions/inbo/flandersqmd/* | Bundled Reveal.js extension assets (SCSS/CSS, Lua filters, fonts/images, CSL). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
| 1. make sure you have checkout the correct branch | ||
| - `git checkout my_feature` |
There was a problem hiding this comment.
Spelling/grammar: “have checkout” should be “have checked out”.
Sorry, something went wrong.
| - apply the changes locally as describe in the previous chapter | ||
| - a simple `git push` will fail because of a diverging history |
There was a problem hiding this comment.
Spelling/grammar: “as describe” should be “as described”.
Sorry, something went wrong.
| border-left-color: var(--flandersqmd-callout-warning-border); | ||
| } | ||
|
|
||
| .reveal div.callout.callout-note.warning-style-default .callout-title{ |
There was a problem hiding this comment.
The selector .reveal div.callout.callout-note.warning-style-default .callout-title looks like a typo (it targets a note callout, not a warning callout). As written, warning callouts may not get the intended title background color; this likely should target .callout-warning and the standard callout style class.
| .reveal div.callout.callout-note.warning-style-default .callout-title{ | |
| .reveal div.callout.callout-warning.callout-style-default .callout-title{ |
Sorry, something went wrong.
| - apply the changes locally as describe in the previous chapter | ||
| - a simple `git push` will fail because of a diverging history | ||
| - you must use `git push --force` or `git push -f` | ||
| - be carefull because you can't undo that |
There was a problem hiding this comment.
Spelling: “carefull” should be “careful”.
Sorry, something went wrong.
| resources$contributes$format$revealjs[["format-resources"]] |> | ||
| basename() |> | ||
| file.remove() -> hide |
There was a problem hiding this comment.
basename() |> file.remove() will delete files in the current working directory matching those basenames. If Quarto's post-render runs from the project root, this can accidentally delete source assets if names collide. Safer: construct explicit paths to the files you intend to delete (e.g., within output/) and/or check file.exists() before removal.
Sorry, something went wrong.
| local url_div = pandoc.Div({pandoc.Para({pandoc.Str(this_url)})}, pandoc.Attr("", {"sidebar-url-tussen"})) | ||
| ent_logo = pandoc.Div("", { class = "entity-tussen" }) | ||
| if (this_lang == "nl-BE") then | ||
| if (entitycolours == "inbo") then | ||
| vl_logo = pandoc.Image("Vlaanderen is wetenschap", "flanders-nl-transparent.png") | ||
| ent_logo = pandoc.Image("Instituut voor Natuur- en Bosonderzoek", "inbo-nl-white.png") | ||
| ent_logo.attr = {class = "entity-tussen"} | ||
| else | ||
| vl_logo = pandoc.Image("Vlaanderen, verbeelding werkt", "flanders-nl-intermediate.jpg") | ||
| end | ||
| vl_logo.attr = {class = "vl-tussen"} | ||
| else |
There was a problem hiding this comment.
Pandoc Lua attributes/classes are set using pandoc.Attr (or by mutating elem.attr.classes), but this filter assigns classes via vl_logo.attr = {class = ...} and passes { class = ... } directly to pandoc.Div(). This likely won't apply the classes (or may error on some Pandoc versions); use pandoc.Attr("", {"vl-tussen"}) / pandoc.Attr("", {"entity-tussen"}) consistently.
Sorry, something went wrong.
| :::: | ||
|
|
||
|
|
||
| ## Commiting to current branch |
There was a problem hiding this comment.
Spelling: section title should be “Committing” (double ‘m’).
Sorry, something went wrong.
| function display_person (person, i) | ||
| res = "" | ||
| if is_empty(person.name) then | ||
| res = '<h1 class = "missing">!!! flandersqmd.authors element ' .. i .. ' has no name element!!!</h1>' | ||
| return res | ||
| end | ||
| if is_empty(person.name.given) then | ||
| res = '<h1 class = "missing">!!! flandersqmd.authors element ' .. i .. ' has no given element under name!!!</h1>' | ||
| return res | ||
| end | ||
| if is_empty(person.name.family) then | ||
| res = '<h1 class = "missing">!!! flandersqmd.authors element ' .. i .. ' has no given element under name!!!</h1>' | ||
| return res | ||
| end | ||
| if is_empty(person.email) then | ||
| res = pandoc.utils.stringify(person.name.given) .. ' ' .. pandoc.utils.stringify(person.name.family) | ||
| else | ||
| res = res .. '<a href= "mailto:' .. pandoc.utils.stringify(person.email) .. '" class = "title email">' .. pandoc.utils.stringify(person.name.given) .. ' ' .. pandoc.utils.stringify(person.name.family) .. '</a>' | ||
| end | ||
| if (is_empty(person.orcid)) then | ||
| return res | ||
| end | ||
| res = res .. '<a href="https://orcid.org/' .. pandoc.utils.stringify(person.orcid) .. '" class="quarto-title-author-orcid"> <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo1N0NEMjA4MDI1MjA2ODExOTk0QzkzNTEzRjZEQTg1NyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDozM0NDOEJGNEZGNTcxMUUxODdBOEVCODg2RjdCQ0QwOSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDozM0NDOEJGM0ZGNTcxMUUxODdBOEVCODg2RjdCQ0QwOSIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkZDN0YxMTc0MDcyMDY4MTE5NUZFRDc5MUM2MUUwNEREIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjU3Q0QyMDgwMjUyMDY4MTE5OTRDOTM1MTNGNkRBODU3Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+84NovQAAAR1JREFUeNpiZEADy85ZJgCpeCB2QJM6AMQLo4yOL0AWZETSqACk1gOxAQN+cAGIA4EGPQBxmJA0nwdpjjQ8xqArmczw5tMHXAaALDgP1QMxAGqzAAPxQACqh4ER6uf5MBlkm0X4EGayMfMw/Pr7Bd2gRBZogMFBrv01hisv5jLsv9nLAPIOMnjy8RDDyYctyAbFM2EJbRQw+aAWw/LzVgx7b+cwCHKqMhjJFCBLOzAR6+lXX84xnHjYyqAo5IUizkRCwIENQQckGSDGY4TVgAPEaraQr2a4/24bSuoExcJCfAEJihXkWDj3ZAKy9EJGaEo8T0QSxkjSwORsCAuDQCD+QILmD1A9kECEZgxDaEZhICIzGcIyEyOl2RkgwAAhkmC+eAm0TAAAAABJRU5ErkJggg=="></a>' | ||
| return res |
There was a problem hiding this comment.
The display_person function builds raw HTML using unescaped values from person.name.*, person.email, and person.orcid, and returns it via pandoc.RawInline('html', ...). If any of these metadata fields contain characters like quotes or <script> tags (for example via flandersqmd.author in the document YAML), they will be injected directly into the generated HTML, enabling cross-site scripting in the rendered tutorial pages. To fix this, avoid concatenating unescaped metadata into HTML strings; instead, construct pandoc element nodes (e.g., Link, Str) so Pandoc escapes content correctly, or at minimum HTML-escape user-provided metadata before concatenation.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Description
The presentation of a BMK talk
Task list
Previewing the pull request
Thanks to GitHub Actions, an artifact (=zip file) of the rendered website is automatically created for each pull request.
This provides a way to preview how these updates will look on the website, useful to contributors and reviewers.
Instructions to preview the updated website
Note: for step 3, you can use any other simple HTTP server to serve the current directory, e.g. Python http.server: python -m http.server 8887 --bind localhost --directory path/to/tutorials_preview
Alternative: Locally Building the Site
Alternatively, you can build the entire site locally (see the README for instructions); the Hugo preview server will update changes on the fly.
This requires Hugo to be installed on your computer.