forked from kaeyleo/jekyll-theme-H2O
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Features] Add submenu support for posts and optimize related codes
- Loading branch information
Showing
17 changed files
with
536 additions
and
262 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
- id: 'begin' | ||
name: 'H2O-ac 主题入门系列' | ||
articles: | ||
- name: '快速入门' | ||
url: '/tech/new-theme-h2o-ac.html' | ||
- name: '快速入门' | ||
url: '/tech/new-theme-h2o-ac.html' | ||
- name: '快速入门' | ||
url: '/tech/new-theme-h2o-ac.html' | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{% if page.submenu %} | ||
<div class="submenu"> | ||
{% for collection in site.data.collections %} | ||
{% if collection.id == page.submenu %} | ||
<h4> | ||
<svg class="icon" aria-hidden="true"> | ||
<use xlink:href="#icon-submenu"></use> | ||
</svg>{{ collection.name }} | ||
</h4> | ||
<ul> | ||
{% for article in collection.articles %} | ||
<li><a href="{{ article.url | prepend: site.baseurl }}">{{ article.name }}</a></li> | ||
{% endfor %} | ||
</ul> | ||
{% endif %} | ||
{% endfor %} | ||
{% else %} | ||
<div class="submenu hidden"> | ||
{% endif %} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ tags: | |
- 学术 | ||
- 运维 | ||
pin: true | ||
submenu: 'begin' | ||
--- | ||
|
||
## 前言 | ||
|
Oops, something went wrong.