As for sharing read-only notes for non-joplin users, don't reinvent the wheel.
Right now, I copy everything over to a hugo site, relinking any attachments. The attachments are quite time-needy, as they need to be renamed (in markdown or the file). For basic text, this is fine, but for special syntax, it might not work.
The preview view is an iframe anyways, I would guess getting / exporting as html not that hard, as you don't have to build much new.
Of course, exporting markdown with attachments, then re-implementing all rendering in a SSG is possible, but it's not very practical.
html files can be hosted easily. Now, from the user side, making joplin upload a file unencrypted to a remote (the ones implemented), in a specified directory (joplinroot/hosted-notes for example), and then generating a link based on configuration is possible.
The webserver serves from the directory (or the directory is synced to it) to
domain.tld/j/. When the user decides to share, generate a short either mnemonic or 4-6 alphanumeric string, allowing the user to rename it. Say user named it to
my-note, the attachments will be in
domain.tld/j/my-note, and the rendered result in
domain.tld/j/my-note/index.html. From preconfigured settings, joplin knows it needs to pre-append
https://domain.tld/j/. This could also be present in the UI on renaming the path.
Now who likes setting up stuff with webservers? Joplin-hosted notes. It's a revenue source for the developers, and provides easy setup to users. When selected, and stored, credentials are synced with clients. 3$/yr for example (warn: maybe load cap of like n visitors per note per month.. or just auto-scale). The public directory is just pushed to a different remote.
Pardon for bad unedited writing, have to go atm.
Tldr take output of rendered html in joplin, along with downloadable attachments (non-images), throw them in a directory (optionally hosted by joplin), where it reaches the web server. Web URL path is pre-appended, and presented to the user. User may change path/sub-path or choose to remove (simple move, remove commands), select, if the note should be auto-updated, and select a (latest) version to be hosted.
I would imagine there really wouldn't be many sync conflicts, for the public directory, but the area needs to be thought of anyway.
Ping me to remind me. I can draft up code design docs and UI examples.