Vite启动器

vitam — Vite 启动器模板

作者 Kazuki-tam

VITAM 是一个基于 Vite 的前端启动模板,面向静态网站,适合落地页与企业官网等中小型项目。

看看你的网站会是什么样

浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。

3 个预览视图
桌面端首页1 / 3
桌面端截图首屏预览

由服务器浏览器实际访问页面后截取。

全部页面与视图 3

截图用于了解视觉与布局,交互效果请以实际项目为准。

采集于 2026-10-03查看来源

值得关注的模板亮点

从已有项目资料中,快速了解它的特点。

01

基于 Vite 的静态网站启动模板,提供开发服务器与生产构建命令

02

使用 Handlebars 与 src/_partials 目录拆分和复用 HTML 局部模板

03

site.config.ts 集中管理站点信息与各页面的标题、描述、OGP 等元数据

04

内置 Sass 函数与 mixins,默认按 Enduring CSS 组织样式架构

05

集成 TypeScript、Jest、ESLint、HTML-validate、Prettier、PostCSS、Stylelint 等配置

06

通过 vite-plugin-svg-icons 以 sprite 方式管理 SVG 图标,并包含 PWA 支持

模板详细介绍

VITAM 是一个以 Vite 为构建工具的前端启动模板,目标场景是静态网站,README 中明确说明适合落地页、企业官网这类中小型项目。模板使用 Handlebars 将 HTML 拆分为多个小文件,通过 src/_partials 目录管理可复用的局部模板,并在 site.config.ts 中集中维护站点基础信息与各页面的标题、描述、URL、OGP 等元数据。样式方面采用 Sass(Dart Sass),预置了部分 functions 与 mixins,默认按 Enduring CSS 组织 CSS 架构,但 README 也说明该架构并非所有项目都必须采用。TypeScript 可直接使用,tsconfig.json 可自行调整,src/ts/utils 下提供了一些工具函数。图标通过 vite-plugin-svg-icons 管理,把 SVG 放入 src/icons 后以 sprite 形式引用。模板还包含 PWA 支持、基于 Jest 的测试、ESLint、HTML-validate、Prettier、PostCSS、Stylelint 等配置,以及 .github/workflows/project-ci.yml 中的 GitHub Actions 工作流。运行环境要求 Node v18(README 标注 18.13.0),包管理器使用 Yarn,命令包括 yarn start、yarn build、yarn serve、yarn lint、yarn test 等。README 注明该模板不支持 Internet Explorer。

Vite启动器

适合你的项目吗?

适用场景

  • 搭建中小型企业官网或产品落地页
  • 需要把 HTML 拆分为可复用局部模板的静态站点
  • 希望以 Vite 为构建工具、并自带 TypeScript 与 Sass 配置的前端项目
  • 需要 PWA 能力与 SVG sprite 图标管理的静态网站

适合人群

  • 使用 Vite 构建静态网站的前端开发者
  • 需要 Handlebars 模板复用与集中式页面元数据配置的中小型项目
  • 接受 Enduring CSS 作为默认样式架构、或愿意自行替换架构的团队
  • 使用 Node v18 与 Yarn 作为开发环境的项目

上手与定制指南

结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。

  1. 1

    环境要求 Node v18(README 标注 18.13.0),包管理器使用 Yarn

  2. 2

    克隆仓库后执行 yarn install 安装依赖

  3. 3

    使用 yarn start 启动开发模式,yarn build 构建生产版本,yarn serve 本地预览生产构建

  4. 4

    新增页面时需编辑 site.config.ts 补充页面元数据;局部模板放入 src/_partials 目录

  5. 5

    PWA 相关资源文件需替换为项目自己的文件,README 明确不支持 Internet Explorer

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。

使用时需要遵守

  • 允许免费使用、修改、商用和分发该版本代码。
  • 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
  • 代码按现状提供;担保与责任限制以原许可证及适用法律为准。

额外费用与待核对事项

  • 该模板不支持 Internet Explorer 浏览器,如需兼容 IE 的项目不能直接使用。
  • PWA 相关的部分资源文件需替换为使用者自己项目的文件,不能直接沿用模板自带资源。
  • 开发环境要求 Node v18(README 标注 18.13.0),并使用 Yarn 作为包管理器。
  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据

Permission is hereby granted, free of charge

许可证原文

This starter template doesn't support Internet Explorer.

README 原文

Note: Please replace some asset files for PWA with your project's files.

README 原文

- [Node v18 (18.13.0)](https://nodejs.org/en/)

README 原文
https://github.com/Kazuki-tam/vitam/blob/main/LICENSEhttps://github.com/Kazuki-tam/vitam/blob/main/README.md

DeepSeek 根据仓库许可证和 README 整理 ·2026-10-03。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。

项目核对记录与介绍依据

模板资料

来源平台
GitHub
资料与维护参考分
资料较完整 · 83 / 100
技术栈
Vite
网站类型
启动器
这个分数如何计算

本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。

这个项目需要核对什么

记录的仓库更新时间
2026-01-22
截图检查日期
2026-10-03

已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。

目录记录的主要技术栈是 Vite。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。

查看具体选型方法 →

介绍的制作与核对状态

介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。

审核声明: [email protected] · 2026-10-04

查看当时使用的来源资料

SHA-256: a48881ab0815401e5e411afe814c6727f81091258151a8c4f8504d7b95023b44

2026-10-03T08:41:15.330Z

来源文件 / 仓库
# VITAM

VITAM is a starter template with Vite for front-end projects. This template focuses on building a static website and suits small to medium projects like a landing page and a corporate website.

## Status

[![Release (latest by date)](https://img.shields.io/github/v/release/Kazuki-tam/vitam)](https://github.com/Kazuki-tam/vitam/releases/tag/v0.0.1)
[![Issues](https://img.shields.io/github/issues/Kazuki-tam/vitam)](https://github.com/Kazuki-tam/vitam/issues)
![Maintenance](https://img.shields.io/maintenance/yes/2023)
![Release date](https://img.shields.io/github/release-date/Kazuki-tam/vitam)

## Features

- Fast HMR with [Vite](https://vitejs.dev/)
- PWA support
- Quick local server
- Compressing image assets
- Breaking HTML smaller files with [Handlebars](https://handlebarsjs.com/)
- Referring to [Enduring CSS](https://ecss.benfrain.com/)
- Out of the box useful JavaScript libraries
- Out of the box useful SCSS functions and Mixins
- Checking TypeScript with [ESLint](https://eslint.org/)
- HTML Validation with [HTML-validate](https://html-validate.org/)
- Transforming styles with [PostCSS](https://postcss.org/)
- Built-in test runner with [Jest](https://jestjs.io/)

## Requirements

- [Node v18 (18.13.0)](https://nodejs.org/en/)

## Main Dependencies

<!-- textlint-disable -->

- [Yarn](https://yarnpkg.com/)
- [Jest](https://jestjs.io/)
- [ESLint](https://eslint.org/)
- [HTML-vallidate](https://html-validate.org/)
- [Prettier](https://prettier.io/)
- [Vite](https://vitejs.dev/)
- [Handlebars](https://handlebarsjs.com/)
- [TypeScript](https://www.typescriptlang.org/)
- [Sass](https://sass-lang.com/)

<!-- textlint-enable -->

## How to Use

Clone this repository and install dependencies

```
yarn install
```

## Available Commands

Start your project in development mode

```
yarn start
```

Build your project for production

```
yarn build
```

Locally preview production build

```
yarn serve
```

Validate HTML files

```
yarn htmlValidate
```

Lint your project files

```
yarn lint
```

Fix your project files

```
yarn lint:fix
```

Install missing TypeScript typings

```
yarn postInstall
```

Check the package's license

```
yarn checkLicense
```

Test project's code

```
yarn test
```

```
yarn test:watch
```

## HTML

You can handle bundling multiple HTML files with [vite-plugin-handlebars](https://www.npmjs.com/package/vite-plugin-handlebars).
Make sure [Handlebars Context](https://handlebarsjs.com/guide/#simple-expressions) as you need.

If you want to use multiple partial files, Add your partial files into the `_partials` folder.

`src/_partials`

You can call partial files directly by other templates like this example.

```
{{> _header }}
  <main>
    <h1>Welcome to VITAM Docs!</h1>
    <p>VITAM is a front-end template with Vite for static websites.</p>
  </main>
{{> _footer }}
```

`site.config.ts` manages the site's basic information.
You have to edit `site.config.ts` when you create a new page.

```js
const pagesData = {
  '/sample/index.html': {
    locale: siteData.locale,
    title: `Smaple Page | ${siteData.siteName}`,
    description: `This is a sample page. ${siteData.description}`,
    url: `${siteData.url}/sampple/`,
    ogpImage: siteData.ogpImage,
    ogType: 'article',
    fbAppId: siteData.fbAppId,
    fbAdmins: siteData.fbAdmins,
    twitterCard: siteData.twitterCard,
    twitterSite: siteData.twitterSite,
  },
};
```

[📖 Learn Handlebars](https://handlebarsjs.com/)

## Sass (Dart Sass)

You can manage style sheets logically with Sass. I've already defined some functions and Mixins.
Check out these files before you get started with your project.

<!-- textlint-disable -->

- `src/scss/foundation/functions/*.scss`
- `src/scss/foundation/mixins/*.scss`

<!-- textlint-enable -->

[📖 Learn Sass](https://sass-lang.com/)

## CSS Architecture

This starter template gives you CSS architecture which is [Enduring CSS](https://ecss.benfrain.com/) standardly, but it's not necessary architecture in all projects. I recommend you introduce the best architecture in each project.

[📖 Learn CSS Architecture](https://philipwalton.com/articles/css-architecture/)

### What's Enduring CSS?

Enduring CSS is an architecture to write style sheets for large-scale, rapidly changing, long-lived web projects.
You can get these benefits from Enduring CSS.

- Isolated, self-quarantining styles
- Scale to any size
- Avoiding abstraction and specificity
- One key selector to rule them all
- Handling state

[📖 Learn Enduring CSS](https://ecss.benfrain.com/)

### How to write Enduring CSS selectors

Here is the example selector.

```
.namespace-Component_ChildNode
```

## TypeScript

This template supports TypeScript. It's easy to import ts files.
You can customize TypeScript's options with `tsconfig.json` at any time.

I've already defined some utility functions.
Check out these files before you get started with your project.

<!-- textlint-disable -->

`src/ts/utils/*.ts`

<!-- textlint-enable -->

`postInstall` command will help you to install typings in this project.

Jest is built-in in this project. You can run Jest from the command line.

[📖 Learn TypeScript](https://www.typescriptlang.org/)
[📖 Learn Jest](https://jestjs.io/)

## Icons

<!-- textlint-disable -->

[vite-plugin-svg-icons](https://github.com/vbenjs/vite-plugin-svg-icons) make it easy to manage SVG icons.

<!-- textlint-enable -->

Add SVG files into the icons folder.

```
src/icons/
```

### Usage of SVG sprite

Call the icon with ID.

```html
<svg aria-hidden="true">
  <use href="#icon-file" />
</svg>
```

## PWA

[Vite Plugin PWA](https://vite-plugin-pwa.netlify.app/) supports making your website faster.
Edit `vite.config.ts` if you would like to customize settings for PWA.
You can generate icons for PWA with [Favicon Generator](https://realfavicongenerator.net/).

Note: Please replace some asset files for PWA with your project's files.

[📖 Learn PWA](https://web.dev/learn/pwa/)

## GitHub Actions

If you use GitHub in your project, you can take advantage of GitHub Actions to automate your development workflows.
Check out this file before you get started with your project.

<!-- textlint-disable -->

`.github/workflows/project-ci.yml`

<!-- textlint-enable -->


## Configurations

<!-- textlint-disable -->

- [package.json](https://docs.npmjs.com/cli/v7/configuring-npm/package-json)
- [.editorconfig](https://editorconfig.org/)
- [.prettierrc](https://prettier.io/docs/en/configuration.html)
- [.eslintrc.json](https://eslint.org/docs/user-guide/configuring/)
- [.htmlvalidate.json](https://html-validate.org/usage/#configuration)
- [.postcssrc.json](https://github.com/postcss/postcss-load-config)
- [.stylelintrc.json](https://stylelint.io/user-guide/configure)
- [.node-version](https://github.com/nodenv/nodenv)
- [.textlintrc](https://textlint.github.io/docs/configuring.html)
- [vite.config.ts](https://vitejs.dev/config/)
- [tsconfig.json](https://www.typescriptlang.org/tsconfig)
- [jest.config.ts](https://jestjs.io/docs/configuration)

<!-- textlint-enable -->

## Recommended IDE

- [Visual Studio Code](https://code.visualstudio.com/)

## Notes

This starter template doesn't support Internet Explorer.
Feel free to use this template.

## Contributes

Pull requests are always welcome.

## License

MIT
反馈内容错误

看看同类模板

对比同技术栈与用途的模板,找到更适合的视觉与内容结构。