-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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(content-blog): links in feed should be absolute #9151
Merged
Merged
Changes from 7 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
b607956
fix: #9136:fix(content-blog): links in feed should be absolute
VinceCYLiao a339fc9
feat: add test to check if links in feed are resolved correctly (+2 s…
e65995e
feat: absolutize img URLs
VinceCYLiao aaa869a
chore: remove test case added in previous commit
VinceCYLiao af9cbe2
chore: update fixture
VinceCYLiao 10ba5cb
chore: add for cSpell
VinceCYLiao 6a8345d
feat: update test cases as added on new fixture file and update snapshot
VinceCYLiao 84493db
chore: correct order of front matter and imports
VinceCYLiao f382af6
feat: use srcset lib to parse urls in img's srcset and make them abso…
VinceCYLiao 08e17db
chore: update snapshot
VinceCYLiao df68905
chore: remove console.log
VinceCYLiao 646d22a
chore: remove unneeded export declaration
VinceCYLiao d34fda6
Update packages/docusaurus-plugin-content-blog/src/feed.ts
slorber 0016a18
Update packages/docusaurus-plugin-content-blog/src/feed.ts
slorber 2158d7c
simplify impl
slorber a62b99f
Merge branch 'main' into fix/issue#9136
slorber c04e223
replace docusaurus.png
slorber 0afae8b
improve blog-with-links.mdx file links
slorber 1f8dfad
regenerate build-snap
slorber da0fb44
Update feed snapshots
slorber File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
...plugin-content-blog/src/__tests__/__fixtures__/website/blog/blog-with-links.mdx
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
31 changes: 31 additions & 0 deletions
31
...ontent-blog/src/__tests__/__fixtures__/website/build-snap/blog/blog-with-links/index.html
Large diffs are not rendered by default.
Oops, something went wrong.
149 changes: 111 additions & 38 deletions
149
packages/docusaurus-plugin-content-blog/src/__tests__/__snapshots__/feed.test.ts.snap
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -152,6 +152,7 @@ jodyheavener | |
joshcena | ||
jscodeshift | ||
jssdk | ||
juillet | ||
kaszubowski | ||
katex | ||
kato | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: 'Test if href in feed resolved correctly' | ||
--- | ||
|
||
[absolute full url](https://github.com/facebook/docusaurus) | ||
|
||
[absolute url with implicit domain name](/tests/blog/2023/07/19/b) | ||
|
||
[relative url](2023-07-19-b.mdx) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Test Relative Path |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks a bit unsafe/risky, maybe introduce a dedicated lib to manipulate srcset reliably instead? see https://www.npmjs.com/package/srcset
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I'll look into it and revise my code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done and since latest version of srcset is pure ESM, so I have to use the previous version.