Skip to content
This repository was archived by the owner on Mar 9, 2025. It is now read-only.

Moving over to a Trilium instance for documentation? #117

Open
eliandoran opened this issue Oct 18, 2024 · 18 comments
Open

Moving over to a Trilium instance for documentation? #117

eliandoran opened this issue Oct 18, 2024 · 18 comments
Labels
enhancement New feature or request

Comments

@eliandoran
Copy link
Contributor

@meichthys , @Alumniminium , now that there is PikaPods, I think we can consider moving the documentation over to a shared instance of Trilium with only a few people having edit access. The public will be able to access it via the share API; what's your take on it?

I think there are a few blockers that we might want to address before:

  • The default share theme is not very user-friendly. I think @zerebos wanted to contribute upstream to Trilium Notes an improved share theme but I'm not sure if he had the time to do it.
  • The URLs are not very user-friendly because the note IDs are randomly generated. It might be interesting to allow the user to define custom friendly URLs for shared notes, but it would involve a bit of development.

cc. @maphew

@eliandoran eliandoran added the enhancement New feature or request label Oct 18, 2024
@maphew

This comment has been minimized.

@maphew
Copy link
Contributor

maphew commented Oct 18, 2024

re: default on-save: that idea would add needless performance hit. Better to tie it to "when shared" slider which is a one time or at least user initiated thing.

@meichthys
Copy link
Contributor

I'm 100% in favor of this. It would make the editing of the docs MUCH easier than the github flow. I think the recent changes would be sufficient to track changes, and we can always take manual backups if needed.

Although the default share theme isn't amazing, it is probably on-par (or better) than our existing github pages documentation which has no sidebar with a table of contents and very poor navigation.

The custom urls would definitely be nice, but I don't think it should be a blocker.

We would incur some minor financial costs for hosting this unless perhaps PikaPods could do us a favor and host it for us? @maphew do you know if this might be a possibility? In order to make it mutually beneficial, I don't see why we couldn't add something to our docs that indicates that we are hosted on PikaPods(?)

@maphew

This comment has been minimized.

@m3nu
Copy link

m3nu commented Oct 18, 2024

You guys are welcome to run as many pods you need for free on our platform. For demo, docs, etc.

@eliandoran
Copy link
Contributor Author

@maphew ,

Friendly urls: perhaps a script with button/keystroke for "turn title into share-alias". One better: it's actually the default on save, but only acts if #shareAlias is missing/empty. In case of duplicate append something.

An important aspect is that changing the friendly URL cannot be done automatically, because the user might not be aware that changing the title will also affect the URL. Generally once a page is published it's a good idea to keep the URL the same in order not to break any hard links (inside the application, or bookmarked by viewers of the site).

url generally: How does trilium.rocks bare domain serve shared pages? There's no share/ prefix. And then how does one get to the edit interface? (I'd like to do the same at my domain, but the bare url is a login prompt). Also see https://github.com/orgs/TriliumNext/discussions/494

Most likely it's simply a reverse proxy configuration. Whenever the domain is accessed, it proxies the URLs to a local instance with the share/ prefix. Of course, this is only an assumption, but it's most likely.

@eliandoran
Copy link
Contributor Author

You guys are welcome to run as many pods you need for free on our platform. For demo, docs, etc.

@m3nu , your help is much appreciated.

I will create an account and create a pod to manage the documentation as a proof of concept. We'll later see with the rest of the team what they think about it.

@maphew
Copy link
Contributor

maphew commented Oct 18, 2024

An important aspect is that changing the friendly URL cannot be done automatically, because the user might not be aware that changing the title will also affect the URL.

Agreed, the auto apply of shareAlias only happens once, and after that is only changed by a deliberate user act and not by the system.

@eliandoran
Copy link
Contributor Author

@Alumniminium , @meichthys , please reach out to my via an email to [email protected] in order to share credentials.

@perfectra1n
Copy link
Member

I worked with Zerebos to set up some documentation on how to set up the share theme here, and I've uploaded the "full" set of Notes required to use the theme here along with some instructions. It works super well, I love the theme :)

@Alumniminium
Copy link
Contributor

Sent the mail, sounds perfect. I'm all for it.

@eliandoran
Copy link
Contributor Author

@perfectra1n , wonderful job.

@eliandoran
Copy link
Contributor Author

Sent the mail, sounds perfect. I'm all for it.

@Alumniminium , replied. Let me know if you don't receive it, since I had some server logs about the message being filtered.

@Alumniminium
Copy link
Contributor

Sent the mail, sounds perfect. I'm all for it.

@Alumniminium , replied. Let me know if you don't receive it, since I had some server logs about the message being filtered.

all good :) thanks!

@maphew
Copy link
Contributor

maphew commented Feb 24, 2025

What is the status on the effort to move the docs repo into a hosted Trilium instance sit?
Is there something I can do to help?

@meichthys
Copy link
Contributor

I think we were waiting for #658 so we could have a cleaner url for the docs. If #658 is the same as #1207, we can probably close #658 and use this feature for redirecting users to our docs.

@maphew
Copy link
Contributor

maphew commented Feb 25, 2025

Ah, thank you @meichthys for reminding me TriliumNext/Notes#658 was still open, yes it's closed as of PR TriliumNext/Notes#1207.

Near the end @eliandoran suggested:

instead of simply redirecting to /share, wouldn't it make more sense to also rewrite all addresses such as /share/STi3RCMhUvG6 to /STi3RCMhUvG6?

...and I argued (lightly) for keeping /share for making it easy for the author to tell what's private and public. In the case of Trilium Docs though I think the argument flips the other way.

My first attempt at this, TriliumNext/Notes#667, included an option to make the redirect target url configurable. I abandoned because it made things too complicated. Now that I know more I'll take another run at it.

@maphew
Copy link
Contributor

maphew commented Feb 26, 2025

My first attempt at this, TriliumNext/Notes#667, included an option to make the redirect target url configurable. I abandoned because it made things too complicated. Now that I know more I'll take another run at it.

TriliumNext/Notes#1288 - some progress, but not working yet.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants