From: "Sébastien Vauban" <zthjwsqqafhv-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: Fully featured Web publishing
Date: Wed, 18 Mar 2009 22:20:49 +0100 [thread overview]
Message-ID: <87hc1qsf2m.fsf@mundaneum.com> (raw)
In-Reply-To: 87ljr2ahvx.fsf@kassiopeya.MSHEIMNETZ
Hi Sebastian,
Sebastian Rose wrote:
> Sébastien Vauban <zthjwsqqafhv-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> 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 attraction 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 the
>> 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\" . \"curriculum-vitae.html\")
>> (\"PGP Public Key\" . \"pgp-public-key.html\")
>> (\"Contact Me\" . \"contact-me.html\")))
>> (\"Resources\" . ( (\"Ubuntu\" . \"ubuntu.html\")
>> (\"Emacs\" . \"dot-emacs.html\")))))
>>
>> and in the footer file:
>>
>> <div id=\"navigation\">
>> <h2>Navigation</h2>
>> <lisp>(my-muse-generate-nav-menu)</lisp>
>> </div>
>>
>> with:
>>
>> (defun my-muse-generate-nav-menu ()
>> [...]
>> (if (string-match
>> (concat ".*" (cdr (car nav-submenu)) "$")
>> cur-path-html)
>> " class=\"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 (adding
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
--
Sébastien Vauban
_______________________________________________
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
next prev parent reply other threads:[~2009-03-18 21:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-18 16:04 Fully featured Web publishing Sébastien Vauban
2009-03-18 16:57 ` Sebastian Rose
2009-03-18 21:20 ` Sébastien Vauban [this message]
2009-03-18 22:38 ` Sebastian Rose
2009-03-18 22:56 ` Rasmus Pank Roulund
2009-03-18 23:19 ` Richard Riley
2009-03-19 7:46 ` Rasmus Pank Roulund
2009-03-19 8:28 ` Richard Riley
2009-03-19 9:43 ` Sébastien Vauban
2009-03-23 11:36 ` Sébastien Vauban
2009-03-23 13:50 ` Taru Karttunen
2009-03-19 10:37 ` Sebastian Rose
2009-03-19 13:38 ` Richard Riley
2009-03-19 15:03 ` Sebastian Rose
2009-03-19 16:12 ` Matthew Lundin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87hc1qsf2m.fsf@mundaneum.com \
--to=zthjwsqqafhv-genee64ty+gs+fvcfc7uqw@public.gmane.org \
--cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.