QOwnNotes (QON) is a program for organising and syncing 'notes' / text files. By default it uses Markdown, but you can use plain ol' TXT files too. It can convert them to PDF and HTML (but the markup is a bit ugmo). It has built-in support for syncing to OwnCloud and NextCloud. You can pretty easily extend it's functionality with scripting. Styling the HTML previews is a pain!
I use it a lot!, and sync stuff between computers and my phone with Syncthing.
You can link to other notes by using
note:// within a regular Markdown link, for example
[link-text](note://note-you're-linking-to). You don't have to specify the folder it's in, if it's in one.
More recently the syntax
<My note.md> /
[Text](My note.md) |
<My subfolder/My note.md> / [Text](My subfolder/My note.md) has been added.