emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ox-publish index allows alternative formats?


From: Ihor Radchenko
Subject: Re: ox-publish index allows alternative formats?
Date: Tue, 25 Jul 2023 08:11:11 +0000

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>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]