From 3448fc57855ad7536a49397b628aa7a2d8afde3b Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Mon, 24 Jun 2024 12:23:51 -0400 Subject: [PATCH 1/2] gitlab-ci: fix test preview feature --- .gitlab-ci.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7447951..5c13bdb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,16 +26,12 @@ pages: fi - rm -rf public/$CURRENT_CONTENT_PATH || true # remove last version of current branch script: + - | # sed needs to be in its own section + sed -i "s|destdir.*|destdir: ./public/$CURRENT_CONTENT_PATH|" ikiwiki.setup - ikiwiki --setup ikiwiki.setup - | # create symbolic link to index.en.html if public/index.html does not exist - if [ ! -L "public/index.html" ]; then - ln -s index.en.html public/index.html - fi - - | - if [ -z "$CURRENT_CONTENT_PATH" ]; then - mv public output - mkdir -p public - mv public public/$CURRENT_CONTENT_PATH + if [ ! -L "public/$CURRENT_CONTENT_PATH/index.html" ]; then + ln -s index.en.html public/$CURRENT_CONTENT_PATH/index.html fi - cd public/$EPHEMERAL_BRANCHES_PATH - tree -d -H '.' -L 1 --noreport --charset utf-8 -T "Versions" -o index.html # generate a root HTML listing all previews for easier access From 853b42a073d28d17380ccd8d1e15a2e0b0938a99 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Mon, 24 Jun 2024 14:06:12 -0400 Subject: [PATCH 2/2] templates/page: make internal hrefs relative --- templates/page.tmpl | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/templates/page.tmpl b/templates/page.tmpl index f36381f..b57d3f5 100644 --- a/templates/page.tmpl +++ b/templates/page.tmpl @@ -18,22 +18,22 @@ - - - - + + + + - + - + - + - + @@ -77,8 +77,8 @@ - - <TMPL_VAR WIKINAME> + + <TMPL_VAR WIKINAME> @@ -89,7 +89,7 @@