fedwiki / wiki-server

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

HTML Title marked incorrectly #112

Closed KsenyaSerova closed 8 years ago

KsenyaSerova commented 8 years ago

I've been experimenting with indexing using custom Google search and have noticed that all the titles come up as "Smallest Federated Wiki"

<!DOCTYPE html>
<html class='no-js'>
  <head>
    <title>Smallest Federated Wiki</title>
    <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'>
KsenyaSerova commented 8 years ago

That was when I made a SE with http://forage.ward.fed.wiki.org/ and http://future.fedwiki.org/ - every time I search it all the pages titles "Smallest Federated Wiki". When I made one with http://ksenya.me/ it displays page titles normally, but the HTML marked in exact same way as with the two other links?

WardCunningham commented 8 years ago

@KsenyaSerova quotes from the initial (only) html page served from the origin to launch the single page application. It has recently moved to be part of the wiki-client repo. github

The wiki-client quickly replaces this title and revises it as new pages load. github

The undesirable behavior she notices is also true of global search result pages and could be fixed. The problem is that the search robot reads the html title, not the one set by javascript. This initial title could be substituted into the html as it is served. This would require fetching the json in order to discover the proper title from the slug. While doing so, it could also substitute the synopsis as the meta-description.

<meta name="description" content="{{synopsis}}">

One disadvantage of this approach is that it make the "static" html file even less static and places additional computational burdens on the server.

We might consider making two versions, a truly static version that could be published with, say, github pages, and a dynamic version with substitutions expected of a full-featured wiki server.

paul90 commented 8 years ago

Closing as this issue is fixed by #120