From c5192d9ece7c94321a18ba3e02a36bc66717be3a Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 21 May 2024 08:56:59 -0300 Subject: url-spec: STATIC_VERSION 2a --- src/url-spec.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/url-spec.js') diff --git a/src/url-spec.js b/src/url-spec.js index 5bc34407..1f04a906 100644 --- a/src/url-spec.js +++ b/src/url-spec.js @@ -1,5 +1,11 @@ import {withEntries} from '#sugar'; +// Static files are all grouped under a `static-${STATIC_VERSION}` folder as +// part of a build. This is so that multiple builds of a wiki can coexist +// served from the same server / file system root: older builds' HTML files +// refer to earlier values of STATIC_VERSION, avoiding name collisions. +const STATIC_VERSION = '2a'; + const genericPaths = { root: '', path: '<>', @@ -67,17 +73,17 @@ const urlSpec = { }, staticCSS: { - prefix: 'static/css/', + prefix: `static-${STATIC_VERSION}/css/`, paths: genericPaths, }, staticJS: { - prefix: 'static/js/', + prefix: `static-${STATIC_VERSION}/js/`, paths: genericPaths, }, staticMisc: { - prefix: 'static/misc/', + prefix: `static-${STATIC_VERSION}/misc/`, paths: { ...genericPaths, icon: 'icons.svg#icon-<>', @@ -85,7 +91,7 @@ const urlSpec = { }, staticSharedUtil: { - prefix: 'static/shared-util/', + prefix: `static-${STATIC_VERSION}/shared-util/`, paths: genericPaths, }, -- cgit 1.3.0-6-gf8a5