From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: Publishing notes to a website Date: Tue, 26 Apr 2011 18:41:18 -0600 Message-ID: <87sjt4mspd.fsf@gmail.com> References: <20110315002842.97947dzdm85pn484@webmail.tuffmail.net> <20110426163639.77013qols2h9j6vk@webmail.tuffmail.net> <877hag3exk.fsf@lw-wireless-pittnet-40-144.wireless.pitt.edu> <20110427000225.193337ai54abay80@webmail.tuffmail.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:43200) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEsoq-0003Mw-U8 for emacs-orgmode@gnu.org; Tue, 26 Apr 2011 20:41:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QEsom-0005zO-Mp for emacs-orgmode@gnu.org; Tue, 26 Apr 2011 20:41:28 -0400 Received: from mail-iy0-f169.google.com ([209.85.210.169]:57658) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEsom-0005zK-Gy for emacs-orgmode@gnu.org; Tue, 26 Apr 2011 20:41:24 -0400 Received: by iyh42 with SMTP id 42so1371464iyh.0 for ; Tue, 26 Apr 2011 17:41:23 -0700 (PDT) In-Reply-To: <20110427000225.193337ai54abay80@webmail.tuffmail.net> (Mash's message of "Wed, 27 Apr 2011 00:02:25 +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: 'Mash Cc: William Gardella , Emacs Org mode mailing list --=-=-= Content-Type: text/plain Having not read the whole thread I apologize if I'm retracing already covered ground. I've had success using Org's built in projects [1]. Although this results in a flat html web-site it is easy to impose a consistent theme, and to publish large numbers of files. To give some personal examples my homepage [2], and even the wiki for my lab [3] are both published using Org-mode's publishing facilities, the latter with a git repository backend and some fancy post_update hooks. For smaller sites (like my home page) I just include the project definition in an elisp block in a commented heading of the main Org-mode file (e.g., [4]), and for larger efforts I define the projects in a separate elisp file, or even in an external script which can be run with an Emacs batch instance. Hope this helps. Best -- Eric 'Mash writes: > Quoting William Gardella : > >> 'Mash writes: >> >>> Quoting Thomas Herbert : >>>> Kyle Sexton mocker.org> writes: >>>> >>>>> I'm looking for advice on ways people are publishing their org notes >>>>> to a website. So far I've looked at blorgit and it's really nice, but >>>>> the dependency for a backend emacs session and running through sinatra >>>>> makes me wary of putting it out on my server for the world. >>>>> >>>>> 1. What methods are people using to publish their org notes? >>>>> 2. Anyone have sample sites that I can see what the output looks like? >>>> >>>> Kyle, >>>> >>>> I have been actually been working on a simple clean solution for >>>> writing in org-mode and keeping the file as org-mode. What I have >>>> come up with is a "Textile" like PHP class that translates org-mode >>>> files into HTML. >>>> >>>> It is still very very alpha and hope to release the code soon for >>>> people to look at, work and improve or completely scrap and take my >>>> idea and do it better. >>> >>> As I mentioned earlier I have been playing around building a regex >>> parser in PHP for Org-Mode files. As you will see I am obviously an >>> amateur programmer and my hope is that if this is at all useful then >>> someone else will rewrite it. My site http://toshine.org uses both the >>> classOrgile and the Orgile CMS. If you look at the bottom of any >>> article you will see the link to the raw .org file that is >>> parsed/converted to HTML. >>> >>> --- >>> The classOrgile PHP class (very limited currently!). >>> http://toshine.org/etc/files/classorgile.php.txt >>> >>> The Orgile PHP flat file CMS (currently used for http://toshine.org). >>> http://toshine.org/etc/files/orgile.php.txt >>> >>> The Orgile PHP flat file CMS (fully commented code). >>> http://toshine.org/etc/files/orgile-commented.php.txt >>> --- >>> >>> Well I hope it is at least interesting for someone on this list. >>> >>> 'Mash >> >> Limited though it may be, I'm extremely impressed with the results you >> are getting out of this little flat-file CMS :) >> >> It seems like a more "blog" (periodical literature)-like solution than >> Blorgit, which in spite of its name is really a wiki framework. I think >> I'll be trying this in my sandbox soon :) >> >> Will >> >> > > Thanks Will, and do let me know if you need any help deciphering my > code. It looks a lot better in php-mode! > It really is actually a very simple program, and really easy to remove > what you don't need and add what you want. > You have my email address so pop me a line whenever. > > Thanks > > 'Mash > > > > > Footnotes: [1] http://orgmode.org/manual/Publishing.html [2] http://cs.unm.edu/~eschulte/ [3] http://wiki.adaptive.cs.unm.edu/ [4] the attached snippet of org-mode is adapted from my homepage. --=-=-= Content-Type: text/org Content-Disposition: inline; filename=publishing-example.org ** COMMENT publishing This code is used to publish this page to the cs.unm.edu webserver. For more information on publishing Org-mode pages see the [[http://orgmode.org/manual/Publishing.html#Publishing][Publishing section]] of the [[http://orgmode.org/manual/index.html#Top][Org-mode manual]]. #+begin_src emacs-lisp :results silent (setq homepage-dir (file-name-directory (or load-file-name buffer-file-name))) (unless (boundp 'org-publish-project-alist) (setq org-publish-project-alist nil)) ;; the main html page (add-to-list 'org-publish-project-alist `("homepage-html" :base-directory ,homepage-dir :base-extension "org" :publishing-directory "/ssh:username@web-server:~/public_html/" :html-postamble ; replaces the auto-generated postamble "
custom-postamble " :style "")) ;; the contents of the data/ directory, css, images, etc... (add-to-list 'org-publish-project-alist `("homepage-data" :base-directory ,(expand-file-name "data" homepage-dir) :base-extension "jpg\\|gif\\|png\\|pdf\\|css\\|bib" :publishing-directory "/ssh:username@web-server:~/public_html/data/" :publishing-function org-publish-attachment)) ;; a single combined project to publish both html and supporting materials (add-to-list 'org-publish-project-alist '("homepage" :components ("homepage-html" "homepage-data"))) #+end_src --=-=-= Content-Type: text/plain -- Eric Schulte http://cs.unm.edu/~eschulte/ --=-=-=--