Skip to content

Commit

Permalink
CLDR-17803 docs/site: re-add .html in internal path
Browse files Browse the repository at this point in the history
  • Loading branch information
srl295 committed Sep 4, 2024
1 parent 6d8e47d commit 02b41bd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/site/assets/js/cldrsite.js
Original file line number Diff line number Diff line change
Expand Up @@ -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("/");
Expand Down Expand Up @@ -189,7 +194,7 @@ const app = Vue.createApp(
},
{
// path of / goes to /index.html
path: window.location.pathname.slice(1) || "index.html",
path: myPath,
}
);

Expand Down

0 comments on commit 02b41bd

Please sign in to comment.