emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Thibault Marin <thibault.marin@gmx.com>
To: Thomas Ingram <taingram@mtu.edu>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Org publish inserting HTML tags into sitemap-format-entry
Date: Wed, 10 Jul 2019 19:47:18 -0400	[thread overview]
Message-ID: <877e8pwiyh.fsf@dell-desktop.WORKGROUP> (raw)
In-Reply-To: <ea6e99c1-6689-45e3-26e0-f4185e92c094@mtu.edu>


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	other threads:[~2019-07-11  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-10 21:44 Org publish inserting HTML tags into sitemap-format-entry Thomas Ingram
2019-07-10 23:47 ` Thibault Marin [this message]
2019-07-11  0:30   ` Thomas Ingram
2019-07-11  1:30     ` Thibault Marin
2019-07-12 15:08       ` Thomas Ingram

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877e8pwiyh.fsf@dell-desktop.WORKGROUP \
    --to=thibault.marin@gmx.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=taingram@mtu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).