-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
i can't found this function soucre code #197
Comments
You can find this function in hexo.extend.helper.register('doc_sidebar', function(className){
var type = this.page.canonical_path.split('/')[0];
var sidebar = this.site.data.sidebar[type];
var path = pathFn.basename(this.path);
var result = '';
var self = this;
var prefix = 'sidebar.' + type + '.';
_.each(sidebar, function(menu, title){
result += '<strong class="' + className + '-title">' + self.__(prefix + title) + '</strong>';
_.each(menu, function(link, text){
var itemClass = className + '-link';
if (link === path) itemClass += ' current';
result += '<a href="' + link + '" class="' + itemClass + '">' + self.__(prefix + text) + '</a>';
})
});
return result;
}); |
wo~ thank you very much!! |
Closed for solved. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
file: site/themes/navy/layout/partial/sidebar.swig
![image](https://cloud.githubusercontent.com/assets/6022948/13976972/c02ebda8-f0ff-11e5-98c4-a66951651113.png)
i waut to change something, but i can not found this function soucre code. please help me
The text was updated successfully, but these errors were encountered: