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: post_link behaviour when using subdir #5419

Merged
merged 4 commits into from
Feb 21, 2024
Merged

Conversation

leafbird
Copy link
Contributor

@leafbird leafbird commented Feb 11, 2024

What does it do?

When subdir is used, the generated URL ignores it, creating an incorrect link. If the value of config.url does not end with '/', this was added to create a correct link.

fix #5383

Screenshots

Pull request tasks

  • Add test cases for the changes.
  • Passed the CI test.

- case of using subdirectory in the url of the site
- guarantee trailing-slash at base part of url.
- make change to invoke Tester workflow.
- fix linter reported issue.
- add test case
- fix lint error.
Copy link

How to test

git clone -b master https://github.com/leafbird/hexo.git
cd hexo
npm install
npm test

@coveralls
Copy link

Pull Request Test Coverage Report for Build 7861542090

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 7 of 7 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 99.53%

Totals Coverage Status
Change from base Build 7691789796: 0.0%
Covered Lines: 9318
Relevant Lines: 9362

💛 - Coveralls

@uiolee uiolee added this to the 7.1.2 milestone Feb 14, 2024
@uiolee uiolee merged commit 7ef26ad into hexojs:master Feb 21, 2024
22 of 23 checks passed
@uiolee uiolee modified the milestones: 7.1.2, 7.2.0 Apr 6, 2024
dimaslanjaka pushed a commit to dimaslanjaka/hexo that referenced this pull request Oct 3, 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.

_config.yml设置了url如https://username.github.io/project', post_link跳转会丢失project,导致404
3 participants