This Site

đź“… November 11, 2019

•

⏱️3 min read

Continued education and learning is valuable to any profession. The quickly changing field of Data Science, which encompasses many different fields (Machine Learning, Statistics, Software Engineering, etc.) is no exception. As a Data Scientist, I think that it is important to have a record of my continued learning and progression through topics in the field, thus the need for this site.

This site is primarily a resource for myself to be able to house all my independent classwork and reflections on trying out new technology. I’d like to be able to play with new libraries, algorithms, and systems and then post about them here to showcase work and serve as a complement to a resume/CV background of myself. Links to code in my Github, also accessible here, will serve to give an adequate picture of my skills and appetite for continued learning in this field.

My needs when creating this site were to have the ability to easily create new pages/posts, tag/organize topics, and display content in a modern, responsive layout optimized for desktop and mobile. I don’t require complex server side logic or processing of backend code as this is mainly a type of journal and showcase of technology I’m trying out. I ruled out WordPress very quickly, although very mature and feature rich I wanted something more lightweight. This left me considering a number of different JAMStack alternatives which all would have worked (Jekyll, Github Pages, Next.js, etc.). I chose Gatsby.js as it allows the use of many different CMS systems, many different data types (Markdown, txt files, etc.), GraphQL queries for data, and doesn’t rely on managing a server. The ability to send generated HTML directly to a CDN and have your site served with little administration seemed like a huge win for this simple site.

With Gatsby, you can easily choose a starter template or roll your own directly from their API’s. After choosing a static site generator like Gatsby, you are also faced with the choice of how to access your data. I wanted a CMS backend to be able to easily create content, rather than leveraging its Markdown rendering capability or putting content directly into HTML. I looked at NetlifyCMS and liked that there’s some tight coupling with your codebase and the content is stored in Github, but ultimately chose a starter which already leveraged Contentful as the CMS. The Gatsby GCN starter that I used provided for quick setup with minor changes being easily implemented to have a semi-customized site up and running quickly. Contentful provides an easy to use UI, has lots of free storage, and allowed me to experiment with GraphQL queries two third party API’s from Gatsby. The starter I chose also leveraged Netlify as a CDN, and this option met my needs as well. Both Contentful and Netlify can use Github logins, so management of the website and code can all be done with the same credentials. This makes for easy context switching when you are modifying code, content, or deploying the site. Because these three play well together you can also create web hooks within Netlify and Contentful which automatically trigger a build and deploy in Netlify when you push code to Github, or you add new content in Contentful (Blog Posts, Tags, Pages). This makes everything very simple when managing a little site like this.

Setup is super easy for the three of these. Clear and concise instructions are provided with the starter and you can easily start managing content in Contentful. I’m a React novice, but I found the components and templates within this starter easy to modify to fit my particular needs. All I really did was switch the blog to a secondary location within the site, add a new homepage, change configuration settings, icons, and finally configure my DNS and I was up and running.

Matt