Skip to content

Fix bug when search in a post #2

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

ddebby
Copy link

@ddebby ddebby commented Apr 18, 2018

Signed-off-by: [email protected]
Bug fix when search in a post.

Reproduce this bug as follows:

  1. Click into a post, for example: http://www.istarx.cc/2018/02/04/build-mulit-edition-apks-using-productflavors/
  2. Search something with some condition
  3. When you click the filtered posts, the generated URL will be "http://www.istarx.cc/2018/02/04/build-mulit-edition-apks-using-productflavors/2018/02/10/android-autotest-summary/".
  4. So we can used the permalink generated by algolia to work around.

Configuration

  • Operating system with version :
  • Node version :
  • Hexo version :
  • Hexo-cli version :

Changes proposed

@@ -22,13 +22,13 @@
<div class="media">
<% if (post.thumbnailImageUrl) { %>
<div class="media-left">
<a class="link-unstyled" href="<%= post.link || post.permalink %>">
<a class="link-unstyled" href="<%= post.permalink || post.permalink %>">
Copy link
Owner

@cherlas cherlas Apr 21, 2018

Choose a reason for hiding this comment

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

tks for PR, but there no error for this file, post.link is external link of the post, and post.permalink is full url for it. There an error in search.js file.
tks again.

@cherlas cherlas added the bug label Apr 21, 2018
cherlas added a commit that referenced this pull request Apr 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants