emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Using macros in worg
@ 2010-10-31 16:37 Benny Simonsen
  0 siblings, 0 replies; 6+ messages in thread
From: Benny Simonsen @ 2010-10-31 16:37 UTC (permalink / raw)
  To: emacs-orgmode

Hi

I would like to use org-mode + git to generate a web page. I would
also like to use the "#+MACRO: " directives as defined in Worg
/macrs.setupfile.

I have downloaded cloned the git repository for Worg
(git clone http://repo.or.cz/r/Worg.git) for an example.

How is the setup to expand the macros?

Are there any further setup that isn't included when I clone the git
repository of Worg?

I don't know how the web page is published - is the publishing done
automatically when the code is submitted to the "central" git archive,
or how is it done? - I have found out to publish something via the
below elisp code, but the macros don't work and there might be smarter
ways to do it automatically when submitted to a "central" git
repository.

/Benny

(require 'org-publish)
(setq org-publish-use-timestamps-flag nil); Always publish all - else
files including other files (menu) aren't updated
(setq org-export-html-style-include-default nil)
(setq org-publish-project-alist
      '(

	;; ... add all the components here (see below)...
	("org-text"
	 :base-directory "~/org/"
	 :base-extension "org"
	 :publishing-directory "~/public_html/"
	 :recursive t
	 :publishing-function org-publish-org-to-html
	 :headline-levels 4             ; Just the default for this project.
;	 :auto-preamble t
	 :style "<link rel=\"stylesheet\" type=\"text/css\"
href=\"./css/stylesheet.css\" />"
	 )

	("org-static"
	 :base-directory "~/org/"
	 :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
	 :publishing-directory "~/public_html/"
	 :recursive t
	 :publishing-function org-publish-attachment
	 )

	("org" :components ("org-text" "org-static")
	 :include "./menu.org"
	 )
	))

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Using macros in worg
@ 2010-11-01 16:29 Benny Simonsen
  2010-11-03 13:08 ` Sebastian Rose
  0 siblings, 1 reply; 6+ messages in thread
From: Benny Simonsen @ 2010-11-01 16:29 UTC (permalink / raw)
  To: emacs-orgmode

Hi

I would like to use org-mode + git to generate a web page. I would
also like to use the "#+MACRO: " directives as defined in Worg
/macrs.setupfile.

I have downloaded cloned the git repository for Worg
(git clone http://repo.or.cz/r/Worg.git) for an example.

How is the setup to expand the macros?

Are there any further setup that isn't included when I clone the git
repository of Worg?

I don't know how the web page is published - is the publishing done
automatically when the code is submitted to the "central" git archive,
or how is it done? - I have found out to publish something via the
below elisp code, but the macros don't work and there might be smarter
ways to do it automatically when submitted to a "central" git
repository.

/Benny

(require 'org-publish)
(setq org-publish-use-timestamps-flag nil); Always publish all - else
files including other files (menu) aren't updated
(setq org-export-html-style-include-default nil)
(setq org-publish-project-alist
     '(

       ;; ... add all the components here (see below)...
       ("org-text"
        :base-directory "~/org/"
        :base-extension "org"
        :publishing-directory "~/public_html/"
        :recursive t
        :publishing-function org-publish-org-to-html
        :headline-levels 4             ; Just the default for this project.
;        :auto-preamble t
        :style "<link rel=\"stylesheet\" type=\"text/css\"
href=\"./css/stylesheet.css\" />"
        )

       ("org-static"
        :base-directory "~/org/"
        :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
        :publishing-directory "~/public_html/"
        :recursive t
        :publishing-function org-publish-attachment
        )

       ("org" :components ("org-text" "org-static")
        :include "./menu.org"
        )
       ))

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Using macros in worg
  2010-11-01 16:29 Using macros in worg Benny Simonsen
@ 2010-11-03 13:08 ` Sebastian Rose
  2010-11-03 19:58   ` Benny Simonsen
  0 siblings, 1 reply; 6+ messages in thread
From: Sebastian Rose @ 2010-11-03 13:08 UTC (permalink / raw)
  To: Benny Simonsen; +Cc: emacs-orgmode

Benny Simonsen <benny@slbs.dk> writes:
> Hi
>
> I would like to use org-mode + git to generate a web page. I would
> also like to use the "#+MACRO: " directives as defined in Worg
> /macrs.setupfile.
>
> I have downloaded cloned the git repository for Worg
> (git clone http://repo.or.cz/r/Worg.git) for an example.
>
> How is the setup to expand the macros?

Hi Benny,


there's no special setup needed.

On worg, the marcos are included through constructs like this in the
Org file's header:

#+SETUPFILE:  ../macros.setupfile


i.e. the relative path to the macros.setupfile.


That's it.


   Sebastian

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Using macros in worg
  2010-11-03 13:08 ` Sebastian Rose
@ 2010-11-03 19:58   ` Benny Simonsen
  2010-11-03 21:30     ` Sebastian Rose
  0 siblings, 1 reply; 6+ messages in thread
From: Benny Simonsen @ 2010-11-03 19:58 UTC (permalink / raw)
  To: emacs-orgmode

> there's no special setup needed.

I had an old org-mode, after upgrade the macros are expanded :)

I would like to auto-publish the web page when I push to the central server.

I suppose it is writing a {central server}/{web-page
repository}.git/hook/post-receive script

The script have to open emacs, load the required lisp code (the code
listed in the original post) and (org-publish "{webpage project org}")
... but does anybody have such a example hook script that would like
to share it?

Thank you
/Benny

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Using macros in worg
  2010-11-03 19:58   ` Benny Simonsen
@ 2010-11-03 21:30     ` Sebastian Rose
  2010-11-04  7:23       ` Benny Simonsen
  0 siblings, 1 reply; 6+ messages in thread
From: Sebastian Rose @ 2010-11-03 21:30 UTC (permalink / raw)
  To: Benny Simonsen; +Cc: emacs-orgmode

Benny Simonsen <benny@slbs.dk> writes:
>> there's no special setup needed.
>
> I had an old org-mode, after upgrade the macros are expanded :)
>
> I would like to auto-publish the web page when I push to the central server.


You might be interested in this document:

   http://orgmode.org/worg/worg-setup.php

and in the scripts in .git/hooks/  (which come with git).


  Sebastian

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Using macros in worg
  2010-11-03 21:30     ` Sebastian Rose
@ 2010-11-04  7:23       ` Benny Simonsen
  0 siblings, 0 replies; 6+ messages in thread
From: Benny Simonsen @ 2010-11-04  7:23 UTC (permalink / raw)
  To: Sebastian Rose; +Cc: emacs-orgmode

2010/11/3 Sebastian Rose <sebastian_rose@gmx.de>:
> Benny Simonsen <benny@slbs.dk> writes:
>>> there's no special setup needed.
>>
>> I had an old org-mode, after upgrade the macros are expanded :)
>>
>> I would like to auto-publish the web page when I push to the central server.
>
>
> You might be interested in this document:
>
>   http://orgmode.org/worg/worg-setup.php

Yep - I will look into it.

>
> and in the scripts in .git/hooks/  (which come with git).

There are example scripts comming with git (.git/hooks/*.sample).

Just to be sure - Worg don't use the hooks, but publishes the website
via a publish cron job (step 2).
I would expect that step 2 could be replaced by a .git hook via "mv
~/bin/publish-worg.sh .git/hooks/post-receive".

Step one can be omitted if the server with the central git repository
can write the files to the webserver.

I will try it.

Thanks
/Benny


>
>
>  Sebastian
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-11-04  7:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-01 16:29 Using macros in worg Benny Simonsen
2010-11-03 13:08 ` Sebastian Rose
2010-11-03 19:58   ` Benny Simonsen
2010-11-03 21:30     ` Sebastian Rose
2010-11-04  7:23       ` Benny Simonsen
  -- strict thread matches above, loose matches on Subject: below --
2010-10-31 16:37 Benny Simonsen

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).