File tree Expand file tree Collapse file tree 4 files changed +51
-2
lines changed Expand file tree Collapse file tree 4 files changed +51
-2
lines changed Original file line number Diff line number Diff line change
1
+ - slug : nosql
2
+ name : NoSQL
3
+ color : ' #3498db'
4
+
5
+ - slug : programming
6
+ name : Programming
7
+ color : ' #1abc9c'
Original file line number Diff line number Diff line change
1
+ - slug : maizi
2
+ name : Maizi
3
+
4
+ - slug : mongodb
5
+ name : MongoDB
Original file line number Diff line number Diff line change
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ < header id ="post-header ">
6
+ < h1 id ="post-title "> {{ page.tag }}</ h1 >
7
+ < h4 id ="post-subtitle "> Articles by tag</ h4 >
8
+ </ header >
9
+
10
+ < div id ="post-content ">
11
+ {% if site.tags[page.tag] %}
12
+ {% for post in site.tags[page.tag] %}
13
+ {% capture post_year %}{{ post.date | date: '%Y' }}{% endcapture %}
14
+ {% if forloop.first %}
15
+ < h3 > {{ post_year }}</ h3 > < div class ="list-group ">
16
+ {% endif %}
17
+
18
+ {% if forloop.first == false %}
19
+ {% assign previous_index = forloop.index0 | minus: 1 %}
20
+ {% capture previous_post_year %}{{ site.tags[page.tag][previous_index].date | date: '%Y' }}{% endcapture %}
21
+ {% if post_year != previous_post_year %}
22
+ </ div > < h3 > {{ post_year }}</ h3 > < div class ="list-group ">
23
+ {% endif %}
24
+ {% endif %}
25
+
26
+ < a href ="{{ post.url }}/ " class ="list-group-item ">
27
+ < h4 class ="list-group-item-heading "> {{ post.title }}</ h4 >
28
+ </ a >
29
+
30
+ {% if forloop.last %}
31
+ </ div >
32
+ {% endif %}
33
+ {% endfor %}
34
+ {% else %}
35
+ < p > There are no posts for this tag.</ p >
36
+ {% endif %}
37
+ </ div >
Original file line number Diff line number Diff line change 2
2
layout : post
3
3
title : MongoDB最佳实践笔记
4
4
published : true
5
- category : MongoDB
6
- tags : [MongoDB, Maizi ]
5
+ category : nosql
6
+ tags : [mongodb, maizi ]
7
7
---
8
8
9
9
主要还得看官网
You can’t perform that action at this time.
0 commit comments