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: Rewrite and restructure the documentation website #933

Open
wants to merge 22 commits into
base: main
Choose a base branch
from

Conversation

aklinker1
Copy link
Collaborator

@aklinker1 aklinker1 commented Aug 20, 2024

@aklinker1 aklinker1 self-assigned this Aug 20, 2024
@aklinker1 aklinker1 added the docs Improvements or additions to documentation label Aug 20, 2024
Copy link

netlify bot commented Aug 20, 2024

Deploy Preview for creative-fairy-df92c4 ready!

Name Link
🔨 Latest commit 83caf62
🔍 Latest deploy log https://app.netlify.com/sites/creative-fairy-df92c4/deploys/67007217b4f2490008b9ee0b
😎 Deploy Preview https://deploy-preview-933--creative-fairy-df92c4.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Comment on lines 38 to 103
# https://github.com/wxt-dev/wxt/issues/704
# Generated via `find docs/.vitepress/dist -type f -name "*.html"`
/guide/i18n/build-integrations.html /TODO
/guide/i18n/introduction.html /TODO
/guide/i18n/messages-file-format.html /TODO
/guide/i18n/editor-support.html /TODO
/guide/i18n/installation.html /TODO
/guide/key-concepts/content-script-ui.html /TODO
/guide/key-concepts/manifest.html /TODO
/guide/key-concepts/wxt-submit.html /TODO
/guide/key-concepts/auto-imports.html /TODO
/guide/key-concepts/web-extension-polyfill.html /TODO
/guide/key-concepts/frontend-frameworks.html /TODO
/guide/key-concepts/multiple-browsers.html /TODO
/guide/go-further/entrypoint-loaders.html /TODO
/guide/go-further/es-modules.html /TODO
/guide/go-further/handling-updates.html /TODO
/guide/go-further/custom-events.html /TODO
/guide/go-further/debugging.html /TODO
/guide/go-further/remote-code.html /TODO
/guide/go-further/vite.html /TODO
/guide/go-further/testing.html /TODO
/guide/go-further/how-wxt-works.html /TODO
/guide/go-further/reusable-modules.html /TODO
/guide/extension-apis/messaging.html /TODO
/guide/extension-apis/i18n.html /TODO
/guide/extension-apis/storage.html /TODO
/guide/extension-apis/scripting.html /TODO
/guide/extension-apis/others.html /TODO
/guide/upgrade-guide/wxt.html /TODO
/guide/directory-structure/components.html /TODO
/guide/directory-structure/hooks.html /TODO
/guide/directory-structure/assets.html /TODO
/guide/directory-structure/package.html /TODO
/guide/directory-structure/env.html /TODO
/guide/directory-structure/wxt-config.html /TODO
/guide/directory-structure/wxt.html /TODO
/guide/directory-structure/public/locales.html /TODO
/guide/directory-structure/public/index.html /TODO
/guide/directory-structure/entrypoints/devtools.html /TODO
/guide/directory-structure/entrypoints/sidepanel.html /TODO
/guide/directory-structure/entrypoints/content-scripts.html /TODO
/guide/directory-structure/entrypoints/newtab.html /TODO
/guide/directory-structure/entrypoints/bookmarks.html /TODO
/guide/directory-structure/entrypoints/unlisted-pages.html /TODO
/guide/directory-structure/entrypoints/unlisted-scripts.html /TODO
/guide/directory-structure/entrypoints/options.html /TODO
/guide/directory-structure/entrypoints/background.html /TODO
/guide/directory-structure/entrypoints/popup.html /TODO
/guide/directory-structure/entrypoints/history.html /TODO
/guide/directory-structure/entrypoints/sandbox.html /TODO
/guide/directory-structure/entrypoints/css.html /TODO
/guide/directory-structure/web-ext-config.html /TODO
/guide/directory-structure/tsconfig.html /TODO
/guide/directory-structure/utils.html /TODO
/guide/directory-structure/app-config.html /TODO
/guide/directory-structure/composables.html /TODO
/guide/directory-structure/output.html /TODO
/get-started/assets.html /TODO
/get-started/introduction.html /TODO
/get-started/configuration.html /TODO
/get-started/publishing.html /TODO
/get-started/migrate-to-wxt.html /TODO
/get-started/compare.html /TODO
/get-started/entrypoints.html /TODO
/get-started/installation.html /TODO
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO

Copy link

codecov bot commented Aug 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.12%. Comparing base (0bf0832) to head (83caf62).
Report is 21 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #933      +/-   ##
==========================================
- Coverage   82.21%   82.12%   -0.10%     
==========================================
  Files         127      127              
  Lines        6625     6634       +9     
  Branches     1103     1103              
==========================================
+ Hits         5447     5448       +1     
- Misses       1164     1172       +8     
  Partials       14       14              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aklinker1 aklinker1 changed the title Add placeholder redirects for all pages that are changing docs: Restructure Aug 20, 2024
@aklinker1 aklinker1 changed the title docs: Restructure docs: Rewrite and restructure all docs Aug 20, 2024
@aklinker1 aklinker1 changed the title docs: Rewrite and restructure all docs docs: Rewrite and restructure the documentation website Aug 20, 2024
Copy link

pkg-pr-new bot commented Sep 28, 2024

Open in Stackblitz

@wxt-dev/auto-icons

pnpm add https://pkg.pr.new/@wxt-dev/auto-icons@933

@wxt-dev/i18n

pnpm add https://pkg.pr.new/@wxt-dev/i18n@933

@wxt-dev/module-svelte

pnpm add https://pkg.pr.new/@wxt-dev/module-svelte@933

@wxt-dev/module-solid

pnpm add https://pkg.pr.new/@wxt-dev/module-solid@933

@wxt-dev/module-react

pnpm add https://pkg.pr.new/@wxt-dev/module-react@933

@wxt-dev/module-vue

pnpm add https://pkg.pr.new/@wxt-dev/module-vue@933

wxt

pnpm add https://pkg.pr.new/wxt@933

commit: 83caf62

@aklinker1 aklinker1 marked this pull request as ready for review September 29, 2024 14:38
@placoderm
Copy link

Do you want us to put specific comments on the wording of things in the new docs here? For example on this page this phrase is tripping me up:

All files inside the entrypoints/ directory are built by WXT and bundled into the .output directory.

That doesn't mean WTX creates them, though? WTX uses them to build the final files, right? Maybe I'm just not familiar with the proper terminology.

@aklinker1
Copy link
Collaborator Author

Do you want us to put specific comments on the wording of things in the new docs here?

Yup, that's fine!

@aklinker1
Copy link
Collaborator Author

That doesn't mean WTX creates them, though? WTX uses them to build the final files, right? Maybe I'm just not familiar with the proper terminology.

I see how it could be read that way... Let's update it! What about this?

WXT uses the files inside the entrypoints/ directory as inputs when bundling your extension.

@placoderm
Copy link

Perfect!

@aklinker1 aklinker1 mentioned this pull request Sep 30, 2024
25 tasks
@placoderm
Copy link

This is just a formatting thing, but in the old docs the number of sub items was styled:

image

Now they aren't:

image

Copy link
Contributor

@Timeraa Timeraa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
These feature links are all not working anymore except modular architecture

@placoderm
Copy link

Small misspelling here

Warning: run_at Caveots

Should be "caveat" I think. I mean, it should be spelled the way you wrote, but unfortunately it isn't, 😅

@aklinker1
Copy link
Collaborator Author

This is just a formatting thing, but in the old docs the number of sub items was styled:

@placoderm Fixed

These feature links are all not working anymore except modular architecture

@Timeraa fixed

Should be "caveat" I think

@placoderm fixed

I'm using Zed, which doesn't have a spellcheck plugin yet, so there's probably a lot of these lol...

@aklinker1
Copy link
Collaborator Author

Sent all the files through AI, and it found lots of typos. They should all be fixed now.

@Timeraa
Copy link
Contributor

Timeraa commented Oct 3, 2024

https://deploy-preview-933--creative-fairy-df92c4.netlify.app/guide/resources/migrate.html
image
Third checklist item is not at the next line

@placoderm
Copy link

I'm not sure the level of knowledge you are expecting from the folks reading the docs.

For example in the vite plugin instructions It wasn't clear to me that at the top of my wxt.config.ts file I needed to import the plugin. It also wasn't clear that instead of just putting the name of the plugin, this is where all the arguments for the function went.

Instead of:

To add a plugin, install it and add it to the config:

Perhaps it could say:

To add a plugin, install it, import the function and add the function with parameters to the config:

Personally I would have appreciated an example like this:

import { defineConfig } from "wxt";
import removeConsole from "vite-plugin-remove-console";

export default defineConfig({
  vite: () => ({
    plugins: [removeConsole({ includes: ["log"] })],
  }),
});

Again, I don't know what level of user you are targeting.

@aklinker1
Copy link
Collaborator Author

I'm not sure the level of knowledge you are expecting from the folks reading the docs.

For example in the vite plugin instructions It wasn't clear to me that at the top of my wxt.config.ts file I needed to import the plugin. It also wasn't clear that instead of just putting the name of the plugin, this is where all the arguments for the function went.

Again, I don't know what level of user you are targeting.

I expect people to read Vite's docs if they want to learn more about Vite's features. On that page, I felt my only requirements were to show people how to add vite config and mention that they can use Vite plugins. I do think adding a plugin as an example is a good idea. I got a bit lazy there.

@placoderm
Copy link

I do think adding a plugin as an example is a good idea. I got a bit lazy there.

If there is anything you can be accused of it is certainly not being lazy, lol. You have done a huge service to your community of users.

After I posted the above snippet I realize that it was working, but not the way I intended. I wanted to see the .logs in dev but not production. @1natsu172 was kind enough to give me better code. You may like to use this instead since it explains a common pattern:

vite: (configEnv) => ({
    plugins: [configEnv.mode === "production" && removeConsole({ includes: ["log"] })],
  }),

@aklinker1
Copy link
Collaborator Author

That's a good example of the differences between vite plugins and how they're used in WXT. I'll add a different example for the basic setup, and add that one as an example for the behavior differences section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to documentation
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

Doc Structure Improvements
4 participants