Quick Start
According to Kecare, it's quite simple. You only need to install the Kecare CLI to help you start a Kecare project from scratch. It will guide you through every step of setting up a new project and allow you to choose from several different official starter templates. If you just want to quickly integrate a blog/documentation site into your existing project, please read
Prerequisites
- Node.js
- Terminal
- Git
Install CLI
You can run create kecare anywhere on your machine, and it will install the Kecare Generator CLI for you.
npm create kecare
If everything goes well, you will see a success message.
Get Theme or Starter Template
[!NOTE]
Currently, Kecare is still in its early stages, so there aren't many themes available to choose from. We appreciate everyone's contributions to Kecare by creating themes to enrich the ecosystem. For now, you can use the theme we provide to experience the advantages that Kecare brings.
git clone https://github.com/Pamperkyumi/Kecare-theme.git
cd Kecare-theme
Install Dependencies
bun install
If everything goes smoothly, you will receive a theme with the following main directory structure,
theme/
├── .kecare/
│ ├── articles/ # 文章目录(将markdown文章放置于此)
│ │
│ ├── menus/
│ │ ├── test.menu.source.ts # 菜单源文件(用于菜单导航栏)
│ │
│ ├── foo-bar.article.ts # 文章详情页模板
│ ├── foo-bar.list.ts # 列表页模板
│ ├── foo-bar.archives.ts # 归档页模板
│
│
├── app/ # Nuxt 应用目录
...
Our theme is built with Nuxt, but in practice, Kecare does not restrict your choice of framework, so we won't delve too much into the Nuxt directory structure.
Start Development Server
You can write your markdown articles in .kecare/articls/, and then use kecare gen . to generate the corresponding pages.
After the generator has finished generating all the required pages, you can use npm run dev to start your development server.