Personally, this is something I've though about a lot. I do have my preferred solution, and it's a
Tiddlywiki, that is, a wiki that lives in a single HTML file, and loads in all standards conforming browsers. It even has mechanisms user generated content and for importing content from other Tiddlywikis.
The nice thing is that it's like a non-linear notebook. I personally feel that such a structure is ideal for ongoing reading of technical works (maybe not for the initial read, but for sure for making sure you find item XYX fast and in a rational way).