From 02b41bd90011e2006e79f67e268b41375b3513c4 Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Wed, 4 Sep 2024 17:59:28 -0500 Subject: [PATCH] CLDR-17803 docs/site: re-add .html in internal path --- docs/site/assets/js/cldrsite.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/site/assets/js/cldrsite.js b/docs/site/assets/js/cldrsite.js index f8cdef6362f..fbfac161684 100644 --- a/docs/site/assets/js/cldrsite.js +++ b/docs/site/assets/js/cldrsite.js @@ -2,6 +2,11 @@ const { ref } = Vue; // site management +let myPath = window.location.pathname.slice(1) || "index.html" +if (!/\.html/.test(myPath)) { + myPath = `${myPath}.html`; // cloudflare likes to drop the .html +} + /** replace a/b/c.md with a/b */ function path2dir(p) { const dir = p.split("/").slice(0, -1).join("/"); @@ -189,7 +194,7 @@ const app = Vue.createApp( }, { // path of / goes to /index.html - path: window.location.pathname.slice(1) || "index.html", + path: myPath, } );