arnaudsm / raito

Mini Markdown Wiki/CMS in 8kb of JavaScript
https://raito.arnaud.at
MIT License
107 stars 13 forks source link

autodetection of sitePAth, no need to configure it #43

Closed mckaygerhard closed 1 year ago

mckaygerhard commented 1 year ago
arnaudsm commented 1 year ago

This code breaks the tests. Users can open the website from another page than the homepage.

Eg: when opening localhost:3000/docs/ with browser routing, the code sets sitePath to /docs/, which is obviously incorrect.

Which problem are you trying to solve ? Isn't the default sitePath enough ?

mckaygerhard commented 1 year ago

oh no! you have right.. i noted that and i am making some code refactoring as the picture shows.. wait for me

Screenshot at 2023-07-18 09-47-44

mckaygerhard commented 1 year ago

the idea is that at first try .. launch a user alert to demand configuration, after that we can just tell user that must configure constants

mckaygerhard commented 1 year ago

i will close this cos after many test and try, concluded that must be set manually the root site path due security issues..