Skip to content

Commit

Permalink
docs: 更新文档配置
Browse files Browse the repository at this point in the history
  • Loading branch information
QingXia-Ela committed Aug 21, 2024
1 parent fafa9a0 commit 09d36a6
Show file tree
Hide file tree
Showing 8 changed files with 1,333 additions and 651 deletions.
24 changes: 19 additions & 5 deletions docs/manual/.gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
node_modules
# build output
dist/
# generated types
.astro/

# vim ignore
*.swp
*~
# dependencies
node_modules/

.astro
# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*


# environment variables
.env
.env.production

# macOS-specific files
.DS_Store
55 changes: 55 additions & 0 deletions docs/manual/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Starlight Starter Kit: Basics

[![Built with Starlight](https://astro.badg.es/v2/built-with-starlight/tiny.svg)](https://starlight.astro.build)

```
npm create astro@latest -- --template starlight
```

[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/starlight/tree/main/examples/basics)
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/starlight/tree/main/examples/basics)
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/withastro/starlight&create_from_path=examples/basics)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgitpro.ttaallkk.top%2Fwithastro%2Fstarlight%2Ftree%2Fmain%2Fexamples%2Fbasics&project-name=my-starlight-docs&repository-name=my-starlight-docs)

> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
## 🚀 Project Structure

Inside of your Astro + Starlight project, you'll see the following folders and files:

```
.
├── public/
├── src/
│ ├── assets/
│ ├── content/
│ │ ├── docs/
│ │ └── config.ts
│ └── env.d.ts
├── astro.config.mjs
├── package.json
└── tsconfig.json
```

Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name.

Images can be added to `src/assets/` and embedded in Markdown with a relative link.

Static assets, like favicons, can be placed in the `public/` directory.

## 🧞 Commands

All commands are run from the root of the project, from a terminal:

| Command | Action |
| :------------------------ | :----------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:4321` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro -- --help` | Get help using the Astro CLI |

## 👀 Want to learn more?

Check out [Starlight’s docs](https://starlight.astro.build/), read [the Astro documentation](https://docs.astro.build), or jump into the [Astro Discord server](https://astro.build/chat).
20 changes: 11 additions & 9 deletions docs/manual/package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
{
"name": "manual",
"version": "1.0.0",
"description": "",
"main": "index.js",
"type": "module",
"version": "0.0.1",
"scripts": {
"dev": "astro dev",
"build": "astro build"
"start": "astro dev",
"build": "astro build",
"preview": "astro preview",
"astro": "astro"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@astrojs/starlight": "^0.25.3",
"astro": "^4.12.2"
"@astrojs/starlight": "^0.26.1",
"astro": "^4.10.2",
"sharp": "^0.32.5",
"@astrojs/check": "^0.9.3",
"typescript": "^5.5.4"
}
}
1 change: 1 addition & 0 deletions docs/manual/public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions docs/manual/src/content/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { defineCollection, z } from 'astro:content';
export const collections = {
'docs': defineCollection({
type: 'content',
schema: z.any()
}),
};
15 changes: 0 additions & 15 deletions docs/manual/src/pages/index.astro

This file was deleted.

16 changes: 16 additions & 0 deletions docs/manual/src/pages/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: 首页
head: []
sidebar:
hidden: false
---

别看了,这里没有内容,点击旁边的下载软件并启动来开始安装软件。
<br />
<br />
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute
irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia
deserunt mollit anim id est laborum.
Loading

0 comments on commit 09d36a6

Please sign in to comment.