Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs rethink #2071

Closed
mcollina opened this issue Feb 1, 2020 · 13 comments
Closed

Docs rethink #2071

mcollina opened this issue Feb 1, 2020 · 13 comments
Labels
discussion Issues or PRs with this label will never stale documentation Improvements or additions to documentation

Comments

@mcollina
Copy link
Member

mcollina commented Feb 1, 2020

I think we might want to start thinking on how we can improve our docs.
fastify/website#145 is an example of a better Table of Contents and a change of structure in the Fastify docs. I would like to generalize that a bit.

In our docs, we mix the concept of a guide vs the concept of an API reference. In most cases, we teach how to use the framework but it's not clear where we document all the APIs. Viceversa, some of the guides are interleaved with API reference and it confuses folks on how to do things with Fastify.

As an example, we have https://www.fastify.io/docs/latest/Plugins/ and https://www.fastify.io/docs/latest/Write-Plugin/, https://www.fastify.io/docs/latest/Plugins-Guide/ and https://www.fastify.io/ecosystem/. Moreover, some of the plugins provide critical functionality such as fastify-static or fastify-cookie (and many others). We have a discoverability problem.

I propose to structure things as follows:

  • Guides
    • Getting started
    • Structure your project
    • Request lifecycle
    • async/await and callbacks
    • How encapsulation work (decorators)
    • Parsing Content Types
    • Serverless
    • Typescript
    • LTS
    • Testing
  • ....
  • API Reference
    • Server
    • Request
    • Reply
    • ... everything else I have forgot

What do you think?

cc @fastify/core @davidmarkclements @Sambaboy

@Eomm
Copy link
Member

Eomm commented Feb 1, 2020

I would add in Guides:

  • Plugin
    • "For sure you are interested in.."
      • Authentication
      • CORS
      • Throws errors (fastify-sensible)

@jsumners
Copy link
Member

jsumners commented Feb 1, 2020

Totally agree. Our docs are quite a mess.

@Sambaboy
Copy link

Sambaboy commented Feb 1, 2020 via email

@Ethan-Arrowood
Copy link
Member

I have a fair amount of guides / examples in the new TypeScript docs. I’m very happy with them and would love to see them in their own section of the docs.

While we are discussing a documentation redesign, what about a ‘typescript’ toggle similar to the ‘async’ toggle? This would really help boost Fastify as the leading TypeScript web server framework

@mcollina
Copy link
Member Author

mcollina commented Feb 1, 2020

While we are discussing a documentation redesign, what about a ‘typescript’ toggle similar to the ‘async’ toggle? This would really help boost Fastify as the leading TypeScript web server framework

I would love this. However most of the docs are part of the .md file in this repo, and the toggle is managed on the website. I'd like to retain a style of the md files that is github-friendly. Could we automate that?

@Ethan-Arrowood
Copy link
Member

I'm also thinking about it now, and most typescript versions of the examples are not different from the javascript version. so maybe a typescript toggle isn't the right thing to use here.

What might be better is to include links from certain parts to the TypeScript details docs of that part (i.e. Routing).

I'm going to split up my current TypeScript pr so that the examples are in their own files. This should help a lot in making the page more readable

@delvedor delvedor added discussion Issues or PRs with this label will never stale documentation Improvements or additions to documentation labels Feb 10, 2020
@vrushti-mody
Copy link

How about splitting it into four sections as mentioned in this documentation guide? https://documentation.divio.com/

@mcollina
Copy link
Member Author

I agree with said structure.
I think a good inspiration should be https://www.gatsbyjs.org.

@Sambaboy
Copy link

Speaking as a tech writer, the quad section structure vrushti-mody is a good conceptual prompt. Agree w/ mcollina that the Gatsby is a good framework. "Quick Start" is good way to start off after an Intro. Splitting Libraries into labels: Starter and Plugin (maybe for Fastify call it "Options" since 'plugin' has a special meaning in Fastify jargon. Gatsby has a Cheat Sheet section with a PDF download. That is Brilliant!!! Ciao!

@Eomm
Copy link
Member

Eomm commented Jan 28, 2022

@luisorbaiceta Do you think we can close here?

@jsumners
Copy link
Member

I think we have only just gotten started with this. The addition of guides support and the reorganization of docs laid the groundwork for being able to add the guides suggested in the original post.

@luisorbaiceta
Copy link
Member

Agree with @jsumners. Now that we can nest content, comes the interesting part of the issue, the content itself. It terms of the website, the next thing would be: fastify/website#273

@Eomm
Copy link
Member

Eomm commented Aug 26, 2023

Superseded by: https://github.com/orgs/fastify/projects/7

Closing

cc @metcoder95 there are ideas here!

@Eomm Eomm closed this as not planned Won't fix, can't repro, duplicate, stale Aug 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Issues or PRs with this label will never stale documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

8 participants