emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Inserting text into the <head> part of an HTML document?
@ 2010-11-18 22:06 Stephen Eglen
  2010-11-18 22:13 ` Erik Iverson
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Eglen @ 2010-11-18 22:06 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Stephen Eglen

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"

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Inserting text into the <head> part of an HTML document?
  2010-11-18 22:06 Inserting text into the <head> part of an HTML document? Stephen Eglen
@ 2010-11-18 22:13 ` Erik Iverson
  2010-11-19  4:22   ` Nick Dokos
  0 siblings, 1 reply; 5+ messages in thread
From: Erik Iverson @ 2010-11-18 22:13 UTC (permalink / raw)
  To: Stephen Eglen; +Cc: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Inserting text into the <head> part of an HTML document?
  2010-11-18 22:13 ` Erik Iverson
@ 2010-11-19  4:22   ` Nick Dokos
  2010-11-19 21:46     ` Stephen Eglen
  0 siblings, 1 reply; 5+ messages in thread
From: Nick Dokos @ 2010-11-19  4:22 UTC (permalink / raw)
  To: Erik Iverson; +Cc: emacs-orgmode, nicholas.dokos, Stephen Eglen

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Inserting text into the <head> part of an HTML document?
  2010-11-19  4:22   ` Nick Dokos
@ 2010-11-19 21:46     ` Stephen Eglen
  2010-11-19 21:53       ` Stephen Eglen
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Eglen @ 2010-11-19 21:46 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode, Stephen Eglen

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Inserting text into the <head> part of an HTML document?
  2010-11-19 21:46     ` Stephen Eglen
@ 2010-11-19 21:53       ` Stephen Eglen
  0 siblings, 0 replies; 5+ messages in thread
From: Stephen Eglen @ 2010-11-19 21:53 UTC (permalink / raw)
  To: Stephen Eglen; +Cc: emacs-orgmode

> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-11-19 21:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-18 22:06 Inserting text into the <head> part of an HTML document? Stephen Eglen
2010-11-18 22:13 ` Erik Iverson
2010-11-19  4:22   ` Nick Dokos
2010-11-19 21:46     ` Stephen Eglen
2010-11-19 21:53       ` Stephen Eglen

Code repositories for project(s) associated with this 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).