Am 21.05.2015 um 10:51 schrieb Guillermo Polito <guillermopolito@gmail.com>:
Hi!
Well, we have this secret really not mature project we started with stef a couple of weeks ago.
https://github.com/guillep/Ecstatic <https://github.com/guillep/Ecstatic>
For now it has some simple features: - you open an image and it will start serving your site + regenerating it every couple of seconds (nice to debug and forget about running pillar commands)
Cool. I was thinking about in-image editing of pillar with Rubric (or the best available choice). Then you can generate on save.
- we made some themes based on the one I made for dbxtalk, the one from stef's personal website and esug website. - we tried to push site configuration to the pillar.conf (title, menu/navigation information, author/contact info)
I had a look at Cocoon but I'm not sure what purpose it serves. Maybe I need to get to used to it.
- another thing we wanted to push was the writing of plugins for the moment taking benefit from the [[[eval=true]]]. We were thinking however on making a special annotation for it. We have two really simple stupid "plugins", one that shows a list of news/blog feed, one that generates a list of publications based on a bib file using citezen.
YES! That is exactly what I was looking for. Something that can be evaluated dynamically. That opens a wide range of possibilities.
I originally started this for the new dbxtalk site which is written basically in pillar.
http://dbxtalk.smallworks.eu/ <http://dbxtalk.smallworks.eu/>
You can see the source code of this site in here:
https://github.com/guillep/DBXTalk/tree/gh-pages <https://github.com/guillep/DBXTalk/tree/gh-pages>
Nice!
Of course, there you will notice a lot of *workarounds* to make it work. I've made a list of those workarounds and sent them to Cyril to see if we can have better support for them in pillar.
I'd be pleased if you contribute and push it :). We have this trello board to add ideas and manage our backlog
https://trello.com/b/2t7qTWpp/ecstatic <https://trello.com/b/2t7qTWpp/ecstatic>
Thanks. I think I'll find some time this weekend to see how your project fits into my needs. I'll be happy nagging you about some things ;) Norbert
Guille
El jue., 21 de may. de 2015 a la(s) 1:10 a. m., Cyril Ferlicot <cyril.ferlicot@gmail.com <mailto:cyril.ferlicot@gmail.com>> escribió: Guille asked me to add some feature for that, I added it to the TODO list of Pillar but I don't have the time to do it now.
On 21 May 2015 at 00:40, Norbert Hartl <norbert@hartl.name <mailto:norbert@hartl.name>> wrote:
Good. I would be pleased if you could show me what you've done so far so I don't waste time on things already solved.
Norbert
Am 21.05.2015 um 00:03 schrieb stepharo <stepharo@free.fr <mailto:stepharo@free.fr>>:
We did the same with guillermo but we are bullet profing the code before announcing it.
Stef
Le 20/5/15 21:45, Norbert Hartl a écrit :
I've found some minutes today to play with pillar and mustache. I wanted to know how far I can go when doing some static site generation. The exercise was to simulate a page that has multiple components either in mustache or pillar format. I could do this
| masterTemplate masterPillar masterDocument partialPillar partialTemplate finalPillar |
masterTemplate := '<master> <head>{{{title}}}</head> <masterContent> {{{content}}} </masterContent> </master>'.
masterPillar := '{{title: This is the title of the master!}} !masterheading
This text is contained in the master pillar template
{{{{{>phase2Template}}}}}'.
partialPillar := '!{{{{{{title}}}}}}
Some text in the partial template before the content...
{{{{{{content}}}}}}}
... and after'.
finalPillar := 'I''m a text in pillar format that was inserted in a partial mustache template generated from pillar that was inserted in a mustache master template in pillar format that was inserted in a master mustache template'.
masterDocument := PRDocumentParser parse: masterPillar readStream.
partialTemplate := PRHTMLWriter write: (PRDocumentParser parse: partialPillar readStream).
phase1Result := masterTemplate asMustacheTemplate value: masterDocument properties, { 'content' -> (PRHTMLWriter write: masterDocument) } asDictionary.
phase2Result := phase1Result asMustacheTemplate value: { 'title' -> 'A partial title'. 'content' -> (PRHTMLWriter write: (PRDocumentParser parse: finalPillar readStream)) } asDictionary partials: { 'phase2Template' -> partialTemplate } asDictionary.
and got
<master> <head>This is the title of the master!</head> <masterContent> <h1>masterheading</h1> <p>This text is contained in the master pillar template</p> <p><h1>A partial title</h1> <p>Some text in the partial template before the content...</p> <p><p>I'm a text in pillar format that was inserted in a partial mustache template generated from pillar that was inserted in a mustache master template in pillar format that was inserted in a master mustache template</p>}</p> <p>... and after</p></p> </masterContent> </master>
That is really cool. Actually pillar and mustache are a good match.
FYI,
Norbert
-- Cheers Cyril Ferlicot