From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Rose Subject: Re: Fully featured Web publishing Date: Wed, 18 Mar 2009 17:57:22 +0100 Message-ID: <87ljr2ahvx.fsf@kassiopeya.MSHEIMNETZ> References: <871vsuakc4.fsf@mundaneum.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ljz2H-0005Rc-9w for emacs-orgmode@gnu.org; Wed, 18 Mar 2009 12:54:33 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ljz2C-0005RG-EI for emacs-orgmode@gnu.org; Wed, 18 Mar 2009 12:54:32 -0400 Received: from [199.232.76.173] (port=37008 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ljz2C-0005RA-8P for emacs-orgmode@gnu.org; Wed, 18 Mar 2009 12:54:28 -0400 Received: from mail.gmx.net ([213.165.64.20]:34282) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1Ljz2B-0005Dt-KX for emacs-orgmode@gnu.org; Wed, 18 Mar 2009 12:54:28 -0400 In-Reply-To: <871vsuakc4.fsf@mundaneum.com> (=?utf-8?Q?=22S=C3=A9bastien?= Vauban"'s message of "Wed, 18 Mar 2009 17:04:27 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?utf-8?Q?S=C3=A9bastien?= Vauban Cc: emacs-orgmode@gnu.org S=C3=A9bastien Vauban writes: > Hello, > > I'd like to use Org exclusively for composing and then publishing my Web = site. > I've done it so far with Emacs Muse, but I have a strong deepish attracti= on to > go the Org way, for many different reasons you must be aware of -- more t= han I > am... > > The features I need are: > > - Conditional CSS [if IE] > - Favicon Both can be achieved through the #+STYLE: options. Multiple lines possible. Those lines are added to the `' section of the resulting documents. Also, you might take a look into the documentation for org-publish-project-alist in http://orgmode.org/manual/Sample-configuration.html#Sample-configuration > - JavaScript for Google Analytics > - Date in the copyright > - Contextual navigation menu #+begin_html your menu here #+end_html #+begin_html your analytics script here #+end_html Regards, Sebastian > I'll come back into more details to these. > > All of these were coded in the header or footer of each page with Muse. W= hat > was good, is that I could write: > > > (setq muse-project-alist > `( > ("My-Muse-Public-Website" > ("~/Public/Websites/Muse/source/" :default "index") > (:base "xhtml" > :path "~/Public/Websites/Muse/publish/" > :header "~/Public/Websites/Muse/source/header.html" > :footer "~/Public/Websites/Muse/source/footer.html")))) > > Hence, specifying file names instead of file contents for both the header= and > footer. This is good, as I don't have to change my .emacs file every time= I > wanna change the way my pages have to look like. Such a feature would be = nice > for Org as well. Is it scheduled? Can we achieve the same result otherwi= se? > > Regarding the above features: > > - Conditional CSS [if IE] > > Can be coded in the common header string. OK. > > - Favicon > > Can be coded in the common header string -- if it's a common one for al= l my > Web site. How can we specify on a per page basis? This more or less co= mes > down to the recent addition of the `keywords' and `description' meta ta= gs > (thanks Carsten). > > - JavaScript for Google Analytics > > Can be coded in the common header string. OK. > > - Date in the copyright > > Can be coded in the common footer string. Well, it would be nice if it = could > be computed somehow, and be for example (depending of user prefs) the d= ate > when the file (or page) has been changed. > > Hence, it's not specifically a data that's common to every page of my W= eb > site. How can we do this? > > This is what I did with Emacs Muse, embedding Emacs Lisp in the footer: > > > Last Updated: > > (format-time-string muse-footer-date-format > (nth 5 (file-attributes (muse-current-file)= ))) > > > but I think this is not currently possible with Org, right? Is there s= ome > other solution? > > - Contextual navigation menu > > Finally, the only real problem that I see (the above being nice-to-have= 's) > is the following: I want to have a common navigation menu, but whose cu= rrent > page is highlighted. To do so, I just have to add the class `current' to > the current entry, but this means the navigation menu is not constant > between pages! > > I did that with Muse doing so: > > > (setq nav-menu '((\"Home\" . \"index.html\") > (\"About Me\" . ( (\"CV\" . \"curri= culum-vitae.html\") > (\"PGP Public Key\" . \"pgp-pub= lic-key.html\") > (\"Contact Me\" . \"contact= -me.html\"))) > (\"Resources\" . ( (\"Ubuntu\" . \"ubunt= u.html\") > (\"Emacs\" . \"dot-ema= cs.html\"))))) > > and in the footer file: > > >
>

Navigation

> (my-muse-generate-nav-menu) >
> > with the following (ugly -- caus' it should be written in a recursive w= ay!) > definition for `my-muse-generate-nav-menu': > > > (defun my-muse-generate-nav-menu () > (let* ((html-menu "") > (cur-path-muse (muse-current-file)) > (cur-path-html > (replace-regexp-in-string "\\.muse" ".html" cur-path-mu= se))) > (setq html-menu "")) > html-menu)) > > How can I do such a thing in Org? > > THANK YOU VERY MUCH for all the hints or help you can provide me with! > > I really want to go the Org way for all my composed stuff... > > Best regards, > Seb --=20 Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover Tel.: +49 (0)511 - 36 58 472 Fax: +49 (0)1805 - 233633 - 11044 mobil: +49 (0)173 - 83 93 417 Email: s.rose@emma-stil.de, sebastian_rose@gmx.de Http: www.emma-stil.de