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

Mass creation of pages from a csv file

Started by Muut Archive 10 years ago · 4 replies · 451 views
10 years ago

Hi I need to create a lot of markdown pages for a website of quotes.
I created a php file which successfully create a lot of markdown files, but the header section of them is not recognized by grav.
Does anyone have an idea why grav don't recognise the header?

The code with some examples is uploaded on github. You can find the examples inside the example folder.

https://github.com/danielpetrica/Grav-mass-creation

10 years ago

Can you provide a link to a GIST or something with an example page that you are having trouble with???

BTW no examples folder in that repo.

10 years ago

it's definitely related to the weird quoting you have in the frontmatter of each page.

You have some quotes escaped \ like in \'@taxonomy\': or \'twitter:card\'.

I also saw some occasional trailing \s strings at the end of a line.

i think in general you need to sort out your quote escape, and cleanup the whitespace characters.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1361 9 years ago
Archive · by Muut Archive, 9 years ago
2 939 9 years ago
Archive · by Muut Archive, 9 years ago
2 4069 9 years ago
Archive · by Muut Archive, 9 years ago
1 2958 9 years ago
Archive · by Muut Archive, 9 years ago
3 1123 9 years ago