There is no abstraction for the description metatag yet in WebDSL.

Not sure what the following ‘description’ is used for, if used at all:

"description" "{" Word* "}"     -> Description {cons("Description")}

link

Anyway, Let’s add support for the description metatag. We can add the following template to built-in:

 define description() {
   includeHead("<meta name='description' content='" + /'/.replaceAll( "&#39;" ,rendertemplate(elements) ) +"'>")
 }

Note: We need to filter the value of rendertemplate(elements) in some way that it won’t interfere with the surrounding tag. I think replacing all single quotes with the html code &#39 would suffice.

Or we need to treat it differently by our compiler in a similar fashion as title.

Submitted by Elmer van Chastelet on 26 November 2012 at 22:05

On 27 November 2012 at 11:27 Danny Groenewegen commented:

The existing description syntax is an unrelated construct for comments, and hardly ever used.

The description template looks like a good solution for now, title should become something similar instead of a separate code generation rule.

The bigger refactoring that needs to happen here is to move the base page template (the html surrounding each page definition) to the library, allowing an application to override it for complete control.


On 27 November 2012 at 11:34 Elmer van Chastelet commented:

Added description template in r5538.

Danny: concerning the bigger refactoring, let’s create a new issue for that?


On 27 November 2012 at 11:34 Elmer van Chastelet closed this issue.

On 27 November 2012 at 11:34 Elmer van Chastelet tagged feature

On 27 November 2012 at 11:34 Elmer van Chastelet removed tag improvement

Log in to post comments