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

v4.webpack.js.org

Open EugeneHlushko opened this issue 5 years ago • 2 comments

Known issues:

  • search results link to the wrong domain
  • edit page links to wrong branch

Features missing:

  • persistent message on top saying that "You are browsing old docs"

EugeneHlushko avatar Nov 19 '19 12:11 EugeneHlushko

function offsetAnchor() {
  if(location.hash.length !== 0) {
      window.scrollTo(window.scrollX, window.scrollY - 100);
  }
}
window.addEventListener('hashchange', offsetAnchor);
window.setTimeout(offsetAnchor, 1);

Adding this part of code to src/components/Link/link.jsx file solves the first part of the issue. Now search results link to the right position on all pages.

Clicking on creating a bundle Screenshot from 2019-12-30 13-10-55

Position on webpack.js.org Screenshot from 2019-12-30 13-19-38

Position on my localhost Screenshot from 2019-12-30 13-30-10

Should I open up a PR here? Also for the second part of the issue, which branch should it redirect? It says will redirect to new branch in my fork @EugeneHlushko @montogeek @evenstensberg

niravasher avatar Dec 30 '19 08:12 niravasher

@EugeneHlushko @montogeek Thank you for your work here.

I'm interested in working on these objectives for https://v4.webpack.js.org/. Can someone describe in a little more detail how the site is deployed from the gh-pages branch of thev4.webpack.js.org repo?

I see that thev4.webpack.js.org repo does not include the logic and application code—only the content for webpack 4.

Could someone contrast how https://v4.webpack.js.org/ is deployed versus how https://webpack.js.org/ is deployed?

What context is provided so that each site is aware of the other? I see that src/components/Sidebar/Sidebar.jsx includes some client-side logic, but it's not clear to me how a deployment knows if it is for webpack 4 or webpack 5

const docs = [
  {
    version: 5,
    url: 'https://webpack.js.org',
  },
  {
    version: 4,
    url: 'https://v4.webpack.js.org',
  }
];

const currentDocsVersion = 5;

Basically, how does a deployment know whether it is v4 or v5 if the web application codebase is shared between them?

andrew-pyle avatar Sep 07 '20 20:09 andrew-pyle