22
vane
5y

I rewrote my static website generation from jekyll to custom python code over single night.
Literally all jekyll plugins I use including seo, rss, syntax highlighting inside markdown content, sitemap, social plugins, css sass, all of it.
Now it’s around 400 lines of python code that I understand completely. I didn’t touch any existing templates and after comparing output I got even better results now and it’s working faster.
I skipped drafts as I don’t need them now.

Why ? Cause now I can make better generator for my side projects that can include some partial website generation, better modification and date handling, tree structure, etc.

What I will do now is that I will parse bunch of content to create markdown files that will be sucked by this generator to create static web pages that will flood internet lol.

Still I didn’t believe it was possible to rewrite all of it so quickly. I sit yesterday around 4pm and finished around 6am.
I started thinking that maybe I am crazy and no one can help me.

Comments
  • 4
    400. Impressive
  • 1
    @stop @irene thanks !
    It can generate one type website so it’s not a much deal as original jekyll has wider range of plugins ( I think ).
  • 2
    Jinja2 for the win?
  • 3
    @EngineerCoding jekyll is using liquid template engine so I used liquidpy and also wrote bunch of missing helpers to not change content I wrote.

    pygments - for syntax hightlighting
    libsass - for sass style compile
    csscompressor - for css compression
    markdown - for makrdown parsing generation with added plugin
    liquidpy - for liquid template parsing

    I made source public.
  • 1
    The problem with Jekyll and tools like it is that they aren't frameworks so it takes ages to figure out how to do anything which you could easily do with a few lines of code... Metalsmith is a better approach but it's API is not very good and it has generally a stupid architecture
  • 1
    @12bitfloat yeah I saw the limitations it have without introducing database or intermediate format and how it works, basically it won’t scale to thousands of documents and I want this feature.

    This was only first step.
  • 0
    I am gonna use jigsaw and tailwindcss for my personal site.
  • 0
  • 0
    @EngineerCoding If you’re interested I got same nick on github - easy to find. Won’t provide direct link for privacy reasons on public forum where I write shit lol.
Add Comment