Hacker News new | ask | show | jobs
by benibela 1599 days ago
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
1 comments

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!