glaciers-in-archives / snowman

A static site generator for SPARQL backends.
GNU Lesser General Public License v3.0
114 stars 11 forks source link

First < in template is escaped #73

Closed mzeinstra closed 1 year ago

mzeinstra commented 1 year ago

I have a curious case where in multiple templates the first occurrence of < is escaped.

e.g. I have a person.rdf template that starts with <?xml version="1.0" encoding="utf-8"?> which after build becomes &lt;?xml version="1.0" encoding="utf-8"?>

In another case I have a script.js with a function and in the first loop for (i = 0; i < tr.length; i++) { becomes for (i = 0; i &lt; tr.length; i++) {

Is this something I am doing wrong, or a bug in the Snowman?

mzeinstra commented 1 year ago

Figured it out using the non-html example: https://github.com/glaciers-in-archives/snowman/blob/main/examples/non-html-content/views.yaml

I needed to put unsafe:true at all my not HTML views. e.g.

 - output: "main.js"
    template: "main.js"
    unsafe: true