Live data from Hacker News

Show HN: SQLite Plugin for Jekyll

github.com

61–70 of 70 posts

Re: Show HN: SQLite Plugin for Jekyll

#61
post #41

Earlier quoted context omitted.

Hugo more or less is "Jekyll, replicated in Go". The core problem you will run into is that Go is a very static language, and Ruby is a very dynamic "free for all" language. Obviously up- and downsides to both approaches, but IMHO Ruby is clearly a much better fit for this sort of thing. On my own Jekyll website I do syntax highlighting with Vim's :TOhtml. I like how my Vim looks and I know how to tweak Vim syntax fi…

Hugo got a WASM based plugin system, but real scripting plugins that would be needed for SQLite are still a feature request: https://github.com/gohugoio/hugo/issues/5510

That would be an improvement, but it still wouldn't be equivalent to what you can do with Ruby and Jekyll. For example I do [1] so I don't need to put dates in my post names, which also fixes a bug [2] I encountered but was never fixed.

[1]: https://stackoverflow.com/a/68287682/660921

[2]: https://github.com/jekyll/jekyll/issues/8707

Re: Show HN: SQLite Plugin for Jekyll

#62

Nice! Great to see innovation in the Jekyll space. Quick FYI on Jekyll performance: I noticed slow generation times on one of my sites and traced it to a plugin that was spawning a git process to get the last commit info for every page. I wrote a drop-in replacement called jekyll-last-commit[0] that uses the ruby libgit2 wrapper for improved performance. Details on its origins are in an old HN comment[1] if you are i…

The other last-modified-plugin is now archived, and no longer included in the default Jekyll, but the sitemap and seo plugin still seem to rely on the page.last_modified_at property, albeit undocumented ( https://github.com/jekyll/jekyll/issues/9702 ), so might be worth getting the implementation switched upstream perhaps? We show the last-modified date on endoflife.date products ( https://endoflife.date/jekyll ), bu…

Thanks for endoflife.date!

Re: Show HN: SQLite Plugin for Jekyll

#63
I'm running my website with Jekyll for around a decade. Interestingly I use sqlite for comments submitted to the server (cgi-bin, mind you) and populate the pages during build. Your plugin is a perfect match for my usecase. Will definitely consider it. Nice work!

Re: Show HN: SQLite Plugin for Jekyll

#66

Earlier quoted context omitted.

Say you have a site about pokemons. Then you can have all the pokemons in a sql database (with a schema) instead of a bunch of MD files. Not all static sites are just blogposts.

Right, looking again I understand better. Instead of a bunch of shaky YAML in a md file, you have properly structured data. Isn't this what Gatsby tries to do with GraphQL?

Exactly. Yea, similar to what Gatsby does.

Re: Show HN: SQLite Plugin for Jekyll

#67

In wake of all the WP craziness a few weeks back, I wonder how long before someone builds a "best of both worlds" CMS to rival WordPress. "You get the nice admin UI, but it generates a static site" type of thing.

Decap CMS: https://decapcms.org/

Re: Show HN: SQLite Plugin for Jekyll

#68
post #6

This is so cool, bookmarked it. It sort of get the impression that Jekyll is slowing turning away from being a boring static site generator to something way interesting.

what is wrong with "being a boring static site generator"?

Nothing, I am just pointing out a transition with Jekyll.

Re: Show HN: SQLite Plugin for Jekyll

#69

I have an understanding of static site generators, I've used several of them and even written my own. But I simply don't understand what this is or what it's doing. You're using a sqlite database during site generation time instead of .md files? You're definitely not querying the db at serve time right? I'm so confused...

Maybe I'm just not understanding the novelty of the concept. No one has done this before? That's very hard to believe.

Who is to say it hasn’t been done before? OP did it and thought it was interesting and posted about it, and enough people also thought it was interesting so they upvoted.

Re: Show HN: SQLite Plugin for Jekyll

#70

This is awesome, and would solve an actual problem I've been thinking through... if only I had selected Jekyll for my static site generator. Does anyone know of a similar solution for Hugo? Technically I'm sure I could run a script to generate .md (or a format like .csv that Hugo can work with) from my database, but this seems like it might be easier for a database that updates frequently.

As others have said, the plug-in system for Hugo is weaker than Jekyll. I think preprocessing is a viable alternative. I built something that generates markdown (especially the preambles) from a sqlite database. As a separate step, Hugo generates the web pages.

My code is messy, and probably not suitable for others, but it's here: https://github.com/ralexander-phi/rss-blogroll-network/blob/...

This uses a weekly web crawler run to populate the sqlite database (https://github.com/ralexander-phi/feed2pages-action/tree/mai...) and it generates a couple thousand pages which are then hosted on GitHub Pages (https://alexsci.com/rss-blogroll-network/).

Post reply on HN