Hi All,
Since I use Orgmode 7.9.2, I tri to do this:
- parsing a directory in which several Org files are located. Basically, each files is a blog post. So one org file pear day.
- import or include them in a main ORG file (index.org) - export the main Org file to HTML to create a website.
To be more clear, this is the directory structure I build.
/website/
########|
########+/blog-posts/
Here is a typical "post" org file:
8<-----------------------------------CUT HERE
*Post title
blala c'est la crise....
8<----------------------------------- CUT HERE
8<-----------------------------------CUT HERE
#+TITLE: Home
#+OPTIONS: toc:nil H:3 num:nil
# <<home>>
* Home
Welcome in ......................
.......
.......
* Latest Articles 1
#+BEGIN_SRC emacs-lisp :exports results
(let ((default-directory "~/path/to/the/directory/posts/"))
(file-expand-wildcards "?org"))
#+END_SRC
#+BEGIN_SRC emacs-lisp :exports results
(directory-files "~/path/to/the/directory/posts/"
nil
"\\.org\\'")
#+END_SRC
* Latest Articles 2
* Latest Articles 3
#+BEGIN_EXAMPLE
#+INCLUDE ~/Dropbox/Private/The_Flammable_project/wx-fp/posts/2012_10_09.org
#+END_EXAMPLE
* Latest Articles 4
#+BEGIN_SRC :exports results :results output
#+END_SRC
8<----------------------------------- CUT HERE
Here is the status of my trial after doing "org-publish-project":
- Latest trials 1 : this elisp code parses the right directory but I don't know how to import the result the elisp function and them use "#+INCLUDE:" them as org files. If someone can help me on that? I really like to do what I want with elisp, more powerfull solution.
- Latest trials 2 : the "#+INCLUDE" command includes the content of each files but in the 3 sub-tests the hierarchy is completely meesed up, like this
"* Latest Articles 2"
"** 2012_10_12 Post title "
"*** 2012_10_09 Post tile"
the second "included" files is put under another level of hierarchy even if the command ":minlevel X" or ":prefix1" are used.
Gentleman's any suggestion?
- Latest Articles 3 & 4 : Not working at all.....
Here we are! The HTML export is working very well. So it's not a problem of export.
If someone can help me to do this I will really appreciate!
Thanks