Thanks, but adding `#+begin_export html' simply outputs that as well without changing the output

"#+begin_export html
<div class=\"timestamp\">%s</div> [[file:blog/%s][%s]]
#+end_export"

Produces

<li>#+begin<sub>export</sub>html &lt;div class="timestamp"&gt;2019-07-10&lt;/div&gt; <a href="blog/test.html">Test</a>#+end<sub>export</sub></li>

On 7/10/19 7:47 PM, Thibault Marin wrote:
You may need to wrap the html part in a `#+begin_export html' block or
similar.  I believe the custom sitemap function should generate org
content, not directly HTML.

Hope it helps.

On 2019-07-10T17:44:01-0400, Thomas Ingram wrote:

   Hello,

   I am using ox-publish to build my website. I have a custom
   sitemap-formt-entry function that adds post dates and I'm trying to
   add a div around those dates. Problem is the tags are getting escaped
   in the resulting HTML. How can I add tags without them being escaped?

   Below is my :sitemap-format-entry function.

   (defun org-sitemap-custom-entry-format (entry style project)
    (let ((filename (org-publish-find-title entry project)))
    (if (= (length filename) 0)
    (format "*%s*" entry)
    (format "<div class=\"timestamp\">%s</div> [[file:blog/%s][%s]]"
    (format-time-string "%Y-%m-%d"
        (org-publish-find-date entry project))
    entry
    filename))))

   Thanks for the help!

   Thomas Ingram




Reply via email to