DEV Community


Developing SSG using Node

Kiran Chauhan
I design software with and for people.
Updated on ・2 min read

The complete title should Developing Static Site Generator using NodeJS.

A few weeks ago, I created a simple ( and personal-use ) static site generator called bajana ( Initially, I gave a name as staticman, but it was already taken! ). While developing this bajana, I try to document the process, in hope of doing some hack/change in future because I don't want to face a situation like,

When I wrote this, only God and I understood what I was doing. Now, only God knows.

But due to priority, I was moved over to other projects after the initial completion of bajana. Now, I have some good free times. So, I thought why not complete the documentation with some minor changes that I want with bajana.

But, the plan with this documentation is different now. I don't want to write the possible methods usage, parameters and about the return values. I don't want to write the options you can pass to bajana to generate, build, debug the blog. Instead, I want to document the process of creating your own SSG.

Please note, that I am not talking about fully featured SSGs such as, Jekyll, Hexo, Hugo and so on. I am not that capable to develop one of these SSGs. Instead, I am talking about the SSG which satisfies my need with blogging and can be written within roughly 150 lines of code including blanklines and lots of comments.

Following is the possible index aka a list of posts, I am going to write a series of articles ( within finite duration of time period ). I will start with nothing, install all the software to complete the bajana. Also, I am not good at writing but speaking. So, read the articles, like I am speaking, ignore the grammar in sentences ( or you can suggest the correct one! ), ignore the word arrangement in sentences and so on.

Anyway, that being said, following is the title of posts, I am going to write ( and also update the link as I publish new article ).

  1. Introduction
  2. Prerequisite
  3. Hello, World program
  4. Standard Library or Modules
  5. ES6
  6. Steps of SSG
  7. Step 01 - Reading Input Files
  8. Step 03 - Generating Output Files
  9. Step 02 - The Process
  10. Front-Matter
  11. Layouts
  12. Support for Assets
  13. Config
  14. Wrap-up

This is not the final index. It may change over time based on content that is included. Also, this is purely experimental and things might go wrong in terms of writing. But hey, you can always send me the feedback, suggestion, advice(!) and what you are thinking. Shy to comment, shoot me an email!

Discussion (1)

guiw5 profile image

I'm waiting the 6th! Could you share it in realtime? Hahaha