-
Notifications
You must be signed in to change notification settings - Fork 83
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
Doesn't link to correct urls #15
Comments
Please give me your configurations on the plugin. |
# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: http://theonlygusti.github.io/blog
root: /blog/
permalink: :year/:month/:day/:title/
permalink_defaults: |
Every other plugin I have seems to work and handle urls correctly. |
What you give me is the setting of your site's root. Whereas I want the setting of you search plugin, for example: search:
path: search.xml
field: all I've wrote two themes for Hexo. One is hexo-theme-freemind and the other is hexo-theme-wixo. Both have used hexo-generator-search for local searching and are put in a subdirectory like your site does. And the plugin works like a charm on both sites. Maybe you can take a look at the settings of these two examples and try to figure out what is the underlying problem. |
I haven't set anything like that in my main |
If you don't need that, you must have hard code it some where in the layout templates. Could you write down it for me? For example, here's the code I wrote for hexo-theme-freemind to load search.xml: <% if (config.search) { %>
<script type="text/javascript">
var search_path = "<%= config.search.path %>";
if (search_path.length == 0) {
search_path = "search.xml";
}
var path = "<%= config.root %>" + search_path;
searchFunc(path, 'local-search-input', 'local-search-result');
</script>
<% } %> See? You should pass an available |
I am using hexo-theme-material for my theme, maybe it isn't handling it correctly |
If you find difficult to customize your theme to support hexo-generator-search, then I would rather suggest you to use hexo-theme-freemind. The local search engine works out of box there. I think I should have given you all the necessary info about how to set up the fire of hexo-generator-search. I will close this issue. If you still want more help, you can continue to ask me questions. |
As you can see in the |
@wzpan Actually, this still seems to be an issue relevant to the Your plugin generates the
It should be |
@theonlygusti Then please give me the full code that you put the plugin to work. There must be something wrong with the path you ask the generator to parse the link. |
Link cannot redirect to correctly. |
I am in the process of setting up a hexo blog on my github pages.
This search plugin looks pretty impressive, but for some reason results redirect to
blog/blog
instead of just/blog
.Mind having a look into this?
The text was updated successfully, but these errors were encountered: