Merge "README: Add instructions for plain markdown (without R)"
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 69364f3..b71cbfa 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -6,7 +6,8 @@
 stages:
   - build
 
-# variables:
+variables:
+  SOURCE_FILE: "inst/rmarkdown/templates/posterdown_ids/skeleton/skeleton.Rmd"
 #  CHROME_VERSION: "114.0.5735.198-1"
 
 build-job:
@@ -56,9 +57,12 @@
     - R -e 'devtools::install()'
     - end_section installing
     - start_section render "Generating demo artifacts"
-    - R_CACHE_ROOTPATH=./cache R -e "require(rmarkdown); render('inst/rmarkdown/templates/posterdown_ids/skeleton/skeleton.Rmd', output_format='posterdown.ids::posterdown_ids', output_dir='target')"
-    - ./ci/html2pdf target/skeleton.html target/skeleton.pdf 1
-    - inkscape -b white --pdf-poppler -o target/skeleton.svg target/skeleton.pdf || true
-    - scour -i target/skeleton.svg -o target/skeleton_optimized.svg --enable-viewboxing --enable-id-stripping --shorten-ids --indent=none
+    - R_CACHE_ROOTPATH=./cache R -e "require(rmarkdown); render('$SOURCE_FILE', output_format='posterdown.ids::posterdown_ids', output_dir='target')"
+    - export SVG=target/$(basename $SOURCE_FILE .Rmd).svg
+    - export HTML=target/$(basename $SOURCE_FILE .Rmd).html
+    - export PDF=target/$(basename $SOURCE_FILE .Rmd).pdf
+    - ./ci/html2pdf $HTML $PDF 1
+    - inkscape -b white --pdf-poppler -o $SVG $PDF || true
+    - scour -i $SVG -o target/skeleton_optimized.svg --enable-viewboxing --enable-id-stripping --shorten-ids --indent=none
     - end_section render
 
diff --git a/R/utils.R b/R/utils.R
index dba1921..ddd11a1 100644
--- a/R/utils.R
+++ b/R/utils.R
@@ -1,7 +1,7 @@
 # Most here is from thesisdown for the posterdown_pdf option
 find_file <- function(template, file) {
   template <- system.file("rmarkdown", "templates", template, file,
-                          package = "posterdown")
+                          package = "posterdown.ids")
   if (template == "") {
     stop("Couldn't find template file ", template, "/", file, call. = FALSE)
   }