From 4430036ea2b54e416b0375d25c322ba066d67084 Mon Sep 17 00:00:00 2001 From: smdyv <88971341+smdyv@users.noreply.github.com> Date: Thu, 13 Jul 2023 16:51:50 +0200 Subject: [PATCH] Change string markings for replacements --- nginx/nginx.conf | 16 +- nginx/snippets/preload.conf | 2 +- process-static | 10 +- static/404.html | 8 +- .../attestation-compatibility-guide.html | 8 +- static/articles/grapheneos-servers.html | 10 +- static/articles/index.html | 8 +- static/articles/server-traffic-shaping.html | 8 +- ...sitewide-advertising-industry-opt-out.html | 8 +- static/build.html | 10 +- static/camera-privacy-policy.html | 8 +- static/contact.html | 8 +- static/donate.html | 8 +- static/faq.html | 10 +- static/features.html | 8 +- static/history/copperheados.html | 8 +- static/history/index.html | 8 +- static/history/legacy-changelog.html | 8 +- static/index.html | 14 +- static/install/cli.html | 10 +- static/install/index.html | 10 +- static/install/web.html | 12 +- static/pdfviewer-privacy-policy.html | 8 +- static/releases.html | 236 +++++++++--------- static/source.html | 8 +- static/usage.html | 10 +- 26 files changed, 231 insertions(+), 231 deletions(-) diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 7a5cf057..b8785792 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -89,14 +89,14 @@ http { aio_write on; map $uri $preload_resources_uri { - /index.html ", <{{path|/pixel-7-pro.svg}}>; rel=preload; as=image, <{{path|/js/redirect.js}}>; rel=modulepreload; integrity={{integrity|/js/redirect.js}}"; - /faq.html ", <{{path|/js/redirect.js}}>; rel=modulepreload; integrity={{integrity|/js/redirect.js}}"; - /install/index.html ", <{{path|/js/redirect.js}}>; rel=modulepreload; integrity={{integrity|/js/redirect.js}}"; - /install/cli.html ", <{{path|/js/redirect.js}}>; rel=modulepreload; integrity={{integrity|/js/redirect.js}}"; - /install/web.html ", <{{path|/js/redirect.js}}>; rel=modulepreload; integrity={{integrity|/js/redirect.js}}"; - /releases.html ", <{{path|/js/redirect.js}}>; rel=modulepreload; integrity={{integrity|/js/redirect.js}}"; - /usage.html ", <{{path|/js/redirect.js}}>; rel=modulepreload; integrity={{integrity|/js/redirect.js}}"; - /build.html ", <{{path|/js/redirect.js}}>; rel=modulepreload; integrity={{integrity|/js/redirect.js}}"; + /index.html ", <[[path|/pixel-7-pro.svg]]>; rel=preload; as=image, <[[path|/js/redirect.js]]>; rel=modulepreload; integrity=[[integrity|/js/redirect.js]]"; + /faq.html ", <[[path|/js/redirect.js]]>; rel=modulepreload; integrity=[[integrity|/js/redirect.js]]"; + /install/index.html ", <[[path|/js/redirect.js]]>; rel=modulepreload; integrity=[[integrity|/js/redirect.js]]"; + /install/cli.html ", <[[path|/js/redirect.js]]>; rel=modulepreload; integrity=[[integrity|/js/redirect.js]]"; + /install/web.html ", <[[path|/js/redirect.js]]>; rel=modulepreload; integrity=[[integrity|/js/redirect.js]]"; + /releases.html ", <[[path|/js/redirect.js]]>; rel=modulepreload; integrity=[[integrity|/js/redirect.js]]"; + /usage.html ", <[[path|/js/redirect.js]]>; rel=modulepreload; integrity=[[integrity|/js/redirect.js]]"; + /build.html ", <[[path|/js/redirect.js]]>; rel=modulepreload; integrity=[[integrity|/js/redirect.js]]"; } server { diff --git a/nginx/snippets/preload.conf b/nginx/snippets/preload.conf index b117155b..5403cae4 100644 --- a/nginx/snippets/preload.conf +++ b/nginx/snippets/preload.conf @@ -1 +1 @@ -add_header Link "<{{path|/main.css}}>; rel=preload; as=style; integrity={{integrity|/main.css}}, ; rel=preload; as=font; crossorigin, ; rel=preload; as=font; crossorigin, <{{path|/mask-icon.svg}}>; rel=preload; as=image$preload_resources_uri" always; +add_header Link "<[[path|/main.css]]>; rel=preload; as=style; integrity=[[integrity|/main.css]], ; rel=preload; as=font; crossorigin, ; rel=preload; as=font; crossorigin, <[[path|/mask-icon.svg]]>; rel=preload; as=image$preload_resources_uri" always; diff --git a/process-static b/process-static index 5e891dc8..c3176328 100755 --- a/process-static +++ b/process-static @@ -49,14 +49,14 @@ for file in static-tmp/**/*.css static-tmp/js/*.js static-tmp/**/!(bimi|favicon) dest="$(dirname $file)/$hash.$(basename $file)" if [[ $file == *.css ]]; then - replace+=";s@{{css|/${file#*/}}}@@g" + replace+=";s@\[\[css|/${file#*/}\]\]@@g" elif [[ $file == *.js ]]; then - replace+=";s@{{js|/${file#*/}}}@@g" + replace+=";s@\[\[js|/${file#*/}\]\]@@g" fi mv "$file" "$dest" - replace+=";s@{{integrity|/${file#*/}}}@${sri_hash}@g" - replace+=";s@{{path|/${file#*/}}}@/${dest#*/}@g" + replace+=";s@\[\[integrity|/${file#*/}\]\]@${sri_hash}@g" + replace+=";s@\[\[path|/${file#*/}\]\]@/${dest#*/}@g" done sed -i "$replace" static-tmp/**/*.html nginx-tmp/nginx.conf nginx-tmp/snippets/preload.conf @@ -67,7 +67,7 @@ for device in ${devices[@]}; do for channel in ${channels[@]}; do metadata=$(curl -s $RELEASES_BASE/$device-$channel) build_number=$(echo -n $metadata | cut -d ' ' -f 1) - replace+=";s@{{$device-$channel-BUILD_NUMBER}}@$build_number@g" + replace+=";s@\[\[$device-$channel-BUILD_NUMBER\]\]@$build_number@g" done done sed -i "$replace" static-tmp/releases.html diff --git a/static/404.html b/static/404.html index 11939664..83b3f8c1 100644 --- a/static/404.html +++ b/static/404.html @@ -20,9 +20,9 @@ - + - {{css|/main.css}} + [[css|/main.css]] @@ -31,7 +31,7 @@