Closed florisvdh closed 1 year ago
Regarding the insertion of figures in markdown output formats as HTML rather than as markdown format, I have just discovered a related thing.
@damianooldoni
When knitting using pandoc
2.9.2.1 (as currently distributed with Ubuntu Jammy), figures inserted with ![]()
in Rmd are still returned as markdown syntax in index.md
, contrary to R chunk generated figures which are returned as HTML by knitr 1.43. When knitting using pandoc
3.1.1 (as currently distributed with RStudio), figures inserted with ![]()
in Rmd are returned as HTML in index.md
. This demonstrates a preference for HTML in markdown output nowadays. It happens both for github-flavoured markdown output format and for plain Pandoc markdown output format.
In our case here, figures have been generated by knitr anyway. It may be due to following change in knitr 1.43 (released May 25):
is_html_output()
recognizes R Markdown v1 documents now (.Rmd
documents compiled via the markdown package).
(Source)
My conclusion: we need to make Hugo accept this, so not turn raw HTML into a markdown comment for security reasons. This is accomplished by 7db836f9.
Sidenote about formats: pandoc's gfm
is interfaced by rmarkdown's github_document
which allows full Pandoc's markdown features. ~We should probably use the latter instead of gfm+footnotes
throughout this repo.~ Pandoc's markdown
output format is interfaced by rmarkdown's md_document
format, which appears to be an identity relation.
EDIT:
We should probably use the latter instead of
gfm+footnotes
throughout this repo.
It has been observed that github_document
scrambles the page header, i.e. the title is repeated twice on the page. Furthermore as both approaches seem to (now) support link-citations: true
, current usage of md_document
> variant: gfm+footnotes
is best kept.
Thanks for reviewing @damianooldoni!
I think we should carefully follow future developments of Hugo
Well, IIRC the current workflow implements a fixed Hugo version (see GHA workflow). That may be good for stability and perhaps theming aspects, but it may eventually raise incompatibility problems with other tooling. I cannot judge which is best in this case, either using latest or using an oldie.
Description
The Geopunt URLs of OGC webservices have changed; this PR solves it for the WMS tutorial.
Note @damianooldoni @peterdesmet that I made Hugo allow raw HTML for this PR to succeed (7db836f9 - see its commit message body). This may be regarded a security issue. If someone knows how to make pandoc or rmarkdown (or whoever is doing this) not insert the resulting figures as HTML for gfm but as markdown figure references, then 7db836f9 can be reverted.
Task list
tutorials/content
index.md
. In case of an Rmarkdown tutorial I have knitted myindex.Rmd
toindex.md
(both files are pushed to the repo).tags
in the YAML header (see the tags listed in the tutorials website side bar for tags that have been used before)categories
to the YAML header and my category tags are from the list of category tagsPreviewing 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
1) On the PR page, you can find a "details" link under "checks - On PR, build the site and ...". Go there, click on the top link in the left sidebar ("Summary"), and download the generated artifact at the bottom of the page. 2) Decompress it and make sure the target directory is called 'tutorials' (you may need to rename it) 3) From the parent directory (just above the
tutorials
folder you created/renamed), runpython -m http.server 8887
, or launch the Google Chrome Web Server app and point it at the parent directory. 4) Point your browser to http://localhost:8887/tutorials. 5) Review the updated website. As a contributor, you can push extra commits to update the PR. As a reviewer, you can accept/refuse/comment the PR.Note: for step 3, you can use any other simple HTTP server to serve the current directory if you don't have a Python 3 environment or Google Chrome available.