Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Grav page data text format after json fetch

Started by Muut Archive 10 years ago · 3 replies · 813 views
10 years ago

Hey, I'm new to Grav.

I am using plugin called "Grav pages to data" which allows me to fetch whole page as json string.

To get all "pages" I simply get the names of the folders using php then store them into array.
After I'll use that array. Encode it and turn it into javascript variable. Now I can use that data on Javascript.

Okay,

Then I'll just make $.Ajax calls for every page and fetch header, content and published-date. Everything works amazingly, but there is a problem with Grav text format.

Text: "Grav is so cool. " which makes text look bolded I suppose but only in Grav page.

I would like to use this text with those characters but turn them into "<strong>" tags. Or just use some simple reader to show text the way its created in Grav.

Long story short. I want to use Grav page data in other website and I want Grav text formatting to work because now its just a huge mess.

Thanks guys!

10 years ago

You can simply store your content in HTML in the Grav page rather than using markdown.

10 years ago

I am not the one who is creating the blog post in the future.

10 years ago

How could I use Grav markup in other page than Grav page?

Suggested topics

Topic Participants Replies Views Activity
Archive · by Muut Archive, 10 years ago
1 673 1 week ago
Archive · by Deleted User, 9 years ago
0 3043 9 years ago
Archive · by Muut Archive, 9 years ago
2 1983 9 years ago
Archive · by Muut Archive, 9 years ago
2 5336 9 years ago
Archive · by Muut Archive, 9 years ago
1 4134 9 years ago