webpack / docs

[OLD] documentation for webpack
http://webpack.github.io/docs/
1.46k stars 127 forks source link

Concept sketch: Search + Autocomplete #75

Closed pastelsky closed 7 years ago

pastelsky commented 8 years ago

Motivation

I'm glad the webpack team is willing to accept contributions to revamp its documentation. One of the major challenges I faced after learning webpack basics was just sifting through the docs to find appropriate examples and configuration values.

While chapterwise organisation and #69 would be helpful, sometimes search would serve to be quicker way to navigate through the vast API surface webpack has.

Concept

image Note: Information shown is for illustrative purposes only.

LHS

Text based search for keyword. Similar to google search results.

RHS

Semantic search results in the webpack API interface. Result sections can be divided into -

{
  config: [{
  name:resolve,
  short_description: "Options affecting the resolving of modules",
  link: "https://webpack.github.io/docs/configuration.html#resolve"
  options: [{
    name: "alias"
    short_description: "When trying to “resolve a module path” the module name is matched to the resolve.alias option",
        link:"..." //link
    }],
  }],
  plugins: [{
    // ...
  }],
  api: [{
    //...
  }],
}

Implementation

One could give the existing documentation the form of a JSON based API, with the nested structure coming from page hierarchy - Page -> H1 -> H2 -> H3 -> H4 and so on.

Or, documentation itself can be stored as a JSON and pages constructed out of it. I've not given this much thought.

skipjack commented 8 years ago

I really like this idea, however it would probably be more of a phase 2 thing in the new repository. I think getting the new content and basic layout done is the most important step right now, but this would definitely be a useful feature to integrate down the road. I'll take a look at this again later and maybe move this issue over there.

SpaceK33z commented 7 years ago

Closing because search has been implemented in the current docs, and for the new docs there is https://github.com/webpack/webpack.js.org/issues/184.