Skip to content

Commit

Permalink
A better way to fix #1733
Browse files Browse the repository at this point in the history
  • Loading branch information
Acris committed Jul 4, 2017
1 parent a67838e commit f951075
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ index_with_subtitle: false
# When running the site in a subdirectory (e.g. domain.tld/blog), remove the leading slash (/archives -> archives)
menu:
home: /
#categories: /categories
#about: /about
archives: /archives
tags: /tags
#categories: /categories/
#about: /about/
archives: /archives/
tags: /tags/
#sitemap: /sitemap.xml
#commonweal: /404.html

Expand Down Expand Up @@ -173,7 +173,7 @@ toc:

# If true, all words will placed on next lines if header width longer then sidebar width.
wrap: false


# Creative Commons 4.0 International License.
# http://creativecommons.org/
Expand Down Expand Up @@ -405,11 +405,11 @@ vkontakte_api:

# Star rating support to each article.
# To get your ID visit https://widgetpack.com
rating:
rating:
enable: false
id: #<app_id>
color: fc6423


# Show number of visitors to each article.
# You can visit https://leancloud.cn get AppID and AppKey.
Expand Down
2 changes: 1 addition & 1 deletion source/js/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ NexT.utils = NexT.$u = {
addActiveClassToMenuItem: function () {
var path = window.location.pathname;
path = path === '/' ? path : path.substring(0, path.length - 1);
$('.menu-item a[href="' + path + '"]').parent().addClass('menu-item-active');
$('.menu-item a[href^="' + path + '"]:first').parent().addClass('menu-item-active');
},

hasMobileUA: function () {
Expand Down

2 comments on commit f951075

@ivan-nginx
Copy link
Collaborator

Choose a reason for hiding this comment

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

@Acris well done!

@N0ooooone
Copy link

Choose a reason for hiding this comment

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

nice

Please sign in to comment.