GSoC 2018 Ideas: "Big Green Button" with plone.restapi and GatsbyJS

Following the items attribute leads to only a couple of paths and thats only a part of it. How do i explore the content tree more? I read the plone.restapi docs and i could'nt find anything...

Also for features like navigation on each page, is using '?expand=naviagtion i.e. expanding navigation endpoint enough?

There are basically two options:

  1. You traverse the tree from the root and recursively go through the "items" attributes
  2. Use the search endpoint to retrieve all the content objects and build the tree hierarchy from the path attributes of the results

@nileshgulia1 let's keep the technical discussions on the github issues please.

2 Likes

Hi all,
I'm Aditya Todkar from India. I am interested in working on this project idea: GatsbyJS Integration as part of GSOC2018. I am proficient in Javascript, Python, ReactJS. How can I proceed further ? Should I fork this repo -> https://github.com/plone/plone-react/issues and start contributing. As the project also needs GraphQL knowledge can you please suggest some core concepts which I should look in GraphQL as I am not familiar with GraphQL.

Regards,
Aditya

Please bear with us for a few more days. We are currently working hard on contributing back our work to plone-react to bring it into a stable state.

@tisto Ok no problem till then I will go through the plone-react code repo https://github.com/plone/plone-react/issues to get familiar with the code base and I will also got through GraphQL docs. Anything else I should be familiar with before contributing ? For GatsbyJS Integration project do I need to download and setup plone as mentioned in this thread Information for Interested GSoC Students

If you are interested in Gatsby and Plone please use https://github.com/collective/gatsby-source-plone/. You can ignore plone-react then.

@tisto I see that we're using Plone at localhost:8080 to get the data. Then is it required that I should use the Plone installation created using buildout in the repo? Or can I use an existing Plone installation? Any specific buildout configs changed here?

It works for me with the existing Plone installation.
As you can see in the code, the data is being fetched from localhost:8080.

1 Like

7 posts were split to a new topic: What does "ZEO" stand for?

One more thing I noticed was that, throughout the gatsby-node.js there is no specification stating retrieve all objects from Plone/@search as allNewsItem. But when using GraphQL to query from these nodes, we seem to be specifying allNewsItem as the array of objects. How does this happen?

Sounds like an error to me. Though, in den end we want to be able to retrieve all content objects anyways. Querying just the news items was just a PoC.

1 Like

@tisto (/cc @ajayns) Why does Pastanaga UI have so big role in this idea? AFAIK Pastanaga is mainly CMS authoring UI / UX for logged-in users while GatsbyJS is for building static web sites from CMS (which could have Pastanaga UI for its editor). Even if GatsbyJS built site had interactive elements, those would more probably be themed after customer design than reusing things from Pastanaga?

IMO, having a 1st class and well documented GatsbyJS plugin would be more than enough deliverable from GSOC already without any Pastanaga related work?

@ajayns Something to consider as a very concrete user scenario for GatsbyJS with Plone:

Plone CMS has awesome support for managing multiple small "subsites" in a single Plone site with zero extra effort. Unfortunately, theming and hosting those subsites separately from the main site is no longer trivial, easy or cheap. It's possible, but there is no single obvious solution. GatsbyJS-integration could be that solution.

I have no clue why we mix Gatsby and Pastanaga UI here to be honest. The two projects are separated. I fully agree that a working GatsbyJS plugin would be more than enough for a single GSoC project.

2 Likes

Thanks for confirming that :slight_smile:

I'd like to note here that a week ago our great @ericof published a pip based Plone docker image, which can be extended in a standardized trivial way (=pip) with plone.restapi for this GSOC project.

https://hub.docker.com/r/ericof/plone/

So, only GatsbyJS related technical experience is required here. Understanding / learning the basic concepts of managing content with Plone would help.

That makes a lot of sense, so better focus on the plugin.

I agree Gatsby would be an efficient and simple solution here. But I didn't quite understand what's meant by Plone sites with multiple subsites, can you give me any example so that I can better understand?
@datakurre Thank you

This seems be a misunderstanding. The information provided in the GSoC ideas page for Plone for GatsbyJS integration is misleading as it mentions such goals. @tisto

Plone maps content into folder and pages and manages permissions similarly to hierarchical filesystem (objects inherit permissions from their parents). This makes Plone good CMS for large hierarchical organizations like universities. Think about having:

  • A single big Plone CMS for an university faculty.
  • It could have subfolders for departments.
  • Departments can have subfolders for subjects.
  • Some subject decides to organize on event, which requires a branded promotion site.

With good GatsbyJS plugin we could let event organizers to manage the event details with their familiar CMS environment, in their own section with proper permissions, but still easily publish branded static promotion site with its own domain etc. (So, with good GatsbyJS plugin we could spin-off many small branded static sites from one big CMS whenever we like to.)

(To better support this use case, Plone has feature called "navigation root". Once some subfolder is marked to be a "navigation root". It will affect sidebar navigation, breadcrumbs, etc. to behave like that "navigation root marker subfolder" was the actual site root.)

@ajayns have a look at collective.lineage, which packages this sort of behaviour

Plone Foundation Code of Conduct