Skip to content

Commit 90b69db

Browse files
committed
add tagpage
1 parent 8ee4de1 commit 90b69db

14 files changed

+76
-53
lines changed

_includes/collecttags.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<!-- Capture tags in the post. -->
2+
13
{% assign rawtags = "" %}
24
{% for post in site.posts %}
35
{% assign ttags = post.tags | join:'|' | append:'|' %}

_layouts/blog_by_tag.html

Lines changed: 0 additions & 28 deletions
This file was deleted.

_layouts/post.html

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,24 @@
44

55
<div class="post">
66
<h1 class="post-title">{{ page.title }}</h1>
7+
<!-- <span class="post-date">
8+
{{ page.date | date_to_string }}
9+
</span></nobr>
10+
<span class="post-tag">
11+
{% for tag in page.tags %}
12+
{% capture tag_name %}{{ tag }}{% endcapture %}
13+
<a href="/tag/{{ tag_name }}">{{ tag_name }}</a>
14+
{% endfor %}
15+
</span> -->
716
<span class="post-date">
817
{{ page.date | date_to_string }}
9-
<span class="post-tag">
10-
{% assign tags=page.tags | join: ' | '%}
11-
{{ tags }}
12-
</span>
1318
</span>
19+
{% for tag in page.tags %}
20+
{% capture tag_name %}{{ tag }}{% endcapture %}
21+
<span class="post-tag">
22+
<a href="/tag/{{ tag_name }}">{{ tag_name }}</a>
23+
</span>
24+
{% endfor %}
1425
{{ content }}
1526
</div>
1627

_layouts/tagpage.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
layout: default
3+
---
4+
5+
<h1>Articles in <span class=tagpage-tagtitle>{{ page.tag }}</span></h1>
6+
7+
{% for post in site.tags[page.tag] %} <span class="archivemono">{{ post.date | date_to_string }}</span> &raquo;
8+
<a href="{{ post.url }}"> {{ post.title}} </a> </br>
9+
{% endfor %}

_posts/2019-08-25-Goettingen.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ layout: post
33
title: 朝圣哥廷根--瞻仰百年前的世界科学中心
44
date: 2019-08-25 00:43:02
55
tags:
6-
- 旅行
7-
- 哥廷根
6+
- Travel
7+
- Reading
88
---
99

1010
&emsp;对于哥廷根,**朝圣**这个词丝毫没有夸张。近三百年的历史里,哥廷根人才辈出,在数学,科学,艺术,政治,哲学上均有所建树,尤其是百年前,这个位于德国中心的小镇(面积大约是海淀区的四分之一)成为了整个世界的数学与科学的中心,孕育了无数数学与科学巨匠。

_posts/2020-02-15-Notes_DL_Coursera_Ng_1.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ layout: post
33
title: Notes on Neural Network and Deep Learning
44
date: 2020-02-15 21:49:02
55
tags:
6-
- Deep Learning
7-
- Artificial Intelligence
8-
- Coursera
6+
- Machine-Learning
97
---
108

119
**This is the 1st course of the [Deep Learning Specialization on Coursera by Andrew Ng ](https://www.coursera.org/specializations/deep-learning#courses)**

_posts/2020-03-21-Notes_DL_Coursera_Ng_2.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@ layout: post
33
title: Notes on Improving Deep Neutral Networks
44
date: 2020-03-21 21:49:02
55
tags:
6-
- Deep Learning
7-
- Coursera
8-
- Batch Normalization
9-
- Hyperparameter tuning
6+
- Machine-Learning
107
---
118

129
**This is the 2nd course of the [Deep Learning Specialization on Coursera by Andrew Ng ](https://www.coursera.org/specializations/deep-learning#courses)**

_posts/2020-07-12-关于PCA算法的思考.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ layout: post
33
title: 关于PCA算法的一点思考
44
date: 2020-07-12 09:16:02
55
tags:
6-
- Principal Components Analysis
7-
- Machine Learning
6+
- Machine-Learning
87
---
98

109
**PCA是机器学习中一种常用的降维方法,从优化的角度上来说,PCA的意义很丰富,但是并不难理解,其中主要让我困惑的一点是为什么PCA这种贪心算法找到的结果是全局最优?**

archive.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@
22
layout: page
33
title: Archive
44
---
5+
{% assign tags=site.tags %}
56

6-
<!--{% include filter_by_tag.html %}-->
7+
<h3> Tags </h3>
8+
{% for tag in tags %}{% capture taglink %} /tag/{{ tag[0] }}{% endcapture %} <span class='post-tag'> <a href="{{ taglink }}"> {{ tag[0] }} </a> </span>
9+
{% endfor %}
710

8-
{% for post in site.posts %}<span class="archivemono">{{ post.date | date_to_string }}</span> &raquo; [ {{ post.title }} ]({{ post.url }})
11+
12+
<h3> Articles </h3>
13+
{% for post in site.posts %} <span class="archivemono">{{ post.date | date_to_string }}</span> &raquo; [ {{ post.title }} ]({{ post.url }})
914
{% endfor %}

index.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@ <h1 class="post-title">
1515
<!-- <span class="post-date">{{ post.date | date_to_string }} {{ tags_content }}</span> -->
1616
<span class="post-date">
1717
{{ post.date | date_to_string }}
18-
<span class="post-tag">
19-
{% assign tags=post.tags | join: ' | '%}
20-
{{ tags }}
21-
</span>
2218
</span>
19+
{% for tag in post.tags %}
20+
{% capture tag_name %}{{ tag }}{% endcapture %}
21+
<span class="post-tag">
22+
<a href="/tag/{{ tag_name }}">{{ tag_name }}</a>
23+
</span>
24+
{% endfor %}
2325

2426
{{ post.excerpt }}
2527
{% capture content_words %}

public/css/customize.css

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,35 @@
11
/* Customize Sidebar Color */
22
.customize .sidebar {
3-
background-color: #ac4142;
3+
/* background-color: #ac4142; */
4+
background-color: black;
45
}
56
.customize .content a {
6-
color: #276767;
7+
color: #5681C5;
78
}
89

910
/* Post */
1011
.customize .post-title,
1112
.customize .post-title a {
12-
color: #ac4142;
13+
color: rgb(53, 51, 51);
1314
}
1415

1516
.customize .post-tag {
1617
display: inline-block;
1718
margin-top: -.5rem;
1819
margin-bottom: 0.5rem;
19-
margin-left: 2rem;
20+
margin-left: 0.25rem;
21+
padding-left: 0.25rem;
22+
padding-right: 0.25rem;
23+
background-color: #F5F5F5;
2024
color: #276767;
2125
;
2226
}
2327

28+
.post-date {
29+
display: inline-block;
30+
margin-right: 2rem;
31+
}
32+
2433
/* Relate Posts */
2534
.customize .related-posts {
2635
padding-left: 0rem;
@@ -57,4 +66,8 @@
5766
text-align: center;
5867
font-size: small;
5968
font-weight: bold;
69+
}
70+
71+
.customize .tagpage-tagtitle {
72+
color: #ac4142;
6073
}

tag/Machine-Learning.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
layout: tagpage
3+
title: Machine-Learning
4+
tag: Machine-Learning
5+
---

tag/Reading.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
layout: tagpage
3+
title: Reading
4+
tag: Reading
5+
---

tag/Travel.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
layout: tagpage
3+
title: Travel
4+
tag: Travel
5+
---

0 commit comments

Comments
 (0)