;; -*- emacs-lisp -*- ;; Author: Olivier Tetard ;; URL : http://www.miskin.be/ ;; This file is free software; you can redistribute it and/or modify it ;; under the terms of the GNU General Public License as published by the ;; Free Software Foundation; either version 2, or (at your option) any ;; later version. ;; This file is distributed in the hope that it will be useful, but ;; WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the Free ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ;; 02111-1307, USA. ;; Inspiré par les fichiers de : ;; * Michael Olson (http://www.mwolson.org/web/WelcomePage.html) (require 'emacs-wiki) (require 'emacs-wiki-srctag) (require 'emacs-wiki-table) ;; Set projects list (setq emacs-wiki-projects `(("MainWiki" . ((emacs-wiki-directories . ("~/src/wiki/www/")) (emacs-wiki-project-server-prefix . "/emacs-wiki/") (emacs-wiki-publishing-directory . "~/emacs-wiki/"))) ("TestWiki" . ((emacs-wiki-directories . ("~/src/wiki/test/")) (emacs-wiki-project-server-prefix . "/~toutoune25/test/") (emacs-wiki-publishing-directory . "~/emacs-wiki-test/"))) )) ;; On utilise le mode recursif (setq emacs-wiki-recurse-directories t) ;; srctag (add-to-list 'emacs-wiki-src-tag-modes-alist '("sh" . sh-mode)) ;;; Functions ;; Insert header (defun my-emacs-wiki-insert-header () (ignore (insert-file-contents "~/src/wiki/common/header.html"))) ;; Insert footer (defun my-emacs-wiki-insert-footer () (ignore (insert-file-contents "~/src/wiki/common/footer.html"))) ;; On utilise le mode 644 pour les nouveaux fichiers publiés ;; http://www.emacswiki.org/cgi-bin/wiki/EmacsWikiMode (defun my-emacs-wiki-chmod-644-published-file (file) (let* ((page (emacs-wiki-page-name file)) (published (emacs-wiki-published-file page))) (shell-command (concat "chmod 644 " published)))) (add-hook 'emacs-wiki-after-file-publish-hook 'my-emacs-wiki-chmod-644-published-file) ;;; Customizations (custom-set-variables '(emacs-wiki-autogen-headings (quote outline)) '(emacs-wiki-charset-default "utf-8") '(emacs-wiki-coding-default "utf-8") '(emacs-wiki-default-project "MainWiki") '(emacs-wiki-default-page "HomePage") '(emacs-wiki-home-page "HomePage") '(emacs-wiki-maintainer "WhoAmI.html") '(emacs-wiki-table-attributes "class=\"ewiki-table\"") '(emacs-wiki-publishing-footer "(my-emacs-wiki-insert-footer)") '(emacs-wiki-publishing-header "(my-emacs-wiki-insert-header)") '(emacs-wiki-style-sheet "")) (provide 'tt25-emacs-wiki)