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

Docs: Link to Edit (Contribute) gives 404 on "configuration-files-new" #17965

Open
1 task
martypdx opened this issue Jan 6, 2024 · 6 comments
Open
1 task
Assignees
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion bug ESLint is working incorrectly documentation Relates to ESLint's documentation repro:yes

Comments

@martypdx
Copy link

martypdx commented Jan 6, 2024

Docs page(s)

https://eslint.org/docs/latest/use/configure/configuration-files-new

What documentation issue do you want to solve?

The "Edit File" button links to 404

What do you think is the correct solution?

Instead of linking to

https://github.com/eslint/eslint/edit/main/docs/src/use/configure/configuration-files-new.md

I believe it should link to:

https://github.com/eslint/eslint/edit/main/docs/src/use/configure/configuration-files.md

Participation

  • I am willing to submit a pull request for this change.

Additional comments

No response

@martypdx martypdx added the documentation Relates to ESLint's documentation label Jan 6, 2024
@snitin315 snitin315 added accepted There is consensus among the team that this change meets the criteria for inclusion bug ESLint is working incorrectly repro:yes labels Jan 7, 2024
@snitin315
Copy link
Contributor

snitin315 commented Jan 7, 2024

Thanks for the report, actually we auto-generate these links (since #16213), and the logic seems to be pointing to the main branch regardless of the eslint version.

edit_link:
start_with: https://github.com/eslint/eslint/edit/main/docs/
text: Edit this page

<div class="docs-edit-link">
<a href="
{% if edit_link %}
{{ edit_link }}
{% else %}
{{ site.edit_link.start_with }}{{ page.inputPath }}
{% endif %}
"
class="c-btn c-btn--secondary">{{ site.edit_link.text }}</a>
</div>

So if you see docs for NEXT or HEAD, the Edit the Page button correctly links to https://github.com/eslint/eslint/edit/main/docs/src/use/configure/configuration-files.md

@snitin315 snitin315 added evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion and removed accepted There is consensus among the team that this change meets the criteria for inclusion labels Jan 7, 2024
@snitin315
Copy link
Contributor

I'm unsure if this is a bug or a limitation for our docs. We can provide edit links only for branches that exist, however for published releases we maintain tags which don't support editing files.

I'd like to know other team members' opinions on how to treat this case. cc @eslint/website-team

Screenshot 2024-01-07 at 9 30 09 AM

@kecrily
Copy link
Member

kecrily commented Jan 7, 2024

I think that should be a limit. Maybe we shouldn't show the edit button on released versions.

@martypdx
Copy link
Author

martypdx commented Jan 7, 2024

My assumption is that the purpose of the Edit Button is to make it easy to fork, edit markdown on Github, and PR to promote contributions. It is an invitation to help correct, clarify, and contribute.

Curious in practice for eslint if that happens, does the "Edit Button" lead to useful contributions?

I think that should be a limit. Maybe we shouldn't show the edit button on released versions.

In theory, assuming the docs are complete on release and don't need further input seems short-sighted. But if the edit button is not productive for generating contributions, then as maintainers I could see limiting that.

@nzakas
Copy link
Member

nzakas commented Jan 11, 2024

This is just a quirk of the release that we should find a way to fix. This is the first major release we've had with the new docs site and there are all kinds of little inconsistencies we've found.

The docs for v8 are contained in the latest branch, and so we should be able to link to that only when there's a next branch. Sending PRs to the latest branch will trigger rebuilding the docs site and get it updated automatically.

So basically, what we should have is...

When we are in prerelease

  1. Docs at /docs/latest should point their edit buttons at the latest branch
  2. Docs at /docs/next should point their edit buttons at the main branch
  3. Docs at /docs/head should point their edit buttons at the main branch

When we are not in prerelease

  1. Docs at /docs/latest should point their edit buttons at the main branch
  2. Docs at /docs/head should point their edit buttons at the main branch

(I'm also realizing this is super confusing and we probably need to revisit this approach after v9 is finalized.)

@snitin315 snitin315 added accepted There is consensus among the team that this change meets the criteria for inclusion and removed evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion labels Jan 18, 2024
@snitin315 snitin315 self-assigned this Feb 9, 2024
@snitin315
Copy link
Contributor

I'll give this a shot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion bug ESLint is working incorrectly documentation Relates to ESLint's documentation repro:yes
Projects
Status: Ready to Implement
Development

No branches or pull requests

4 participants