Skip to content

Commit a712bf1

Browse files
committed
Add new email service images and update image processing logic
- Added multiple new images for AWS, Postmark, SendGrid, Mailgun, and Mailjet services. - Enhanced the image processing function to correctly resolve relative paths based on the file's directory. - Updated image path handling in markdown to use <img> tags instead of markdown syntax to prevent build errors for missing images. - Improved cleanup and transformation of content, including handling of GitHub callouts and inline code. - Generated version and folder-specific meta.json files for better organization of documentation.
1 parent 5f1b404 commit a712bf1

File tree

298 files changed

+8749
-355
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

298 files changed

+8749
-355
lines changed

app/docs/[plugin]/[version]/[...slug]/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,9 @@ export async function generateStaticParams() {
8484
export async function generateMetadata(props: CurrentPageProps): Promise<Metadata> {
8585
const params = await props.params;
8686
const pluginName = params.plugin;
87+
const version = params.version;
8788

88-
return generateMetadataForPlugin(pluginName) ?? notFound();
89+
return generateMetadataForPlugin(pluginName, version) ?? notFound();
8990
// const page = source.getPage([pluginName, version, ...slugs]);
9091
// if (!page) notFound();
9192

app/docs/components/helpers.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
import { config } from "@/lib/config";
22
import { getPluginImage } from "@/lib/source";
33

4-
export function generateMetadataForPlugin(plugin: string) {
4+
export function generateMetadataForPlugin(plugin: string, version?: string) {
55
const pluginConfig = config.plugins.find(p => p.id === plugin);
66
if (!pluginConfig) return null;
77
return {
8-
title: `${pluginConfig.title} | Solution Forest Plugins` ,
8+
title: [
9+
pluginConfig.title,
10+
version,
11+
'Solution Forest Plugins'
12+
].filter(Boolean).join(' | '),
913
description: pluginConfig.description,
1014
// openGraph: {
1115
// images: [

content/docs/_meta.json

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
title: Authentication
3+
description: Modern self-hosted email marketing platform built specifically for Filament Admin Panel with subscriber management, email campaigns, and automation features.
4+
lastUpdated: 2026-03-26T10:47:10.900Z
5+
---
6+
7+
# Authentication for Private API Routes
8+
Authentication for the API is performed on a per-workspace basis by supplying a token with the API request.
9+
10+
### Generating Tokens
11+
12+
To view your existing tokens, or to generate a new token, perform the following steps for each of your Workspaces:
13+
14+
1. Visit the edit workspace page.
15+
3. In the relation manager section, you will see a list of any previously generated API tokens.
16+
4. You can add a new token and optionally provide a description for the token.
17+
5. You will now be able to use the generated token to authenticate with the API for the current workspace.
18+
19+
### Bearer Token
20+
21+
The preferred way to authenticate with the API during a request is to use the token as a Bearer token. This is performed by supplying an `Authorization` header with the request, where the value is `Bearer {api_token}`.
22+
23+
**Example:**
24+
25+
```
26+
Authorization: Bearer 9w2fN7d4F3Banyv7gihYOWJEH6MvtYyZ
27+
```
28+
29+
### API Token Parameter
30+
31+
Alternatively, you can authenticate by providing the token as a parameter when making the request. The token parameter should be keyed as `api_token` where the value is `{api_token}`.
32+
33+
**GET Example:**
34+
35+
```
36+
/api/v1/ping?api_token=9w2fN7d4F3Banyv7gihYOWJEH6MvtYyZ
37+
```
38+
39+
**POST Example:**
40+
41+
```json
42+
{
43+
"api_token": "9w2fN7d4F3Banyv7gihYOWJEH6MvtYyZ"
44+
}
45+
```
46+
47+
### Throttling
48+
You can set the throttling rate as following:
49+
```php
50+
use Sendportal\Base\Facades\Sendportal;
51+
use SolutionForest\FilamentNewsletter\Middleware\Authentication;
52+
53+
Route::middleware([
54+
config('filament-newsletter.throttle_middleware') ?? 'throttle:60,1',
55+
Authentication::class,
56+
])->group(function () {
57+
// Authenticated API routes (workspace-level authentication).
58+
Sendportal::apiRoutes();
59+
});
60+
```
61+
62+
When this limit is exceeded, a `429 Too Many Requests` response will be returned.
63+
64+
The limit can be configured by editing the `filament-newsletter.throttle_middleware` key in the config file. The value needs to be in the format `throttle:{number_of_requests},{every_X_minutes}`.
65+
66+
For example, this would limit the API to 1000 requests every 5 minutes:
67+
68+
```
69+
'throttle_middleware' => 'throttle:1000,5'
70+
```
71+
72+
For more information on rate limiting, see the official [Laravel documentation](https://laravel.com/docs/11.x/rate-limiting).
73+
74+
75+
76+
## Using Laravel Sanctum
77+
You can use [Laravel Sanctum](https://laravel.com/docs/11.x/sanctum) to protect your API routes.
78+
79+
```php
80+
use Sendportal\Base\Facades\Sendportal;
81+
82+
Route::middleware('auth:sanctum')->group(function () {
83+
Route::middleware([
84+
config('filament-newsletter.throttle_middleware') ?? 'throttle:60,1',
85+
])->group(function () {
86+
// Authenticated API routes (workspace-level authentication).
87+
Sendportal::apiRoutes();
88+
});
89+
});
90+
```

0 commit comments

Comments
 (0)