From: Sebastian Rose <sebastian_rose@gmx.de>
To: Manuel Giraud <manuel.giraud@univ-nantes.fr>
Cc: emacs-orgmode@gnu.org
Subject: Re: Babel for blogging
Date: Mon, 18 Oct 2010 23:36:24 +0200 [thread overview]
Message-ID: <87eibnmbdz.fsf@gmx.de> (raw)
In-Reply-To: <871v7nmvgd.fsf@univ-nantes.fr> (Manuel Giraud's message of "Mon, 18 Oct 2010 16:22:58 +0200")
Manuel Giraud <manuel.giraud@univ-nantes.fr> writes:
> Eric S Fraga <ucecesf@ucl.ac.uk> writes:
>
>> On Fri, 15 Oct 2010 11:07:05 -0600, "Eric Schulte" <schulte.eric@gmail.com> wrote:
>>>
>>> Hi Manuel,
>>>
>>> The following works for me, it creates an index of all files in the same
>>> directory as the Org-mode file.
>>>
>>> --8<---------------cut here---------------start------------->8---
>>> * index
>>>
>>> Create an index automatically with an elisp code block.
>>>
>>> #+begin_src emacs-lisp :exports results :results raw
>>> (mapconcat
>>> (lambda (file)
>>> (unless (file-directory-p file)
>>> (format "- [[%s][%s]]" (file-name-sans-extension file) file)))
>>> (directory-files (or default-directory
>>> (file-name-directory (buffer-file-name))))
>>> "\n")
>>> #+end_src
>>> --8<---------------cut here---------------end--------------->8---
>>
>> Maybe the format statement should look like this instead (swap the two
>> arguments to the format string around):
>>
>> : (format "- [[%s][%s]]" file (file-name-sans-extension file))))
>>
>> Also, maybe change the link to include the current directory:
>>
>> : (format "- [[./%s][%s]]" file (file-name-sans-extension file))))
>>
>> Just some thoughts late on a Friday night... ;-)
>
> Thanks that does the trick. But searching the org-mode source (version
> 7.01trans) , I discovered that this function is already here (called
> sitemap instead of index). So now, I can generate the correct sitemap
> with the following project:
>
>
> (setq org-publish-project-alist
> '(("orgfiles"
> :base-directory "~/org/"
> :base-extension "org"
> :publishing-directory "~/public_html/"
> :publishing-function org-publish-org-to-html
> :section-numbers nil
> :table-of-contents nil
> :auto-sitemap t
> :sitemap-title "Blog"
> :style "<link rel=\"stylesheet\"
> href=\"blog.css\"
> type=\"text/css\"/>")
> ("css"
> :base-directory "~/org/"
> :base-extension "css"
> :publishing-directory "~/public_html/"
> :publishing-function org-publish-attachment)
> ("blog" :components ("orgfiles" "css"))))
>
> What's missing now is that the sitemap list is ordered alphabetically
> and I'd like to have it sorted by modification time or, even better, by
> there #+date tag.
It's there, too.
See
C-h v org-publish-project-alist
"
If you create a sitemap file, adjust the sorting like this:
:sitemap-sort-folders Where folders should appear in the
sitemap. Set this to `first' (default) or
`last' to display folders first or last,
respectively. Any other value will mix
files and folders.
:sitemap-alphabetically The site map is normally sorted
alphabetically. Set this explicitly to
nil to turn off sorting.
:sitemap-ignore-case Should sorting be case-sensitive?
Default nil.
"
Sebastian
next prev parent reply other threads:[~2010-10-18 21:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-15 16:07 Babel for blogging Manuel Giraud
2010-10-15 17:07 ` Eric Schulte
2010-10-15 17:44 ` Pere Quintana Seguí
2010-10-15 20:32 ` Eric Schulte
2010-10-15 22:13 ` Pere Quintana Seguí
2010-10-16 17:17 ` Olivier Schwander
2010-10-15 23:03 ` Eric S Fraga
2010-10-18 14:22 ` Manuel Giraud
2010-10-18 21:36 ` Sebastian Rose [this message]
2010-10-20 17:09 ` Manuel Giraud
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=87eibnmbdz.fsf@gmx.de \
--to=sebastian_rose@gmx.de \
--cc=emacs-orgmode@gnu.org \
--cc=manuel.giraud@univ-nantes.fr \
/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.