emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Sebastian Rose <sebastian_rose@gmx.de>
To: emacs-orgmode Mailinglist <emacs-orgmode@gnu.org>
Subject: Re: org-publish
Date: Wed, 20 Aug 2008 11:18:21 +0200	[thread overview]
Message-ID: <877iacrqn6.fsf@kassiopeya.MSHEIMNETZ> (raw)
In-Reply-To: <1219205093.20415.7.camel@pod.lab> (David O'Toole's message of "Wed, 20 Aug 2008 00:04:53 -0400")

Hi David,

here are some solutions I could come up with. Maybe one of them is
helpful.


* Customize org

  M-x customize-variable org-export-html-extension

  and set it to 'php'?



* Apache: use mod_mime or add-handler

  You could also use the add-handler directive in your apache config
  file or (maybe) .htaccess files to execute your *.html files as PHP.

  See:
  http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addhandler

  or:
  http://httpd.apache.org/docs/2.2/mod/mod_mime.html



* Apache and mod_rewrite

  You might also set up a .htaccess file like this:



    <IfModule mod_rewrite.c>
      RewriteEngine on
      RewriteBase   /
      RewriteRule   ^(.*)$ passthrough.php$1 [L]
    </IfModule>

  if you put all your *.html files exported by org into a subdirectory
  called org, passthrough.php will be called with the path to that file
  relative to /org/.

  $PATH_INFO = "org".getenv('PATH_INFO'); // not tested

  get's you that relative path (you'll have to strip '#target' and
  '?querystring' though).

  Now you can open the file, read it line by line and replace what ever
  you like (add custom headers and footers...).


  Keep in mind, that the exported files are valid XHTML so might want to
  use some XML related technique to parse and change the files on the
  fly.





Regards,

  Sebastian



David O'Toole <dto@gnu.org> writes:
> I have some ideas for changes to org-publish. I am helping someone set
> up a content-heavy site using Emacs and Org-Mode, and we ran into
> several problems that I would like to fix. We have workarounds in place
> but these immediately suggested interesting fixes. For example it
> doesn't seem possible to publish to .PHP files but maybe I missed
> something. I need to reread the code because there seem to have been
> many changes since I last looked at it. Furthermore it did not seem
> possible to control :auto-preamble and :auto-postamble on a per-file
> basis (without setting up a special project just for that one file and
> using include/exclude.) Anyone mind if I make some changes and send a
> patch? Is there a more recent version than the one in CVS that i should
> begin with?

--
Sebastian Rose, Hannover, Germany
Phone: +49 173 83 93 417
Mail.: sebatian_rose@gmx.de, s.rose@emma-stil.de

  reply	other threads:[~2008-08-20  9:16 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-20  4:04 org-publish David O'Toole
2008-08-20  9:18 ` Sebastian Rose [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-07-04 15:28 org-publish Richard G Riley
2008-07-05 15:30 ` org-publish Carsten Dominik
2008-07-05 15:42   ` org-publish Richard G Riley
2008-07-07 15:44     ` org-publish Carsten Dominik
2008-06-21  1:27 org-publish Richard G Riley
2008-06-21  4:31 ` org-publish Manish
     [not found]   ` <7s4p7nouop.fsf@richardriley.net>
     [not found]     ` <e7cdbe30806210543m361bda09q8357b084531abc67@mail.gmail.com>
2008-06-21 13:05       ` org-publish Richard G Riley
2008-06-22  4:27         ` org-publish Nick Dokos
2008-06-22 14:25           ` org-publish Manish
2008-06-22 15:07             ` org-publish Carsten Dominik
2008-06-22 15:27               ` org-publish Manish
2008-06-22 20:57                 ` org-publish Carsten Dominik
2008-06-23 10:41                   ` org-publish Richard G Riley
2008-06-23 14:46                     ` org-publish Carsten Dominik
2008-06-23 10:39               ` org-publish Richard G Riley
2008-06-23 16:19                 ` org-publish Carsten Dominik
2008-07-07 14:24               ` org-publish Rick Moynihan
2008-07-07 15:42                 ` org-publish Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877iacrqn6.fsf@kassiopeya.MSHEIMNETZ \
    --to=sebastian_rose@gmx.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).