Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ghost Exporter - Image Uploading + Code Block #291

Open
Varun-Sethu opened this issue Oct 14, 2022 · 1 comment
Open

Ghost Exporter - Image Uploading + Code Block #291

Varun-Sethu opened this issue Oct 14, 2022 · 1 comment
Assignees

Comments

@Varun-Sethu
Copy link
Member

Varun-Sethu commented Oct 14, 2022

Update the ghost exporter to support image uploading + code blocks, would also be nice if we had an option of specifying if we want to upload images to our local cms or staging

@Varun-Sethu
Copy link
Member Author

also fix this too pls 🥺

// this is so hacky im sorry :(, please fix this later
(it was a temp hack i added so we could get the exporter script running before the MVP)

let rec sequenceSubsections = function
    | [] -> Ok []
    | x :: xs -> match x with
                             | JArray inner -> match parseSectionBlockList inner with
                             | Ok arr -> (fun parsedValue -> List.append arr parsedValue) <!> (sequenceSubsections xs)
                            | Error x -> Error x
    | o -> Decode.Fail.arrExpected o

section.createSection <!> (sequenceSubsections <| List.ofSeq subsectionArray) <*> (Ok Paragraph)

the purpose of the snippet is to compress lists into a big paragraph (coz FE doesnt support rendering lists), would be nice if we split this into its own function instead so we an update it nicely when the frontend does support lists

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants