From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: Re: Best way to create blog for company web site with Orgmode Date: Thu, 10 Mar 2016 08:37:07 +0100 Message-ID: References: <87io0wae5h.fsf@gmx.net> <87r3fjqx39.fsf@gmx.net> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55229) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adv9k-00049a-OO for emacs-orgmode@gnu.org; Thu, 10 Mar 2016 02:37:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1adv9h-0003Uk-I8 for emacs-orgmode@gnu.org; Thu, 10 Mar 2016 02:37:12 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:14786) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adv9h-0003UY-7Y for emacs-orgmode@gnu.org; Thu, 10 Mar 2016 02:37:09 -0500 In-Reply-To: <87r3fjqx39.fsf@gmx.net> (Rainer Hansen's message of "Wed, 09 Mar 2016 20:18:18 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Rainer Hansen Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2016-03-09 20:18, Rainer Hansen writes: > Sometimes I should read more carefully what I write. I want to use a > static web site generator! So Wordpress is no option for me. I maintain several very basic web sites in org. *Basic* is the keyword here. Here is an example: http://ajacs.inria.fr/ Note that I suck at design and CSS, but I think this is orthogonal to the matter at hand ;) Each page is its own org file, and there is an additional file for the left-hand bar. Here is what index.org starts with: #+INCLUDE: "common.org" * body :PROPERTIES: :CUSTOM_ID: mainbody :HTML_CONTAINER_CLASS: container-mainbody :END: ** Welcome to the AJACS web site Content goes here The common.org is like this: #+TITLE: AJACS #+OPTIONS: toc:nil num:nil #+HTML_HEAD: * sidebar :PROPERTIES: :CUSTOM_ID: sidebar :HTML_CONTAINER_CLASS: container-sidebar :END: =2D [[http://ajacs.inria.fr/][Home]] =2D [[./members.org][Members]] =2D [[./meetings.org][Meetings]] #+begin_center #+ATTR_HTML: :width 100 [[./files/ANR.png]]\\ ANR-14-CE28-0008=20=20 #+end_center The layout is done using CSS. Here is an excerpt: #+begin_src css .container-mainbody { margin-left: 200px; padding: 10px; } .container-sidebar { float: left; width: 200px; padding-top: 12px; } #postamble { clear: both; } #mainbody, #sidebar { display: none; } #text-sidebar li a { color: rgb(54, 117, 148); text-decoration: none; } #address { display: none; } #text-address { color: rgb(54, 117, 148); text-align: center; } #mainheading { text-align: center; } .container-sidebar ul { list-style: none; } #+end_src Finally this is all exported using a very simple Makefile #+begin_src make EMACS=3Demacs BATCH_EMACS=3D$(EMACS) --batch -Q -l init.el PUB_FILES=3Dindex.html meetings.html internships/proxies.html style.css %.html: %.org common.org $(BATCH_EMACS) $*.org -f org-html-export-to-html all: $(PUB_FILES) publish: $(PUB_FILES) rsync -azR --no-p --rsh=3Dssh -O $^ gf:/home/groups/ajacs/htdocs/ .PHONY: all publish #+end-src Oh, I need to show the init.el as well for the export: #+begin_src emacs-lisp (add-to-list 'load-path (file-name-directory load-file-name)) (require 'local_settings) (require 'org) (require 'ox-html) (setq org-html-postamble nil) #+end_src The local-settings.el file allows us to collaborate using different kind of installations for org. #+begin_src emacs-lisp (setq emacsd-dir "/Users/schmitta/.emacs.d/") ;; (add-to-list 'load-path (concat emacsd-dir "org/emacs/site-lisp/org")) (setq package-user-dir (concat emacsd-dir "elpa")) (package-initialize) (provide 'local_settings) #+end_src Best, Alan =2D-=20 OpenPGP Key ID : 040D0A3B4ED2E5C7 Monthly Athmospheric CO=E2=82=82 (2016-02, Mauna Loa Obs.): 404.02 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBCgAGBQJW4SQjAAoJEAQNCjtO0uXHGzwIAK9jGw7f7N7JB1CtLXNMh2w9 /mbGuU2nwKxU7WRgBmEDtarKmq17DKVabB0DPZ4kmaYIA6XAgOYxgWIp99nqiMtH jA7EQ9PfFJZE5ZaYm0BTD260UJ0+BGwY4dag0yHG/H0c1ATLGvL05l/Tj0jyKOIL Z++yIqc4kyfP+QqaY1eEYMAzkHVu/s+nd5vzuGHJONylGWZXXe2x2XKB31UaLrFX rXbc1HejgTlG8nGdnmgJlcWdbGXF2EVKCRRiSYs7jQHFfHb/6nqHP87ZSCwMOz1T 0yNE7hE3/9yqYQAPWokUTTyZ7a+OAbz5Xl3yKOnvGRms3AusSG+hysckXdDxSh0= =Rw5N -----END PGP SIGNATURE----- --=-=-=--