关于本站 Under the Hood

开发这个网站的心路历程 The story behind building this website


这个网站几乎完全是通过 Vibe Coding 搭建的,我自己的代码贡献率不足 10%。技术栈选用了 Astro + Tailwind CSS。 我并没有使用 Claude Code 这类的 Agent,而是全程跟强大的 Gemini 3.0 Pro 对话,一点点把结构搭起来的,整个基础框架的搭建大概只花了 20 个小时。 在这个页面里,我会分享一些小组件的设计思路和有趣的小细节,最后再聊聊我为什么要折腾这个网站。
I built this website almost entirely through Vibe Coding, with a tech stack of Astro + Tailwind CSS. My own code contribution is less than 10%. Instead of using a coding agent like Claude Code, I had a step-by-step conversation with Gemini 3.0 Pro to construct the entire structure. The basic infrastructure took roughly 20 hours to complete. On this page, I'll showcase the design ideas behind some of the components and interesting details, and then share my motivation for building this site.

设计细节
Design

在这一部分,我将介绍一些小组件的设计思路以及一些有趣的小细节。
In this section, I will introduce the design ideas behind some of the components and a few interesting details.

统一基准外观
Unified Default Layout

灵感来源于 Siddhartha Mukherjee 的个人网站, 他的博客以统一的黑色边框为特色,给人一种简洁大气、整齐划一的感觉。 我网站的整体外观是在 #2d3748 的深色背景中,抠出一块白色区域作为内容的主体。
Inspired by Siddhartha Mukherjee's personal website, which features a consistent black border around his blog posts, giving it a clean, elegant, and cohesive look. My website's unified layout features a white content background "cut out" from a dark #2d3748 backdrop.

页面标题、描述的设计灵感则来源于 Brandur 的网站。
The design of the page titles and descriptions is inspired by Brandur's website.

导航栏设计
Navigation Bar

我采用了经典的导航栏设计:左侧是网站名称,右侧是主要页面的链接。 导航栏在“初始状态”和“滚动状态”下有不同的样式。初始状态下,它会和白色的主体背景融为一体; 当你向下滚动页面时,导航栏会拓展至页面全宽,并加上背景色来保证文字的可读性。我还给它加了一点“磨砂玻璃”的特效, 让你能隐隐约约看到滑过去的文字内容。
I adopted a classic navigation bar design: website name on the left, main links on the right. It behaves differently depending on the scroll state. Initially, it blends seamlessly with the white main content background. When scrolled, it expands to full width and gains a background color to maintain readability. I also added a "frosted glass" effect, allowing you to faintly see the content sliding behind the navigation bar.

页脚设计
Footer Design

页脚的设计相对简单,主要是版权信息和社交链接。 我在页脚加上了一句话,希望它能带来一种沉静的收尾感,提醒访客:这里不是一座静止的博物馆,而是一个生机勃勃的有机体。 设计的核心理念就是:“这不是博物馆,而是一座花园。” 为了呼应这种生命力,我给这段文字加了一点“呼吸感”的交互——当光标拂过时,它不会生硬地改变排版, 而是通过光影的晕染和微小的上浮做出回应。配合顶部那道若隐若现的渐变分割线,这个页脚以最安静的方式,承托起上方所有的思考。
The footer serves as the quiet anchor of this digital space. Rather than a hard stop, it is designed to be a soft transition—a reminder that this website, like a garden, is an organic entity in constant flux.

I centered the design around a bilingual manifesto: "This is a garden, not a museum." To reflect this living nature, the text features a subtle "breathing" interaction; instead of rigid layout shifts, it responds to your cursor with a gentle lift and a soft glow, mimicking the play of light and shadow. Grounded by a fading gradient line and essential connections, it provides a functional yet unobtrusive foundation.

双语切换
Bilingual Toggle

为了实现流畅的中英切换,本站用了一套基于 Nano Stores 的轻量级双语方案。 系统会记住你的语言偏好,不管是刷新页面还是下次再来,它都能保持你选定的语言。 在渲染层面,主要是通过改变 HTML 根元素的 data-lang 属性,来动态控制中英文内容的显示与隐藏。
To ensure a smooth bilingual experience, this site uses a lightweight solution built on Nano Stores. It utilizes persistent storage to remember your language preference, ensuring your choice remains saved even after you reload the page. Technically, content visibility is dynamically controlled by updating the data-lang attribute on the root HTML element.

交互上,切换按钮有一个动态的视觉焦点:当前激活的语言会保持清晰,没选中的语言则会变模糊。 另外,它还有个“锁定机制”。如果某篇文章我还没来得及翻译,切换按钮就会自动锁定,并弹出一个小气泡,告诉你当前页面不可切换,免得你点过去看到一片空白。
Visually, the toggle button features a dynamic focus: the active language remains sharp, while the inactive option fades into a blur. Additionally, it has a "locked state" mechanism. If a specific post hasn't been translated yet, the toggle automatically locks and displays a tooltip to let you know, preventing you from clicking into a blank page.

卡片展示
Card Layout

在博客列表页,我选用了卡片加上“时间轴”的设计。 系统会自动把文章按年月分组,并按时间倒序排列。视觉上,左侧会有一根线条把同一个月的内容串联起来。 每篇文章就像是时间轴上的一个节点,当鼠标悬停时,节点会被点亮,背景也会有细微的变化,用来引导阅读视线。
For the blog list, I opted for a card-based "Timeline" design. The system automatically groups posts by year and month, arranging them in reverse chronological order. Visually, vertical lines connect the posts within the same month on the left. Each post acts as a node on this timeline; hovering over a card activates the node and subtly highlights the background to guide your focus.

其他参考
Other References

本网站还参考了许多其他网站的设计和内容,包括但不限于: Shu Ding谢益辉Paco Coursey黄玄Andrej KarpathyDerek SiversAnthony Fu 等大佬。
This website also references the design and content of many others, including but not limited to: Shu Ding, Yihui Xie, Paco Coursey, Hux, Andrej Karpathy, Derek Sivers, and Anthony Fu.

另外,特别感谢 A神(Arthals)的 个人网站,是在源头上激励我搭这个网站的动力。
Also, special thanks to Arthals (A Shen), whose website originally inspired me to build my own.

网站内容
Content

这个网站主要分成了技术博客思考与随笔微研究三个板块。我大致是这么设想它们的:
The site is mainly divided into three sections: Tech Blog, Brain Dump, and Mini Lab. Here is what they are all about:

“技术博客”里,我主要记录自己在这个跨界学习 CS 和 AI 过程中的各种踩坑日常。作为一个医学生,我经常会在一些基础的逻辑或配置上卡壳,所以这里更多是我的“排雷记录”。当然,偶尔我也会煞有介事地写点正儿八经的笔记和技术总结。文章里肯定会有不少疏漏,非常欢迎大家指出错误,帮我一起完善。
In the "Tech Blog", I mainly document my daily pitfalls and trial-and-error as I cross over to learn CS and AI. As a medical student, I often get stuck on basic concepts or configurations, so this serves mostly as my personal mine-clearing log. Occasionally, I'll pretend to be serious and produce some proper notes and summaries. There will inevitably be mistakes, so I highly welcome readers to point them out and help me improve.

“思考与随笔”就像它的英文名 Brain Dump 一样,专门用来存放我脑子里那些未经过滤的碎片。这里有捕捉到的稍纵即逝的灵感、看完书或视频后的零碎思考,当然,还有很多不加修饰的牢骚。它不需要什么严密的体系,也不强求给出一个完美的答案,主打一个随心所欲的记录。
"Brain Dump" is exactly what it sounds like: a place to offload the unfiltered fragments in my head. This is where I catch fleeting ideas, jot down scattered thoughts after reading a book or watching a video, and of course, vent some unpolished rants. It doesn't need a rigorous system or a perfect conclusion—it's all about spontaneous logging.

“微研究”大概是我觉得最有趣的一个板块。它用来存放一些源自生活的“低可信度、非严谨”的小型研究。我总是试图用查阅文献和所谓的“科学方法”,去煞有介事地指导和解决日常生活中的鸡毛蒜皮。受限于个人的科研能力,这些“研究”往往带着点自娱自乐的性质,但如果刚好对你的生活有点切实的启发,那就再好不过了。
"Mini Lab" is probably the section I find the most fun. It houses small, non-rigorous, and low-credibility "research" inspired by daily life. I enjoy attempting to tackle trivial everyday problems and over-engineer daily life with literature and semi-scientific methods. Given my limited research skills, these investigations are mostly for my own amusement, but if they happen to offer you some practical insights, that's a fantastic bonus.

为什么写这个网站
Motivations

折腾这个网站,最大的动机是我希望能培养自己“主动思考”的习惯。我想通过输出内容,逼着自己把人格里那点“自驱力”给压榨出来。就像我在主页提到的,写下这些代码的时候,我刚过完医学生的第一个学期。那半年里,我接触了太多以前没想过的事,整个人变得迷茫又烦躁,浑浑噩噩地混了过去。这个网站,算是我试图做出改变的第一步。
The biggest motivation for building this site is to cultivate a habit of "active thinking." I want to force my self-driven nature out through output. As I mentioned on the homepage, I started writing this code just after finishing my first semester as a medical student. During those six months, I was exposed to so many things I hadn't considered before, leaving me feeling lost, anxious, and like I was just drifting along doing nothing. This website is my first step toward changing that.

另一个目的,是想实践一下费曼学习法。强迫自己把学到的东西用人话写出来,其实挺考验理解深度的。我一直觉得我不怎么擅长表达自己的想法和感受,所以这也是给我自己下的战书。
Another goal is to practice the Feynman Technique. Forcing myself to write down what I've learned in plain language really tests how deeply I understand it. I've always felt that I'm not great at expressing my thoughts and feelings, so this is also a personal challenge I've set for myself.

其实,建站这个念头我大一上学期就有了。当时学完了 HTML、CSS 和 JS 基础,每天都在看各种大佬的博客,但我就是不敢动手。原因很简单:我觉得自己太普通了。别人有响当当的 title 和技术,而我连医学生的专业课笔记都整理不明白,平时还得靠前辈整理的“复习大礼包”续命。我总觉得,我写的东西那么浅显,连 AI 回答得都不如,谁会看呢?写出来又有什么意义?于是,我无数次在终端敲下 npm create astro@latest,又无数次心虚地 rm -rf
Honestly, I hesitated for a long time. I had the idea to build a personal site early in my freshman year. I had learned the basics of HTML, CSS, and JS, and spent days browsing awesome blogs by amazing developers, but I never dared to actually start. The reason was simple: Imposter Syndrome. I felt I was too ordinary. The people with personal sites all had impressive titles and skills, while I was just a regular medical student who couldn't even organize my own major's notes properly. I constantly thought: my writing is so shallow, it's not even as good as an LLM's answer, who would read it? What's the point? So, I typed npm create astro@latest countless times, only to timidly rm -rf it right after.

但既然你能看到这段文字,说明我最终还是和自己的“冒名顶替综合征”和解了。说服自己的理由其实很朴素:反正无论怎么做都不可能完美。老是盯着那些厉害的人看,陷入完美主义的内耗里,那就永远只能停在原地。 这个网站不是我要拿去找工作的简历,不是用来炫耀成就的陈列室,它就是一个用来种点花草、记录思考的“数字花园”。我希望它能记录下我从小城走到大城市求学路上的挣扎与成长,见证我一路上对“意义”这东西的笨拙追寻。
But since you're reading this, it means I finally made peace with my Imposter Syndrome. The logic that convinced me was quite simple: nothing is ever going to be perfect anyway. If I keep looking up at those incredible people and trapping myself in perfectionism, I'll never take the first step. This website is not a resume for job hunting, nor a museum to show off achievements. It's just a "digital garden" where I plant some seeds and record my thoughts. I hope it can document my struggles and growth from a small town to a big city, and witness my clumsy but earnest pursuit of "meaning."

谢谢你能读到这里。哪怕我的文字显得有些幼稚和浅薄,只要我写下来了,它对我来说就是有意义的。如果这些碎碎念刚好也能给你带来一点启发,或者让你也有了记录生活的冲动,我会非常开心。 欢迎随时发邮件到 kangchengwen@proton.me,无论是挑刺、建议、分享见解,还是纯粹闲聊,我都十分期待。我们一起进步。
Thank you for reading this far. Even if my writing seems a bit naive or shallow, the sheer act of writing it down makes it profoundly meaningful to me. If these ramblings happen to inspire you or spark an urge to start recording your own life, I'd be beyond thrilled. Feel free to drop me an email at kangchengwen@proton.me anytime. Whether it's to point out mistakes, offer advice, share your thoughts, or just chat, I'm looking forward to it. Let's grow together.

版权与开源声明
Copyright & License

本站的所有原创文章、文字及视觉内容,如无特别声明,均采用 CC BY-NC-SA 4.0 协议进行许可。这意味着您可以自由地分享和演绎这里的内容,但请务必注明出处,不得用于商业目的,且二次创作必须采用相同的开源协议。
Unless otherwise stated, all original articles, text, and visual content on this website are licensed under the CC BY-NC-SA 4.0 license. This means you are free to share and adapt the content, provided you give appropriate credit, do not use it for commercial purposes, and distribute your contributions under the same license.

这个网站的相关模版我将在后续稍作修改和调整后开源,敬请期待。
I plan to open-source the template for this website after making some adjustments, so stay tuned.

Thanks for reading