[{"data":1,"prerenderedAt":96},["ShallowReactive",2],{"storyblok:blog\u002Ftime-for-storyblok-moving-the-blog:version=published&resolve_relations=blog-entry.categories":3},{"stories":4,"story":5},[5],{"name":6,"created_at":7,"published_at":8,"updated_at":9,"id":10,"uuid":11,"content":12,"slug":86,"full_slug":87,"sort_by_date":54,"position":88,"tag_list":89,"is_startpage":90,"parent_id":91,"meta_data":54,"group_id":92,"first_published_at":93,"release_id":54,"lang":94,"path":54,"alternates":95,"default_full_slug":54,"translated_slugs":54},"Time for Storyblok - Moving the blog","2022-06-20T17:45:18.722Z","2022-07-08T19:38:22.286Z","2022-07-08T19:38:22.304Z",152916343,"53a73d73-8953-4c88-8fad-1dd8ad027f99",{"_uid":13,"date":14,"content":15,"component":83,"categories":84},"bf50a830-eaea-4b8f-9d23-1f99b9b569fd","2022-06-20 19:07:42",[16],{"_uid":17,"text":18,"component":26},"d65e8786-9e78-4ba8-92ef-f9b1837ad4e9",{"type":19,"content":20},"doc",[21,27,31,35,39,43,79],{"type":22,"content":23},"paragraph",[24],{"text":25,"type":26},"The next big mission will be to move the blog. This will be a lot more work than moving the portfolio.","text",{"type":22,"content":28},[29],{"text":30,"type":26},"To make it more simple for now, I will just have all the entries in a long list and I will skip the categories for now. Pulling the blog entries is fairly straightforward. I am using the API similarly to how I did it with the portfolio, but I am limiting it to only blog entries and I am sorting them right away based on the manual date field that I have included.",{"type":22,"content":32},[33],{"text":34,"type":26},"The only thing I had to do to make the blog show up correctly is to replace the v-html that I was using previously with the RichTextRenderer that renders the storyblok specific rich text field.",{"type":22,"content":36},[37],{"text":38,"type":26},"Now comes the tedious part. I am going to write a script to pull all the blog posts from the SQL database and then import it straight into storyblok.",{"type":22,"content":40},[41],{"text":42,"type":26},"Originally I was going to make the migrator in PHP, but realized that I am faster in Javascript so might aswell do it in pure nodejs.",{"type":22,"content":44},[45,47,56,58,64,66,72,74],{"text":46,"type":26},"I made a standalone script that runs nodejs that uses ",{"text":48,"type":26,"marks":49},"storyblok-markdown-richtext",[50],{"type":51,"attrs":52},"link",{"href":53,"uuid":54,"anchor":54,"target":54,"linktype":55},"https:\u002F\u002Fgithub.com\u002Fstoryblok\u002Fstoryblok-markdown-richtext",null,"url",{"text":57,"type":26}," and ",{"text":59,"type":26,"marks":60},"turndown",[61],{"type":51,"attrs":62},{"href":63,"uuid":54,"anchor":54,"target":54,"linktype":55},"https:\u002F\u002Fgithub.com\u002Fmixmark-io\u002Fturndown",{"text":65,"type":26}," to convert my HTML richtext into storyblok richtext and then uses the ",{"text":67,"type":26,"marks":68},"Universal JavaScript SDK for Storyblok's API",[69],{"type":51,"attrs":70},{"href":71,"uuid":54,"anchor":54,"target":54,"linktype":55},"https:\u002F\u002Fgithub.com\u002Fstoryblok\u002Fstoryblok-js-client",{"text":73,"type":26},". You can find the full script here: ",{"text":75,"type":26,"marks":76},"https:\u002F\u002Fgist.github.com\u002FSebbeJohansson\u002F2f64e0a76e3b786e5ea3ed1cdbf8ca29",[77],{"type":51,"attrs":78},{"href":75,"uuid":54,"anchor":54,"target":54,"linktype":55},{"type":22,"content":80},[81],{"text":82,"type":26},"The blog post was originally written in my admin panel, but I am now writing inside of storyblok!","blog-entry",[85],"36c5f0a3-3461-4b49-9758-537bdda01a2c","time-for-storyblok-moving-the-blog","blog\u002Ftime-for-storyblok-moving-the-blog",30,[],false,152811822,"a726b2b4-fc9d-46ed-9755-f45e3ec5bdfa","2022-06-20T19:07:42.000Z","default",[],1787062199752]