Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Grav page data text format after json fetch

Started by Muut Archive 9 years ago · 3 replies · 626 views
9 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!

9 years ago

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

9 years ago

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

9 years ago

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

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1336 9 years ago
Archive · by Muut Archive, 9 years ago
2 925 9 years ago
Archive · by Muut Archive, 9 years ago
2 4056 9 years ago
Archive · by Muut Archive, 9 years ago
1 2941 9 years ago
Archive · by Muut Archive, 9 years ago
3 1112 9 years ago