I'm using org-mode to export an html file of my org file. I'd like to add the following line to the <head> ... </head> section of the document: #+HTML: <meta name="robots" content="noindex, nofollow" /> [This line tells search indexes not to index the file. http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=93710 ] but the HTML directive puts it in the body, rather than the head. Any ideas how I'd get it into the head? I tried +HTML_HEADER as an analogy to LATEX_HEADER, but that doesn't seem to be defined. Thanks, Stephen org-version "7.02trans"
Stephen,
There may be a better answer, but I see in the
doc-string for org-export-html-style, that:
As the value of this option simply gets inserted into the HTML <head>
header, you can \"misuse\" it to add arbitrary text to the header.
See also the variable `org-export-html-style-extra'.
However, I doubt you want to use the 'org-export-html-style' variable,
since it looks like you have to specify the entire header, but
perhaps the 'style-extra' version will do what you want?
--Erik
Stephen Eglen wrote:
> I'm using org-mode to export an html file of my org file. I'd like to
> add the following line to the <head> ... </head> section of the
> document:
>
> #+HTML: <meta name="robots" content="noindex, nofollow" />
>
> [This line tells search indexes not to index the file.
> http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=93710
> ]
>
> but the HTML directive puts it in the body, rather than the head.
> Any ideas how I'd get it into the head? I tried +HTML_HEADER as an
> analogy to LATEX_HEADER, but that doesn't seem to be defined.
>
> Thanks, Stephen
>
> org-version
> "7.02trans"
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Erik Iverson <eriki@ccbr.umn.edu> wrote:
> Stephen,
>
> There may be a better answer, but I see in the
> doc-string for org-export-html-style, that:
>
> As the value of this option simply gets inserted into the HTML <head>
> header, you can \"misuse\" it to add arbitrary text to the header.
> See also the variable `org-export-html-style-extra'.
>
> However, I doubt you want to use the 'org-export-html-style' variable,
> since it looks like you have to specify the entire header, but
> perhaps the 'style-extra' version will do what you want?
>
I don't know of a better answer, but it's OK to use org-export-html-style
if you want. You don't need to specify the entire header: the default
style header comes from org-export-html-style-default.
However, the style-extra version *is* more convenient because it can
be set per-file with
#+STYLE: whatever you want
Nick
Thanks Nick and Erik! I just tried #+STYLE: <meta name="robots" content="noindex, nofollow" /> which does what I was after. I think this should be documented - so I'll draft a patch. Stephen
> which does what I was after. I think this should be documented - so
> I'll draft a patch.
>
no need - I see its already there, I just missed it before.
(section 12.5.7 CSS support)
Stephen