Hi Robin and Nick, You definitely CAN output full html, non js, SEO optimized web pages. We use that for our store index and apps pages (on https://www.smileupps.com/store).
We needed to: 1. create html templates of your pages with a templating library(we used handlebars.js), 2. precompile these templates before 'couchapp push' as server side javascript file in ddoc, such as lib/templates.js 3. create a view with name(path) of your page as key, emitting documents containing information of a same page under the same key. These elements may be html for header, links for navigation bar, markdown or raw html for your page content, a list of apps, or anything else 4. create a list which uses: - getrow() to fetch above elements in memory, - var tpls=require(lib/templates), - obtain html by merging templates and documents: htmlforheader=tpls.header(headerdocument), htmlfornavbar=tpls.navbar(linksdocuments) - return/output html from the list function Probably the most difficult part is to precompile correctly those templates, in a way you can use them server side withouth issues. We used a node.js handlebar precompiler automatically run before 'couchapp push', but I think it should be possible to use ermouth's ddoc.me to obtain the same result much more easily. Maybe he can speak for us.. Hope this helps, --Giovanni Il giorno 19/nov/2015 00:13, "Robin Millette" <[email protected]> ha scritto: > Hi, > > First time writing to this list, or any couchdb list for that matter. > Hope to see a brillant couchapp (the concept) revival in 2016! > > On Wed, Nov 18, 2015 at 5:53 PM, Nick <[email protected]> wrote: > > > Thanks - which indeed implies I am right and there is no solution that > works > > without JS on the client... > > I also prefer to send complete html responses, for SEO and general > crawling benefits. > One strategy I used was to craft views to output different kinds of > rows. For instance, you've got you main content row, and you can also > have "block" rows, to pepper your html page with. > The list fonction can then handle those different row types and > generate proper html. > > > -- > Robin >
