{"componentChunkName":"component---src-templates-post-jsx","path":"/blog/016-migrating-to-gatsby/","result":{"data":{"markdownRemark":{"html":"<p>Last weekend, I took some time to fully rebuild my personal blog from “scratch”.</p>\n<p>I tossed my <a href=\"https://www.getlektor.com/\">Lektor</a> site and rebuilt it with\n<a href=\"https://www.gatsbyjs.org\">GatsbyJS</a>, <a href=\"https://graphql.org/\">GraphQL</a> and\n<a href=\"https://rebassjs.org/\">Rebass</a>. It took less than 10 hours to implement and deploy! That time was\nbroken into:</p>\n<ul>\n<li>6 hours to get the baseline of the site where I wanted it to be</li>\n<li>2 hours to tweak styles and layouts</li>\n<li>5 minutes to deploy</li>\n<li>55 minutes to debug my SSL config (😂)</li>\n</ul>\n<h2 id=\"planning\"><a href=\"#planning\" aria-label=\"planning permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Planning</h2>\n<p>My original site (and the many incarnations of it before that) was a static site built around blog\nposts written in Markdown or reStructuredText. I would use different themes from <a href=\"http://html5up.net\">HTML5\nUP</a> and manually split out the files into templates, work with verbose\nstylesheets that someone else wrote, and would generally sink more time into maintaining my site\nthan actually writing blog posts. <a href=\"https://www.getlektor.com/\">Lektor</a> was great but I needed\nsomething more streamlined, and wanted something that was going to give me a more modern web\nexperience out of the box.</p>\n<h3 id=\"pain-points-to-alleviate\"><a href=\"#pain-points-to-alleviate\" aria-label=\"pain points to alleviate permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Pain-Points To Alleviate:</h3>\n<ul>\n<li>No more difficult asset-wrangling (<a href=\"https://www.getlektor.com/\">Lektor</a> has\n<a href=\"https://webpack.js.org/\">webpack</a> support, but I was tired of trying to fix/change my config all\nthe time)</li>\n<li>Toss out any \"design\". I've previously used fancy templates that took hours to split into usable\npieces that I never felt great about. I wanted something super simple and minimal</li>\n<li>Keep my previous minimal static site set up! I love the idea of generating static files with\nsuper simple hosting</li>\n</ul>\n<h3 id=\"first-class-support-for\"><a href=\"#first-class-support-for\" aria-label=\"first class support for permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>First-class Support For:</h3>\n<ul>\n<li>Markdown support for blog posts</li>\n<li>Tags/Categories for blog posts</li>\n<li>Google Analytics</li>\n<li>Syntax highlighting</li>\n<li>RSS feed</li>\n<li>Offline support</li>\n<li>Optimized image loading</li>\n</ul>\n<h2 id=\"implementation\"><a href=\"#implementation\" aria-label=\"implementation permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Implementation</h2>\n<p>I found a <a href=\"https://github.com/Vagr9K/gatsby-advanced-starter\">Gatsby starter</a> by <a href=\"https://twitter.com/Vagr9K\">Ruben\nHarutyunyan</a> that gave me an awesome starting place for almost\neverything I was looking for. I was especially happy to find a starter that was so fully featured,\nbut had <em>very</em> minimal pages and <em>no</em> styling or CSS frameworks included. It also uses\n<a href=\"https://graphql.org/\">GraphQL</a> under the hood to retrieve blog post data, which is makes\ninteracting with post data really clean.</p>\n<p>I had to handle a couple of formatting differences from my previous Markdown files for my blog\nposts, but those were basically able to be dropped into the new site. I'm a huge fan of\n<a href=\"https://rebassjs.org/\">Rebass</a> and used all stock components for the UI.</p>\n<p>I was super impressed with the myriad of plugins/libraries available for Gastby. Things like\noffline support, uploading files to AWS, optimized image loading, and RSS feeds all have plugins\nthat sometimes complex tasks essentially plug-and-play.</p>\n<p>The only major issue that I encountered was that I needed to customize the blog post URL in order\nto make sure links from my previous blog were supported. Diving into how the blog slugs were\ndetermined and used took a little more time than I would have liked, but was still fairly\nlow-effort.</p>\n<h2 id=\"my-next-steps\"><a href=\"#my-next-steps\" aria-label=\"my next steps permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>My Next Steps</h2>\n<ul>\n<li>Code clean-up! I sped through my initial build, so there's a lot of refactoring that I want to do\n(add my preferred import style, split out components, clean up styles, etc.)</li>\n<li>Add support for toggling between light and dark themes</li>\n<li>Expose the ability to browse by category/tag</li>\n<li>Write more blog posts!</li>\n</ul>\n<h2 id=\"repositories\"><a href=\"#repositories\" aria-label=\"repositories permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Repositories</h2>\n<p>The repo for my original Lektor site as well as my new site are on GitHub:</p>\n<p><strong>GatsbyJS/GraphQL/Rebass repo:</strong> <a href=\"https://github.com/emilyemorehouse/emilyemorehouse.com\">GitHub - emilyemorehouse/emilyemorehouse.com: Personal website,\nbuilt using Gatsby, Rebass, and GraphQL</a></p>\n<p><strong>Original Lektor repo:</strong> <a href=\"https://github.com/emilyemorehouse/emilyemorehouse.com-archive\">GitHub - emilyemorehouse/emilyemorehouse.com-archive: Personal website,\nbuilt using Lektor</a></p>","timeToRead":3,"excerpt":"Last weekend, I took some time to fully rebuild my personal blog from “scratch”. I tossed my Lektor site and rebuilt it with\nGatsbyJS…","frontmatter":{"title":"Migrating My Blog to GatsbyJS in Less Than 10 Hours","cover":"https://images.unsplash.com/photo-1529220502050-f15e570c634e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2301&q=80","date":"2019-02-20","category":"tech","tags":["javascript","gatsby"]},"fields":{"slug":"/blog/016-migrating-to-gatsby/","date":"2019-02-20T07:00:00.000Z"}}},"pageContext":{"slug":"/blog/016-migrating-to-gatsby/"}}}