Maps drop-in moves to /embed/doxa-maps-build; old /js links redirect
- The generated maps output now lives under public/embed/ next to the embed page; the site's map slots, the full-page maps view and the embed page point there - /js/doxa-maps-build/** and the older /js/doxa-maps/** answer 301 to the new location, so links already shared keep working - Frame policy follows the new path
|
|
@ -1,7 +1,7 @@
|
|||
# doxa-life (doxa-maps-cdn)
|
||||
|
||||
The team's shared Nuxt app and CDN host for the Doxa maps. Static drop-in map
|
||||
builds live under `public/js/doxa-maps-build/`, and the app serves the Mapbox
|
||||
builds live under `public/embed/doxa-maps-build/`, and the app serves the Mapbox
|
||||
token endpoint that those maps use at runtime.
|
||||
|
||||
## Maps & map tokens
|
||||
|
|
@ -13,7 +13,7 @@ The maps support two providers: **MapLibre** and **Mapbox**.
|
|||
MapLibre-based maps need **no API token**. The build sets `var TOKEN_FREE = true;`
|
||||
and mounts the map with an empty token (`provider: 'maplibre'`, using
|
||||
`window.maplibregl`), skipping the token ladder entirely.
|
||||
See `public/js/doxa-maps-build/doxa-maps/demo-map/demo-map/maplibre/index.html`.
|
||||
See `public/embed/doxa-maps-build/doxa-maps/demo-map/demo-map/maplibre/index.html`.
|
||||
|
||||
### Mapbox — requires a public (`pk.`) token
|
||||
|
||||
|
|
@ -33,7 +33,7 @@ returns JSON `{ token, type }` (with an optional `expires_in`):
|
|||
|
||||
**Static drop-in maps — token ladder (precedence order):** the built map pages
|
||||
resolve a Mapbox token by walking this ladder (see
|
||||
`public/js/doxa-maps-build/doxa-maps/doxa-simple-map/doxa-simple-map/engagement/index.html`).
|
||||
`public/embed/doxa-maps-build/doxa-maps/doxa-simple-map/doxa-simple-map/engagement/index.html`).
|
||||
Rungs 1–3 yield a token used **directly, with no network call**:
|
||||
|
||||
1. A token hardcoded into the page's profile-config (`config.tk`)
|
||||
|
|
|
|||
|
|
@ -10,13 +10,13 @@ const MAPBOX_JS = 'https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.js'
|
|||
const MAPBOX_GEOCODER_JS = 'https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v5.0.0/mapbox-gl-geocoder.min.js'
|
||||
|
||||
// Map of bundle keys → CDN drop-in URLs. The built maps live under
|
||||
// public/js/doxa-maps-build/ (the doxa-maps bundler's output folder, dropped in here),
|
||||
// served at /js/doxa-maps-build/doxa-maps/<bundle>/<bundle>.js. Each IIFE bundle
|
||||
// public/embed/doxa-maps-build/ (the doxa-maps bundler's output folder, dropped in here),
|
||||
// served at /embed/doxa-maps-build/doxa-maps/<bundle>/<bundle>.js. Each IIFE bundle
|
||||
// registers its own custom element (doxa-map / doxa-research-map), so only one
|
||||
// bundle should load per page.
|
||||
const BUNDLES = {
|
||||
'simple-map': '/js/doxa-maps-build/doxa-maps/doxa-simple-map/doxa-simple-map.js',
|
||||
'research-map': '/js/doxa-maps-build/doxa-maps/doxa-research-map/doxa-research-map.js'
|
||||
'simple-map': '/embed/doxa-maps-build/doxa-maps/doxa-simple-map/doxa-simple-map.js',
|
||||
'research-map': '/embed/doxa-maps-build/doxa-maps/doxa-research-map/doxa-research-map.js'
|
||||
} as const
|
||||
type BundleKey = keyof typeof BUNDLES
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
// doxa.life/doxa-maps — the DOXA maps SPA (every map, one app).
|
||||
//
|
||||
// Frames the bundler's single-page app (the app-wrapper shell) from the
|
||||
// drop-in at public/js/doxa-maps-build/ — every map, table and dashboard the
|
||||
// drop-in at public/embed/doxa-maps-build/ — every map, table and dashboard the
|
||||
// bundler ships, composed into one lazy-loaded app, always exactly as current
|
||||
// as the build in this repo. Pointed to from the research page
|
||||
// ("See all DOXA maps →").
|
||||
|
|
@ -29,7 +29,7 @@ onMounted(async () => {
|
|||
if (tk) q.set('tk', tk)
|
||||
if (utm) q.set('utm_source', utm)
|
||||
const qs = q.toString()
|
||||
frameSrc.value = '/js/doxa-maps-build/index.html' + (qs ? `?${qs}` : '')
|
||||
frameSrc.value = '/embed/doxa-maps-build/index.html' + (qs ? `?${qs}` : '')
|
||||
})
|
||||
useHead({
|
||||
title: 'All DOXA Maps',
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// Below the UupgsList we embed the 5-tab `research-map` IIFE built from
|
||||
// the upstream DOXA-MAPS module — exposes Engagement / Prayer
|
||||
// / Adoption (clones of doxa-simple-map) plus Language Families. The
|
||||
// the doxa-maps build now publishes /js/doxa-maps-build/doxa-maps/doxa-research-map/doxa-research-map.js (canonical name).
|
||||
// the doxa-maps build now publishes /embed/doxa-maps-build/doxa-maps/doxa-research-map/doxa-research-map.js (canonical name).
|
||||
// via the publishToDoxaLife() plugin.
|
||||
|
||||
import { buildUupgListTranslations } from '~/utils/uupgListTranslations'
|
||||
|
|
@ -42,7 +42,7 @@ useTextHighlight()
|
|||
</div>
|
||||
|
||||
<!-- Research map embed — sits directly under the H1, above the UUPG
|
||||
search bar. Loads /js/doxa-maps-build/doxa-maps/doxa-research-map/doxa-research-map.js (auto-published from
|
||||
search bar. Loads /embed/doxa-maps-build/doxa-maps/doxa-research-map/doxa-research-map.js (auto-published from
|
||||
the upstream module on every research-mfe build). -->
|
||||
<DoxaMapSlot
|
||||
map-id="research-page-map"
|
||||
|
|
|
|||
|
|
@ -154,16 +154,17 @@ export default defineNuxtConfig({
|
|||
},
|
||||
|
||||
routeRules: {
|
||||
// LEGACY MAP PATHS HEAL THEMSELVES: the drop-in moved to /js/doxa-maps-build/
|
||||
// LEGACY MAP PATHS HEAL THEMSELVES: the drop-in lives at /embed/doxa-maps-build/ (earlier: /js/doxa-maps/, then /js/doxa-maps-build/)
|
||||
// (one output folder under the js path). Any old /js/doxa-maps/... link —
|
||||
// bookmarks, muscle memory, older embeds — 301s to the current location.
|
||||
'/js/doxa-maps/**': { redirect: { to: '/js/doxa-maps-build/doxa-maps/**', statusCode: 301 } },
|
||||
'/js/doxa-maps/**': { redirect: { to: '/embed/doxa-maps-build/doxa-maps/**', statusCode: 301 } },
|
||||
'/js/doxa-maps-build/**': { redirect: { to: '/embed/doxa-maps-build/**', statusCode: 301 } },
|
||||
|
||||
// THE DROP-IN STAYS FRAMEABLE: every partner-site embed is an iframe of one of these leaf
|
||||
// pages, so they must be embeddable from ANY origin. Nitro does not read the bundler's
|
||||
// public/_headers frame policy — this rule is the site-side contract. Without it, a future
|
||||
// global X-Frame-Options / frame-ancestors header would blank every embedded map at once.
|
||||
'/js/doxa-maps-build/doxa-maps/**': { headers: { 'content-security-policy': 'frame-ancestors *' } },
|
||||
'/embed/doxa-maps-build/doxa-maps/**': { headers: { 'content-security-policy': 'frame-ancestors *' } },
|
||||
|
||||
// Content-hashed build assets never change under the same URL — cache forever.
|
||||
'/_nuxt/**': { headers: { 'cache-control': 'public, max-age=31536000, immutable' } },
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 422 KiB After Width: | Height: | Size: 422 KiB |
|
Can't render this file because it is too large.
|
|
Before Width: | Height: | Size: 217 KiB After Width: | Height: | Size: 217 KiB |
|
Before Width: | Height: | Size: 184 KiB After Width: | Height: | Size: 184 KiB |
|
Before Width: | Height: | Size: 235 KiB After Width: | Height: | Size: 235 KiB |
|
Before Width: | Height: | Size: 230 KiB After Width: | Height: | Size: 230 KiB |
|
Before Width: | Height: | Size: 216 KiB After Width: | Height: | Size: 216 KiB |
|
Before Width: | Height: | Size: 220 KiB After Width: | Height: | Size: 220 KiB |
|
Before Width: | Height: | Size: 232 KiB After Width: | Height: | Size: 232 KiB |
|
Before Width: | Height: | Size: 219 KiB After Width: | Height: | Size: 219 KiB |
|
Before Width: | Height: | Size: 219 KiB After Width: | Height: | Size: 219 KiB |
|
Before Width: | Height: | Size: 240 KiB After Width: | Height: | Size: 240 KiB |
|
Before Width: | Height: | Size: 219 KiB After Width: | Height: | Size: 219 KiB |
|
Before Width: | Height: | Size: 223 KiB After Width: | Height: | Size: 223 KiB |
|
Before Width: | Height: | Size: 224 KiB After Width: | Height: | Size: 224 KiB |
|
Before Width: | Height: | Size: 238 KiB After Width: | Height: | Size: 238 KiB |
|
Before Width: | Height: | Size: 197 KiB After Width: | Height: | Size: 197 KiB |
|
Before Width: | Height: | Size: 188 KiB After Width: | Height: | Size: 188 KiB |
|
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 73 KiB |
|
Before Width: | Height: | Size: 167 KiB After Width: | Height: | Size: 167 KiB |
|
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 101 KiB |
|
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 110 KiB After Width: | Height: | Size: 110 KiB |
|
Before Width: | Height: | Size: 166 KiB After Width: | Height: | Size: 166 KiB |
|
Before Width: | Height: | Size: 215 KiB After Width: | Height: | Size: 215 KiB |
|
Before Width: | Height: | Size: 182 KiB After Width: | Height: | Size: 182 KiB |
|
Before Width: | Height: | Size: 168 KiB After Width: | Height: | Size: 168 KiB |
|
Before Width: | Height: | Size: 164 KiB After Width: | Height: | Size: 164 KiB |
|
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 134 KiB |
|
Before Width: | Height: | Size: 210 KiB After Width: | Height: | Size: 210 KiB |
|
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 106 KiB |
|
Before Width: | Height: | Size: 142 KiB After Width: | Height: | Size: 142 KiB |
|
Before Width: | Height: | Size: 154 KiB After Width: | Height: | Size: 154 KiB |
|
Before Width: | Height: | Size: 108 KiB After Width: | Height: | Size: 108 KiB |
|
Before Width: | Height: | Size: 150 KiB After Width: | Height: | Size: 150 KiB |
|
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 147 KiB |
|
Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 137 KiB |
|
Before Width: | Height: | Size: 125 KiB After Width: | Height: | Size: 125 KiB |
|
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 134 KiB |
|
Before Width: | Height: | Size: 148 KiB After Width: | Height: | Size: 148 KiB |
|
Before Width: | Height: | Size: 145 KiB After Width: | Height: | Size: 145 KiB |
|
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 101 KiB |
|
Before Width: | Height: | Size: 138 KiB After Width: | Height: | Size: 138 KiB |
|
Before Width: | Height: | Size: 185 KiB After Width: | Height: | Size: 185 KiB |
|
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 101 KiB |
|
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 117 KiB |
|
Before Width: | Height: | Size: 127 KiB After Width: | Height: | Size: 127 KiB |
|
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 112 KiB |
|
Before Width: | Height: | Size: 115 KiB After Width: | Height: | Size: 115 KiB |
|
Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 132 KiB |
|
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 98 KiB |
|
Before Width: | Height: | Size: 209 KiB After Width: | Height: | Size: 209 KiB |
|
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 116 KiB |
|
Before Width: | Height: | Size: 142 KiB After Width: | Height: | Size: 142 KiB |
|
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 122 KiB |
|
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 147 KiB |
|
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 122 KiB |
|
Before Width: | Height: | Size: 139 KiB After Width: | Height: | Size: 139 KiB |
|
Before Width: | Height: | Size: 155 KiB After Width: | Height: | Size: 155 KiB |
|
Before Width: | Height: | Size: 148 KiB After Width: | Height: | Size: 148 KiB |
|
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 134 KiB |
|
Before Width: | Height: | Size: 104 KiB After Width: | Height: | Size: 104 KiB |
|
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 102 KiB |
|
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 100 KiB |
|
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 147 KiB |
|
Before Width: | Height: | Size: 133 KiB After Width: | Height: | Size: 133 KiB |
|
Before Width: | Height: | Size: 109 KiB After Width: | Height: | Size: 109 KiB |
|
Before Width: | Height: | Size: 107 KiB After Width: | Height: | Size: 107 KiB |
|
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 88 KiB |
|
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 147 KiB |
|
Before Width: | Height: | Size: 123 KiB After Width: | Height: | Size: 123 KiB |
|
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 106 KiB |
|
Before Width: | Height: | Size: 195 KiB After Width: | Height: | Size: 195 KiB |
|
Before Width: | Height: | Size: 152 KiB After Width: | Height: | Size: 152 KiB |
|
Before Width: | Height: | Size: 133 KiB After Width: | Height: | Size: 133 KiB |
|
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 147 KiB |
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 83 KiB |
|
Before Width: | Height: | Size: 140 KiB After Width: | Height: | Size: 140 KiB |
|
Before Width: | Height: | Size: 129 KiB After Width: | Height: | Size: 129 KiB |
|
Before Width: | Height: | Size: 210 KiB After Width: | Height: | Size: 210 KiB |
|
Before Width: | Height: | Size: 143 KiB After Width: | Height: | Size: 143 KiB |
|
Before Width: | Height: | Size: 138 KiB After Width: | Height: | Size: 138 KiB |
|
Before Width: | Height: | Size: 96 KiB After Width: | Height: | Size: 96 KiB |
|
Before Width: | Height: | Size: 159 KiB After Width: | Height: | Size: 159 KiB |
|
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 84 KiB |
|
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 116 KiB |
|
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 147 KiB |
|
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 88 KiB |