emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org to static site?
@ 2017-05-31 15:00 Matt Price
  2017-05-31 15:08 ` Russell Adams
                   ` (6 more replies)
  0 siblings, 7 replies; 35+ messages in thread
From: Matt Price @ 2017-05-31 15:00 UTC (permalink / raw)
  To: Org Mode

[-- Attachment #1: Type: text/plain, Size: 542 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 643 bytes --]

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

* Re: org to static site?
  2017-05-31 15:00 org to static site? Matt Price
@ 2017-05-31 15:08 ` Russell Adams
  2017-05-31 15:17   ` Jeffrey Brent McBeth
  2017-05-31 17:05 ` Chunyang Xu
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 35+ messages in thread
From: Russell Adams @ 2017-05-31 15:08 UTC (permalink / raw)
  To: emacs-orgmode

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 Adams                            RLAdams@AdamsInfoServ.com

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

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

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

* Re: org to static site?
  2017-05-31 15:08 ` Russell Adams
@ 2017-05-31 15:17   ` Jeffrey Brent McBeth
  2017-05-31 15:29     ` Russell Adams
  2017-05-31 15:32     ` John Hendy
  0 siblings, 2 replies; 35+ messages in thread
From: Jeffrey Brent McBeth @ 2017-05-31 15:17 UTC (permalink / raw)
  To: emacs-orgmode

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

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

* Re: org to static site?
  2017-05-31 15:17   ` Jeffrey Brent McBeth
@ 2017-05-31 15:29     ` Russell Adams
  2017-05-31 15:34       ` John Hendy
  2017-05-31 15:32     ` John Hendy
  1 sibling, 1 reply; 35+ messages in thread
From: Russell Adams @ 2017-05-31 15:29 UTC (permalink / raw)
  To: emacs-orgmode


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 Adams                            RLAdams@AdamsInfoServ.com

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

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

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

* Re: org to static site?
  2017-05-31 15:17   ` Jeffrey Brent McBeth
  2017-05-31 15:29     ` Russell Adams
@ 2017-05-31 15:32     ` John Hendy
  2017-05-31 16:08       ` Puneeth Chaganti
  1 sibling, 1 reply; 35+ messages in thread
From: John Hendy @ 2017-05-31 15:32 UTC (permalink / raw)
  To: Jeffrey Brent McBeth; +Cc: emacs-orgmode

On Wed, May 31, 2017 at 10:17 AM, Jeffrey Brent McBeth
<mcbeth@broggs.org> 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
>
>

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

* Re: org to static site?
  2017-05-31 15:29     ` Russell Adams
@ 2017-05-31 15:34       ` John Hendy
  2017-05-31 16:20         ` Russell Adams
  0 siblings, 1 reply; 35+ messages in thread
From: John Hendy @ 2017-05-31 15:34 UTC (permalink / raw)
  To: emacs-orgmode

On Wed, May 31, 2017 at 10:29 AM, Russell Adams
<RLAdams@adamsinfoserv.com> 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 Adams                            RLAdams@AdamsInfoServ.com
>
> PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/
>
> Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3
>

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

* Re: org to static site?
  2017-05-31 15:32     ` John Hendy
@ 2017-05-31 16:08       ` Puneeth Chaganti
  2017-05-31 16:17         ` John Hendy
  0 siblings, 1 reply; 35+ messages in thread
From: Puneeth Chaganti @ 2017-05-31 16:08 UTC (permalink / raw)
  To: John Hendy; +Cc: Jeffrey Brent McBeth, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 507 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1002 bytes --]

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

* Re: org to static site?
  2017-05-31 16:08       ` Puneeth Chaganti
@ 2017-05-31 16:17         ` John Hendy
  0 siblings, 0 replies; 35+ messages in thread
From: John Hendy @ 2017-05-31 16:17 UTC (permalink / raw)
  To: Puneeth Chaganti; +Cc: Jeffrey Brent McBeth, emacs-orgmode

On Wed, May 31, 2017 at 11:08 AM, Puneeth Chaganti <punchagan@gmail.com> 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

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

* Re: org to static site?
  2017-05-31 15:34       ` John Hendy
@ 2017-05-31 16:20         ` Russell Adams
  2017-05-31 16:37           ` John Kitchin
  0 siblings, 1 reply; 35+ messages in thread
From: Russell Adams @ 2017-05-31 16:20 UTC (permalink / raw)
  To: emacs-orgmode

On Wed, May 31, 2017 at 10:34:57AM -0500, John Hendy wrote:
> On Wed, May 31, 2017 at 10:29 AM, Russell Adams
> <RLAdams@adamsinfoserv.com> 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 Adams                            RLAdams@AdamsInfoServ.com
> >
> > PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/
> >
> > Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3
> >
>


------------------------------------------------------------------
Russell Adams                            RLAdams@AdamsInfoServ.com

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

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

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

* Re: org to static site?
  2017-05-31 16:20         ` Russell Adams
@ 2017-05-31 16:37           ` John Kitchin
  0 siblings, 0 replies; 35+ messages in thread
From: John Kitchin @ 2017-05-31 16:37 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2933 bytes --]

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 <RLAdams@adamsinfoserv.com>
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
> > <RLAdams@adamsinfoserv.com> 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 Adams                            RLAdams@AdamsInfoServ.com
> > >
> > > PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/
> > >
> > > Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3
> > >
> >
>
>
> ------------------------------------------------------------------
> Russell Adams                            RLAdams@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

[-- Attachment #2: Type: text/html, Size: 4241 bytes --]

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

* Re: org to static site?
  2017-05-31 15:00 org to static site? Matt Price
  2017-05-31 15:08 ` Russell Adams
@ 2017-05-31 17:05 ` Chunyang Xu
  2017-05-31 19:51   ` John Ankarström
  2017-05-31 18:23 ` lists
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 35+ messages in thread
From: Chunyang Xu @ 2017-05-31 17:05 UTC (permalink / raw)
  To: Matt Price, Org Mode

Matt Price <moptop99@gmail.com> 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 <https://xuchunyang.me/> 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/)

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

* Re: org to static site?
  2017-05-31 15:00 org to static site? Matt Price
  2017-05-31 15:08 ` Russell Adams
  2017-05-31 17:05 ` Chunyang Xu
@ 2017-05-31 18:23 ` lists
  2017-06-01  7:46 ` Julian M. Burgos
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 35+ messages in thread
From: lists @ 2017-05-31 18:23 UTC (permalink / raw)
  To: Matt Price; +Cc: Org Mode

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.

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

* Re: org to static site?
  2017-05-31 17:05 ` Chunyang Xu
@ 2017-05-31 19:51   ` John Ankarström
  0 siblings, 0 replies; 35+ messages in thread
From: John Ankarström @ 2017-05-31 19:51 UTC (permalink / raw)
  To: emacs-orgmode

Chunyang Xu <mail@xuchunyang.me> 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 <https://xuchunyang.me/> 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

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

* Re: org to static site?
  2017-05-31 15:00 org to static site? Matt Price
                   ` (2 preceding siblings ...)
  2017-05-31 18:23 ` lists
@ 2017-06-01  7:46 ` Julian M. Burgos
  2017-06-01 10:09 ` Rasmus
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 35+ messages in thread
From: Julian M. Burgos @ 2017-06-01  7:46 UTC (permalink / raw)
  To: Matt Price; +Cc: Org Mode

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.burgos@hafogvatn.is

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

* Re: org to static site?
  2017-05-31 15:00 org to static site? Matt Price
                   ` (3 preceding siblings ...)
  2017-06-01  7:46 ` Julian M. Burgos
@ 2017-06-01 10:09 ` Rasmus
  2017-06-04 18:26 ` Scott Randby
  2017-11-30  5:13 ` George myglc2 Clemmer
  6 siblings, 0 replies; 35+ messages in thread
From: Rasmus @ 2017-06-01 10:09 UTC (permalink / raw)
  To: emacs-orgmode

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.

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

* Re: org to static site?
  2017-05-31 15:00 org to static site? Matt Price
                   ` (4 preceding siblings ...)
  2017-06-01 10:09 ` Rasmus
@ 2017-06-04 18:26 ` Scott Randby
  2017-06-05  5:59   ` John Ankarström
  2017-06-06  9:12   ` Fabrice Popineau
  2017-11-30  5:13 ` George myglc2 Clemmer
  6 siblings, 2 replies; 35+ messages in thread
From: Scott Randby @ 2017-06-04 18:26 UTC (permalink / raw)
  To: Matt Price, Org Mode

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

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

* Re: org to static site?
  2017-06-04 18:26 ` Scott Randby
@ 2017-06-05  5:59   ` John Ankarström
  2017-06-05 16:54     ` Scott Randby
  2017-06-06  9:12   ` Fabrice Popineau
  1 sibling, 1 reply; 35+ messages in thread
From: John Ankarström @ 2017-06-05  5:59 UTC (permalink / raw)
  To: emacs-orgmode

On June 5, 2017 1:26:15 AM GMT+07:00, Scott Randby <srandby@gmail.com> 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

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

* Re: org to static site?
  2017-06-05  5:59   ` John Ankarström
@ 2017-06-05 16:54     ` Scott Randby
  2017-06-05 21:16       ` Nick Dokos
  0 siblings, 1 reply; 35+ messages in thread
From: Scott Randby @ 2017-06-05 16:54 UTC (permalink / raw)
  To: emacs-orgmode

On 06/05/2017 01:59 AM, John Ankarström wrote:
> On June 5, 2017 1:26:15 AM GMT+07:00, Scott Randby <srandby@gmail.com> 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
> 
> 

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

* Re: org to static site?
  2017-06-05 16:54     ` Scott Randby
@ 2017-06-05 21:16       ` Nick Dokos
  2017-06-06  2:41         ` Scott Randby
  0 siblings, 1 reply; 35+ messages in thread
From: Nick Dokos @ 2017-06-05 21:16 UTC (permalink / raw)
  To: emacs-orgmode

Scott Randby <srandby@gmail.com> 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 <srandby@gmail.com> 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

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

* Re: org to static site?
  2017-06-05 21:16       ` Nick Dokos
@ 2017-06-06  2:41         ` Scott Randby
  2017-06-10  9:21           ` Nicolas Goaziou
  0 siblings, 1 reply; 35+ messages in thread
From: Scott Randby @ 2017-06-06  2:41 UTC (permalink / raw)
  To: emacs-orgmode

On 06/05/2017 05:16 PM, Nick Dokos wrote:
> Scott Randby <srandby@gmail.com> 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 <srandby@gmail.com> 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

> 

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

* Re: org to static site?
  2017-06-04 18:26 ` Scott Randby
  2017-06-05  5:59   ` John Ankarström
@ 2017-06-06  9:12   ` Fabrice Popineau
  2017-06-08  8:14     ` Ken Mankoff
  1 sibling, 1 reply; 35+ messages in thread
From: Fabrice Popineau @ 2017-06-06  9:12 UTC (permalink / raw)
  To: Scott Randby; +Cc: Org Mode

[-- Attachment #1: Type: text/plain, Size: 2078 bytes --]

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 <srandby@gmail.com>:

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

[-- Attachment #2: Type: text/html, Size: 2833 bytes --]

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

* Re: org to static site?
  2017-06-06  9:12   ` Fabrice Popineau
@ 2017-06-08  8:14     ` Ken Mankoff
  0 siblings, 0 replies; 35+ messages in thread
From: Ken Mankoff @ 2017-06-08  8:14 UTC (permalink / raw)
  To: fabrice.popineau; +Cc: Scott Randby, Org Mode

[-- Attachment #1: Type: text/plain, Size: 2675 bytes --]

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.popineau@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 <srandby@gmail.com>:
>
>> 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>
> ------------------------------
>
>

[-- Attachment #2: Type: text/html, Size: 4033 bytes --]

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

* Re: org to static site?
  2017-06-06  2:41         ` Scott Randby
@ 2017-06-10  9:21           ` Nicolas Goaziou
  2017-06-10 18:13             ` Scott Randby
  0 siblings, 1 reply; 35+ messages in thread
From: Nicolas Goaziou @ 2017-06-10  9:21 UTC (permalink / raw)
  To: Scott Randby; +Cc: emacs-orgmode

Hello,

Scott Randby <srandby@gmail.com> 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

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

* Re: org to static site?
  2017-06-10  9:21           ` Nicolas Goaziou
@ 2017-06-10 18:13             ` Scott Randby
  0 siblings, 0 replies; 35+ messages in thread
From: Scott Randby @ 2017-06-10 18:13 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

On 06/10/2017 05:21 AM, Nicolas Goaziou wrote:
> Hello,
> 
> Scott Randby <srandby@gmail.com> 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,
> 

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

* Re: org to static site?
  2017-05-31 15:00 org to static site? Matt Price
                   ` (5 preceding siblings ...)
  2017-06-04 18:26 ` Scott Randby
@ 2017-11-30  5:13 ` George myglc2 Clemmer
  2017-12-01 17:17   ` Tory S. Anderson
  2017-12-01 20:19   ` Adonay Felipe Nogueira
  6 siblings, 2 replies; 35+ messages in thread
From: George myglc2 Clemmer @ 2017-11-30  5:13 UTC (permalink / raw)
  To: Matt Price; +Cc: Org Mode

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

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

* Re: org to static site?
  2017-11-30  5:13 ` George myglc2 Clemmer
@ 2017-12-01 17:17   ` Tory S. Anderson
  2017-12-01 21:13     ` George myglc2 Clemmer
  2017-12-01 20:19   ` Adonay Felipe Nogueira
  1 sibling, 1 reply; 35+ messages in thread
From: Tory S. Anderson @ 2017-12-01 17:17 UTC (permalink / raw)
  To: George myglc2 Clemmer; +Cc: Org Mode

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 <myglc2@gmail.com> 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

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

* Re: org to static site?
  2017-11-30  5:13 ` George myglc2 Clemmer
  2017-12-01 17:17   ` Tory S. Anderson
@ 2017-12-01 20:19   ` Adonay Felipe Nogueira
  2017-12-02  2:53     ` myglc2
  1 sibling, 1 reply; 35+ messages in thread
From: Adonay Felipe Nogueira @ 2017-12-01 20:19 UTC (permalink / raw)
  To: emacs-orgmode

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.

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

* Re: org to static site?
  2017-12-01 17:17   ` Tory S. Anderson
@ 2017-12-01 21:13     ` George myglc2 Clemmer
  0 siblings, 0 replies; 35+ messages in thread
From: George myglc2 Clemmer @ 2017-12-01 21:13 UTC (permalink / raw)
  To: Tory S. Anderson; +Cc: Org Mode

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.

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

* Re: org to static site?
  2017-12-01 20:19   ` Adonay Felipe Nogueira
@ 2017-12-02  2:53     ` myglc2
  2017-12-05 12:30       ` Rasmus
  0 siblings, 1 reply; 35+ messages in thread
From: myglc2 @ 2017-12-02  2:53 UTC (permalink / raw)
  To: Adonay Felipe Nogueira; +Cc: emacs-orgmode

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

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

* Re: org to static site?
  2017-12-02  2:53     ` myglc2
@ 2017-12-05 12:30       ` Rasmus
  2017-12-05 16:40         ` myglc2
  2017-12-05 19:10         ` ox-publish export subtree scopes? (Was: org to static site?) Kaushal Modi
  0 siblings, 2 replies; 35+ messages in thread
From: Rasmus @ 2017-12-05 12:30 UTC (permalink / raw)
  To: emacs-orgmode

myglc2@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ä!

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

* Re: org to static site?
  2017-12-05 12:30       ` Rasmus
@ 2017-12-05 16:40         ` myglc2
  2017-12-05 19:10         ` ox-publish export subtree scopes? (Was: org to static site?) Kaushal Modi
  1 sibling, 0 replies; 35+ messages in thread
From: myglc2 @ 2017-12-05 16:40 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode

On 12/05/2017 at 13:30 Rasmus writes:

> myglc2@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.

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

* ox-publish export subtree scopes? (Was:  org to static site?)
  2017-12-05 12:30       ` Rasmus
  2017-12-05 16:40         ` myglc2
@ 2017-12-05 19:10         ` Kaushal Modi
  2017-12-10  7:15           ` ox-publish export subtree scopes? Narendra Joshi
  2018-01-15 21:27           ` Adonay Felipe Nogueira
  1 sibling, 2 replies; 35+ messages in thread
From: Kaushal Modi @ 2017-12-05 19:10 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2505 bytes --]

On Tue, Dec 5, 2017 at 7:31 AM Rasmus <rasmus@gmx.us> wrote:

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

Hello Rasmus,

I'd like to make the ox-publish based exporting working for my ox-hugo[1]
package but so far have been unsuccessful.

The main reason is that org-foo-publish-to-bar functions take only plist,
filename and pub-dir as args. I miss the ability to first pick a subtree
scope from the specific Org file and then export only that. Is something
like that already possible which I am missing?

In addition, when given a file name, I need to auto-decide (i) if I need to
cycle through "valid" subtrees (see more about that below) and export those
subtrees,or (ii) export the whole Org file if #+TITLE is present.

So I ended up with org-hugo-export-wim-to-md[2] ("wim" stands for What I
Mean). Below is a snippet from its doc string:

=====
- If the current subtree has the \"EXPORT_FILE_NAME\" property, export
  that subtree.
- If the current subtree doesn't have that property, but one of its
  parent subtrees has, then export from that subtree's scope.
- If none of the subtrees have that property (or if there are no Org
  subtrees at all), but the Org #+TITLE keyword is present,
  export the whole Org file as a post with that title (calls
  `org-hugo-export-to-md' with its SUBTREEP argument set to nil).

- If ALL-SUBTREES is non-nil, export all valid Hugo post subtrees
  \(that have the \"EXPORT_FILE_NAME\" property) in the current file
  to multiple Markdown posts.
- If ALL-SUBTREES is non-nil, and again if none of the subtrees have
  that property (or if there are no Org subtrees), but the Org #+TITLE
  keyword is present, export the whole Org file.

- If the file neither has valid Hugo post subtrees, nor has the
  #+TITLE present, throw a user error.  If NOERROR is non-nil, use
  `message' to display the error message instead of signaling a user
  error.
=====

And I use a Makefile[3] to find all Org files in the current directly and
call the above function, which then does the right thing as explained in
the conditions above.

Is there any way to call org-publish to export either the entire file or
cycle through the file and export the subtrees matching a predicate?

[1]: https://github.com/kaushalmodi/ox-hugo
[2]:
https://github.com/kaushalmodi/ox-hugo/blob/832a5d7424013f60b77354ec28613440afac0269/ox-hugo.el#L2424-L2448
[3]: https://github.com/kaushalmodi/ox-hugo/blob/master/Makefile
-- 

Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 3484 bytes --]

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

* Re: ox-publish export subtree scopes?
  2017-12-05 19:10         ` ox-publish export subtree scopes? (Was: org to static site?) Kaushal Modi
@ 2017-12-10  7:15           ` Narendra Joshi
  2017-12-19 11:53             ` Rasmus
  2018-01-15 21:27           ` Adonay Felipe Nogueira
  1 sibling, 1 reply; 35+ messages in thread
From: Narendra Joshi @ 2017-12-10  7:15 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: emacs-orgmode, Rasmus

Kaushal Modi <kaushal.modi@gmail.com> writes:

> On Tue, Dec 5, 2017 at 7:31 AM Rasmus <rasmus@gmx.us> wrote:
>
>     If you have any suggestions on how to improve ox-publish to
>     better suit
>     please share them.
>
>
> Hello Rasmus,
>
> I'd like to make the ox-publish based exporting working for my
> ox-hugo[1] package but so far have been unsuccessful.
>
> The main reason is that org-foo-publish-to-bar functions take only
> plist, filename and pub-dir as args. I miss the ability to first pick
> a subtree scope from the specific Org file and then export only that.
> Is something like that already possible which I am missing?
>
> In addition, when given a file name, I need to auto-decide (i) if I
> need to cycle through "valid" subtrees (see more about that below)
> and export those subtrees,or (ii) export the whole Org file if #
> +TITLE is present.
>
> So I ended up with org-hugo-export-wim-to-md[2] ("wim" stands for
> What I Mean). Below is a snippet from its doc string:
>
> =====
> - If the current subtree has the \"EXPORT_FILE_NAME\" property,
> export
>   that subtree.
> - If the current subtree doesn't have that property, but one of its
>   parent subtrees has, then export from that subtree's scope.
> - If none of the subtrees have that property (or if there are no Org
>   subtrees at all), but the Org #+TITLE keyword is present,
>   export the whole Org file as a post with that title (calls
>   `org-hugo-export-to-md' with its SUBTREEP argument set to nil).
>
> - If ALL-SUBTREES is non-nil, export all valid Hugo post subtrees
>   \(that have the \"EXPORT_FILE_NAME\" property) in the current file
>   to multiple Markdown posts.
> - If ALL-SUBTREES is non-nil, and again if none of the subtrees have
>   that property (or if there are no Org subtrees), but the Org #
> +TITLE
>   keyword is present, export the whole Org file.
>
> - If the file neither has valid Hugo post subtrees, nor has the
>   #+TITLE present, throw a user error.  If NOERROR is non-nil, use
>   `message' to display the error message instead of signaling a user
>   error.
> =====
>
> And I use a Makefile[3] to find all Org files in the current directly
> and call the above function, which then does the right thing as
> explained in the conditions above.
>
> Is there any way to call org-publish to export either the entire file
> or cycle through the file and export the subtrees matching a
> predicate?
>
> [1]: https://github.com/kaushalmodi/ox-hugo
> [2]: https://github.com/kaushalmodi/ox-hugo/blob/
> 832a5d7424013f60b77354ec28613440afac0269/ox-hugo.el#L2424-L2448
> [3]: https://github.com/kaushalmodi/ox-hugo/blob/master/Makefile
> --
>
> Kaushal Modi

I have faced something similar (or maybe not very similar) while using
`org-publish' for my static blog. I wanted to wrap everything inside
body in a container and a row (bootstrap classes). The functions
provided do not let me do this conveniently. I can define `content',
`preamble' and `postamble' but cannot wrap all three of them inside a
`div' without overriding the whole export function.

Best,
-- 
Narendra Joshi

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

* Re: ox-publish export subtree scopes?
  2017-12-10  7:15           ` ox-publish export subtree scopes? Narendra Joshi
@ 2017-12-19 11:53             ` Rasmus
  0 siblings, 0 replies; 35+ messages in thread
From: Rasmus @ 2017-12-19 11:53 UTC (permalink / raw)
  To: emacs-orgmode

Narendra Joshi <narendraj9@gmail.com> writes:

> Kaushal Modi <kaushal.modi@gmail.com> writes:
>
>> On Tue, Dec 5, 2017 at 7:31 AM Rasmus <rasmus@gmx.us> wrote:
>>
>>     If you have any suggestions on how to improve ox-publish to
>>     better suit
>>     please share them.
>>
>>
>> Hello Rasmus,
>>
>> I'd like to make the ox-publish based exporting working for my
>> ox-hugo[1] package but so far have been unsuccessful.
>>
>> The main reason is that org-foo-publish-to-bar functions take only
>> plist, filename and pub-dir as args. I miss the ability to first pick
>> a subtree scope from the specific Org file and then export only that.
>> Is something like that already possible which I am missing?
>>
>> In addition, when given a file name, I need to auto-decide (i) if I
>> need to cycle through "valid" subtrees (see more about that below)
>> and export those subtrees,or (ii) export the whole Org file if #
>> +TITLE is present.
>>
>> So I ended up with org-hugo-export-wim-to-md[2] ("wim" stands for
>> What I Mean). Below is a snippet from its doc string:
>>
>> =====
>> - If the current subtree has the \"EXPORT_FILE_NAME\" property,
>> export
>>   that subtree.
>> - If the current subtree doesn't have that property, but one of its
>>   parent subtrees has, then export from that subtree's scope.
>> - If none of the subtrees have that property (or if there are no Org
>>   subtrees at all), but the Org #+TITLE keyword is present,
>>   export the whole Org file as a post with that title (calls
>>   `org-hugo-export-to-md' with its SUBTREEP argument set to nil).
>>
>> - If ALL-SUBTREES is non-nil, export all valid Hugo post subtrees
>>   \(that have the \"EXPORT_FILE_NAME\" property) in the current file
>>   to multiple Markdown posts.
>> - If ALL-SUBTREES is non-nil, and again if none of the subtrees have
>>   that property (or if there are no Org subtrees), but the Org #
>> +TITLE
>>   keyword is present, export the whole Org file.
>>
>> - If the file neither has valid Hugo post subtrees, nor has the
>>   #+TITLE present, throw a user error.  If NOERROR is non-nil, use
>>   `message' to display the error message instead of signaling a user
>>   error.
>> =====
>>
>> And I use a Makefile[3] to find all Org files in the current directly
>> and call the above function, which then does the right thing as
>> explained in the conditions above.
>>
>> Is there any way to call org-publish to export either the entire file
>> or cycle through the file and export the subtrees matching a
>> predicate?
>>
>> [1]: https://github.com/kaushalmodi/ox-hugo
>> [2]: https://github.com/kaushalmodi/ox-hugo/blob/
>> 832a5d7424013f60b77354ec28613440afac0269/ox-hugo.el#L2424-L2448
>> [3]: https://github.com/kaushalmodi/ox-hugo/blob/master/Makefile
>> --
>>
>> Kaushal Modi
>
> I have faced something similar (or maybe not very similar) while using
> `org-publish' for my static blog. I wanted to wrap everything inside
> body in a container and a row (bootstrap classes). The functions
> provided do not let me do this conveniently. I can define `content',
> `preamble' and `postamble' but cannot wrap all three of them inside a
> `div' without overriding the whole export function.

For that you could use a filter, which may or may not be convinient.

(add-to-list
 'org-export-filter-final-output-functions
 (defun rasmus/div-body (body backend info)
   (when (and (org-export-derived-backend-p backend 'html)
	      ;; Add something to identify your project if using same
	      ;; init.el for "normal" usage and publishing usage.
	      )
     (replace-regexp-in-string
      "</body>" "</div>\n</body>"
      (replace-regexp-in-string "<body>"
				"<body>\n<div class=\"bootstrap-thingy\">" body)))))

Rasmus

-- 
Bang bang

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

* Re: ox-publish export subtree scopes?
  2017-12-05 19:10         ` ox-publish export subtree scopes? (Was: org to static site?) Kaushal Modi
  2017-12-10  7:15           ` ox-publish export subtree scopes? Narendra Joshi
@ 2018-01-15 21:27           ` Adonay Felipe Nogueira
  1 sibling, 0 replies; 35+ messages in thread
From: Adonay Felipe Nogueira @ 2018-01-15 21:27 UTC (permalink / raw)
  To: emacs-orgmode

Rasmus, emacs-orgmode, what's the status of this?

2017-12-05T19:10:17+0000 Kaushal Modi wrote:
> Hello Rasmus,
>
> I'd like to make the ox-publish based exporting working for my ox-hugo[1]
> package but so far have been unsuccessful.
>
> The main reason is that org-foo-publish-to-bar functions take only plist,
> filename and pub-dir as args. I miss the ability to first pick a subtree
> scope from the specific Org file and then export only that. Is something like
> that already possible which I am missing?
>
> In addition, when given a file name, I need to auto-decide (i) if I need to
> cycle through "valid" subtrees (see more about that below) and export those
> subtrees,or (ii) export the whole Org file if #+TITLE is present.
>
> So I ended up with org-hugo-export-wim-to-md[2] ("wim" stands for What I
> Mean). Below is a snippet from its doc string:
>
> =====
> - If the current subtree has the \"EXPORT_FILE_NAME\" property, export
> that subtree.
> - If the current subtree doesn't have that property, but one of its
> parent subtrees has, then export from that subtree's scope.
> - If none of the subtrees have that property (or if there are no Org
> subtrees at all), but the Org #+TITLE keyword is present,
> export the whole Org file as a post with that title (calls
> `org-hugo-export-to-md' with its SUBTREEP argument set to nil).
>
> - If ALL-SUBTREES is non-nil, export all valid Hugo post subtrees
> \(that have the \"EXPORT_FILE_NAME\" property) in the current file
> to multiple Markdown posts.
> - If ALL-SUBTREES is non-nil, and again if none of the subtrees have
> that property (or if there are no Org subtrees), but the Org #+TITLE
> keyword is present, export the whole Org file.
>
> - If the file neither has valid Hugo post subtrees, nor has the
> #+TITLE present, throw a user error. If NOERROR is non-nil, use
> `message' to display the error message instead of signaling a user
> error.
> =====
>
> And I use a Makefile[3] to find all Org files in the current directly and
> call the above function, which then does the right thing as explained in the
> conditions above.
>
> Is there any way to call org-publish to export either the entire file or
> cycle through the file and export the subtrees matching a predicate?
>
> [1]: https://github.com/kaushalmodi/ox-hugo
> [2]:
> https://github.com/kaushalmodi/ox-hugo/blob/832a5d7424013f60b77354ec28613440afac0269/ox-hugo.el#L2424-L2448
>
> [3]: https://github.com/kaushalmodi/ox-hugo/blob/master/Makefile

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

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

end of thread, other threads:[~2018-01-15 21:27 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-31 15:00 org to static site? Matt Price
2017-05-31 15:08 ` Russell Adams
2017-05-31 15:17   ` Jeffrey Brent McBeth
2017-05-31 15:29     ` Russell Adams
2017-05-31 15:34       ` John Hendy
2017-05-31 16:20         ` Russell Adams
2017-05-31 16:37           ` John Kitchin
2017-05-31 15:32     ` John Hendy
2017-05-31 16:08       ` Puneeth Chaganti
2017-05-31 16:17         ` John Hendy
2017-05-31 17:05 ` Chunyang Xu
2017-05-31 19:51   ` John Ankarström
2017-05-31 18:23 ` lists
2017-06-01  7:46 ` Julian M. Burgos
2017-06-01 10:09 ` Rasmus
2017-06-04 18:26 ` Scott Randby
2017-06-05  5:59   ` John Ankarström
2017-06-05 16:54     ` Scott Randby
2017-06-05 21:16       ` Nick Dokos
2017-06-06  2:41         ` Scott Randby
2017-06-10  9:21           ` Nicolas Goaziou
2017-06-10 18:13             ` Scott Randby
2017-06-06  9:12   ` Fabrice Popineau
2017-06-08  8:14     ` Ken Mankoff
2017-11-30  5:13 ` George myglc2 Clemmer
2017-12-01 17:17   ` Tory S. Anderson
2017-12-01 21:13     ` George myglc2 Clemmer
2017-12-01 20:19   ` Adonay Felipe Nogueira
2017-12-02  2:53     ` myglc2
2017-12-05 12:30       ` Rasmus
2017-12-05 16:40         ` myglc2
2017-12-05 19:10         ` ox-publish export subtree scopes? (Was: org to static site?) Kaushal Modi
2017-12-10  7:15           ` ox-publish export subtree scopes? Narendra Joshi
2017-12-19 11:53             ` Rasmus
2018-01-15 21:27           ` Adonay Felipe Nogueira

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