nuxt / nuxt/nuxt.com

[Proposal] Unified Nuxt Documentation Experience

Open
#2,242 8 comments 20 reactions 1 assignee View on GitHub

@atinux is already working on this.

Since Nov 20, 2023.

Dominant language
TypeScript
Stars
457
Forks
272
Avg merge
13h 33m
Merged PRs (30d)
23

Description

Motivation

Nuxt leverage the unjs ecosystem for core parts of the framework, mainly Nitro, H3 and oftech.
While the UnJS ecosystem can be used stand-alone, the majority of its users comes from Nuxt.

Yet, the experience while looking for information about Nuxt in general is often disjointed, due to Nuxt.com and Nitro being separated website, and h3/ofetch currently not having dedicated websites https://github.com/unjs/h3/issues/418

This makes it hard to reason about Nuxt for newcomers, when they will look for how to do something in the docs, won't find it, then have to navigate to the Nitro website, or the github READMEs for H3 or oftech, or googling / finding information in articles.

With separated websites, the information is not searchable and accessible easily. We could have a single algolia index that search throughout Nuxt/Nitro/H3.
It's something that cloudflare does well, the search bar can jump from one product to the other seamlessly.

image

Proposal

For Nuxt

Integrate H3, Nitro and ofetch in the nuxt.com website, such so that we have

and one search bar that can be used to reference the content of all 3.
This would remove the duplicated content accross Nuxt and these website, are they would use the same source.

For Nitro, H3 and ofetch

Since these tools are meant to be used either standalone or with Nuxt, we could have a nuxt version for them.
This can be implemented with a NuxtOnly and a StandAlone component that we can use to wrap docs paragraph or code examples.

Using Nitro as an example, this would serve multiple purposes :

  • Documentation for Nitro and Nuxt would share the same source of truth
  • Nitro would still have a standalone website that would be identical to what it is today
  • Nitro would feel more integrated under the Nuxt umbrella as its docs would be accessible without navigating to an external page. Wether they're the same Nuxt app, or there's is one website for each subdocs is an implementation detail.

Additionally, the Nitro website could use a toggle like the vue composition/options api switcher :
image
This toggle would enable nuxt or standalone instructions. It would be hidden inhttps://nuxt.com/docs/nitro/ which would default to Nuxt, and would be either hidden or visible in https://nitro.unjs.io/ which would default to standalone.

Extra toughts

There are also additional libraries that are used by Nuxt such as vue, vite, vue-router, but this doesn't affect the experience as bad as Nitro/h3. However a similar system can be adopted for unjs libraries that are end-user facing and auto-imported.
Where this makes sense. Perhaps Unstorage/db0 as they come with Nitro/Nuxt.

Additional information
  • Would you be willing to help implement this feature?
  • Could this feature be implemented as a module?
Final checks

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.