What extensions the Pinegrow team is working on

@RobM

Sorry this took so long. With all that has been going on lately it slipped my mind.
But anyway, nog that I’ve picked it up again a few days ago, I have familiarised myself a bit more with static site generators, Jekyll in particular. And I’ve made some (admittedly crude, sorry…) images that I think protray the concept that I have in mind reasonably well.

The first one is mainly inspired by the “content” action of the wordpress plugin and is analagous to it.
The idea is that it basically does the same thing as it defines header and footer files inside the page. Whether this is the best approach for a jekyll site in regards to Pinegrow, I don’t know but I thought that retaining similarity between jekyll and wordpress builders may be a good thing as many pinegrow users will already be familiar with the concepts employed.

The second image is in regards to the blog posts (as jekyll is a “blog aware” SSG).
This particular piece of code was copied from Jekyll’s documentation page.
In this instance it’s a for loop that inserts a bunch of HTML into the page for every data entry in the file that is referenced there.

Doing it like in the picture below is similar to the “show posts” action of the wordpress plugin, and is supposed to work similarly.

Here it shows that the “posts” jekyll action corresponds to the for loop (at least, how I envision it).

And in this image, it shows the elements where the post link and the post title are placed by the jekyll “post-link” and “post-title” action on the element inside the for loop of the previous two two images.

how this will work together, I’m not sure. Seeing as the wordpress plugin from pinegrow exports to PHP, in analogy something similar should happen to the Jekyll html files. The thing is in this case, HTML would export to ….html…. but with the liquid tags inserted into them. Perhaps this approach could work by helping the user “manage” their Jekyll file structure by defining wether the file is a template in something like “jekyll page settings”, similar to the wordpress plugin. When defined as a template, pinegrow could than export the files to the layouts folder wherever the jekyll project has been created, keeping the pingrow original files seperate (even thoug both would have .html extensions). Example in image below.

Alternatively the jekyll html files could perhaps somehow remove the liquid tags when opening the files in pinegrow (perhaps storing the data relating to this in a pinegrow.json file as is the case in the wordpress plugin, I don’t know, just thinking out loud here…) but will actually show the liquid tags when opening it in any other editor. However, this would require a different solution for the header and footer files.

Anyway, the main thing why I would like something like something like this because it would allow the excellent visual editing for a static site generator which otherwise doesn’t suport it.

I hope what I wrote here makes sense and doesn’t come across as too ramble-y.

1 Like