Leanote provides services for note and blog. You can use "note" as your personal notebook, if you want to share with friends, just publish note or notebook to the blog. The code of Leanote can be found on Github but you have to pay to get the app from the official website, hence this freemium license.
- Probably the most complete open source, self-hosted or paid-for Evernote alternative in terms of functionality. Sadly, the English instructions aren't easy to find or that clear. But it works phenomenally well as an Evernote alternative.
- It supports, markdown, sequence diagram, flowchart, math, and syncing. The desktop clients (Win/MacOs) also export to HTML and PDF. It support Nested notebooks. I doesn't have web clipper, and this is fine as I don't need it. I like to structure my notes using Markdown. Many of instructions are in Chinese and some are in English. If you drop in question in English (in the forum), someone would reply in English. The team is in the progress of translating Chinese manual to English.