Open maphew opened 2 days ago
As written above, this would be a major change in out of the box Trilium behaviour, so not to be approached lightly. With my recent learning success in adding a whitelist of html tags to the Options page I think I see a path to how to make this an optional setting too. We'll see how well that goes!
I don't know if this is a good approach architecturally speaking, and welcome comments from experienced minds.
Would this change require a user to have a root Share note already set up?:
{
"message": "Share root note not found"
}
I understand the reason why, but IMO since this is firstly a note-taking platform (and not a microblog), I'm not sure if this is the best idea. I understand that your suggestion is what platforms like Wordpress do where the root URL redirects to the website, and /wp-admin
is reserved for management/editing. I'm sure @meichthys will have a much more sensible response.
You could do exactly what you're suggesting with access to the webserver and changing its configuration, but since you're on Pikapods I don't believe you have access to that.
Yes shareRoot needs to be defined, thanks for the reminder! I've added that note to the helper text in the PR
First off, I think this is a neat idea, and I can see it's use case, however if it were to be implemented, it would certainly need to be a non-default option.
I would also suspect that there could be some unexpected side effects of a change like this (Elian would have a better understanding on that).
Thanks for the feedback @meichthys. Yes it's off by default.
Discussed in https://github.com/orgs/TriliumNext/discussions/596
At the technical level, it's actually easy to redirect bare domain to share:
#shareRoot
../src/services/auth.ts
change line 20 fromres.redirect("login")
tores.redirect("share")
.To login, edit url in address bar and replace path with '/login', ex:
https://my.trilium.net/login
...
This won't work for PikaPods since they only use the lates release stable release from Docker Hub, and making this change in stable needs more thought, work, and documentation.