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

v4.webpack.js.org #3366

Open
EugeneHlushko opened this issue Nov 19, 2019 · 2 comments
Open

v4.webpack.js.org #3366

EugeneHlushko opened this issue Nov 19, 2019 · 2 comments

Comments

@EugeneHlushko
Copy link
Member

EugeneHlushko commented Nov 19, 2019

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"
@niravasher
Copy link
Contributor

niravasher commented Dec 30, 2019

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

@andrew-pyle
Copy link

@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?

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

Successfully merging a pull request may close this issue.

4 participants