fastify / website

https://fastify.dev/
MIT License
60 stars 63 forks source link

Integrate plugins' documentation #132

Open metcoder95 opened 1 year ago

metcoder95 commented 1 year ago

Hey @Eomm can you help me elaborate a little bit more about this one?

Eomm commented 1 year ago

I was thinking of enhancing the plugin section: https://fastify.dev/docs/latest/Guides/Write-Plugin

We have sparse docs and we never mention encapsulation here

metcoder95 commented 1 year ago

Got it, I believe the plugins concept of fastify is quite powerful and it really deserves its own more robust guide. The topics that should cover by default are encapsulation and how it works (I remember your diagram in the form of graphs, that will be super helpful), gotchas (e.g. the onRoute plugins need to be awaited to have an effect on the instance).

But maybe this can go right into the plugin reference section instead, and we continue leaving the guide to showcase best practices while writing fastify plugins. What do you have in mind to kick-off the work?

Eomm commented 1 year ago

What do you have in mind to kick-off the work?

We need to fix the main fastify repo, we have tons of docs that need to be rewritten in a clearer way imho

So I would start from a new doc:

metcoder95 commented 1 year ago

Nice! Let's do that, I'll prepare some small doc to list the topic, to discuss its order, and we can use it as kick-off for the work