Skip to content

Commit 67f5de4

Browse files
committed
improve docs
1 parent 29689a5 commit 67f5de4

File tree

3 files changed

+97
-17
lines changed

3 files changed

+97
-17
lines changed

docs/docs/plugins/build-plugin.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
sidebar_position: 4
3+
---
4+
5+
# 🛠️ Building Custom Plugins
6+
7+
Want to build your own plugin? Follow this guide to create and publish your custom plugin.
8+
9+
## Getting Started
10+
11+
1. Use our [plugin template](https://github.com/PotLock/curatedotfun-plugin-template) to bootstrap your plugin:
12+
13+
```bash
14+
git clone https://github.com/PotLock/curatedotfun-plugin-template.git your-plugin-name
15+
cd your-plugin-name
16+
```
17+
18+
2. Implement your plugin logic following the template structure
19+
3. Publish your plugin to NPM
20+
21+
## Using Your Plugin
22+
23+
Once published, you can use your plugin in any curate.fun project:
24+
25+
1. Install the package:
26+
27+
```bash
28+
npm install @your-org/your-plugin
29+
```
30+
31+
2. Configure it in your `curate.config.json`:
32+
33+
```json
34+
{
35+
"plugins": {
36+
"@your-org/your-plugin": {
37+
"type": "distributor", // or "transformer"
38+
"url": "@your-org/your-plugin" // Use the package name as the url
39+
}
40+
}
41+
}
42+
```
43+
44+
## Plugin Types
45+
46+
You can create two types of plugins:
47+
48+
- **Distributors**: Send content to external platforms (e.g., Telegram, Discord, RSS)
49+
- **Transformers**: Modify content before distribution (e.g., AI enhancement, formatting)
50+
51+
## Future Improvements
52+
53+
:::note
54+
Currently, plugins need to be installed at build time. We are exploring dynamic plugin loading at runtime using [module federation](https://module-federation.io/) to make the system even more flexible.
55+
:::

docs/docs/plugins/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,4 @@ Transform content using OpenRouter's GPT models for AI-powered content enhanceme
6767

6868
### [📝 Simple Transform](./transformers/simple-transform.md)
6969

70-
Format content using a template-based approach with customizable placeholders.
70+
Format content using a template-based approach with customizable placeholders.

docs/sidebars.ts

Lines changed: 41 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,47 +5,72 @@ const sidebars: SidebarsConfig = {
55
{
66
type: "doc",
77
id: "intro",
8-
label: "Introduction",
8+
label: "👋 Introduction",
99
},
1010
{
1111
type: "doc",
1212
id: "getting-started",
13-
label: "Getting Started",
13+
label: "🚀 Getting Started",
1414
},
1515
],
1616
userGuideSidebar: [
1717
{
1818
type: "doc",
1919
id: "user-guides/curation",
20-
label: "Curation",
20+
label: "📚 Curation",
2121
},
2222
],
2323
developerGuideSidebar: [
2424
{
2525
type: "category",
26-
label: "Setup",
26+
label: "🔨 Setup",
2727
items: ["developers/configuration", "developers/deployment"],
2828
},
29+
// {
30+
// type: "category",
31+
// label: "🔌 Integration",
32+
// items: ["developers/plugins"],
33+
// },
2934
{
3035
type: "category",
31-
label: "Integration",
32-
items: ["developers/plugins"],
33-
},
34-
{
35-
type: "category",
36-
label: "Plugins",
36+
label: "🔌 Plugins",
3737
items: [
38-
"plugins/index",
38+
{
39+
type: "doc",
40+
id: "plugins/index",
41+
label: "📖 Overview"
42+
},
3943
{
4044
type: "category",
41-
label: "Distributors",
42-
items: ["plugins/distributors/telegram"]
45+
label: "📡 Distributors",
46+
items: [
47+
{
48+
type: "doc",
49+
id: "plugins/distributors/telegram",
50+
label: "📱 Telegram"
51+
}
52+
]
4353
},
4454
{
4555
type: "category",
46-
label: "Transformers",
47-
items: ["plugins/transformers/gpt-transform", "plugins/transformers/simple-transform"]
48-
}
56+
label: "🔄 Transformers",
57+
items: [
58+
{
59+
type: "doc",
60+
id: "plugins/transformers/gpt-transform",
61+
label: "🤖 GPT Transform"
62+
},
63+
{
64+
type: "doc",
65+
id: "plugins/transformers/simple-transform",
66+
label: "📝 Simple Transform"
67+
}
68+
]
69+
},
70+
{
71+
type: "doc",
72+
id: "plugins/build-plugin",
73+
},
4974
],
5075
},
5176
],

0 commit comments

Comments
 (0)