Skip to content

Commit

Permalink
add: isSubdirectory in _config.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskyfung committed Sep 29, 2020
1 parent 923b375 commit 60d3d1e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ paginate: 12
paginate_path: "/blog/page:num/"
permalink: /blog/:year/:month/:day/:title
timezone: 'Asia/Hong_Kong'
isSubdirectory:
baseurl: ''
email: ''
google_analytics: ''
Expand Down
2 changes: 1 addition & 1 deletion _includes/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<aside class="sidebar">

{% unless page.url == "/blog/" or page.url contains "/blog/page"%}
{% unless page.url == "/blog/" or page.url contains "/blog/page" or site.isSubdirectory %}
<!-- Featured -->
<div aria-label="featured posts" class="sidebar-section">
<h5><span>Featured</span></h5>
Expand Down

1 comment on commit 60d3d1e

@chriskyfung
Copy link
Owner Author

Choose a reason for hiding this comment

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

✨ New Feature

  • Support disabling to display Featured posts in sidebar, if isSubdirectory is specified in the _config.yml file

Please sign in to comment.