I use TiddlyWiki via TiddlyPWA. It’s an offline-capable PWA with builtin sync and encryption. It doesn’t have folders but it does have nestable tags. I don’t think it supports markdown out of the box, but I’m positive you can find a plugin to use markdown. Plugins are crazy easy to install in TiddlyWiki; you just drag and drop the plugin into your wiki window and confirm the installation.
nodebb and discourse are working on activitypub support. See https://crag.social/@devnull/111732273308478221