Hi everyone,
We are transitioning from WordPress to Grav and are currently exploring plugin development. Coming from WP, we notice that there is significantly less documentation and community content available for Grav, making it harder to find clear examples. Even with AI assistance, it’s still challenging to figure things out.
Our goal is to create a custom content type similar to WordPress “Custom Post Types.” Specifically, we want to store relationships in a table format with fields like name, surname, email, website, and phone number. We need full CRUD functionality: adding, editing, and deleting entries within the Grav Admin interface.
So far, we have:
- Created a basic plugin that adds an admin page.
- Defined a YAML blueprint for a simple form.
- Attempted to store data, but it’s unclear how to properly manage structured entries in a way that works well with Grav’s flat-file system.
Our main struggles:
- How to correctly structure and store this data (should we use YAML, JSON, or something else?).
- How to dynamically add, edit, and delete rows efficiently within the admin panel.
- How to make it behave similarly to a WordPress CPT while staying true to Grav’s philosophy.
Additionally, are there any recommended resources, documentation, or even a boilerplate example for this type of plugin? Something that outlines best practices for creating structured content with full CRUD operations in Grav?
Is there anyone who could guide us in the right direction? Maybe share some examples or best practices? Any help would be greatly appreciated!
Thanks in advance!