Skip to content

[Docs Bug] npm webhint (hint) page: 404s #3792

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

Closed
henrihelvetica opened this issue Jun 1, 2020 · 7 comments · Fixed by #3937
Closed

[Docs Bug] npm webhint (hint) page: 404s #3792

henrihelvetica opened this issue Jun 1, 2020 · 7 comments · Fixed by #3937
Assignees
Labels
area:documentation msft-consider Issues being considered for contributions from Microsoft priority:medium type:bug
Milestone

Comments

@molant
Copy link
Member

molant commented Jun 1, 2020

This is because we optimized for local links when publishing so you open the local version. Looks like there is an issue between npm an mono repos when they create the links automatically.

Options:

  • Research if there's a way to link to a specific folder in package.json and not just a repo (this will be the ideal scenario)
  • Make a not for those reading from npm that they should go to the website to make sure all links are working and have access to more information
  • Update those links to point to the right versions of the website. This could maybe mess with the link transformation step we have with the website

@hxlnt
Copy link
Member

hxlnt commented Jun 4, 2020

Like this? From https://docs.npmjs.com/files/package.json#repository:

If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives:

"repository": {
  "type" : "git",
  "url" : "https://github.com/facebook/react.git",
  "directory": "packages/react-dom"
}

@molant
Copy link
Member

molant commented Jun 4, 2020

Yes, like this. I believe we tried that a while ago but wasn't working but maybe we should try again?

@hxlnt hxlnt added agenda msft-consider Issues being considered for contributions from Microsoft labels Jun 10, 2020
@hxlnt hxlnt added this to the 2006-2 milestone Jun 12, 2020
@hxlnt hxlnt modified the milestones: 2006-2, 2007-1 Jun 26, 2020
@hxlnt hxlnt removed the agenda label Jul 10, 2020
@hxlnt hxlnt modified the milestones: 2007-1, 2007-2 Jul 10, 2020
@hxlnt
Copy link
Member

hxlnt commented Aug 7, 2020

@johnemau Tony thinks we already implement this fix above, and that it's possible this may be a bug on npm. Do you mind taking a look?

@johnemau
Copy link
Contributor

johnemau commented Aug 7, 2020

Update those links to point to the right versions of the website. This could maybe mess with the link transformation step we have with the website

@molant, after researching the root cause in npm (npm/marky-markdown#449) I went with this fix (#3937) from your comment.

Can you clarify how this might "mess with the link transformation step" ? How can I check if this is the case?

@molant
Copy link
Member

molant commented Aug 7, 2020

Good question. Before we were cloning the latest version of master in webhint.io, but now we are pulling the latest npm packages.

I think that a way would be clone the website's repo locally, install all dependencies, manually update a couple of the files you've modified, and then run the generation scripts to see what comes out of that.

johnemau added a commit that referenced this issue Aug 24, 2020
hint-axe docs are now generated at build time so the relative path is only good for post build local install of the repository and results in 404s for anyone browsing github or npmjs.org (the more common scenario).

To give the best experience for the more common scenario this change directs the links to webhint.io which will have the information from the latest release.

Follow-up to #3937 
Fixes #3792
@johnemau
Copy link
Contributor

I think that a way would be clone the website's repo locally, install all dependencies, manually update a couple of the files you've modified, and then run the generation scripts to see what comes out of that.

@molant, tested it out after webhintio/webhintio.github.io#934, and my fix worked #3967

antross pushed a commit that referenced this issue Aug 24, 2020
antross added a commit that referenced this issue Aug 24, 2020
hint-axe docs are now generated at build time so the relative path is only
good for post build local install of the repository and results in 404s for
anyone browsing github or npmjs.org (the more common scenario).

To give the best experience for the more common scenario this change
directs the links to webhint.io which will have the information from the
latest release.

- - - - - - - - - - - - - - - - - - - -

Ref #3937 
Fix #3792
Close #3967

Co-authored-by: Tony Ross <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:documentation msft-consider Issues being considered for contributions from Microsoft priority:medium type:bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants