diff options
Diffstat (limited to 'src/url-spec.js')
-rw-r--r-- | src/url-spec.js | 47 |
1 files changed, 33 insertions, 14 deletions
diff --git a/src/url-spec.js b/src/url-spec.js index ec971c0c..56366ed4 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 = '3p2'; + const genericPaths = { root: '', path: '<>', @@ -63,19 +69,37 @@ const urlSpec = { }, shared: { - paths: { - ...genericPaths, + paths: genericPaths, + }, - utilityRoot: 'util', - staticRoot: 'static', + staticCSS: { + prefix: `static-${STATIC_VERSION}/css/`, + paths: genericPaths, + }, + + staticJS: { + prefix: `static-${STATIC_VERSION}/js/`, + paths: genericPaths, + }, - utilityFile: 'util/<>', - staticFile: 'static/<>?<>', + staticLib: { + prefix: `static-${STATIC_VERSION}/lib/`, + paths: genericPaths, + }, - staticIcon: 'static/icons.svg#icon-<>', + staticMisc: { + prefix: `static-${STATIC_VERSION}/misc/`, + paths: { + ...genericPaths, + icon: 'icons.svg#icon-<>', }, }, + staticSharedUtil: { + prefix: `static-${STATIC_VERSION}/shared-util/`, + paths: genericPaths, + }, + media: { prefix: 'media/', @@ -100,13 +124,8 @@ const urlSpec = { paths: genericPaths, }, - static: { - prefix: 'static/', - paths: genericPaths, - }, - - util: { - prefix: 'util/', + searchData: { + prefix: 'search-data/', paths: genericPaths, }, }; |