Re: How to include global HTML attributes in posts in Haunt Static Site Generator

"Thompson, David" <[email protected]>
Newsgroups gmane.lisp.guile.user
Message-ID <CAJ=RwfYoqHfetOYN1geT7HFfFw7RcriPuJisHir7zt4GufJJYg@mail.gmail.com>
On Thu, Mar 20, 2025 at 5:50 PM Tomas Volf <[email protected]> wrote:
>
> Pon Arun Kumar R <[email protected]> writes:
>
> > Questions:
> > 1. Which module in haunt needs to be modified? is it the module where the
> > metadata key value pairs are passed on to render the html?
>
> I do not think there is anything in haunt that you need to modify.  You
> can just add your extra metadata and access the full alist using
> post-metadata procedure.  You can even define additional accessors in
> your own code as:
>
> --8<---------------cut here---------------start------------->8---
> (define (post-metadata-lang post)
>   (assq-ref (post-metadata post) 'lang))
> --8<---------------cut here---------------end--------------->8---
>
> > 2. How to code and extend so that the global attributes, local attributes
> > and HTML5 elements are supported with(in) haunt posts?
>
> You can just modify your theme, in particular the procedure passed to
> #:post-template argument, to inspect the post-metadata and adjust the
> generated HTML based on your requirements.

Tomas is correct. Thanks for answering faster than I could. :)

- Dave
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.