From 3c957e9b0e5b37f8234b5e9bbbf04312e5c70f21 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Sun, 12 Mar 2023 21:31:29 +0100 Subject: [PATCH] docs: Move 'Events' to design docs Signed-off-by: David Mehren --- docs/content/dev/{ => design_docs}/events.md | 8 ++++++-- docs/mkdocs.yml | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) rename docs/content/dev/{ => design_docs}/events.md (52%) diff --git a/docs/content/dev/events.md b/docs/content/dev/design_docs/events.md similarity index 52% rename from docs/content/dev/events.md rename to docs/content/dev/design_docs/events.md index 17a3f409a..81579727c 100644 --- a/docs/content/dev/events.md +++ b/docs/content/dev/design_docs/events.md @@ -1,8 +1,12 @@ -In HedgeDoc we use an event system based on [EventEmitter2][eventemitter2]. It's used to reduce circular dependencies between different services and inform these services about changes. +# Events + +In HedgeDoc 2, we use an event system based on [EventEmitter2][eventemitter2]. +It's used to reduce circular dependencies between different services and inform these services about changes. HedgeDoc's system is basically [the system NestJS offers][nestjs/eventemitter]. The config for the `EventEmitterModule` is stored in `events.ts` and exported as `eventModuleConfig`. -In the same file enums for the event keys are defined. Each of these events is expected to be sent with an additional value. In the enum defintion a comment should tell you what exactly this value should be. +In the same file enums for the event keys are defined. Each of these events is expected to be sent with an additional value. +In the enum definition a comment should tell you what exactly this value should be. [eventemitter2]: https://github.com/EventEmitter2/EventEmitter2 [nestjs/eventemitter]: https://docs.nestjs.com/techniques/events diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index c87d6bb83..755a3703d 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -23,6 +23,7 @@ nav: - '2.0 Development': dev/2.0.md - Design Documents: - API Authentication: dev/design_docs/api_auth.md + - Events: dev/design_docs/events.md - Notes: dev/design_docs/notes.md - 'User Profiles & Authentication': dev/design_docs/user_profiles.md - Configuration: dev/design_docs/config.md