<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>静态预渲染 | 锤子前端</title><description>Now vibe coding, so learning hammer FE ?</description><link>https://channel.meo-ai.com</link><item><title>《用TanStack_Start构建博客（上篇）》</title><link>https://channel.meo-ai.com/posts/601</link><guid isPermaLink="true">https://channel.meo-ai.com/posts/601</guid><pubDate>Sat, 18 Apr 2026 08:38:00 GMT</pubDate><content:encoded>&lt;span class=&quot;post-title-source&quot;&gt;《用TanStack_Start构建博客（上篇）》&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;标签：&lt;a href=&quot;/search/result?q=%23%E5%89%8D%E7%AB%AF&quot; title=&quot;#前端&quot;&gt;#前端&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23TanStack_Start&quot; title=&quot;#TanStack_Start&quot;&gt;#TanStack_Start&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23TanStack_Router&quot; title=&quot;#TanStack_Router&quot;&gt;#TanStack_Router&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23Server_Functions&quot; title=&quot;#Server_Functions&quot;&gt;#Server_Functions&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23%E9%9D%99%E6%80%81%E9%A2%84%E6%B8%B2%E6%9F%93&quot; title=&quot;#静态预渲染&quot;&gt;#静态预渲染&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23Markdown%E5%8D%9A%E5%AE%A2&quot; title=&quot;#Markdown博客&quot;&gt;#Markdown博客&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23%E4%BB%A3%E7%A0%81%E9%AB%98%E4%BA%AE&quot; title=&quot;#代码高亮&quot;&gt;#代码高亮&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;总结：&lt;br /&gt;本文通过实战案例演示如何使用 TanStack Start 框架构建一个 Markdown 博客系统。文章重点介绍了 Server Functions 解决同构加载器无法访问文件系统的问题、动态路由参数处理、以及使用 markdown-it 和 Shiki 实现带行号的高亮代码块，为开发者提供了完整的技术实现路径。&lt;br /&gt;&lt;br /&gt;文章要点：&lt;br /&gt;- TanStack Start 是基于 TanStack Router 的轻量级服务端框架，支持 SSR、API 端点和 Server Functions&lt;br /&gt;- 使用 &lt;code&gt;import.meta.glob&lt;/code&gt; 动态扫描 Markdown 文件，配合 &lt;code&gt;gray-matter&lt;/code&gt; 解析文章元数据&lt;br /&gt;- Server Functions 是同构应用的关键——无论 loader 在服务端还是客户端运行，都能保证文件读取逻辑始终在服务端执行&lt;br /&gt;- 动态路由通过 &lt;code&gt;$slug.tsx&lt;/code&gt; 文件命名实现，配合 &lt;code&gt;createFileRoute&lt;/code&gt; 和 &lt;code&gt;head&lt;/code&gt; 函数设置页面标题&lt;br /&gt;- 使用 markdown-it + Shiki 实现代码高亮，通过自定义 transformer 支持 &lt;code&gt;line-numbers&lt;/code&gt; 语法标记，结合 CSS counter 渲染行号&lt;br /&gt;- 文章预告下篇将介绍静态生成和部署策略&lt;br /&gt;&lt;br /&gt;文章URL：&lt;a href=&quot;https://frontendmasters.com/blog/building-a-blog-in-tanstack-part-1-of-2/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; title=&quot;https://frontendmasters.com/blog/building-a-blog-in-tanstack-part-1-of-2/&quot;&gt;https://frontendmasters.com/blog/building-a-blog-in-tanstack-part-1-of-2/&lt;/a&gt;&lt;a class=&quot;tgme_widget_message_link_preview&quot; href=&quot;https://frontendmasters.com/blog/building-a-blog-in-tanstack-part-1-of-2&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; title=&quot;TanStack Start is one of the newest web frameworks, and its popularity is rising quickly. Start is a thin server-side layer that sits atop TanStack Router and provides features like server functions, API endpoints, and server-side rendering. I wrote a three…&quot;&gt;
  
  &lt;div class=&quot;link_preview_site_name accent_color&quot;&gt;Frontend Masters&lt;/div&gt;
  &lt;img class=&quot;link_preview_image&quot; alt=&quot;Building a Blog in TanStack (Part 1 of 2)&quot; src=&quot;/static/https://cdn4.telesco.pe/file/SdcbHy_4OJWiubsSxzCgJ8NcIYv3G7kH2N2jNrB8t3TbMqiok_ID_AkaDmpPliaU4mXl1YiJIt3X3zT5g_gp8XQIkHth8B2EEC2I6G6apJbHqmdP2u2Iq-PnmtOwfh1fZkB1rppS9zlgzO9GOVVvwO0zRR2yAlmLqAU9C7EOxHZhSNDPt17w8I2KFUxv3OSj56leWB3dwsNJFepmI9N7zNXorIyCzBwmT7GCZHtrwEnltgmCDIt4nT8mhUDinBDAZx9s5sWD59uA5puezmNjeqKksJ_7mhc2d6iqHJLkaLTwRw1kfBYYT_nZECaijRBLRkP0cOM2iq8MiPqUgxhZeg.jpg&quot; width=&quot;1200&quot; height=&quot;630&quot; loading=&quot;eager&quot; /&gt;
  &lt;div class=&quot;link_preview_title&quot;&gt;Building a Blog in TanStack (Part 1 of 2)&lt;/div&gt;
  &lt;div class=&quot;link_preview_description&quot;&gt;TanStack Start is one of the newest web frameworks, and its popularity is rising quickly. Start is a thin server-side layer that sits atop TanStack Router and provides features like server functions, API endpoints, and server-side rendering. I wrote a three…&lt;/div&gt;
&lt;/a&gt;</content:encoded></item></channel></rss>