TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

How to Build a Composable Blog

20 点作者 sunilsandhu大约 3 年前

7 条评论

fredley大约 3 年前
Is this parody?<p>&gt; Creating a blog from scratch requires quite a lot.<p>Quite a lot of what? If I want to create a blog then there are many existing systems that are essentially plug and play.<p>Perhaps this is an article teaching me about composable whatevers, but I&#x27;m not sure this is a great example, or even if it is perhaps a different tone could have helped set the scene. Nobody in their right mind would want to build a blog this way in the real world, I hope.
评论 #31036174 未加载
评论 #31034196 未加载
malkosta大约 3 年前
Here is my composable blog with cURL and awk<p>#!&#x2F;bin&#x2F;sh<p>process() {<p><pre><code> output=&quot;${1%.*}&quot;.html # Convert markdown to html and save curl \ -sS \ -u &quot;${GITHUB_USERNAME}:${GITHUB_TOKEN}&quot; \ -X POST \ -H &quot;Content-Type: text&#x2F;plain&quot; -H &quot;Accept: application&#x2F;vnd.github.v3+json&quot; \ https:&#x2F;&#x2F;api.github.com&#x2F;markdown&#x2F;raw \ --data &quot;$(cat $1)&quot; &gt; $output # Apply layout and save html=$(awk &#x27;NR==FNR { a[n++]=$0; next } &#x2F;{{ content }}&#x2F; { for (i=0;i&lt;n;++i) print a[i]; next } 1&#x27; $output layout.html) printf &quot;%s&quot; &quot;$html&quot; &gt; &quot;$output&quot; echo &quot;Processed ${output}&quot;</code></pre> }<p>for file in *.md; do process &quot;$file&quot; &amp; done wait
nighthawk454大约 3 年前
This looks like &quot;what if every DOM element was it&#x27;s own library?&quot;. Seems like a total nightmare except in the extremes. For toy projects might be nice to not build widgets yourself, or if you&#x27;re a large organization with many teams each owning reusable components.<p>For the vast majority of not-a-toy and not-Amazon projects this seems un-aligned?<p>It&#x27;s unclear what this even does to facilitate component development. It doesn&#x27;t seem to provide any primitives. Most of the docs appear to focus on how this can be your workspace, env management, dependency graph, build system, CI, package repo, and team management. Super over-zealous for a component ecosystem.<p>What is the ecosystem? A bunch of packages of dubious quality left un-maintained from github? We already have that. Maybe the &#x27;search by feature&#x27; aspect is useful.<p>This feels like an index of NPM packages needlessly masquerading as a framework, but maybe also your whole dev workflow and toolchain, but also an &quot;ecosystem&quot; so there can be a subscription fee tacked on.
bastawhiz大约 3 年前
As someone who has built my own blog (and blog platform) more than a few times, built WordPress themes many times, currently maintains a blog-ish site on Webflow, and used hosted blogging services numerous times...this blog post sounds like the most exhausting possible way to build a blog.
评论 #31033742 未加载
vosper大约 3 年前
To help me think about this, is it like if I built a blog with React, but each major UI component was it&#x27;s own package that I installed with `npm`?<p>Is the expectation that I would mix and match UI components out of different projects? Like I want to use Material UI&#x27;s &lt;Checkbox&gt; component but Chakra&#x27;s &lt;Banner&gt; component? And they&#x27;re all independently versioned?<p>Sounds like a recipe for a lot of complexity to me, but probably I am missing something.<p>Edit: The homepage actually does a really good job of explaining this. And yes, it seems like it&#x27;s what I thought.<p><a href="https:&#x2F;&#x2F;bit.cloud&#x2F;" rel="nofollow">https:&#x2F;&#x2F;bit.cloud&#x2F;</a>
tsujp大约 3 年前
A lot of moving parts? Aren&#x27;t blogs traditionally static sites. Yes you can full MVC your blog and what not but there&#x27;s nothing complex about an `index.html` page created from one of the many, many, many readily available Markdown parses or straight plain-text.<p>This article is a lot of busy work.
riidom大约 3 年前
Parts of the site are jumping and fonts are realigning for more than 10 seconds after loading. Maybe it&#x27;s just me, though.