Skip to content

Commit

Permalink
Move developers docs to a separate folder
Browse files Browse the repository at this point in the history
  • Loading branch information
moisseev committed Apr 24, 2024
1 parent 5d2902c commit c7f1c43
Show file tree
Hide file tree
Showing 16 changed files with 21 additions and 21 deletions.
8 changes: 4 additions & 4 deletions _includes/top.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@
<li>Developers documentation
<ul>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/lua/">Lua API reference</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/lua/examples.html">Lua rules examples</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/tutorials/writing_rules.html">Writing Rspamd rules</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/developers/examples.html">Lua rules examples</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/developers/writing_rules.html">Writing Rspamd rules</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/fuzzy_storage.html">Creating your fuzzy storage</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/architecture/index.html">Architecture information</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/architecture/protocol.html">Protocol documentation</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/developers/architecture.html">Architecture information</a></li>
<li><a class="dropdown-item" href="{{ site.baseurl }}/doc/developers/protocol.html">Protocol documentation</a></li>
</ul>
</li>
<li>External resources
Expand Down
12 changes: 6 additions & 6 deletions _layouts/doc.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@
<li class="r-docs-subnav list-group-item">
<a href="#">Developers documentation</a>
<ul>
<li><a href="{{ site.baseurl }}/doc/tutorials/writing_rules.html">Writing Rspamd rules</a></li>
<li><a href="{{ site.baseurl }}/doc/lua/sync_async.html">Coroutines and async calls</a></li>
<li><a href="{{ site.baseurl }}/doc/architecture/index.html">Architecture information</a></li>
<li><a href="{{ site.baseurl }}/doc/architecture/protocol.html">Protocol documentation</a></li>
<li><a href="{{ site.baseurl }}/doc/tutorials/writing_tests.html">Writing Rspamd tests</a></li>
<li><a href="{{ site.baseurl }}/doc/lua/examples.html">Useful Lua rules examples</a></li>
<li><a href="{{ site.baseurl }}/doc/developers/writing_rules.html">Writing Rspamd rules</a></li>
<li><a href="{{ site.baseurl }}/doc/developers/sync_async.html">Coroutines and async calls</a></li>
<li><a href="{{ site.baseurl }}/doc/developers/architecture.html">Architecture information</a></li>
<li><a href="{{ site.baseurl }}/doc/developers/protocol.html">Protocol documentation</a></li>
<li><a href="{{ site.baseurl }}/doc/developers/writing_tests.html">Writing Rspamd tests</a></li>
<li><a href="{{ site.baseurl }}/doc/developers/examples.html">Useful Lua rules examples</a></li>
</ul>
</li>

Expand Down
4 changes: 2 additions & 2 deletions _posts/2018-09-24-rspamd-1.8.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ There are couple of the incompatibilities introduced, hence, please check the [m

This framework allows to combine and process different data extracted from messages and use that in different plugins, such as [multimap](https://rspamd.com/doc/modules/multimap.html), [reputation](https://rspamd.com/doc/modules/reputation.html) or [ratelimits](https://rspamd.com/doc/modules/ratelimit.html). It is also possible to use data extracted in Rspamd [regular expressions](https://rspamd.com/doc/modules/regexp.html).

* [**Coroutines** API](https://rspamd.com/doc/lua/sync_async.html) support in Lua
* [**Coroutines** API]({{ site.baseurl }}/doc/developers/sync_async.html) support in Lua

Now you can write code in a usual imperative manner but you still will not block any other tasks. Each potentially blocking operation creates a yielding-point. In turn, this means the code is suspended until the operation is done (just like blocking) and resumes only when there is some result. Meanwhile, other tasks are processed as usual.

Expand Down Expand Up @@ -134,4 +134,4 @@ There are couple of the incompatibilities introduced, hence, please check the [m
* [WebUI] Fix throughput data consolidation
* [WebUI] Fix upload buttons disabling
* [WebUI] Notify user on module loading failure
* [WebUI] Update FooTable 3.1.4 -> 3.1.6
* [WebUI] Update FooTable 3.1.4 -> 3.1.6
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ if rule['score'] then
end
~~~

You can also use [`coroutines`](https://rspamd.com/doc/lua/sync_async.html) to simplify your asynchronous code.
You can also use [`coroutines`]({{ site.baseurl }}/doc/developers/sync_async.html) to simplify your asynchronous code.

## Redis requests

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion doc/fuzzy_storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ Initially, rspamd only supported the [siphash](https://en.wikipedia.org/wiki/Sip

For the vast majority of configurations we recommend `mumhash` or `fasthash` (also called `fast`). These algorithms perform well on a wide range of platforms, and `mumhash` is currently the default for all new storage. `siphash` (also called `old`) is only supported for legacy purposes.

You can evaluate the performance of different algorithms yourself by [compiling the tests set]({{ site.baseurl }}/doc/tutorials/writing_tests.html) from rspamd sources:
You can evaluate the performance of different algorithms yourself by [compiling the tests set]({{ site.baseurl }}/doc/developers/writing_tests.html) from rspamd sources:

```
$ make rspamd-test
Expand Down
2 changes: 1 addition & 1 deletion doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ You can also watch some [videos about Rspamd]({{ site.url }}{{ site.baseurl }}/m
Rspamd is shipped with various spam filtering modules and features enabled just out of the box.
The full list of built-in modules could be found in the [modules documentation]({{ site.url }}{{ site.baseurl }}/doc/modules/).

If that is not enough, Rspamd provides an extensive [Lua API]({{ site.url }}{{ site.baseurl }}/doc/lua/) to write your own rules and plugins: <{{ site.url }}{{ site.baseurl }}/doc/tutorials/writing_rules.html>
If that is not enough, Rspamd provides an extensive [Lua API]({{ site.baseurl }}/doc/lua/) to write your own rules and plugins: <{{ site.url }}{{ site.baseurl }}/doc/developers/writing_rules.html>


## License
Expand Down
4 changes: 2 additions & 2 deletions doc/lua/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ title: Lua API documentation

Lua plugins are a powerful tool for creating complex filters that can access practically all features of Rspamd. Lua plugins can be used for writing custom rules which could interact with Rspamd in many ways such as using maps and making DNS requests. Rspamd is shipped with a number of Lua plugins that could be used as examples while writing your own plugins.

Please read the [guide]({{ site.url }}{{ site.baseurl }}/doc/tutorials/writing_rules.html) about writing Lua rules.
Please read the [guide]({{ site.url }}{{ site.baseurl }}/doc/developers/writing_rules.html) about writing Lua rules.

## Lua API reference

You can select the module you are interested in in the list on the left. Some of the modules are implied, for example, if you see `task` in the list of your function arguments it is assumed that you check for [`rspamd_task` module]({{ site.url }}{{ site.baseurl }}/doc/lua/rspamd_task.html). There is also some super globals available, for example [`rspamd_config`]({{ site.url }}{{ site.baseurl }}/doc/lua/rspamd_config.html).

## Using async requests inside plugins

Please read the following [document]({{ site.url }}{{ site.baseurl }}/doc/lua/sync_async.html) that describes the main principles of writing async code in Rspamd.
Please read the following [document]({{ site.baseurl }}/doc/developers/sync_async.html) that describes the main principles of writing async code in Rspamd.

## References

Expand Down
2 changes: 1 addition & 1 deletion doc/modules/metric_exporter.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Metric exporter collects statistics from Rspamd and feeds them to external monit
[Graphite](https://graphiteapp.org/) is the only supported backend for now.

Besides, if you want to use `pull` model to collect statistics from Rspamd, we provide support for [Prometheus](https://prometheus.io/) endpoint.
Please have a look at [Controller worker]({{ site.baseurl }}/doc/workers/controller.html) and [Controller HTTP endpoints]({{ site.baseurl }}/doc/architecture/protocol.html#controller-http-endpoints)
Please have a look at [Controller worker]({{ site.baseurl }}/doc/workers/controller.html) and [Controller HTTP endpoints]({{ site.baseurl }}/doc/developers/protocol.html#controller-http-endpoints)
for further information.

### Configuration
Expand Down
2 changes: 1 addition & 1 deletion doc/modules/regexp.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ config.regexp.BLA = {
}
~~~

Please note that you **cannot** use asynchronous functions, including those with [coroutines](../lua/sync_async.html), in these Lua snippets, as Rspamd will not wait for them to finish. The only way to use such functions in Regexp expressions is to create a dedicated rule that performs asynchronous tasks, register the dependency for the regexp symbol using `rspamd_config:register_dependency('RE_SYMBOL', 'ASYNC_SYMBOL')`, and then call `task:has_symbol('ASYNC_SYMBOL')` in the Lua function defined in the Regexp expression.
Please note that you **cannot** use asynchronous functions, including those with [coroutines]({{ site.baseurl }}/doc/developers/sync_async.html), in these Lua snippets, as Rspamd will not wait for them to finish. The only way to use such functions in Regexp expressions is to create a dedicated rule that performs asynchronous tasks, register the dependency for the regexp symbol using `rspamd_config:register_dependency('RE_SYMBOL', 'ASYNC_SYMBOL')`, and then call `task:has_symbol('ASYNC_SYMBOL')` in the Lua function defined in the Regexp expression.

## Regexp prefilters

Expand Down
2 changes: 1 addition & 1 deletion doc/tutorials/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ title: Rspamd Tutorials
In this section you can find the current step-by-step tutorials coverign various topics about rspamd.

* [Migrating from SA](migrate_sa.html) - the guide for those who wants to migrate an existing SpamAssassin system to Rspamd
* [Writing rspamd rules](writing_rules.html) - how to extend rspamd by writing your own rules
* [Writing rspamd rules]({{ site.baseurl }}/doc/developers/writing_rules.html) - how to extend rspamd by writing your own rules
* [Creating your fuzzy storage]({{ site.url }}{{ site.baseurl }}/doc/fuzzy_storage.html) - learn how to make your own fuzzy storage
* [Contributing to rspamd.com web-site](site_contributing.html) describes general conventions and how to test web-site changes
* [Getting feedback from users with IMAPSieve](feedback_from_users_with_IMAPSieve.html) - how to get a copy of the message moved by user from or into the `Junk` folder
Expand Down
2 changes: 1 addition & 1 deletion doc/workers/rspamd_proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ For users who do not need Milter support, it's generally more efficient to use n

Starting from Rspamd 1.6, the rspamd proxy worker supports the `milter` protocol, which is compatible with popular MTAs like Postfix and Sendmail. This new feature also marks the obsolescence of the [Rmilter](https://rspamd.com/rmilter/) project in recognition of the improved integration method.

To enable Milter mode, use the `milter` boolean worker option. When enabled, the proxy communicates exclusively in the Milter protocol. If disabled, the proxy can be used with Rspamd's native [HTTP protocol](https://rspamd.com/doc/architecture/protocol.html) and the legacy protocol used by Exim.
To enable Milter mode, use the `milter` boolean worker option. When enabled, the proxy communicates exclusively in the Milter protocol. If disabled, the proxy can be used with Rspamd's native [HTTP protocol]({{ site.baseurl }}/doc/developers/protocol.html) and the legacy protocol used by Exim.

It's important to note that Milter support is available in the `rspamd_proxy` worker only. There are two ways to use the Milter protocol:

Expand Down

0 comments on commit c7f1c43

Please sign in to comment.