Using grav as back-end, need parser in custom front-end

Hello community! …

I’m building a website, which i use GRAV for as a back-end supplier which works great.
I’ve made my own .md parser but seeing as more and more features are added as for example the YouTube plugin, I’d like to know if it is possible to use the GRAV parser in my custom made front-end.

I’ve been unable to find any information about this so far, so I’m hoping you guys can help me out on this.

Thanks in advance!

Grav is more than just a parser, though. Grav uses Parsedown as it’s Markdown parser. It’s Grav’s plugin architecture that makes things like the YouTube plugin possible. Why can’t you use Grav as the main provider? Why do you have front and back ends? Is there some functionality that you can instead roll into a Grav plugin?

Without more information on what your configuration is and why, it’s hard to offer meaningful help.

Thanks for your reply Perlkönig, I use templates for the different version of the same website, at the time I was only looking for a standalone CMS, which in GRAV took place as.

Now that I’ve programmed the front-end of the website myself, and I’m not familiar enough with GRAV’s front-end part I was looking for a way to use the .md file reading part of GRAV for my own custom website, to process for example the youtube plugin and the settings that are defined.

In regards to Parsedown, I already use http://parsedown.org but that unfortunately doesn’t support YouTube so far.

I’m hoping what I’m looking for actually possible, as that might save a lot of hassle extending my own parser / parsedown functionality.

I guess I’m still not understanding what you mean by “front end” vs “back end”. Grav is flat file. By front end do you mean the look and feel? The theme? You can easily incorporate your custom theme into Grav and then use all Grav’s features. The YouTube support is via plugin, which is an integral part of Grav. There’s no way to simply extract them.

Hello Perlkönig, the ‘front-end’ part is located on https://glasvezeldewolden.nl and on https://demo.glasvezeldewolden.nl and GRAV is placed on http://beheer.glasvezeldewolden.nl

Currently I have my own PHP function the reads the ‘.md’ file with file_get_contents() and from there i start to split the specific parts into variable’s which i return trough a function.

I’d like to replace this bit of code with the official GRAV code to read out the .md file.

I come back to my initial question: why are you doing this in the first place? Why not just expose the Grav server to the public internet and let it do its job and serve the content? Why are you creating a separate front and back end? Grav may just not be the right tool to accomplish what you’re trying to accomplish.

There’s no trivial way to extract only part of the Grav system.

Hello Perlkönig, I’ve made it seperate as we’ve chosen to use GRAV later on to manage the content. Thanks for letting me know, I’ll expand my own parser to process the things i need.
Thanks for helping me so far.