Re: [O] org to static site?

2017-12-05 Thread myglc2
On 12/05/2017 at 13:30 Rasmus writes:

> myg...@gmail.com writes:
>
>> On 12/01/2017 at 18:19 Adonay Felipe Nogueira writes:
>>
>>> The best approach for me is also to use something such as org-publish,
>>> and a simple static site server such as GNU Serveez.
>>
>> Have you used org-publish in earnest?  I settled on the approach used in
>> https://github.com/myglc2/emacsite only after trying out org-publish
>> extensively.  I needed source and generated content to sit together in
>> the working tree of complex multi-level reproducible research projects
>> and to be transparently revision controlled and hosted on the
>> organization's Github Entreprise server.
>
> I am happy that you found a method that works for you.
>
> As a contrasting point, I don’t see why you couldn’t do that with
> ox-publish.el in addition to maybe Make.
>
> Based on your description, I’d copy source files using
> org-publish-attachment to a publish dir and compiled files to the same dir
> via different projects in org-publish-project-alist.

Yes, this works and I this before switching to the emacsite approach.

[...]

> If you have any suggestions on how to improve ox-publish to better suit
> please share them.

Does org-publish now support making the publishing directory coincide
with the project directory? If not, this is the suggestion.



Re: [O] org to static site?

2017-12-05 Thread Rasmus
myg...@gmail.com writes:

> On 12/01/2017 at 18:19 Adonay Felipe Nogueira writes:
>
>> The best approach for me is also to use something such as org-publish,
>> and a simple static site server such as GNU Serveez.
>
> Have you used org-publish in earnest?  I settled on the approach used in
> https://github.com/myglc2/emacsite only after trying out org-publish
> extensively.  I needed source and generated content to sit together in
> the working tree of complex multi-level reproducible research projects
> and to be transparently revision controlled and hosted on the
> organization's Github Entreprise server.

I am happy that you found a method that works for you.

As a contrasting point, I don’t see why you couldn’t do that with
ox-publish.el in addition to maybe Make.

Based on your description, I’d copy source files using
org-publish-attachment to a publish dir and compiled files to the same dir
via different projects in org-publish-project-alist.  I don’t know how
github works re CI, but with Gitlab you’d then mark the publish folder as
an artifact folder that would be published.  For each commit you’d then
have a zip and a website with source and compiled data / code.

If you have any suggestions on how to improve ox-publish to better suit
please share them.

> After studying both approaches I found the emacsite approach to work
> better than org-publish. Just to be clear, emacsite does not require
> GitHub. You can equally well serve the site from the development tree,
> or you can publish by doing git push to non bare git repos hosted on web
> servers. In this way emacsite effectively automates site publishing
> using make and git which I found to be more reliable than org-publish.

For publishing something to the web I’d personally use CI or just cp.
You could use git using :publishing-function or maybe
:publishing-directory if tramp somehow supports git. 

Rasmus

-- 
Tack, ni svenska vakttorn. Med plutonium tvingar vi dansken på knä!




Re: [O] org to static site?

2017-12-01 Thread myglc2
On 12/01/2017 at 18:19 Adonay Felipe Nogueira writes:

> The best approach for me is also to use something such as org-publish,
> and a simple static site server such as GNU Serveez.

Have you used org-publish in earnest?  I settled on the approach used in
https://github.com/myglc2/emacsite only after trying out org-publish
extensively.  I needed source and generated content to sit together in
the working tree of complex multi-level reproducible research projects
and to be transparently revision controlled and hosted on the
organization's Github Entreprise server.

After studying both approaches I found the emacsite approach to work
better than org-publish. Just to be clear, emacsite does not require
GitHub. You can equally well serve the site from the development tree,
or you can publish by doing git push to non bare git repos hosted on web
servers. In this way emacsite effectively automates site publishing
using make and git which I found to be more reliable than org-publish.

I also needed to be able to easily preview live results generated on HPC
development servers in order to share work in progress with colleges.
emacsite supports this natively.  A nice lightweight emacs-only way to
serve this work is https://github.com/skeeto/emacs-http-server.

-George



Re: [O] org to static site?

2017-12-01 Thread George myglc2 Clemmer
On 12/01/2017 at 17:17 Tory S. Anderson writes:

> I've got a single-chord setup with Hugo, adapted from:
> http://www.holgerschurig.de/en/emacs-blog-from-org-to-hugo/
>
> I'm very pleased with it.

That's cool, but I wanted to avoid "external" components like
frameworks, site generators, and themes as much as possible ;-)

That's why https://github.com/myglc2/emacsite generates sites directly
from org-mode using only emacs and GNU make. The only external component
is the Bootstrap javascript front-end library (https://getbootstrap.com)
referenced by https://github.com/marsmining/ox-twbs to produce
mobile-first sites.



Re: [O] org to static site?

2017-12-01 Thread Adonay Felipe Nogueira
The best approach for me is also to use something such as org-publish,
and a simple static site server such as GNU Serveez.

If you want server-side programming using GNU Guile, dynamic pages or
dynamic output/return of .csv/.json files, then the upcomming GNU
Artanis might be a good start.

I couldn't make use of it yet, but I heard that even GNU Guile has a
built-in web server (and if I read all these correctly, GNU Artanis and
GNU Serveez only make the usage of this built-in one simpler).

Also, in all cases I mentioned you'll be using the already known Scheme
language, which is somewhat similar to Emacs Lisp and has more
performance than most webserver software today.

Also, GNU Artanis allows you to use templates in pages or have a plain
HTML page that comes from a mix of HTML and Scheme.

2017-11-30T00:13:12-0500 George myglc2 Clemmer wrote:
> On 05/31/2017 at 12:00 Matt Price writes:
>
>
> No doubt too late for your teaching website, but you may find this
> interesting ...
>
> https://github.com/myglc2/emacsite
>
> HTH - George

-- 
- https://libreplanet.org/wiki/User:Adfeno
- Palestrante e consultor sobre /software/ livre (não confundir com
  gratis).
- "WhatsApp"? Ele não é livre. Por favor, veja formas de se comunicar
  instantaneamente comigo no endereço abaixo.
- Contato: https://libreplanet.org/wiki/User:Adfeno#vCard
- Arquivos comuns aceitos (apenas sem DRM): Corel Draw, Microsoft
  Office, MP3, MP4, WMA, WMV.
- Arquivos comuns aceitos e enviados: CSV, GNU Dia, GNU Emacs Org, GNU
  GIMP, Inkscape SVG, JPG, LibreOffice (padrão ODF), OGG, OPUS, PDF
  (apenas sem DRM), PNG, TXT, WEBM.



Re: [O] org to static site?

2017-12-01 Thread Tory S. Anderson
I've got a single-chord setup with Hugo, adapted from: 
http://www.holgerschurig.de/en/emacs-blog-from-org-to-hugo/


I'm very pleased with it.

- Tory

George myglc2 Clemmer  writes:


On 05/31/2017 at 12:00 Matt Price writes:

I'm trying to wean myself off of Wordpress for next year's 
teaching websites, and am wondering what solutions other people 
are using for turning a collection of org pages and/or subtrees 
into a static html site. I am leaning towards Hugo but honestly 
not for any sensible reason; I've seen other people use Jekyll,
though the fact that Github doesn't support direct conversion 
from org-mode removes some of Jekyll's appeal; and I know there 
are a number of other solutions too. 


So, I would love to hear what you all recommend.

[...]

No doubt too late for your teaching website, but you may find 
this interesting ...


https://github.com/myglc2/emacsite

HTH - George




Re: [O] org to static site?

2017-12-01 Thread George myglc2 Clemmer
On 05/31/2017 at 12:00 Matt Price writes:

> I'm trying to wean myself off of Wordpress for next year's teaching websites, 
> and am wondering what solutions other people are using for turning a 
> collection of org pages and/or subtrees into a static html site. I am leaning 
> towards Hugo but honestly not for any sensible reason; I've seen other people 
> use Jekyll,
> though the fact that Github doesn't support direct conversion from org-mode 
> removes some of Jekyll's appeal; and I know there are a number of other 
> solutions too. 
>
> So, I would love to hear what you all recommend.
[...]

No doubt too late for your teaching website, but you may find this interesting 
...

https://github.com/myglc2/emacsite

HTH - George



Re: [O] org to static site?

2017-06-10 Thread Scott Randby
On 06/10/2017 05:21 AM, Nicolas Goaziou wrote:
> Hello,
> 
> Scott Randby  writes:
> 
>> On 06/05/2017 05:16 PM, Nick Dokos wrote:
> 
>>> Can this paragraph please be added to 
>>> http://orgmode.org/worg/org-quotes.html?
>>> It certainly added a smile to my day.
>>
>> Sure, it can be added. I'm glad you liked it.
> 
> I added it. Thank you.

Just one comment. When I click on the "Show Org source" button at the
bottom of the page, it doesn't work. The button works on the Worg index
page, and the file org-quotes.org.html exists, so I don't know what the
problem is.

Scott

> 
> Regards,
> 




Re: [O] org to static site?

2017-06-10 Thread Nicolas Goaziou
Hello,

Scott Randby  writes:

> On 06/05/2017 05:16 PM, Nick Dokos wrote:

>> Can this paragraph please be added to 
>> http://orgmode.org/worg/org-quotes.html?
>> It certainly added a smile to my day.
>
> Sure, it can be added. I'm glad you liked it.

I added it. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] org to static site?

2017-06-08 Thread Ken Mankoff
I haven't seen anyone mention org-spec https://github.com/thi-ng/org-spec
or these themes: https://github.com/fniessen/org-html-themes
Both seem like they would make for a fine class webpage.
The original request didn't go into details, but for most teaching
websites, wordpress is overkill, and a single page (or a few, manually
linked) are enough.

  -k.

On Tue, Jun 6, 2017 at 12:12 PM, Fabrice Popineau <
fabrice.popin...@supelec.fr> wrote:

> I do the same, albeit I won't qualify my setup as 'simple'.
> I export all my teaching stuff, personal web page and so on from Org
> files, one file per
> course or topic. I export html files, reveal presentations, pdf files for
> exams or reference documents,
> even IPython notebooks (thanks to John Kitchin).
> I haven' t found an easy way to rely on ox-publish  for subtree publishing
> with this scheme where you keep everything in the same Org file.
> The problem was with navigation. I use a templating system
> where I compute menus and body documents that are inserted in
> some html template. So I had to write all the functions that will
> do this computation and resolve cross links (not yet perfect in this are).
>
>
>
> 2017-06-04 20:26 GMT+02:00 Scott Randby :
>
>> On 05/31/2017 11:00 AM, Matt Price wrote:
>> > I'm trying to wean myself off of Wordpress for next year's teaching
>> > websites, and am wondering what solutions other people are using for
>> > turning a collection of org pages and/or subtrees into a static html
>> > site. I am leaning towards Hugo but honestly not for any sensible
>> > reason; I've seen other people use Jekyll, though the fact that Github
>> > doesn't support direct conversion from org-mode removes some of Jekyll's
>> > appeal; and I know there are a number of other solutions too.
>> >
>> > So, I would love to hear what you all recommend.
>>
>> Maybe this is too primitive, but I keep all the content in one Org file
>> and export the text under each top-level headline as a single HTML page.
>> I use some simple macros if I need to export more than one top-level
>> headline. I keep the CSS code in a separate file. Keeping all the
>> content in one file makes it really easy to add new pages and edit old
>> pages. I use a preamble for site navigation.
>>
>> Scott Randby
>>
>>
>
>
> --
> Fabrice Popineau
> -
> SUPELEC
> Département Informatique
> 3, rue Joliot Curie
> 91192 Gif/Yvette Cedex
> Tel direct : +33 (0) 169851950 <+33%201%2069%2085%2019%2050>
> Standard : +33 (0) 169851212 <+33%201%2069%2085%2012%2012>
> --
>
>


Re: [O] org to static site?

2017-06-06 Thread Fabrice Popineau
I do the same, albeit I won't qualify my setup as 'simple'.
I export all my teaching stuff, personal web page and so on from Org files,
one file per
course or topic. I export html files, reveal presentations, pdf files for
exams or reference documents,
even IPython notebooks (thanks to John Kitchin).
I haven' t found an easy way to rely on ox-publish  for subtree publishing
with this scheme where you keep everything in the same Org file.
The problem was with navigation. I use a templating system
where I compute menus and body documents that are inserted in
some html template. So I had to write all the functions that will
do this computation and resolve cross links (not yet perfect in this are).



2017-06-04 20:26 GMT+02:00 Scott Randby :

> On 05/31/2017 11:00 AM, Matt Price wrote:
> > I'm trying to wean myself off of Wordpress for next year's teaching
> > websites, and am wondering what solutions other people are using for
> > turning a collection of org pages and/or subtrees into a static html
> > site. I am leaning towards Hugo but honestly not for any sensible
> > reason; I've seen other people use Jekyll, though the fact that Github
> > doesn't support direct conversion from org-mode removes some of Jekyll's
> > appeal; and I know there are a number of other solutions too.
> >
> > So, I would love to hear what you all recommend.
>
> Maybe this is too primitive, but I keep all the content in one Org file
> and export the text under each top-level headline as a single HTML page.
> I use some simple macros if I need to export more than one top-level
> headline. I keep the CSS code in a separate file. Keeping all the
> content in one file makes it really easy to add new pages and edit old
> pages. I use a preamble for site navigation.
>
> Scott Randby
>
>


-- 
Fabrice Popineau
-
SUPELEC
Département Informatique
3, rue Joliot Curie
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
Standard : +33 (0) 169851212
--


Re: [O] org to static site?

2017-06-05 Thread Scott Randby
On 06/05/2017 05:16 PM, Nick Dokos wrote:
> Scott Randby  writes:
> 
>> On 06/05/2017 01:59 AM, John Ankarström wrote:
>>> On June 5, 2017 1:26:15 AM GMT+07:00, Scott Randby  
>>> wrote:

 Maybe this is too primitive, but I keep all the content in one Org
 file
 and export the text under each top-level headline as a single HTML
 page.
 I use some simple macros if I need to export more than one top-level
 headline. I keep the CSS code in a separate file. Keeping all the
 content in one file makes it really easy to add new pages and edit old
 pages. I use a preamble for site navigation.

 Scott Randby
>>>
>>> Sounds interesting.
>>>
>>> Do you have any way to generate an index page for your blog?
>>
>> I have an idea about how to generate an index page, but I haven't had
>> time to work out the details. Instead, since it isn't much work, I will
>> add entries by hand to an index page. I don't have an index page right
>> now because it isn't useful for my students.
>>
>> Actually, my site isn't a blog, it is for the classes I teach. I post
>> class notes, class audio, and other items for each class. What I like
>> about using my own site for teaching is that students don't need to log
>> into a learning management system to get the lessons. I've also designed
>> the site so that it works well on mobile devices (which is why the
>> design is very simple). Below is a link to the site I used for one of my
>> courses last semester and a link to a page containing some templates and
>> notes for things I didn't use last semester but might use in the future.
>> I don't have my source code posted anywhere yet, but I'm thinking about
>> setting up a Git repository somewhere as soon as I get a better grasp of
>> Git. Well, I'm also not sure if anyone else cares about such simple code.
>>
> 
> You'd be surprised :-) I think there is a *need* for simple code, the simpler
> the better. If I can do anything to push you along, let me know!

Okay, I consider your comment a push. My two obstacles are time and weak
understanding of Git. I will work on overcoming both.

> 
>> http://srandby.org/2017-1/356-001/home.html
>>
>> http://srandby.org/lesson-examples/lessons.html
>>
>> Org is amazing. I don't know elisp, I'm certainly not an advanced user
>> of Emacs, and I don't know how to do that really sophisticated Org stuff
>> that others talk about on this list, but I can make a functional web
>> site with Org without trouble by using the basic export functions.
>> Adding new pages, editing old pages, and updating is trivial. I know a
>> lot of people who use Markdown and static site generators, but Org is
>> much better for my purposes. And I can use it for many other things too.
>> Sorry for this unnecessary rant, but I just love Org.
>>
> 
> Can this paragraph please be added to http://orgmode.org/worg/org-quotes.html?
> It certainly added a smile to my day.

Sure, it can be added. I'm glad you liked it.

Scott Randby

> 




Re: [O] org to static site?

2017-06-05 Thread Nick Dokos
Scott Randby  writes:

> On 06/05/2017 01:59 AM, John Ankarström wrote:
>> On June 5, 2017 1:26:15 AM GMT+07:00, Scott Randby  wrote:
>>>
>>> Maybe this is too primitive, but I keep all the content in one Org
>>> file
>>> and export the text under each top-level headline as a single HTML
>>> page.
>>> I use some simple macros if I need to export more than one top-level
>>> headline. I keep the CSS code in a separate file. Keeping all the
>>> content in one file makes it really easy to add new pages and edit old
>>> pages. I use a preamble for site navigation.
>>>
>>> Scott Randby
>> 
>> Sounds interesting.
>> 
>> Do you have any way to generate an index page for your blog?
>
> I have an idea about how to generate an index page, but I haven't had
> time to work out the details. Instead, since it isn't much work, I will
> add entries by hand to an index page. I don't have an index page right
> now because it isn't useful for my students.
>
> Actually, my site isn't a blog, it is for the classes I teach. I post
> class notes, class audio, and other items for each class. What I like
> about using my own site for teaching is that students don't need to log
> into a learning management system to get the lessons. I've also designed
> the site so that it works well on mobile devices (which is why the
> design is very simple). Below is a link to the site I used for one of my
> courses last semester and a link to a page containing some templates and
> notes for things I didn't use last semester but might use in the future.
> I don't have my source code posted anywhere yet, but I'm thinking about
> setting up a Git repository somewhere as soon as I get a better grasp of
> Git. Well, I'm also not sure if anyone else cares about such simple code.
>

You'd be surprised :-) I think there is a *need* for simple code, the simpler
the better. If I can do anything to push you along, let me know!

> http://srandby.org/2017-1/356-001/home.html
>
> http://srandby.org/lesson-examples/lessons.html
>
> Org is amazing. I don't know elisp, I'm certainly not an advanced user
> of Emacs, and I don't know how to do that really sophisticated Org stuff
> that others talk about on this list, but I can make a functional web
> site with Org without trouble by using the basic export functions.
> Adding new pages, editing old pages, and updating is trivial. I know a
> lot of people who use Markdown and static site generators, but Org is
> much better for my purposes. And I can use it for many other things too.
> Sorry for this unnecessary rant, but I just love Org.
>

Can this paragraph please be added to http://orgmode.org/worg/org-quotes.html?
It certainly added a smile to my day.

-- 
Nick




Re: [O] org to static site?

2017-06-05 Thread Scott Randby
On 06/05/2017 01:59 AM, John Ankarström wrote:
> On June 5, 2017 1:26:15 AM GMT+07:00, Scott Randby  wrote:
>>
>> Maybe this is too primitive, but I keep all the content in one Org
>> file
>> and export the text under each top-level headline as a single HTML
>> page.
>> I use some simple macros if I need to export more than one top-level
>> headline. I keep the CSS code in a separate file. Keeping all the
>> content in one file makes it really easy to add new pages and edit old
>> pages. I use a preamble for site navigation.
>>
>> Scott Randby
> 
> Sounds interesting.
> 
> Do you have any way to generate an index page for your blog?

I have an idea about how to generate an index page, but I haven't had
time to work out the details. Instead, since it isn't much work, I will
add entries by hand to an index page. I don't have an index page right
now because it isn't useful for my students.

Actually, my site isn't a blog, it is for the classes I teach. I post
class notes, class audio, and other items for each class. What I like
about using my own site for teaching is that students don't need to log
into a learning management system to get the lessons. I've also designed
the site so that it works well on mobile devices (which is why the
design is very simple). Below is a link to the site I used for one of my
courses last semester and a link to a page containing some templates and
notes for things I didn't use last semester but might use in the future.
I don't have my source code posted anywhere yet, but I'm thinking about
setting up a Git repository somewhere as soon as I get a better grasp of
Git. Well, I'm also not sure if anyone else cares about such simple code.

http://srandby.org/2017-1/356-001/home.html

http://srandby.org/lesson-examples/lessons.html

Org is amazing. I don't know elisp, I'm certainly not an advanced user
of Emacs, and I don't know how to do that really sophisticated Org stuff
that others talk about on this list, but I can make a functional web
site with Org without trouble by using the basic export functions.
Adding new pages, editing old pages, and updating is trivial. I know a
lot of people who use Markdown and static site generators, but Org is
much better for my purposes. And I can use it for many other things too.
Sorry for this unnecessary rant, but I just love Org.

Scott

> 
> - John
> 
> 




Re: [O] org to static site?

2017-06-05 Thread John Ankarström
On June 5, 2017 1:26:15 AM GMT+07:00, Scott Randby  wrote:
> 
> Maybe this is too primitive, but I keep all the content in one Org
> file
> and export the text under each top-level headline as a single HTML
> page.
> I use some simple macros if I need to export more than one top-level
> headline. I keep the CSS code in a separate file. Keeping all the
> content in one file makes it really easy to add new pages and edit old
> pages. I use a preamble for site navigation.
> 
> Scott Randby

Sounds interesting.

Do you have any way to generate an index page for your blog?

- John



Re: [O] org to static site?

2017-06-04 Thread Scott Randby
On 05/31/2017 11:00 AM, Matt Price wrote:
> I'm trying to wean myself off of Wordpress for next year's teaching
> websites, and am wondering what solutions other people are using for
> turning a collection of org pages and/or subtrees into a static html
> site. I am leaning towards Hugo but honestly not for any sensible
> reason; I've seen other people use Jekyll, though the fact that Github
> doesn't support direct conversion from org-mode removes some of Jekyll's
> appeal; and I know there are a number of other solutions too. 
> 
> So, I would love to hear what you all recommend.

Maybe this is too primitive, but I keep all the content in one Org file
and export the text under each top-level headline as a single HTML page.
I use some simple macros if I need to export more than one top-level
headline. I keep the CSS code in a separate file. Keeping all the
content in one file makes it really easy to add new pages and edit old
pages. I use a preamble for site navigation.

Scott Randby



Re: [O] org to static site?

2017-06-01 Thread Rasmus
Hi,

> I'm trying to wean myself off of Wordpress for next year's teaching
> websites, and am wondering what solutions other people are using for
> turning a collection of org pages and/or subtrees into a static html site.

I use ox and ox-publish.  Since ox-publish can be recursive it's quite
versatile.  I use a lot of css as well.  Using special-blocks, you should
be able to make any look that you need.

> I am leaning towards Hugo but honestly not for any sensible reason; I've
> seen other people use Jekyll, though the fact that Github doesn't support
> direct conversion from org-mode removes some of Jekyll's appeal; and I know
> there are a number of other solutions too.

On my laptop, I just keep raw org files and sometimes html files.
ox-publish converts all org files and just copy over html, css and js
files.

I push changes to gitlab which then builds the website using gitlab-ci.
Gitlab also deploys the website to my domain and works with Let’s Encrypt.

https://gitlab.com/pages/org-mode

Hope it helps,
Rasmus

-- 
Lasciate ogni speranza, voi che leggete questo.




Re: [O] org to static site?

2017-06-01 Thread Julian M. Burgos
Hi Matt,

Recently I started to use Hugo to maintain our project's website:

http://novasarc.hafogvatn.is/

I am liking it very much. I keep the entire site in a single file, with
each page in a single subtree. Modifications to the template are also
kept in subtrees.  I edit this page directly, rather than using the hugo
tools to create content.  Then to update the site I tangle the org file
to create all the htlm files of the site, and run hugo to create the
site files that are then copied to the server.  Pretty easy.

Julian


Matt Price writes:

> I'm trying to wean myself off of Wordpress for next year's teaching
> websites, and am wondering what solutions other people are using for
> turning a collection of org pages and/or subtrees into a static html site.
> I am leaning towards Hugo but honestly not for any sensible reason; I've
> seen other people use Jekyll, though the fact that Github doesn't support
> direct conversion from org-mode removes some of Jekyll's appeal; and I know
> there are a number of other solutions too.
>
> So, I would love to hear what you all recommend.
>
> Thanks,
> Matt


--
Julian Mariano Burgos, PhD
Hafrannsóknastofnun, rannsókna- og ráðgjafarstofnun hafs og vatna/
Marine and Freshwater Research Institute
Skúlagata 4, 121 Reykjavík, Iceland
Sími/Telephone : +354-5752037
Bréfsími/Telefax:  +354-5752001
Netfang/Email: julian.bur...@hafogvatn.is



Re: [O] org to static site?

2017-05-31 Thread John Ankarström
Chunyang Xu  writes:

> It is said that Nanoc is flexible. You can convert org mode to
> HTML with Pandoc or Emacs. Nanoc supports Pandoc out of box. To
> use Emacs, you need to write your own "filter" (Nanoc's
> terminology, i.e., convert one format into another), for
> example,
> [...]
> I just created my own site  with it
> last week.

Looks fantastic! I've been searching for a good way to write blog
posts in Org, and this looks very promising. Thanks for the
examples, too.

> The syntax highlighting on code block is provided by
> htmlize.el. I noticed `org-html-export-to-html' produces
> different HTML every time even the org file is unchanged at
> all. It is very annoying to me. I found a work-around to avoid
> it,

I've always been annoyed by Org's default heading id's. The way
I usually solve it is by setting a CUSTOM_ID property for every
heading, but it's rather inflexible ...

Does anybody know of a way to have Org produce sensible, readable
id's for headings? Like #this-is-a-heading instead of
#orgdcbac14.

- John



Re: [O] org to static site?

2017-05-31 Thread lists

On 2017-05-31 16:00, Matt Price wrote:

I'm trying to wean myself off of Wordpress for next year's teaching
websites, and am wondering what solutions other people are using for
turning a collection of org pages and/or subtrees into a static html
site. I am leaning towards Hugo but honestly not for any sensible
reason; I've seen other people use Jekyll, though the fact that Github
doesn't support direct conversion from org-mode removes some of
Jekyll's appeal; and I know there are a number of other solutions too.




I have been using Pelican https://pelican.readthedocs.io/en/3.0/ for a 
while. It's written in Python and has a plugin which supports org-mode, 
or you can use markdown by exporting your content from org-mode. I have 
used it to publish a web version of a book, which is also available in 
pdf. All done from org-mode.


The html version is at: http://thecastle.github.io/thecastle/

The github repo is at: https://github.com/thecastle/thecastle

Ian.



Re: [O] org to static site?

2017-05-31 Thread Chunyang Xu
Matt Price  writes:

> I'm trying to wean myself off of Wordpress for next year's teaching
> websites, and am wondering what solutions other people are using for
> turning a collection of org pages and/or subtrees into a static html site.
> I am leaning towards Hugo but honestly not for any sensible reason; I've
> seen other people use Jekyll, though the fact that Github doesn't support
> direct conversion from org-mode removes some of Jekyll's appeal; and I know
> there are a number of other solutions too.
>
> So, I would love to hear what you all recommend.

It is said that Nanoc is flexible. You can convert org mode to HTML with
Pandoc or Emacs. Nanoc supports Pandoc out of box. To use Emacs, you
need to write your own "filter" (Nanoc's terminology, i.e., convert one
format into another), for example,

#+BEGIN_SRC ruby
require 'tempfile'

class OrgFilter < Nanoc::Filter
  identifier :org

  def run(content, params = {})
file = Tempfile.new(['nanoc', '.org'])
file.write(content)
file.close
system("emacs --batch --load init.el #{file.path} --eval 
'(org-html-export-to-html nil nil nil t)'")
html = "#{File.dirname(file.path)}/#{File.basename(file.path, '.org')}.html"
file.unlink
File.read(html)
  end
end
#+END_SRC

I just created my own site  with it last
week. The syntax highlighting on code block is provided by htmlize.el.
I noticed `org-html-export-to-html' produces different HTML every time
even the org file is unchanged at all. It is very annoying to me. I
found a work-around to avoid it,

#+BEGIN_SRC emacs-lisp
;; -*- lexical-binding: t; -*-
(let ((id 0))
  (defun org-export-new-reference--use-persistent-id (references)
(let ((new id))
  (while (rassq new references)
(setq new (incf id)))
  new)))

(advice-add 'org-export-new-reference
:override #'org-export-new-reference--use-persistent-id)
#+END_SRC

[...]

--
Org mode version 9.0.7 (release_9.0.7-496-g3d3e24 @
/Users/xcy/src/org-mode/lisp/)





Re: [O] org to static site?

2017-05-31 Thread John Kitchin
I have used blogofile for many years now. I write the posts in orgmode but
export them to html with the required yaml header.

That approach could also be used for markdown. This old
http://kitchingroup.cheme.cmu.edu/blog/2013/09/27/Publishing-to-blogofile-using-org-mode/
but lays out the basic approach I use with my blog.

Note I am not sure I would recommend blogofile today. It is not actively
developed anymore I think. It does what I want these days.
On Wed, May 31, 2017 at 12:21 PM Russell Adams 
wrote:

> On Wed, May 31, 2017 at 10:34:57AM -0500, John Hendy wrote:
> > On Wed, May 31, 2017 at 10:29 AM, Russell Adams
> >  wrote:
> > >
> > > On Wed, May 31, 2017 at 11:17:10AM -0400, Jeffrey Brent McBeth wrote:
> > >> Nikola supports org-mode last I checked though?
> > >
> > > I think it tries to remotely call emacs to compile the org to html,
> but I didn't want the extra layers. Markdown is adequate.
> > >
> > >> I use Nikola, and find the documentation frustratingly incomplete,
> but not so frustrating as to change :)
> > >
> > > Yeah, but IRC has been good for answering questions. I was able to get
> a minimal site with NO external links, libs, js,
> > > css, other crap, etc in a short time.
> >
> > I'm intrigued. Do you have the sources or could you post the gist
> > somewhere? While the result looks more or less pretty, the bootstrap3
> > base was super intimidating with respect to changing anything. I
> > probably hunted for 30min or more just to figure out why changing the
> > navbar color didn't work. Turns out it was hardcoded to use the
> > navbar-inverse class instead of the regular navbar class!?
>
> http://adamssystems.nl/
>
> You can examine the CSS there. I disabled all CDNs. I didn't want any
> javascript, external libs, etc. My ublock shows
> zero other sites, no third party code.
>
> I'd have to dig into how I customized the pre-compiled css files.
>
> >
> > John
> >
> > > I think my only complaint is that when I moved laptops my Python
> version changed and now I have to fix it.
> > >
> > >
> > > --
> > > Russell Adamsrlad...@adamsinfoserv.com
> > >
> > > PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/
> > >
> > > Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3
> > >
> >
>
>
> --
> Russell Adamsrlad...@adamsinfoserv.com
>
> PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/
>
> Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3
>
> --
John

---
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu


Re: [O] org to static site?

2017-05-31 Thread Russell Adams
On Wed, May 31, 2017 at 10:34:57AM -0500, John Hendy wrote:
> On Wed, May 31, 2017 at 10:29 AM, Russell Adams
>  wrote:
> >
> > On Wed, May 31, 2017 at 11:17:10AM -0400, Jeffrey Brent McBeth wrote:
> >> Nikola supports org-mode last I checked though?
> >
> > I think it tries to remotely call emacs to compile the org to html, but I 
> > didn't want the extra layers. Markdown is adequate.
> >
> >> I use Nikola, and find the documentation frustratingly incomplete, but not 
> >> so frustrating as to change :)
> >
> > Yeah, but IRC has been good for answering questions. I was able to get a 
> > minimal site with NO external links, libs, js,
> > css, other crap, etc in a short time.
>
> I'm intrigued. Do you have the sources or could you post the gist
> somewhere? While the result looks more or less pretty, the bootstrap3
> base was super intimidating with respect to changing anything. I
> probably hunted for 30min or more just to figure out why changing the
> navbar color didn't work. Turns out it was hardcoded to use the
> navbar-inverse class instead of the regular navbar class!?

http://adamssystems.nl/

You can examine the CSS there. I disabled all CDNs. I didn't want any 
javascript, external libs, etc. My ublock shows
zero other sites, no third party code.

I'd have to dig into how I customized the pre-compiled css files.

>
> John
>
> > I think my only complaint is that when I moved laptops my Python version 
> > changed and now I have to fix it.
> >
> >
> > --
> > Russell Adamsrlad...@adamsinfoserv.com
> >
> > PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/
> >
> > Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3
> >
>


--
Russell Adamsrlad...@adamsinfoserv.com

PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/

Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3



Re: [O] org to static site?

2017-05-31 Thread John Hendy
On Wed, May 31, 2017 at 11:08 AM, Puneeth Chaganti  wrote:
> I really wrestled with getting it to behave initially. I hope the
> intro to the docs is a joke, as either I'm an idiot or the author
> definitely failed :)
> - https://getnikola.com/handbook.html
>
> "DON'T READ THIS MANUAL. IF YOU NEED TO READ IT I FAILED, JUST USE THE
> THING."
>
>
> To be fair to the author, org support is not built into Nikola, and is
> coming through a plugin (by yours truly). The remote calls to Emacs for
> compiling, and other ugly stuff can make it harder than necessary to deal
> with.

Understood, and I just meant in general (not org integration). This
was a bit tongue in cheek; I don't think anyone would *expect* that
something like this could be used without a manual. It's complicated
and takes a bit to parse, just like any other software! I think it's
great thus far, but can't fathom how someone could "pick it up" and
start using it from scratch with no docs.

John

> - Puneeth



Re: [O] org to static site?

2017-05-31 Thread Puneeth Chaganti
I really wrestled with getting it to behave initially. I hope the
intro to the docs is a joke, as either I'm an idiot or the author
definitely failed :)
- https://getnikola.com/handbook.html

"DON'T READ THIS MANUAL. IF YOU NEED TO READ IT I FAILED, JUST USE THE
THING."


To be fair to the author, org support is not built into Nikola, and is
coming through a plugin (by yours truly). The remote calls to Emacs for
compiling, and other ugly stuff can make it harder than necessary to deal
with.

- Puneeth


Re: [O] org to static site?

2017-05-31 Thread John Hendy
On Wed, May 31, 2017 at 10:29 AM, Russell Adams
 wrote:
>
> On Wed, May 31, 2017 at 11:17:10AM -0400, Jeffrey Brent McBeth wrote:
>> Nikola supports org-mode last I checked though?
>
> I think it tries to remotely call emacs to compile the org to html, but I 
> didn't want the extra layers. Markdown is adequate.
>
>> I use Nikola, and find the documentation frustratingly incomplete, but not 
>> so frustrating as to change :)
>
> Yeah, but IRC has been good for answering questions. I was able to get a 
> minimal site with NO external links, libs, js,
> css, other crap, etc in a short time.

I'm intrigued. Do you have the sources or could you post the gist
somewhere? While the result looks more or less pretty, the bootstrap3
base was super intimidating with respect to changing anything. I
probably hunted for 30min or more just to figure out why changing the
navbar color didn't work. Turns out it was hardcoded to use the
navbar-inverse class instead of the regular navbar class!?

John

> I think my only complaint is that when I moved laptops my Python version 
> changed and now I have to fix it.
>
>
> --
> Russell Adamsrlad...@adamsinfoserv.com
>
> PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/
>
> Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3
>



Re: [O] org to static site?

2017-05-31 Thread John Hendy
On Wed, May 31, 2017 at 10:17 AM, Jeffrey Brent McBeth
 wrote:
> Nikola supports org-mode last I checked though?

Make that a +1 for Nikola, and confirming it supports Org-mode. I just
started setting up an online portfolio/blog via github.io and found
these helpful:
- http://cestlaz.github.io/posts/2016-04-17-emacs-jekyll-nikola/#.WS7gV3VE5D8
- https://streakycobra.github.io/posts/blogging-in-org-mode-with-nikola/

> I use Nikola, and find the documentation frustratingly incomplete, but not so 
> frustrating as to change :)

I really wrestled with getting it to behave initially. I hope the
intro to the docs is a joke, as either I'm an idiot or the author
definitely failed :)
- https://getnikola.com/handbook.html

"DON'T READ THIS MANUAL. IF YOU NEED TO READ IT I FAILED, JUST USE THE THING."


John

> Jeff
>
> --
> "The man who does not read good books has no advantage over
>  the man who cannot read them."
>  -- not Mark Twain, maybe a southen librarian in 1910
>
>



Re: [O] org to static site?

2017-05-31 Thread Russell Adams

On Wed, May 31, 2017 at 11:17:10AM -0400, Jeffrey Brent McBeth wrote:
> Nikola supports org-mode last I checked though?

I think it tries to remotely call emacs to compile the org to html, but I 
didn't want the extra layers. Markdown is adequate.

> I use Nikola, and find the documentation frustratingly incomplete, but not so 
> frustrating as to change :)

Yeah, but IRC has been good for answering questions. I was able to get a 
minimal site with NO external links, libs, js,
css, other crap, etc in a short time.

I think my only complaint is that when I moved laptops my Python version 
changed and now I have to fix it.


--
Russell Adamsrlad...@adamsinfoserv.com

PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/

Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3



Re: [O] org to static site?

2017-05-31 Thread Jeffrey Brent McBeth
Nikola supports org-mode last I checked though?

I use Nikola, and find the documentation frustratingly incomplete, but not so 
frustrating as to change :)

Jeff

-- 
"The man who does not read good books has no advantage over 
 the man who cannot read them."
 -- not Mark Twain, maybe a southen librarian in 1910




Re: [O] org to static site?

2017-05-31 Thread Russell Adams
On Wed, May 31, 2017 at 11:00:10AM -0400, Matt Price wrote:
> I'm trying to wean myself off of Wordpress for next year's teaching
> websites, and am wondering what solutions other people are using for
> turning a collection of org pages and/or subtrees into a static html site.
> I am leaning towards Hugo but honestly not for any sensible reason; I've
> seen other people use Jekyll, though the fact that Github doesn't support
> direct conversion from org-mode removes some of Jekyll's appeal; and I know
> there are a number of other solutions too.
>
> So, I would love to hear what you all recommend.
>
> Thanks,
> Matt

As much as I adore Org, I didn't like any of the static site generators. I 
ended up using Nikola, which uses Markdown.


--
Russell Adamsrlad...@adamsinfoserv.com

PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/

Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3



[O] org to static site?

2017-05-31 Thread Matt Price
I'm trying to wean myself off of Wordpress for next year's teaching
websites, and am wondering what solutions other people are using for
turning a collection of org pages and/or subtrees into a static html site.
I am leaning towards Hugo but honestly not for any sensible reason; I've
seen other people use Jekyll, though the fact that Github doesn't support
direct conversion from org-mode removes some of Jekyll's appeal; and I know
there are a number of other solutions too.

So, I would love to hear what you all recommend.

Thanks,
Matt