2019-02-10

Changing the blog's engine to GatsbyJS

As a seasoned PHP dev, I made the first instance of this blog in Scuplin. Why not? Php can do. Writing article was easy, just get the subject and let it flow. But there were some technical problems. With deploying (git submodule, what the heck?!). I could do that, I could also build my frontend with some tooling, custom gulp, custom webpack and so on. Looking wistfully towards jekyllrb and it's gems I was almost ready to switch to it, but custom theme development could be too much. And some months later I've looked into the basic React tutorial on codeacademy. There was some hype around GatsbyJS, so I thought, why not?! All that counts in building your own techie blog are some markdown files with content. You could present them any way you like.

And here it is. I daily work with PHP system - Drupal. And I've read that Gatsby could use Drupal as a data source. But I've stopped here. Just to have some separate sandbox and feed my brain with something different than I usually do. The graphQL, how cool is that? Combining restful APIs opposite to graphQL - and only for using a static site generator. There's also a huge ecosystem of plugins to check, offering the newest technologies these days - service workers, SSR, link prefetching among the others - and all things that you could think of.

For now, starting with default starter and putting my old .md files is enough. But switching to a new system brings lots of advantages and ideas to write about. Having a gatsby blog could be the low entry level for trying react because he is already here. Redesign the blog once more - stay creative. Maybe try offline mode and so on. Even start to write English should be a stimulating experience.

And the deploy, ah, now it's sweet npm command npm run deploy and blog gets published to user's repository master branch. Switch branch to source and here you go - the source, without conflict, gets saved.

Happy blogging to myself! :)