Skip to content
This repository has been archived by the owner on Aug 8, 2019. It is now read-only.

Concept sketch: Search + Autocomplete #75

Closed
pastelsky opened this issue Jul 10, 2016 · 2 comments
Closed

Concept sketch: Search + Autocomplete #75

pastelsky opened this issue Jul 10, 2016 · 2 comments

Comments

@pastelsky
Copy link

pastelsky commented Jul 10, 2016

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 -

  • Configuration Results
  • Plugin Results
  • Node API results
  • CLI Results
    etc.

Schema

{
  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
Copy link

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
Copy link
Member

Closing because search has been implemented in the current docs, and for the new docs there is webpack/webpack.js.org#184.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants