emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Bug? Setting #+OPTIONS: title:nil Seems to Be Ignored in HTML Ex


From: Rasmus
Subject: Re: [O] Bug? Setting #+OPTIONS: title:nil Seems to Be Ignored in HTML Export.
Date: Tue, 01 Aug 2017 22:48:08 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Hi Kaushal,

Kaushal Modi <address@hidden> writes:

> Your patch to fix printing of h1 title when :with-title is nil looks good.
>
> More comments below.

OK I’ll push it then. 

> Here is my attempt to fix it (below is a whitespace ignored diff):

Thanks for looking into this.  That hack really leaves the title on the
tabs completely blank!  I’ve never seen anything like it.  It’s in line
with other exporters, so on that front it’s fine.  I do wonder if it’s the
right thing to do.  When the title is blank Firefox (and I assume other
browsers) show the path.  With &lrm it’s completely blank.

I am fine with this approach, but I’m not particularly fond about how it
looks in Firefox and Chromium...

> diff --git a/lisp/ox-html.el b/lisp/ox-html.el
> index 43e4ef8d48..25a41e1dc4 100644
> --- a/lisp/ox-html.el
> +++ b/lisp/ox-html.el
> @@ -1812,11 +1812,14 @@ INFO is a plist used as a communication channel."
>  (defun org-html--build-meta-info (info)
>    "Return meta tags for exported document.
>  INFO is a plist used as a communication channel."
> -  (let ((protect-string
> +  (let* ((protect-string
>    (lambda (str)
>      (replace-regexp-in-string
>       "\"" "&quot;" (org-html-encode-plain-text str))))
>   (title (org-export-data (plist-get info :title) info))

Perhaps this would be simpler?

    (or (org-string-nw-p (org-export-data (plist-get info :title) info)) 
"&lrm;")

> Credit:
> https://stackoverflow.com/questions/23556255/how-can-i-have-a-blank-title-page#comment67991763_23558385
>
> With above, a "blank" title will also result in a valid HTML, correct?

It is indeed valid according to the validator.

Thanks,
Rasmus


-- 
Summon the Mothership!



reply via email to

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