website icon indicating copy to clipboard operation
website copied to clipboard

Integrate plugins' documentation

Open metcoder95 opened this issue 11 months ago • 5 comments

metcoder95 avatar Jul 30 '23 11:07 metcoder95

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

metcoder95 avatar Jul 30 '23 11:07 metcoder95

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

Eomm avatar Aug 05 '23 16:08 Eomm

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?

metcoder95 avatar Aug 06 '23 11:08 metcoder95

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:

  • write down the topic list in order
  • identify what is not essential (eg: starting a server must be discussed in another page)
  • then cut-paste from the older markdown what has already be done
  • write the sections that are in the topic list but where not in the older doc
  • grammarly FTW
  • commit&push&open a PR

Eomm avatar Aug 09 '23 15:08 Eomm

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

metcoder95 avatar Aug 09 '23 21:08 metcoder95