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

let post_link use original post title as title attribute #4973

Merged
merged 2 commits into from Aug 27, 2022

Conversation

ppwwyyxx
Copy link
Contributor

@ppwwyyxx ppwwyyxx commented May 18, 2022

What does it do?

This PR modifies the post_link tag so that the "title" attribute will contain the actual post title.

I think this new behavior is better:

  • Same as the old behavior, the text will still show the title that users specified as arguments in post_link tag
  • But once hovered, the tooltip will show full title of the actual post

In the old behavior:

  • Once hovered, the tooltip will have the same content as the existing text, therefore the tooltip is not useful.

Screenshots

The screenshot shows the new behavior, where tooltip text is the actual post title
2022-05-18_04-18

Pull request tasks

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

@github-actions
Copy link

How to test

git clone -b post_link https://github.com/ppwwyyxx/hexo.git
cd hexo
npm install
npm test

@coveralls
Copy link

Coverage Status

Coverage remained the same at 98.031% when pulling a99693b on ppwwyyxx:post_link into afc4d7f on hexojs:master.

@ppwwyyxx
Copy link
Contributor Author

The failures in github actions are:

Run marocchino/sticky-pull-request-comment@v2
Error: Request failed due to following response errors:
 - Resource not accessible by integration

this seems unrelaed to this PR

@ppwwyyxx
Copy link
Contributor Author

Can maintainers take a look at this simple PR? thanks

@ppwwyyxx
Copy link
Contributor Author

Can maintainers take a look? Thanks!

@renbaoshuo renbaoshuo merged commit e44b48c into hexojs:master Aug 27, 2022
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.

None yet

4 participants