Hacker News new | past | comments | ask | show | jobs | submit login

I use XQuery as static site generator. It is a w3c standard.

You just write the HTML and then it replaces $variables with data, e.g.:

     <html><head>
       <title>{$title}</title>
     </head><body>
       <h1>{$title}</h1>
       <div class="main">{$content}</div>
       ...
It has for loops and functions, too



Wow, did not know about XQuery. Can you point to some resources explaning how one would use it as a SSG?


I only read the specification. It covers every there is in XQuery

I searched around and found this article: https://www.gnu.org/software/qexo/XQ-Gen-XML.html

And here is the source of my website using it: https://github.com/benibela/site


Thanks, this is fascinating!




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: