emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Brett Viren <bv@bnl.gov>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Overriding org-html-headline or other export functions?
Date: Mon, 29 May 2017 08:22:43 -0400	[thread overview]
Message-ID: <8637bn3l9o.fsf@bnl.gov> (raw)

Hi,

I am writing a manual in Org which gets exported/published to HTML and
styled with org-html-themes.  I want the HTML to include a little icon
next to each headline which is a direct link to the headline itself.
Basically, I want to rip off what GitHub does when it renders Org.

First, is there some way to achieve this headline link without
explicitly adding it in the Org text or diving into Org Elisp?

I couldn't find one so I took the latter route by copying out the whole
of org-html-headline into the Emacs init Elisp file I used for
publishing and fiddle with it until I got more or less what I wanted.
Here are the lines tweaked:

  https://github.com/WireCell/wire-cell-docs/blob/master/manuals/publish.el#L69

Here is an example of the result:

  http://www.phy.bnl.gov/~bviren/wirecell.github.io/manual.html

Is this copy+hack the proper way to tweak the exporting in this case?
In particular, I worry about my copy of org-html-headline diverging from
the real.


I read about export filters and extending an existing back-end, but I
think these do not apply, but maybe I have that wrong.

Thanks for any suggestions!

-Brett.

             reply	other threads:[~2017-05-29 12:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-29 12:22 Brett Viren [this message]
2017-05-29 17:38 ` Overriding org-html-headline or other export functions? Charles C. Berry
2017-05-29 18:20   ` Brett Viren
2017-05-29 20:34     ` Brett Viren
2017-05-29 20:35     ` Charles C. Berry
2017-05-29 18:33 ` Marcin Borkowski
2017-05-29 19:14   ` Brett Viren

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=8637bn3l9o.fsf@bnl.gov \
    --to=bv@bnl.gov \
    --cc=emacs-orgmode@gnu.org \
    /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).