diff --git a/index.html b/index.html index fba211c..c5bd493 100644 --- a/index.html +++ b/index.html @@ -392,6 +392,9 @@ (function () { var inTheseus = location.hostname === 'pithos.sia'; var path = location.pathname.replace(/^\/bns\/pithos\.sia(?=\/|$)/, '').replace(/^\/pithos(?=\/|$)/, '') || '/'; + // pithos.sia/l//: a public link; the file lives at navigate.st/sia + var link = /^\/l\/([A-Za-z0-9_-]{4,64}(?:\/.*)?)$/.exec(path); + if (link) { location.replace('https://navigate.st/sia/' + link[1] + location.search); return; } var sitePage = /^\/(index\.html|vs(\.html)?|docs(\/.*)?|llms\.txt)?$/.test(path); var appPath = sitePage ? '/' : path; var href = inTheseus ? (sitePage ? '/app' : path) : 'http://127.0.0.1:47621/open?path=' + encodeURIComponent(appPath);