emacs-orgmode
[Top][All Lists]
Advanced

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

[O] How to also convert org file into htmlized html file in org-publish?


From: stardiviner
Subject: [O] How to also convert org file into htmlized html file in org-publish?
Date: Mon, 16 Apr 2018 22:52:16 +0800
User-agent: mu4e 1.0; emacs 27.0.50

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

I want to have Org-mode file converted into HTML, htmlized HTML, and plain org 
file.
So I have following config:

,----
| (require 'htmlize)
| ;; (setq org-html-htmlize-output-type 'css)
|
| (defvar my-org-publish-directory "~/org-publish/")
|
| ;; projects definition
| (setq org-publish-project-alist
|       `(("blog-org"
|          :base-directory ,(concat org-directory "/Website/Blog/")
|          :base-extension "org"
|          :recursive t
|          :publishing-function (org-html-publish-to-html 
org-org-publish-to-org)
|          :publishing-directory ,(concat my-org-publish-directory "Blog/")
|          ....
|          )))
`----

I want to add a function into `:publishing-function` like
`htmlize-file`, but got arguments number error:

,----
| Publishing file /home/stardiviner/Org/Website/Blog/2016-04-22 22:54.org using 
‘htmlize-file’
| org-publish-file: Wrong number of arguments: (1 . 2), 3
`----

So how can I use htmlize in org-publish?

And I want to add a button "Show Org-mode version" button on every page.
How can I add this button in `:html-postamble` of org-publish to link to
current page's htmlized Org-mode page?

- --
[ stardiviner ] don't need to convince with trends.
       Blog: https://stardiviner.github.io/
       IRC(freenode): stardiviner
       GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAlrUuKEACgkQG13xyVro
msPHhAgAuf3CBbyfaK+ylpQ4/NtKHn9gmpspBOdGd4dI6O972iHj83qxSiHxxoIW
FrGElq1IkNpJVohOsz6M6SxL6yKlsySLMw/YxVCKhBdWP0R8uxHfKh62fE0Di5SA
V7VMYte7wihx+0mpRHzIu0BniwlAgsZcgt77d9svFQsuMLFt+QuRzRQClWi+r7KI
ZKZ709YzzY1jBH0bXJ1VUNimgTR7yiig03m2nvLNnTlpUUcTL3XLo/3PuAAqABTQ
gbYPEaTxWA8UAB4xpaSnerZPFCiqNCvMEFJU5YcGOtrRIN8SWKr68QMavuuTWK0e
fvUhGTf1Ot6oWvwz6tmlIKW5EvngwQ==
=StDU
-----END PGP SIGNATURE-----



reply via email to

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