From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?S=C3=A9bastien_Vauban?= Subject: Re: Fully featured Web publishing Date: Wed, 18 Mar 2009 22:20:49 +0100 Message-ID: <87hc1qsf2m.fsf@mundaneum.com> References: <871vsuakc4.fsf@mundaneum.com> <87ljr2ahvx.fsf@kassiopeya.MSHEIMNETZ> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: 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-mXXj517/zsQ@public.gmane.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi Sebastian, Sebastian Rose wrote: > S=C3=A9bastien Vauban writes: >> 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 attract= ion to >> go the Org way, for many different reasons you must be aware of -- more = than I >> am... >> >> [...] >> >> The only real problem that I see (the above being nice-to-have's) is t= he >> following: I want to have a common navigation menu, but whose current >> 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\" . \"curr= iculum-vitae.html\") >> (\"PGP Public Key\" . \"pgp-pu= blic-key.html\") >> (\"Contact Me\" . \"contac= t-me.html\"))) >> (\"Resources\" . ( (\"Ubuntu\" . \"ubun= tu.html\") >> (\"Emacs\" . \"dot-em= acs.html\"))))) >> >> and in the footer file: >> >>
>>

Navigation

>> (my-muse-generate-nav-menu) >>
>> >> with: >> >> (defun my-muse-generate-nav-menu () >> [...] >> (if (string-match >> (concat ".*" (cdr (car nav-subm= enu)) "$") >> cur-path-html) >> " class=3D\"current\"" >> "") >> [...] >> >> How can I do such a thing in Org? > > #+begin_html > > your menu here > > #+end_html Thanks for the other (useful) info. But, here, your answer is not adequate = as I don't want to have almost identical information duplicated in each page of my site. Just imagine the pain it is if I want to change the structure (add= ing a new page in my menu -- I have to update all my pages!). The trick I used with Muse was to make that automatically computed: o having a menu defined only once; o per page, adding the `current' keyword on the adequate item -- automatically done by the above function. Adding a page in my Web site means just updating one variable: the menu definition. Nothing more to do... Is there, then, a similar solution? Or, at least, one achieving the same results by other means? Best regards, Seb --=20 S=C3=A9bastien=C2=A0Vauban _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode-mXXj517/zsQ@public.gmane.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode