Skip to content

Commit

Permalink
feat(内核): 添加使用文档
Browse files Browse the repository at this point in the history
  • Loading branch information
qianmoQ committed Jan 17, 2025
1 parent 615c7c8 commit 2f2fe3a
Show file tree
Hide file tree
Showing 4 changed files with 158 additions and 5 deletions.
46 changes: 46 additions & 0 deletions docs/assets/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions docs/content/getting-started/get-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: 开始使用
---

LightCall 是一个简单、直观且功能强大的服务调用框架。通过声明式的方式,让开发者专注于业务逻辑而不是底层的 HTTP 调用细节。

我们可以通过下面的步骤来快速上手:

## 添加依赖

---

!!! info "提示"

这里我们以 Maven 为例,您可以根据自己的需求选择不同的依赖管理工具

!!!

```xml
<dependency>
<groupId>org.devlive.lightcall</groupId>
<artifactId>lightcall</artifactId>
<version>${latest.version}</version>
</dependency>
```

## 定义接口

---

```java
public interface PostService
{
@Get("/posts")
List<Post> getPosts();
}
```

## 初始化并使用

---

```java
private final LightCallConfig config = LightCallConfig.create("https://jsonplaceholder.typicode.com");
private final PostService service = LightCall.create(PostService.class, config);

List<Post> posts = service.getPosts();
```
65 changes: 60 additions & 5 deletions docs/content/index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,64 @@
---
title: 首页
title: 欢迎使用 PageForge
layout: home

config:
sidebar: false
toc: false
---
sidebar: false
toc: false

hero:
title: 创新技术解决方案
description: 为您的企业或网站提供最前沿的技术支持和解决方案
primaryCta:
url: /getting-started/get-started.html
text: 开始使用
secondaryCta:
url: /usage/header.html
text: 了解更多

features:
subtitle: 核心优势
title: 为什么选择我们
description: 提供全方位的技术支持和服务
items:
- icon: >-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" class="w-6 h-6 text-indigo-600">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z" />
</svg>
title: 高性能
description: 采用最新技术架构,确保系统高效运行
- icon: >-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" class="w-6 h-6 text-indigo-600">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z" />
</svg>
title: 安全可靠
description: 全方位的安全防护,保障数据安全
- icon: >-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" class="w-6 h-6 text-indigo-600">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2" />
</svg>
title: 易于使用
description: 直观的界面设计,简单易上手
stats:
title: 用数据说话
description: 我们取得的成就
items:
- label: 活跃用户
value: 1+
- label: 服务客户
value: 1+
- label: 正常运行时间
value: 99.99%
- label: 客户满意度
value: 100%

LightCall 是一个简单、直观且功能强大的服务调用框架。通过声明式的方式,让开发者专注于业务逻辑而不是底层的 HTTP 调用细节。
cta:
title: 准备好开始了吗?
description: 立即加入我们,开启您的技术创新之旅
button:
url: /getting-started/get-started.html
text: 立即使用
---
4 changes: 4 additions & 0 deletions docs/pageforge.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
site:
title: LightCall
description: LightCall 的设计目标是提供一个简单、直观且功能强大的服务调用框架。通过声明式的方式,让开发者专注于业务逻辑而不是底层的 HTTP 调用细节。
logo: /assets/logo.svg
favicon: assets/logo.svg

repo:
owner: devlive-community
Expand All @@ -23,6 +25,8 @@ footer:
href: https://github.com/devlive-community/pageforge

nav:
- 开始使用:
- /getting-started/get-started
- 文档:
- /usage/header
- /usage/get

0 comments on commit 2f2fe3a

Please sign in to comment.