From: Ihor Radchenko <yantar92@posteo.net>
To: Britt Anderson <britt@b3l.xyz>
Cc: emacs-orgmode@gnu.org
Subject: Re: ox-publish index allows alternative formats?
Date: Tue, 25 Jul 2023 08:11:11 +0000 [thread overview]
Message-ID: <878rb4s95s.fsf@localhost> (raw)
In-Reply-To: <87mszlctmn.fsf@b3l.xyz>
Britt Anderson <britt@b3l.xyz> writes:
> Question:
>
> Could ~:makeindex~ (in the ~org-publish-project-alist~) be expanded to
> accept a user provided function for formatting the output differently?
Yes.
> It seems like it would be nice to allow users to provide their own
> formatting functions to ~org-publish-index-generate-theindex~. Similar
> to the way that ~:sitemap-function~ allows a user controlled sitemap.
> ...
> My question is whether this is something that is worth doing, and if it
> is worth doing how hard should it be for a novice to attempt, and does
> anyone have any pointers for how to tackle it?
You can introduce :makeindex-function property that will override
`org-publish-index-generate-theindex', or at least its part after ";;
Write "theindex.inc" in DIRECTORY.".
Alternatively (or additionally), you can introduce
:makeindex-format-entry keyword that will hold function used to format
an item in the index.
Should not be too hard. You can follow the existing examples with
sitemap generation code.
And feel free to ask anything, if you have difficulties along the way.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
prev parent reply other threads:[~2023-07-25 8:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-24 13:28 ox-publish index allows alternative formats? Britt Anderson
2023-07-25 8:11 ` Ihor Radchenko [this message]
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=878rb4s95s.fsf@localhost \
--to=yantar92@posteo.net \
--cc=britt@b3l.xyz \
--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).