Merge branch 'test-preview' into 'master'

gitlab-ci: fix preview feature

See merge request ayakael/ayakael.net!1
This commit is contained in:
Antoine Martin 2024-06-24 18:10:26 +00:00
commit 6e7f351964
2 changed files with 15 additions and 19 deletions

View file

@ -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

View file

@ -18,22 +18,22 @@
<!-- for the record: it is absolutely ridiculous that new browsers
*and* operating systems each want their own little precious
snowflake just for a frigging icon -->
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="apple-touch-icon" sizes="180x180" href="<TMPL_VAR BASEURL>apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="<TMPL_VAR BASEURL>favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="<TMPL_VAR BASEURL>favicon-16x16.png">
<link rel="manifest" href="<TMPL_VAR BASEURL>site.webmanifest">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
<!-- ikiwiki CSS -->
<link href="/style.css" rel="stylesheet" />
<link href="<TMPL_VAR BASEURL>style.css" rel="stylesheet" />
<!-- Bootstrap core CSS -->
<!-- those checksums can be verified with: shasum -b -a 384 $file | xxd -r -p | base64 -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous" />
<!-- Custom styles for this template -->
<link href="/bootstrap.local.css" rel="stylesheet" />
<link href="<TMPL_VAR BASEURL>bootstrap.local.css" rel="stylesheet" />
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
@ -43,9 +43,9 @@
<!-- Custom styles for derivatives -->
<TMPL_IF LOCAL_CSS>
<link rel="stylesheet" href="/<TMPL_VAR LOCAL_CSS>" type="text/css" />
<link rel="stylesheet" href="<TMPL_VAR BASEURL><TMPL_VAR LOCAL_CSS>" type="text/css" />
<TMPL_ELSE>
<link rel="stylesheet" href="/local.css" type="text/css" />
<link rel="stylesheet" href="<TMPL_VAR BASEURL>local.css" type="text/css" />
</TMPL_IF>
<TMPL_UNLESS DYNAMIC>
@ -77,8 +77,8 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">
<img alt="<TMPL_VAR WIKINAME>" src="/favicon.png" width="48" height="48" />
<a class="navbar-brand" href="<TMPL_VAR BASEURL>">
<img alt="<TMPL_VAR WIKINAME>" src="<TMPL_VAR BASEURL>favicon.png" width="48" height="48" />
</a>
</div>
@ -89,7 +89,7 @@
<button class="btn language-switcher dropdown-toggle" type="button" id="language-menu-top" data-toggle=
"dropdown" aria-haspopup="true" aria-expanded="true">
<TMPL_VAR LANG_NAME>
<img src="/wikiicons/languages.png">
<img src="<TMPL_VAR BASEURL>wikiicons/languages.png">
</button>
<ul class="dropdown-menu" aria-labelledby="language-menu-top">
<TMPL_LOOP OTHERLANGUAGES>