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: Use inline image link in faq.md #35413

Merged
merged 2 commits into from Sep 12, 2022
Merged

docs: Use inline image link in faq.md #35413

merged 2 commits into from Sep 12, 2022

Conversation

apetresc
Copy link
Contributor

@apetresc apetresc commented Aug 23, 2022

Description of Change

Relative Markdown links are rendered relative to the host domain, which works fine when viewing it on Github, but since you also use the same generated HTML in your doc site, the link is broken. See here: https://www.electronjs.org/docs/latest/faq#the-font-looks-blurry-what-is-this-and-what-can-i-do

Using an absolute URL here should fix the issue on the main site.

Checklist

Release Notes

Notes: Fixed broken image link in docs/latest/faq.

@welcome
Copy link

welcome bot commented Aug 23, 2022

💖 Thanks for opening this pull request! 💖

We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix.

Examples of commit messages with semantic prefixes:

  • fix: don't overwrite prevent_default if default wasn't prevented
  • feat: add app.isPackaged() method
  • docs: app.isDefaultProtocolClient is now available on Linux

Things that will help get your PR across the finish line:

  • Follow the JavaScript, C++, and Python coding style.
  • Run npm run lint locally to catch formatting errors earlier.
  • Document any user-facing changes you've made following the documentation styleguide.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Aug 23, 2022
@apetresc apetresc changed the title Use absolute URL in faq.md image link docs: Use absolute URL in faq.md image link Aug 23, 2022
@electron-cation electron-cation bot added documentation 📓 semver/patch backwards-compatible bug fixes and removed new-pr 🌱 PR opened in the last 24 hours labels Aug 23, 2022
@zcbenz zcbenz requested a review from a team August 25, 2022 06:55
@zcbenz zcbenz added semver/none target/20-x-y target/21-x-y PR should also be added to the "21-x-y" branch. and removed semver/patch backwards-compatible bug fixes labels Aug 25, 2022
@codebytere
Copy link
Member

@apetresc could you please push an empty commit to trigger the lint check?

@apetresc
Copy link
Contributor Author

Done! (The Appveyor build failures seem totally unrelated to the change 🤔)

@zcbenz
Copy link
Member

zcbenz commented Aug 29, 2022

@apetresc Can you rebase this PR on latest main? It should be able to fix the CI failure.

@apetresc
Copy link
Contributor Author

Thanks for doing the rebase for me - I'm travelling at the moment without my laptop until tomorrow.

Copy link
Member

@dsanders11 dsanders11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is the right approach to fixing this broken image link. All image links in the docs are relative links, they're transformed by Docusaurus (I believe, @erickzhao correct me if I'm wrong) to point to the correct asset paths (which include hashes). Changing this to an absolute link sidesteps that process.

My guess would be Docusaurus isn't transforming the image path correctly due to this case using a reference-style link, or because it's using the simplified syntax style (![] rather than ![][]) - there might be a bug in Docusaurus, or our own code which fixes up links.

I think changing this to an inline link would fix the issue and ensure the image goes through the same asset processing as the other images in the docs.

@apetresc
Copy link
Contributor Author

apetresc commented Sep 5, 2022

That makes sense, thanks @dsanders11. I'm not sure what the underlying Docusaurus problem is that causes the reference-style link to fail to be transformed properly, but if switching to an inline link works, that's good (and it seems like that's the likely culprit since other relative inline image links in other tutorial pages render fine in the HTML site).

So, I've updated this patch to do just that 🙂

@apetresc apetresc changed the title docs: Use absolute URL in faq.md image link docs: Use inline image link in faq.md Sep 5, 2022
@electron-cation electron-cation bot added the semver/patch backwards-compatible bug fixes label Sep 5, 2022
@apetresc
Copy link
Contributor Author

apetresc commented Sep 6, 2022

Should I try rebasing again to resolve the appveyor build failures?

@dsanders11
Copy link
Member

Should I try rebasing again to resolve the appveyor build failures?

@apetresc, you can rebase or push an empty commit.

@apetresc
Copy link
Contributor Author

apetresc commented Sep 11, 2022

@dsanders11 Looks like appveyor finally passed now but the Semver job is hanging because the PR somehow ended up with multiple semver labels. Is that something you have permissions to fix?

@dsanders11 dsanders11 removed the semver/patch backwards-compatible bug fixes label Sep 11, 2022
The relative link is rendered relative to the host domain, which works fine when viewing it on Github, but since you also use the same generated HTML in your doc site, the link is broken. See here: https://www.electronjs.org/docs/latest/faq#the-font-looks-blurry-what-is-this-and-what-can-i-do

Using an absolute URL here should fix the issue on the main site.
@apetresc
Copy link
Contributor Author

Yaaay it finally passed all the checks 🎊 🥳 🎊

@ckerr ckerr merged commit ef463b3 into electron:main Sep 12, 2022
@welcome
Copy link

welcome bot commented Sep 12, 2022

Congrats on merging your first pull request! 🎉🎉🎉

@release-clerk
Copy link

release-clerk bot commented Sep 12, 2022

Release Notes Persisted

Fixed broken image link in docs/latest/faq.

@trop
Copy link
Contributor

trop bot commented Sep 12, 2022

I have automatically backported this PR to "19-x-y", please check out #35647

@trop
Copy link
Contributor

trop bot commented Sep 12, 2022

I have automatically backported this PR to "21-x-y", please check out #35648

@trop
Copy link
Contributor

trop bot commented Sep 12, 2022

I have automatically backported this PR to "20-x-y", please check out #35649

@trop trop bot added in-flight/20-x-y and removed target/21-x-y PR should also be added to the "21-x-y" branch. target/20-x-y labels Sep 12, 2022
@apetresc apetresc deleted the patch-1 branch September 13, 2022 01:22
@trop trop bot added merged/19-x-y merged/21-x-y PR was merged to the "21-x-y" branch. and removed in-flight/19-x-y labels Sep 13, 2022
khalwa pushed a commit to solarwindscloud/electron that referenced this pull request Feb 22, 2023
* Use absolute URL in faq.md image link

The relative link is rendered relative to the host domain, which works fine when viewing it on Github, but since you also use the same generated HTML in your doc site, the link is broken. See here: https://www.electronjs.org/docs/latest/faq#the-font-looks-blurry-what-is-this-and-what-can-i-do

Using an absolute URL here should fix the issue on the main site.

* Use inline image reference for subpixel rendering example

As suggested by @dsanders11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation 📓 merged/21-x-y PR was merged to the "21-x-y" branch. semver/none
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants