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 redirects plugin for html output #606

Merged
merged 2 commits into from
May 8, 2024
Merged

Conversation

thautwarm
Copy link
Contributor

Description

redirects plugin not working when --location is specified at the build time, if the location is not a root url.

For example, my blog url is https://thautwarm.github.io/Site-33/ instead of https://thautwarm.github.io/, then the redirection fails to resolve urls.

Related Issues

No issue yet. I found the case by

Check List

  • Have you read the
    CODE OF CONDUCT
  • Have you read the document
    CONTRIBUTING
    • One pull request per feature. If you want to do more than one thing,
      send multiple pull request.
    • Write tests.
    • Run deno fmt to fix the code format before commit.
    • Document any change in the CHANGELOG.md.

Copy link
Member

@oscarotero oscarotero left a comment

Choose a reason for hiding this comment

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

Good catch! Thanks for this.
I left a comment to improve your changes.

plugins/redirects.ts Outdated Show resolved Hide resolved
@thautwarm
Copy link
Contributor Author

Returning from & to instead of the mixed from & newUrl looks more consistency.

@thautwarm thautwarm requested a review from oscarotero May 8, 2024 11:00
@oscarotero
Copy link
Member

Looks great. Thank you!

@oscarotero oscarotero merged commit 4824f1d into lumeland:main May 8, 2024
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.

2 participants