TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Static blog generator in about 1 KLOC

44 pointsby jjjbokmaover 4 years ago

9 comments

jstanleyover 4 years ago
1000 lines! What decadence!<p>This is what I use for my blog, it is 250 lines: <a href="https:&#x2F;&#x2F;gist.github.com&#x2F;jes&#x2F;88e3e587413d5794f69c281bdd14a27f" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;jes&#x2F;88e3e587413d5794f69c281bdd14a27f</a><p>(Joking aside: cool project, and I expect it is substantially more capable than my ridiculously-hacky version).
评论 #24813562 未加载
评论 #24812159 未加载
评论 #24813816 未加载
评论 #24811939 未加载
评论 #24812452 未加载
评论 #24812667 未加载
thomasfromcdnjsover 4 years ago
I&#x27;ve been toying with a project where you define your entire blog in one file (blog.json) and then you can pass that file to a generator (community built) and it will output html for you to deploy.<p>I wrote about it here -&gt; <a href="https:&#x2F;&#x2F;ajaxdavis.com&#x2F;post&#x2F;Introducing-JSON-Blog&#x2F;" rel="nofollow">https:&#x2F;&#x2F;ajaxdavis.com&#x2F;post&#x2F;Introducing-JSON-Blog&#x2F;</a><p>I&#x27;m using the project to run my blog above.
dvfjsdhgfvover 4 years ago
I remember playing with these things in late nineties and making jokes at my friends creating bleeding edge CMSes with PHP and mSQL&#x2F;MySQL I can get much faster than them. I wouldn&#x27;t have believed things would come full circle over 20 years later.
评论 #24811942 未加载
评论 #24813584 未加载
mihaifmover 4 years ago
Adding my own in here, 668 lines: <a href="https:&#x2F;&#x2F;github.com&#x2F;mihaifm&#x2F;smolpress" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mihaifm&#x2F;smolpress</a><p>Static generator + CMS (extremely lightweight), management interface and markdown editing.
评论 #24815511 未加载
winridover 4 years ago
The one I wrote for the FastComments Blog is 140 lines. Each post is a separate markdown file, and it has RSS support. I love using NodeJS for little scripts like this. Generates in about 200ms for the content we have today.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;FastComments&#x2F;fastcomments-blog&#x2F;blob&#x2F;master&#x2F;src&#x2F;app.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;FastComments&#x2F;fastcomments-blog&#x2F;blob&#x2F;maste...</a><p>There are hacks in that file. Beware the dragons.<p>Commenting support is or course done with FastComments...
mobilioover 4 years ago
I&#x27;m testing for same job bashblog -&gt; <a href="https:&#x2F;&#x2F;github.com&#x2F;cfenollosa&#x2F;bashblog" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;cfenollosa&#x2F;bashblog</a>
jjjbokmaover 4 years ago
Example of the output can be viewed at <a href="https:&#x2F;&#x2F;plurrrr.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;plurrrr.com&#x2F;</a>
egberts1over 4 years ago
And here we begin the “I did it in X lines” where X is less than the previous commentator’s boast.
Animatsover 4 years ago
Oh, it&#x27;s just a Markdown to HTML translator.<p>I expected it to <i>write</i> the blog, with GPT-3.
评论 #24813908 未加载