fedwiki / wiki-server

Federated Wiki client and server in Node.js
Other
153 stars 35 forks source link

Item IDs absent from rendered HTML #139

Open opn opened 6 years ago

opn commented 6 years ago

Testing with curl I find that the HTML returned from routes ending in .html do not have ids on the paragraph divs returned. This seems to be added by the javascript.

Would be good to add these to the vanilla markup so that programmes can fetch specific portions if rendered html.

WardCunningham commented 6 years ago

Good idea. Should be easy. But the server-side rendering into html is only for a few item types intended to be read by robots. The rendering could be easily duplicated by a consumer from the json data.

https://github.com/fedwiki/wiki-server/blob/5632501ee391256c0342913ece98bc3693159801/lib/server.coffee#L56-L76

It might be interesting to build a "rendering proxy" that would run client plugins server-side for any lineup url including those that span multiple sites. Working out verses of the 99 Bottles of Beer song would be a good test case.

WardCunningham commented 6 years ago

Speaking of rendering, github has done a nice job of expanding my code reference into a code window. I wonder how that comes out in watch list email? They don't send me a copy but maybe someone else can tell us how hard they try to match the rendering they do online.

For comparison, here is a screen shot of what I am seeing from me in the comment stream.

image

paul90 commented 6 years ago

They don't try very hard...

screen shot 2018-03-08 at 16 01 23