webpack.js.org icon indicating copy to clipboard operation
webpack.js.org copied to clipboard

add r/webpack page

Open chenxsan opened this issue 4 years ago • 2 comments

An experiment for https://github.com/webpack/webpack/pull/13822#pullrequestreview-709439528

  1. from: https://webpack.js.org/r/webpack/?option=output/filename
  2. to: https://webpack.js.org/configuration/output/#outputfilename

Currently we can only make those redirections happen on client side as a single page application hosted on github pages won't support any server side redirects, i.e., urls of https://webpack.js.org/webpack-options/output/chunk-load-timeout type won't work unless we generate every intermediate page for them.

Example: https://webpack-js-org-git-fork-chenxsan-feature-ha-97c6dc-webpack-docs.vercel.app/r/webpack/?option=output/filename

chenxsan avatar Jul 19 '21 12:07 chenxsan

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/webpack-docs/webpack-js-org/A3wjw23KTAQfn2pu9HhAggc3FrTi
✅ Preview: https://webpack-js-org-git-fork-chenxsan-feature-ha-97c6dc-webpack-docs.vercel.app

vercel[bot] avatar Jul 19 '21 12:07 vercel[bot]

I'm afraid these's no one-size-fits-all solution as the documents don't share a common pattern.

E.g.,

  1. /configuration/module/#modulegenerator
  2. /configuration/module/#rulelayer

This pull request would work only for the first pattern. And there could be other patterns besides the aforementioned two.

Anyway we can maintain a redirect map like below on this repository:

{
  'output/filename': '/configuration/output/#outputfilename',
}

But I don't think it's a good idea, there could be hundreds of options. Generally I think we should just let users take advantage of the search function on our documentation site.

chenxsan avatar Jul 26 '21 11:07 chenxsan