From: stardiviner <numbchild@gmail.com>
To: org-mode <emacs-orgmode@gnu.org>
Subject: How to also convert org file into htmlized html file in org-publish?
Date: Mon, 16 Apr 2018 22:52:16 +0800 [thread overview]
Message-ID: <87sh7v5hlr.fsf@gmail.com> (raw)
-----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 other threads:[~2018-04-16 14:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=87sh7v5hlr.fsf@gmail.com \
--to=numbchild@gmail.com \
--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).