* org-html-h
@ 2015-01-26 20:36 Sébastien Brisard
2015-01-26 20:40 ` Binding org-html-head to a function? Sébastien Brisard
2015-01-26 20:50 ` org-html-h Rasmus
0 siblings, 2 replies; 4+ messages in thread
From: Sébastien Brisard @ 2015-01-26 20:36 UTC (permalink / raw)
To: emacs-orgmode
Hello,
my blog (sbrisard.github.io) is entirely written with org-mode. Org-mode
offers everything I need, except for one minor detail. It is very
difficult to include the same CSS file in the html-head of several files
located at various levels of the directory hierarchy.
I do not really like this trick
http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.html#sec-6.
For the time being, I configured several projects (one for each level),
see https://github.com/sbrisard/blog/blob/master/sb-blog.el. But I am
not happy with this solution either.
I think that it would be great if org-html-head and org-html-head-extra
behaved as org-html-preamble and org-html-postamble, which can be set to
either a string, or a function. This offers great flexibility for the
configuration of the pre/postamble (I use it to conditionnaly include
DISQUS comments in the postamble).
Would it be possible to mimick the same behavior with org-html-head and
org-html-head-extra? Or would this be too much work?
Thanks for your thoughts,
Sébastien
^ permalink raw reply [flat|nested] 4+ messages in thread
* Binding org-html-head to a function?
2015-01-26 20:36 org-html-h Sébastien Brisard
@ 2015-01-26 20:40 ` Sébastien Brisard
2015-01-26 20:50 ` org-html-h Rasmus
1 sibling, 0 replies; 4+ messages in thread
From: Sébastien Brisard @ 2015-01-26 20:40 UTC (permalink / raw)
To: emacs-orgmode
Hello,
my blog (sbrisard.github.io) is entirely written with org-mode. Org-mode
offers everything I need, except for one minor detail. It is very
difficult to include the same CSS file in the html-head of several files
located at various levels of the directory hierarchy.
I do not really like this trick
http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.html#sec-6.
For the time being, I configured several projects (one for each level),
see https://github.com/sbrisard/blog/blob/master/sb-blog.el. But I am
not happy with this solution either.
I think that it would be great if org-html-head and org-html-head-extra
behaved as org-html-preamble and org-html-postamble, which can be set to
either a string, or a function. This offers great flexibility for the
configuration of the pre/postamble (I use it to conditionnaly include
DISQUS comments in the postamble).
Would it be possible to mimick the same behavior with org-html-head and
org-html-head-extra? Or would this be too much work?
Thanks for your thoughts,
Sébastien
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: org-html-h
2015-01-26 20:36 org-html-h Sébastien Brisard
2015-01-26 20:40 ` Binding org-html-head to a function? Sébastien Brisard
@ 2015-01-26 20:50 ` Rasmus
1 sibling, 0 replies; 4+ messages in thread
From: Rasmus @ 2015-01-26 20:50 UTC (permalink / raw)
To: emacs-orgmode
Hi Sébastien,
Sébastien Brisard <sebastien.brisard@m4x.org> writes:
> my blog (sbrisard.github.io) is entirely written with
> org-mode.
Looks pretty.
> Org-mode offers everything I need, except for one minor
> detail. It is very difficult to include the same CSS file in the
> html-head of several files located at various levels of the directory
> hierarchy.
> I do not really like this trick
> http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.html#sec-6. For
> the time being, I configured several projects (one for each level),
> see https://github.com/sbrisard/blog/blob/master/sb-blog.el. But I am
> not happy with this solution either.
> I think that it would be great if org-html-head and
> org-html-head-extra behaved as org-html-preamble and
> org-html-postamble, which can be set to either a string, or a
> function. This offers great flexibility for the configuration of the
> pre/postamble (I use it to conditionnaly include DISQUS comments in
> the postamble).
> Would it be possible to mimick the same behavior with org-html-head
> and org-html-head-extra? Or would this be too much work?
You could use macros:
#+MACRO: my-style (eval (concat "#+HTML_HEAD_EXTRA: " (if t "<style></>" "<no-style></>")))
{{{my-style}}}
But for this problem you could just the absolute path to the CSS:
http://my.url/theme.css, I guess.
Preferably via ox-publish.
Hope it helps,
Rasmus
--
May the Force be with you
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Binding org-html-head to a function?
@ 2015-01-31 13:22 Sébastien Brisard
0 siblings, 0 replies; 4+ messages in thread
From: Sébastien Brisard @ 2015-01-31 13:22 UTC (permalink / raw)
To: emacs-orgmode
Hi Rasmus,
> Hi Sébastien,
>
> Sébastien Brisard <address@hidden> writes:
>
> >/ my blog (sbrisard.github.io) is entirely written with/
> >/ org-mode./
>
> Looks pretty.
Thanks!
>
> >/ Org-mode offers everything I need, except for one minor/
> >/ detail. It is very difficult to include the same CSS file in the/
> >/ html-head of several files located at various levels of the directory/
> >/ hierarchy./
> >/ I do not really like this trick/
> >/ http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.html#sec-6./
> >/ For/
> >/ the time being, I configured several projects (one for each level),/
> >/ seehttps://github.com/sbrisard/blog/blob/master/sb-blog.el. But I am/
> >/ not happy with this solution either./
> >/ I think that it would be great if org-html-head and/
> >/ org-html-head-extra behaved as org-html-preamble and/
> >/ org-html-postamble, which can be set to either a string, or a/
> >/ function. This offers great flexibility for the configuration of the/
> >/ pre/postamble (I use it to conditionnaly include DISQUS comments in/
> >/ the postamble)./
> >/ Would it be possible to mimick the same behavior with org-html-head/
> >/ and org-html-head-extra? Or would this be too much work?/
>
> You could use macros:
>
> #+MACRO: my-style (eval (concat "#+HTML_HEAD_EXTRA: " (if t "<style></>"
> "<no-style></>")))
> {{{my-style}}}
>
> But for this problem you could just the absolute path to the CSS:
> http://my.url/theme.css, I guess.
>
> Preferably via ox-publish.
Yeah, I thought about that, but this would not be very practical, as I
am still fidling around with the style sheet a lot. With this solution,
I would need to commit any minor change.
> Hope it helps,
> Rasmus
I still think that having org-html-head and org-html-head-extra behave
like org-html-preamble and org-html-postamble would be a great addition,
which would offer a lot of flexibility (beyond the use-case listed here).
Best regards,
Sébastien
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-01-31 13:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-26 20:36 org-html-h Sébastien Brisard
2015-01-26 20:40 ` Binding org-html-head to a function? Sébastien Brisard
2015-01-26 20:50 ` org-html-h Rasmus
2015-01-31 13:22 Binding org-html-head to a function? Sébastien Brisard
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).