Skip to content

Conversation

@stevenjoezhang
Copy link
Member

What does it do?

Issue resolved: #5042
Issue resolved: #4778

Screenshots

Pull request tasks

  • Add test cases for the changes.
  • Passed the CI test.
@github-actions
Copy link

github-actions bot commented Nov 24, 2022

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.04%) to 98.742% when pulling 7f9a8be on slug into 807ddd8 on master.

@stevenjoezhang stevenjoezhang requested a review from a team November 25, 2022 08:59
Copy link
Member

@yoshinorin yoshinorin left a comment

Choose a reason for hiding this comment

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

Maybe LGTM. I'll debug this in this weekend.

@stevenjoezhang stevenjoezhang added this to the 7.0.0 milestone Nov 26, 2022
Copy link
Member

@yoshinorin yoshinorin left a comment

Choose a reason for hiding this comment

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

LGTM 👍


BTW, the current implementation (before this PR) behavior is similar to many of ORM first method (like Rails's first, Laravel's first ...etc). Honestly, I don't like this. Because it can't find a post uniquely and sometimes users can't notice.

I know this behavior is generally in ORM. But, many hexo users may confusing.


P.S:

Anyway we should merge this PR and move forward.

@stevenjoezhang
Copy link
Member Author

Yes, the slug is unique, so there is no confusion. However, for the users, titles are more intuitive than the slug, so I believe this patch will improve usability when there're no duplicate titles.

@stevenjoezhang stevenjoezhang merged commit ca51e15 into master Nov 27, 2022
@stevenjoezhang stevenjoezhang deleted the slug branch November 27, 2022 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants