基于 SvelteKit 的静态博客模板,构建产物为 build/ 目录,可发布到静态托管服务
svelte-blog-template — Svelte 博客模板
作者 moonmoonio
基于 SvelteKit 的静态博客模板,内置标签聚合与多语言支持,文章使用 mdsvex 编写。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
全部页面与视图 2
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
文章使用 mdsvex 编写,支持 front matter 声明标题、标签、摘要、发布日期、更新日期、作者与贡献者
标签从全部文章中自动收集并汇总,方便按标签查找相关文章
内置国际化支持,翻译文件按语言分目录存放,语言列表由 enums.ts 与 translations/index.ts 管理
文章按语言命名文件(如 en.svx、es.svx),同一篇内容可提供多语言版本
站点名称、关于页、社交链接与页脚版权信息均有对应的配置文件可修改
模板详细介绍
svelte-blog-template 是一个用 SvelteKit 构建的静态博客模板,定位为简单静态博客站点。它自带标签功能与国际化支持,文章以 mdsvex 文件撰写,可放在按语言命名的文件中(如 en.svx、es.svx),并通过 front matter 声明标题、标签、摘要、发布日期、更新日期、作者与贡献者等字段。标签会从全部文章中自动收集并汇总,便于按标签查找文章。
模板把多语言内容集中放在 src/lib/translations/ 下,每个语言一个目录;可用语言由 src/lib/enums.ts 中的枚举定义,并在 src/lib/translations/index.ts 注册。站点名称、关于页、社交链接与页脚版权信息分别通过 src/lib/translations/generic.json、src/lib/blog/about/ 和 src/lib/config/site.ts 修改。
构建流程为 npm install 后运行 npm run dev 开发,npm run build 生成生产版本,npm run preview 预览,最终把生成的 build/ 目录发布到任意静态托管服务。仓库未提供更多关于主题样式、性能或部署平台的具体说明,使用前需自行核对演示图片、字体、图标等第三方素材的许可。
适合你的项目吗?
适用场景
- 搭建以 Markdown 风格文件撰写、按标签组织的个人静态博客
- 需要同一博客提供多种语言内容,并分别维护各语言翻译
- 把生成的静态文件部署到自选的静态站点托管服务
- 在 SvelteKit 项目中参考多语言翻译文件与文章 front matter 的组织方式
适合人群
- 熟悉 SvelteKit 与 mdsvex,希望快速起步静态博客的开发者
- 需要标签聚合与多语言内容组织的博客作者
- 计划自行选择静态托管服务并自行处理第三方素材许可的使用者
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
使用 npm install(或 pnpm install、yarn)安装依赖,npm run dev 启动开发服务器
- 2
npm run build 生成生产版本,npm run preview 预览,最终发布 build/ 目录
- 3
在 src/lib/translations/generic.json 中把 "Test Site" 替换为实际站点名称
- 4
文章放在 src/lib/blog/posts/ 下以 slug 命名的目录中,文件名使用语言代码(如 en.svx)
- 5
增删语言需同步更新 src/lib/enums.ts 与 src/lib/translations/index.ts,并维护对应语言目录
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中的免费 MIT 版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 使用、修改或分发代码时,保留原作者版权声明和完整 MIT 许可证。
- 允许免费使用、修改及商用,也允许分发代码;分发时仍需随附版权与许可声明。
- 代码按现状提供,作者不承诺担保或承担使用责任。
额外费用与待核对事项
- 社交图标依赖外部图标库(Flowbite Svelte 与 svelte-icons-pack),默认仅支持 Simple Icons;使用这些图标需遵守对应第三方图标集的许可,模板本身不提供图标素材授权。
- 文章作者字段结构依赖第三方 npm 包 feed,使用 RSS 相关功能需安装并遵守该依赖的许可。
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据
Permission is hereby granted, free of charge
许可证原文
The available icons for the social media icons can be found in https://flowbite-svelte.com/icons/solid-icons, as well as in https://leshak.github.io/svelte-icons-pack/#/pack/si (note that only Simple Icons are supported by default).
README 原文
https://github.com/moonmoonio/svelte-blog-template/blob/main/LICENSEhttps://github.com/moonmoonio/svelte-blog-template/blob/main/README.mdThe `Author` class referred above is taken from [`feed`](https://www.npmjs.com/package/feed) to simplify the RSS feed creation.
README 原文
依据完整 MIT 许可证与仓库 README 核对 · 2026-09-30。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。
项目核对记录与介绍依据
模板资料
- 来源平台
- GitHub
- 资料与维护参考分
- 资料较完整 · 83 / 100
- 技术栈
- Svelte
- 网站类型
- 博客
这个分数如何计算
本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。
这个项目需要核对什么
- 记录的仓库更新时间
- 2026-07-14
- 截图检查日期
- 2026-09-30
已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。
目录记录的主要技术栈是 Svelte。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。
查看具体选型方法 →介绍的制作与核对状态
介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。
已完成服务器许可规则与 AI 来源核对;未经过人工编辑审核。
查看当时使用的来源资料
SHA-256: aeb28ea5ce9239c42dbae9c00d9aec1b474894b3af830922515225152347b623
2026-09-30T01:10:11.708Z
来源文件 / 仓库# svelte-blog-template `svelte-blog-template` is a template for a simple static blog site. It included tagging functionality and internationalization support. ## Developing Install dependencies with `npm install` (or `pnpm install` or `yarn`) and start the development server: ```bash npm run dev # or start the server and open the app in a new browser tab npm run dev -- --open ``` ## Building To create a production version of your app: ```bash npm run build ``` To preview the production build, use `npm run preview`. ## Publishing Publish the generated `build/` directory to your static site hosting service of preference. ## Making it your own ### Set up a website name Modify `src/lib/translations/generic.json` and replace `"Test Site"` with your own website name. ### Update the about me page Modify the files contained in `src/lib/blog/about/` (you may delete the translations for any language you do not wish to use). This project uses mdsvex which has support for front matter in its files, so make sure to update those fields too. ### Adding blog posts Add any new blog post to its own directory (which will be used as the post's slug) under `src/lib/blog/posts/`. Name your post file with the language it's written in. E.g., en.svx for english posts, and es.svx for posts written in spanish. The available front matter fields for blog posts are the following: ``` title: string; tags?: string[]; // Optional array of tags associated with this post. summary?: string; // Optional summary of the blog post, displayed in the list of all blog posts. publishDate: string | Date; // I tend to write them in the YYYY-MM-DD format. updatedDate?: string | Date; // Was the post updated after its original publish date? If so, update it here! authors?: Author[]; // Optional list of authors specific to this blog post contributors?: Author[]; // Optioan list of contributos specific to this blog post ``` The `Author` class referred above is taken from [`feed`](https://www.npmjs.com/package/feed) to simplify the RSS feed creation. Its fields are: ``` name?: string; email?: string; link?: string; avatar?: string; ``` ### Tags Tags are automatically taken from all blog posts and put in a table to easily find posts that share tags. ### Adding or removing locales Locale information is mostly contained within `src/lib/translations/`. - Each language has its own directory containing all associated translation files for it under `src/lib/translations/[langugage]`. - An enum containing all available locales is defined in `src/lib/enums.ts`. Update it to add or remove languages. - Translations are registered in `src/lib/translations/index.ts`, so make sure to update that file to register or remove languages. - I tried to keep translations of individual components in separate files, so the contents of `src/lib/translations/[langugage]` are translation files for each UI component of the site. ### Site config file The file located at `src/lib/config/site.ts` sets up links to social media and it declares the copyright owner specified in the site's footer. The available icons for the social media icons can be found in https://flowbite-svelte.com/icons/solid-icons, as well as in https://leshak.github.io/svelte-icons-pack/#/pack/si (note that only Simple Icons are supported by default). ### Home page I suggest you update the home page to make it your own thing :)
看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

CMSaasStarter
A modern SaaS template/boilerplate built with SvelteKit, Tailwind, and Supabase. Includes marketing page, blog…
Svelte · 后台

sveltepress
Sveltepress 是一个建立在 SvelteKit 之上的文档与博客静态站点生成工具,思路接近 VitePress,但保留了完整的 SvelteKit 能力面(SSR、适配器、服务端路由、hooks)。
Svelte · 工具站

sveltekit-blog-template
A SvelteKit blog template
Svelte · 博客

sveltekit-mdsvex-blog
A minimalistic blog template built with SvelteKit and MDsveX
Svelte · 博客

tablog-svelte
Tablog reimagined in Svelte/SvelteKit, a lightweight blogging setup powered entirely by Markdown.
Svelte · 博客

sveltekit-mdsvex-blog-template
MDsveX blog starter template built with Sveltekit & Tailwind
Svelte · 作品集
