Next: , Previous: Tables, Up: Top


11 Multiple Projects

Emacs-wiki has a way of supporting multiple Wiki projects. This allows you to make links from one project to another, which are often called interwiki links. This can be convenient if you wish to split your website according to the kind of content, for example.

For now, it is considered good practice to have your multiple projects under a common directory, and not to nest your projects.

You will need something like the following in your .emacs file in order to set up multiple project support.

     (setq emacs-wiki-projects
           `(("WebWiki" .
              ((emacs-wiki-directories . ("~/proj/wiki/webpage"))
               (emacs-wiki-project-server-prefix . "../wiki/")
               (emacs-wiki-publishing-directory
                . "~/personal-site/site/wiki")))
             ("ProjectsWiki" .
              ((emacs-wiki-directories . ("~/proj/wiki/projects"))
               (emacs-wiki-project-server-prefix . "../projects/")
               (emacs-wiki-publishing-directory
                . "~/personal-site/site/projects")))))

The first phrase on the second line of code is the name of the project. In this example, there are two projects, WebWiki and ProjectsWiki. It would be best for these names to be in mixed case.

The emacs-wiki-directories line indicates which source directories correspond with the particular project. This must be a list.

emacs-wiki-project-server-prefix is the text that will be put at the beginning of each interwiki link at publish time. For example, ‘WebWiki#MyPage’ would be rendered ‘../wiki/MyPage.html’ in its published (HTML) form. It is also acceptable to give an absolute location here, like ‘/projects’, with the root directory corresponding to your root web publishing directory.

emacs-wiki-publishing-directory is the directory where the HTML content will be placed upon publishing the project. You should make sure that the content of emacs-wiki-project-server-prefix is such that a link from a file in one project to a file in another project is feasible.

Other variables can also be defined in this block if you wish to customize a particular project further.