A good code thief
Tags: opensource, cpp, programming, showdev
Published: 2022-10-27 04:17:33

While developing [palpatine](https://github.com/batunpc/palpatine), I found myself browsing through the internet and getting inspired by how other static site generators (SSG) tackled my problems (i.e. supporting md files, stylesheets, exception handling). During this process, it was obvious to me that JavaScript dominated the field of static site generators, as almost all the options I looked at, were Javascript-based. Some of the interesting ones I found were: [Docusaurus](https://docusaurus.io/), [Gatsby](https://www.gatsbyjs.com/), [Jekyll](https://jekyllrb.com/) and [Eleventy](https://www.11ty.dev/). They all have their unique features, competing with all other SSGs, and are constantly being maintained by the community in GitHub.
 
Docusaurus has a [showcase page](https://docusaurus.io/showcase) where you can see how other serious projects are using their tool, such as [Jest website](https://jestjs.io/) built with Docusaurus, it is inspiring when you see their pages professionally done. So I initially read their documentation on `how to get started`, very straightforward, and within minutes I was able to set up my [docusaurus site](https://batunpc.github.io/dokku/)!  Key features to note are: easy to use, beautiful themes, precise documentation and customizable.
 
## Follow up on palpatine
Across all the JavaScript-based SSGs, palpatine is developed from the ground up using C++ and CMake as the build system. As the developer and maintainer of palpatine my main concern is to make it `lightning fast` compared to others. Currently, palpatine1.5 can generate a static site in less than 1 second. I've also made sure that it is easy to use, with a simple command line interface. The [documentation](https://github.com/batunpc/palpatine#------palpatine) is also precise and easy to follow. However, it is lacking one of the core features, supporting `markdown files fully`. I've been [working](https://github.com/batunpc/palpatine/issues/14) on this feature for the past few days and I found a header-only Markdown parser library [maddy](https://github.com/progsource/maddy). But it seems that it has been more than a year since the last commit was made to the library. I'm not sure if it is still being maintained. CMake was quite upset about how outdated it was.
 
![cmake-warning](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pdbq7dmy5sz09dwpgcml.png)

Thus, I was not able to use as a [git submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules) with CMake like I have used for other libraries. I instead cloned maddy and used only the particular `include` directory within the palpatine. This was successful supporting `some markdown features` but failed in several aspects (i.e. supporting tables, crossed texts like ~~text~~, specifying language for code-blocks ). I have created [issues](https://github.com/batunpc/palpatine/issues) on palpatine to resolve these problems, but I believe most of them are library related. Currently, you can see the latest progress on the [sample deployment](https://emperor-palpatine.netlify.app/markdown-sample/palpatine.html) of palpatine.