aadtyaraj01
(aadtyaraj01 Raj)
April 21, 2024, 10:10am
1
I've content in markdown format that I want to upload to Prismic using the Migration API.
I've almost 200 pieces of content.
I can use Marked to convert Markdown into HTML, but how do I get it to format that Prismic wants?
This is like really essential to do, so please reply asap.
Phil
(Phil Snow)
April 22, 2024, 10:30am
2
Hi @aadtyaraj01 ,
Welcome to the Prismic community
Maybe some of these tools will help:
When you import content to your Prismic repository using the Import/Export feature, your content needs to be in a compatible JSON format.
There are a couple of community-made tools that can help convert either Markdown or raw HTML into the proper JSON format to add the content to a Rich Text field. These are:
kramdown-prismic : A Ruby tool to convert Markdown or HTML documents to Prismic's Rich Text JSON format
prismic-importer : A PHP tool to convert Markdown into Prismic-compatible JSON.
w…
1 Like
be1
(Be.Green Plants)
May 19, 2024, 7:18pm
3
Hi, I need a solution that are through native PHP, or even markdown would be enough.
Phil
(Phil Snow)
May 28, 2024, 12:57pm
5
Hi @be1 ,
This tool is listed in the linked thread:
be1
(Be.Green Plants)
June 18, 2024, 1:57pm
7
The idea is to have something more native, without going through ruby. Also, you could do it on the side of your api, accept html directly...
Hey @be1 ,
Since the Migration API is relatively new, the ecosystem is still growing. You can see some example scripts here:
But I don't think that includes a Markdown converter. I know that this is something the team is actively considering and it will probably come in the future.
Sam