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

Fix links in warnings and errors #2471

Merged
merged 2 commits into from Oct 4, 2018
Merged

Conversation

lukastaegert
Copy link
Member

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (I.e. most of the links were tested and of course I adjusted the tests as well)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

List any relevant issue numbers:

Description

One of the nicer features of Rollup is that some errors and warnings contain urls linking to further information. Since the plugin and troubleshooting sections are now part of the website, I used this chance to go through all these links, fix the broken ones and make sure all wiki links now point to the website instead. Once this is released, we can definitely replace the troubleshooting section in the wiki with a link to the website as well.

@shellscape
Copy link
Contributor

shellscape commented Sep 22, 2018

Kind of an aside, but do you think there's reason enough to use a permalink redirect system (shortlink, or other) for links in code? The thought being that the shortlinks could be updated to redirect to any destination and the code wouldn't have to change (and older releases wouldn't contain bad urls as a result)

@lukastaegert
Copy link
Member Author

Depending on how we would set this up, I think this is a really good idea!

From my experience adjusting the links, one major issue is that changes to the markdown files can change the actual links as those are calculated from the headlines, cf. e.g. my adjustments to the links for the output.exports option.

What we could do is to add a list of short, fixed links to the website that are automatically resolved to the actual links by the server. We could then add a script to the website that is e.g. run on linting that calculates all existing link targets by running the markdown converter and collecting the id attributes. Then we check if all needed targets still exist.

If we manage the forwarding by hand, we could even make sure the short links are at least somewhat memorable.

@lukastaegert
Copy link
Member Author

Ok, re-reading what you wrote, this is more or less what you proposed ;)

@shellscape
Copy link
Contributor

Haha yes exactly

@lukastaegert
Copy link
Member Author

@shellscape I guess there is no reason not to merge this for now, is it? The permalink idea would definitely require a little more work, no reason to have wrong links until then.

@shellscape
Copy link
Contributor

Agreed. It's a value add. :shipit:

@lukastaegert lukastaegert merged commit ee1aa48 into master Oct 4, 2018
@lukastaegert lukastaegert deleted the fix-warning-and-error-urls branch October 4, 2018 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants