* Org as a static site generator @ 2013-04-01 11:12 David Engster 2013-04-01 11:29 ` Vincent Beffara 2013-04-10 9:17 ` 'Mash (Thomas Herbert) 0 siblings, 2 replies; 13+ messages in thread From: David Engster @ 2013-04-01 11:12 UTC (permalink / raw) To: emacs-orgmode I'd like to use Org as a static site generator. I know quite a few people use Org to manage their sites, so I'd like to know what's already available and what I'd need to add to make this working properly. I know of course how to export a bunch of Org files to HTML through the publishing features. However, that's not really cutting it, I'm afraid. Thing of a typical HTML5 template having a <header>, <nav>, <footer>, and <article>. I'd like Org to include the different exported files into the <article> section, and the rest to remain the same. The <nav> would contain a global navigation menu, also highlighting the current active section (though CSS, no JS please). Has anybode done something like this? -David ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Org as a static site generator 2013-04-01 11:12 Org as a static site generator David Engster @ 2013-04-01 11:29 ` Vincent Beffara 2013-04-01 11:54 ` David Engster 2013-04-10 9:17 ` 'Mash (Thomas Herbert) 1 sibling, 1 reply; 13+ messages in thread From: Vincent Beffara @ 2013-04-01 11:29 UTC (permalink / raw) To: emacs-orgmode Hi, I am using o-blog for that, it is pretty great. One Org file for everything, and it actually splits it into one page per marked headline. You can use one of the headlines as a template for the nav section of the page, shared across all pages. (As you can tell from the name, it is intended as a blogging tool, but you don't have to use it that way ...) The default template might not be to your taste (I don't like it at all, personally, so I made my own essentially from scratch) but you can customize it easily enough. And it might actually be close to what you are looking for. Page: http://perso.ens-lyon.fr/vincent.beffara/ Source: https://www.dropbox.com/sh/kdu6myi2ov7y78e/3Ljz5Eipq9 > Thing of a typical HTML5 template having a <header>, <nav>, <footer>, > and <article>. I'd like Org to include the different exported files into > the <article> section, and the rest to remain the same. The <nav> would > contain a global navigation menu, also highlighting the current active > section (though CSS, no JS please). I never quite managed to do that ... but it should definitely be doable. /v ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Org as a static site generator 2013-04-01 11:29 ` Vincent Beffara @ 2013-04-01 11:54 ` David Engster 2013-04-01 12:08 ` Vincent Beffara 0 siblings, 1 reply; 13+ messages in thread From: David Engster @ 2013-04-01 11:54 UTC (permalink / raw) To: Vincent Beffara; +Cc: emacs-orgmode Vincent Beffara writes: > I am using o-blog for that, it is pretty great. Thanks, that looks pretty nice. I'll take a look. >> Thing of a typical HTML5 template having a <header>, <nav>, <footer>, >> and <article>. I'd like Org to include the different exported files into >> the <article> section, and the rest to remain the same. The <nav> would >> contain a global navigation menu, also highlighting the current active >> section (though CSS, no JS please). > > I never quite managed to do that ... but it should definitely be doable. It's really simple to do. You just have to include some 'id' in the <body> which indicates to which section it belongs to. I've also just found this, which uses Org only as a markup tool and Jekyll to generate the site: http://orgmode.org/worg/org-tutorials/org-jekyll.html But doing everything in Org is tempting, of course. And then just serve that stuff with ElNode. :-) -David ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Org as a static site generator 2013-04-01 11:54 ` David Engster @ 2013-04-01 12:08 ` Vincent Beffara 2013-04-01 19:09 ` Ian Barton 0 siblings, 1 reply; 13+ messages in thread From: Vincent Beffara @ 2013-04-01 12:08 UTC (permalink / raw) To: Vincent Beffara, emacs-orgmode > > > Thing of a typical HTML5 template having a <header>, <nav>, <footer>, > > > and <article>. I'd like Org to include the different exported files into > > > the <article> section, and the rest to remain the same. The <nav> would > > > contain a global navigation menu, also highlighting the current active > > > section (though CSS, no JS please). > > > > I never quite managed to do that ... but it should definitely be doable. > > It's really simple to do. You just have to include some 'id' in the > <body> which indicates to which section it belongs to. Yes, I mean, I know which html you need for that, simply within o-blog you need to manage between relative paths, absolute paths, canonical paths and so on in the template, to match the right section, - mainly it should be a matter of let-ing the right variable to the right value at the right point in the template and catching it when generating the toc, but I never took the time to get it right ... > I've also just found this, which uses Org only as a markup tool and > Jekyll to generate the site: > > http://orgmode.org/worg/org-tutorials/org-jekyll.html I had a look at the too, but it felt just a little bit too convoluted compared to managing everything from Org. Besides, it seems to lose fontification of code snippets and the like? /v ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Org as a static site generator 2013-04-01 12:08 ` Vincent Beffara @ 2013-04-01 19:09 ` Ian Barton 2013-04-05 16:02 ` Christopher Allan Webber 0 siblings, 1 reply; 13+ messages in thread From: Ian Barton @ 2013-04-01 19:09 UTC (permalink / raw) To: emacs-orgmode On 01/04/13 13:08, Vincent Beffara wrote: > Yes, I mean, I know which html you need for that, simply within o-blog you need to manage between relative paths, absolute paths, canonical paths and so on in the template, to match the right section, - mainly it should be a matter of let-ing the right variable to the right value at the right point in the template and catching it when generating the toc, but I never took the time to get it right ... >> I've also just found this, which uses Org only as a markup tool and >> Jekyll to generate the site: >> >> http://orgmode.org/worg/org-tutorials/org-jekyll.html > I had a look at the too, but it felt just a little bit too convoluted compared to managing everything from Org. Besides, it seems to lose fontification of code snippets and the like? > > /v > As the original author of that page, I agree that using Jekyll is convoluted, but it gives you much more control. However I now use Pelican: https://pelican.readthedocs.org/en/3.1.1/ There are a few reasons for this. Pelican is written in Python, which I find easier to hack on. It is more flexible than Jekyll, which I found hard to get to work the way I wanted with categories and tags. I wrote a yaml importer for Pelican so I could use my old jekyll posts. However, Pelican understands Markdown, which I think the new exporter supports. So my work flow now is Emacs-> export as html -> run Jekyll Ian. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Org as a static site generator 2013-04-01 19:09 ` Ian Barton @ 2013-04-05 16:02 ` Christopher Allan Webber 2013-04-06 8:01 ` Ian Barton 0 siblings, 1 reply; 13+ messages in thread From: Christopher Allan Webber @ 2013-04-05 16:02 UTC (permalink / raw) To: ian; +Cc: emacs-orgmode Ian Barton writes: > On 01/04/13 13:08, Vincent Beffara wrote: > >> Yes, I mean, I know which html you need for that, simply within o-blog you need to manage between relative paths, absolute paths, canonical paths and so on in the template, to match the right section, - mainly it should be a matter of let-ing the right variable to the right value at the right point in the template and catching it when generating the toc, but I never took the time to get it right ... >>> I've also just found this, which uses Org only as a markup tool and >>> Jekyll to generate the site: >>> >>> http://orgmode.org/worg/org-tutorials/org-jekyll.html >> I had a look at the too, but it felt just a little bit too convoluted compared to managing everything from Org. Besides, it seems to lose fontification of code snippets and the like? >> >> /v >> > As the original author of that page, I agree that using Jekyll is > convoluted, but it gives you much more control. However I now use > Pelican: https://pelican.readthedocs.org/en/3.1.1/ > > There are a few reasons for this. Pelican is written in Python, which I > find easier to hack on. It is more flexible than Jekyll, which I found > hard to get to work the way I wanted with categories and tags. > > I wrote a yaml importer for Pelican so I could use my old jekyll posts. > However, Pelican understands Markdown, which I think the new exporter > supports. > > So my work flow now is Emacs-> export as html -> run Jekyll > > Ian. Heya Ian, I've been planning to switch my blog over to pelican. It's cool to hear you say this. Is there any special elisp you use for the export, including converting things like the title, etc? Thanks! - Chris ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Org as a static site generator 2013-04-05 16:02 ` Christopher Allan Webber @ 2013-04-06 8:01 ` Ian Barton 2013-04-06 15:15 ` Christopher Allan Webber 0 siblings, 1 reply; 13+ messages in thread From: Ian Barton @ 2013-04-06 8:01 UTC (permalink / raw) To: Christopher Allan Webber; +Cc: emacs-orgmode On Fri, Apr 05, 2013 at 11:02:56AM -0500, Christopher Allan Webber wrote: > Ian Barton writes: > > > On 01/04/13 13:08, Vincent Beffara wrote: > > > >> Yes, I mean, I know which html you need for that, simply within o-blog you need to manage between relative paths, absolute paths, canonical paths and so on in the template, to match the right section, - mainly it should be a matter of let-ing the right variable to the right value at the right point in the template and catching it when generating the toc, but I never took the time to get it right ... > >>> I've also just found this, which uses Org only as a markup tool and > >>> Jekyll to generate the site: > >>> > >>> http://orgmode.org/worg/org-tutorials/org-jekyll.html > >> I had a look at the too, but it felt just a little bit too convoluted compared to managing everything from Org. Besides, it seems to lose fontification of code snippets and the like? > >> > >> /v > >> > > As the original author of that page, I agree that using Jekyll is > > convoluted, but it gives you much more control. However I now use > > Pelican: https://pelican.readthedocs.org/en/3.1.1/ > > > > There are a few reasons for this. Pelican is written in Python, which I > > find easier to hack on. It is more flexible than Jekyll, which I found > > hard to get to work the way I wanted with categories and tags. > > > > I wrote a yaml importer for Pelican so I could use my old jekyll posts. > > However, Pelican understands Markdown, which I think the new exporter > > supports. > > > > So my work flow now is Emacs-> export as html -> run Jekyll > > > > Ian. > > Heya Ian, > > I've been planning to switch my blog over to pelican. It's cool to hear > you say this. > > Is there any special elisp you use for the export, including converting > things like the title, etc? > > Thanks! > - Chris Hi Chris, No, nothing special. I just use org's standard publish functions. However, I publish only the body part of the html and place the yaml tags in the org file. A typical org file for a blog post would look like: #+STARTUP: showall indent #+STARTUP: hidestars #+OPTIONS: H:2 num:nil tags:nil toc:nil timestamps:nil #+BEGIN_HTML --- title: My Fire Steel Crumbles to Dust. date: 2013-02-17 tags: [gear] category: blog --- #+END_HTML After my walk over Moel Famau and Moel Arthur I was looking forward to making a hot drink. My brew kit lives permanently in the boot of org pubish then creates a file with a yaml header and html body text. Then I just run Pelican to publish the post. I have written a Pelican yaml reader which converts the yaml files to allow Pelican to process them. I'll document the whole process over the next couple of days and put it on Worg. I keep meaning to contribute my yaml reader back to Pelican, but it's quite specific to publishing org-mode files and not really a general purpose yaml importer. -- Best wishes, Ian. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Org as a static site generator 2013-04-06 8:01 ` Ian Barton @ 2013-04-06 15:15 ` Christopher Allan Webber 2013-04-06 16:13 ` Ian Barton 0 siblings, 1 reply; 13+ messages in thread From: Christopher Allan Webber @ 2013-04-06 15:15 UTC (permalink / raw) To: "ian; +Cc: emacs-orgmode Cool, thanks for that info! Ian Barton writes: > On Fri, Apr 05, 2013 at 11:02:56AM -0500, Christopher Allan Webber wrote: >> Ian Barton writes: >> >> > On 01/04/13 13:08, Vincent Beffara wrote: >> > >> >> Yes, I mean, I know which html you need for that, simply within o-blog you need to manage between relative paths, absolute paths, canonical paths and so on in the template, to match the right section, - mainly it should be a matter of let-ing the right variable to the right value at the right point in the template and catching it when generating the toc, but I never took the time to get it right ... >> >>> I've also just found this, which uses Org only as a markup tool and >> >>> Jekyll to generate the site: >> >>> >> >>> http://orgmode.org/worg/org-tutorials/org-jekyll.html >> >> I had a look at the too, but it felt just a little bit too convoluted compared to managing everything from Org. Besides, it seems to lose fontification of code snippets and the like? >> >> >> >> /v >> >> >> > As the original author of that page, I agree that using Jekyll is >> > convoluted, but it gives you much more control. However I now use >> > Pelican: https://pelican.readthedocs.org/en/3.1.1/ >> > >> > There are a few reasons for this. Pelican is written in Python, which I >> > find easier to hack on. It is more flexible than Jekyll, which I found >> > hard to get to work the way I wanted with categories and tags. >> > >> > I wrote a yaml importer for Pelican so I could use my old jekyll posts. >> > However, Pelican understands Markdown, which I think the new exporter >> > supports. >> > >> > So my work flow now is Emacs-> export as html -> run Jekyll >> > >> > Ian. >> >> Heya Ian, >> >> I've been planning to switch my blog over to pelican. It's cool to hear >> you say this. >> >> Is there any special elisp you use for the export, including converting >> things like the title, etc? >> >> Thanks! >> - Chris > > > Hi Chris, > > No, nothing special. I just use org's standard publish functions. However, I publish only the body part of the html and place the yaml tags in the org file. A typical org file for a blog post would look like: > > > #+STARTUP: showall indent > #+STARTUP: hidestars > #+OPTIONS: H:2 num:nil tags:nil toc:nil timestamps:nil > #+BEGIN_HTML > --- > title: My Fire Steel Crumbles to Dust. > date: 2013-02-17 > tags: [gear] > category: blog > > --- > #+END_HTML > > After my walk over Moel Famau and Moel Arthur I was looking forward > to making a hot drink. My brew kit lives permanently in the boot of > > > > org pubish then creates a file with a yaml header and html body text. Then I just run Pelican to publish the post. I have written a Pelican yaml reader which converts the yaml files to allow Pelican to process them. I'll document the whole process over the next couple of days and put it on Worg. I keep meaning to contribute my yaml reader back to Pelican, but it's quite specific to publishing org-mode files and not really a general purpose yaml importer. > > > -- > > Best wishes, > > Ian. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Org as a static site generator 2013-04-06 15:15 ` Christopher Allan Webber @ 2013-04-06 16:13 ` Ian Barton 0 siblings, 0 replies; 13+ messages in thread From: Ian Barton @ 2013-04-06 16:13 UTC (permalink / raw) To: emacs-orgmode On 06/04/13 16:15, Christopher Allan Webber wrote: > Cool, thanks for that info! > > Ian Barton writes: > >> On Fri, Apr 05, 2013 at 11:02:56AM -0500, Christopher Allan Webber wrote: >>> Ian Barton writes: >>> >>>> On 01/04/13 13:08, Vincent Beffara wrote: >>>> >>>>> Yes, I mean, I know which html you need for that, simply within o-blog you need to manage between relative paths, absolute paths, canonical paths and so on in the template, to match the right section, - mainly it should be a matter of let-ing the right variable to the right value at the right point in the template and catching it when generating the toc, but I never took the time to get it right ... >>>>>> I've also just found this, which uses Org only as a markup tool and >>>>>> Jekyll to generate the site: >>>>>> >>>>>> http://orgmode.org/worg/org-tutorials/org-jekyll.html >>>>> I had a look at the too, but it felt just a little bit too convoluted compared to managing everything from Org. Besides, it seems to lose fontification of code snippets and the like? >>>>> >>>>> /v >>>>> >>>> As the original author of that page, I agree that using Jekyll is >>>> convoluted, but it gives you much more control. However I now use >>>> Pelican: https://pelican.readthedocs.org/en/3.1.1/ >>>> >>>> There are a few reasons for this. Pelican is written in Python, which I >>>> find easier to hack on. It is more flexible than Jekyll, which I found >>>> hard to get to work the way I wanted with categories and tags. >>>> >>>> I wrote a yaml importer for Pelican so I could use my old jekyll posts. >>>> However, Pelican understands Markdown, which I think the new exporter >>>> supports. >>>> >>>> So my work flow now is Emacs-> export as html -> run Jekyll >>>> >>>> Ian. >>> >>> Heya Ian, >>> >>> I've been planning to switch my blog over to pelican. It's cool to hear >>> you say this. >>> >>> Is there any special elisp you use for the export, including converting >>> things like the title, etc? >>> >>> Thanks! >>> - Chris >> >> >> Hi Chris, >> >> No, nothing special. I just use org's standard publish functions. However, I publish only the body part of the html and place the yaml tags in the org file. A typical org file for a blog post would look like: >> >> >> #+STARTUP: showall indent >> #+STARTUP: hidestars >> #+OPTIONS: H:2 num:nil tags:nil toc:nil timestamps:nil >> #+BEGIN_HTML >> --- >> title: My Fire Steel Crumbles to Dust. >> date: 2013-02-17 >> tags: [gear] >> category: blog >> >> --- >> #+END_HTML >> >> After my walk over Moel Famau and Moel Arthur I was looking forward >> to making a hot drink. My brew kit lives permanently in the boot of >> >> >> >> org pubish then creates a file with a yaml header and html body text. Then I just run Pelican to publish the post. I have written a Pelican yaml reader which converts the yaml files to allow Pelican to process them. I'll document the whole process over the next couple of days and put it on Worg. I keep meaning to contribute my yaml reader back to Pelican, but it's quite specific to publishing org-mode files and not really a general purpose yaml importer. >> >> >> -- >> I have just written a short post at: http://www.ian-barton.com/posts/2013/Apr/06/blogging-with-emacs-org-mode-and-pelican/ which describes how I use org-mode and Pelican. I'll write a more comprehensive explanation for Worg. Ian. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Org as a static site generator 2013-04-01 11:12 Org as a static site generator David Engster 2013-04-01 11:29 ` Vincent Beffara @ 2013-04-10 9:17 ` 'Mash (Thomas Herbert) 2013-04-10 16:59 ` Bastien 1 sibling, 1 reply; 13+ messages in thread From: 'Mash (Thomas Herbert) @ 2013-04-10 9:17 UTC (permalink / raw) To: David Engster; +Cc: emacs-orgmode On 2013-04-01 13:12+0200, David Engster wrote: > I'd like to use Org as a static site generator. I know quite a few > people use Org to manage their sites, so I'd like to know what's already > available and what I'd need to add to make this working properly. > > I know of course how to export a bunch of Org files to HTML through the > publishing features. However, that's not really cutting it, I'm afraid. > > Thing of a typical HTML5 template having a <header>, <nav>, <footer>, > and <article>. I'd like Org to include the different exported files into > the <article> section, and the rest to remain the same. The <nav> would > contain a global navigation menu, also highlighting the current active > section (though CSS, no JS please). > > Has anybode done something like this? > > -David > I rolled my own called "Orgile". http://toshine.org/etc/orgile-emacs-org-mode-file-html-parser-php-publishing-tool/ I would love someone to help me develop "classOrgile.php" the org-mode file to HTML parser can be used as a stand-alone PHP class in what ever tool you want. I am not much of a developer so this is a garden-shed effort, but as you can see with http://toshine.org it turned out pretty clean, and allows me to stay in Emacs and just push up the .org file via Git and Orgile does the rest. Note: I have tweaked my current Orgile code on my current site versus the public version on github, so may need to compare the two and republish to github. 'Mash ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Org as a static site generator 2013-04-10 9:17 ` 'Mash (Thomas Herbert) @ 2013-04-10 16:59 ` Bastien 2013-05-27 23:48 ` François Pinard 0 siblings, 1 reply; 13+ messages in thread From: Bastien @ 2013-04-10 16:59 UTC (permalink / raw) To: 'Mash (Thomas Herbert); +Cc: emacs-orgmode, David Engster "'Mash (Thomas Herbert)" <mashdot@toshine.net> writes: > I rolled my own called "Orgile". > > http://toshine.org/etc/orgile-emacs-org-mode-file-html-parser-php-publishing-tool/ Oh, nice! I added a pointer in Worg: http://orgmode.org/worg/org-tools/index.html -- Bastien ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Org as a static site generator 2013-04-10 16:59 ` Bastien @ 2013-05-27 23:48 ` François Pinard 2013-05-29 13:16 ` Eric Schulte 0 siblings, 1 reply; 13+ messages in thread From: François Pinard @ 2013-05-27 23:48 UTC (permalink / raw) To: emacs-orgmode Bastien <bzg@gnu.org> writes: > Oh, nice! I added a pointer in Worg: > http://orgmode.org/worg/org-tools/index.html At the end of that page, there is: "See the page Org Blogs and Wikis.", with "Org Blogs and Wikis" clickable. However, the pointer resolves to file:///home/emacs/install/git/worg/org-blog-wiki.html. Some "http://" was likely intended there? François ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Org as a static site generator 2013-05-27 23:48 ` François Pinard @ 2013-05-29 13:16 ` Eric Schulte 0 siblings, 0 replies; 13+ messages in thread From: Eric Schulte @ 2013-05-29 13:16 UTC (permalink / raw) To: François Pinard; +Cc: emacs-orgmode François Pinard <pinard@iro.umontreal.ca> writes: > Bastien <bzg@gnu.org> writes: > >> Oh, nice! I added a pointer in Worg: >> http://orgmode.org/worg/org-tools/index.html > > At the end of that page, there is: "See the page Org Blogs and Wikis.", > with "Org Blogs and Wikis" clickable. However, the pointer resolves to > file:///home/emacs/install/git/worg/org-blog-wiki.html. Some "http://" > was likely intended there? > > François > I just pushed up a fix for this link, and also added mention of org-ehtml to the Org-mode blog/wiki page. Cheers, -- Eric Schulte http://cs.unm.edu/~eschulte ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2013-05-29 13:17 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-04-01 11:12 Org as a static site generator David Engster 2013-04-01 11:29 ` Vincent Beffara 2013-04-01 11:54 ` David Engster 2013-04-01 12:08 ` Vincent Beffara 2013-04-01 19:09 ` Ian Barton 2013-04-05 16:02 ` Christopher Allan Webber 2013-04-06 8:01 ` Ian Barton 2013-04-06 15:15 ` Christopher Allan Webber 2013-04-06 16:13 ` Ian Barton 2013-04-10 9:17 ` 'Mash (Thomas Herbert) 2013-04-10 16:59 ` Bastien 2013-05-27 23:48 ` François Pinard 2013-05-29 13:16 ` Eric Schulte
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).