-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
wh.huajieyu
committed
May 14, 2024
1 parent
0c7b71f
commit 57c3b36
Showing
24 changed files
with
174 additions
and
3 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
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 |
---|---|---|
@@ -1 +1 @@ | ||
<a href="{{ "/" | relative_url }}">{{ site.theme_config.back_home_text }}</a> | ||
<a href="javascript:history.back(-1)">{{ site.theme_config.back_home_text }}</a> |
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,18 @@ | ||
{% assign rawtags = "" %} | ||
{% for post in site.posts %} | ||
{% assign ttags = post.tags | join:'|' | append:'|' %} | ||
{% assign rawtags = rawtags | append:ttags %} | ||
{% endfor %} | ||
{% assign rawtags = rawtags | split:'|' | sort %} | ||
|
||
{% assign site.tags = "" %} | ||
{% for tag in rawtags %} | ||
{% if tag != "" %} | ||
{% if tags == "" %} | ||
{% assign tags = tag | split:'|' %} | ||
{% endif %} | ||
{% unless tags contains tag %} | ||
{% assign tags = tags | join:'|' | append:'|' | append:tag | split:'|' %} | ||
{% endunless %} | ||
{% endif %} | ||
{% endfor %} |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
layout: default | ||
--- | ||
{%-include back_link.html-%} | ||
<div class="post"> | ||
<h1>Tag: {{ page.tag }}</h1> | ||
<ul> | ||
{% for post in site.tags[page.tag] %} | ||
<li><a href="{{ post.url }}">{{ post.title }}</a> ({{ post.date | date_to_string }})<br> | ||
{{ post.description }} | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
<hr> |
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,15 @@ | ||
--- | ||
layout: null | ||
permalink: /api/post.json | ||
--- | ||
[ | ||
{% for post in site.posts %}{ | ||
"title": {{ post.title | jsonify }}, | ||
"url": {{ post.url | jsonify }}, | ||
"category": {{ post.category | jsonify }}, | ||
"date": {{ post.date | jsonify }}, | ||
"tags": {{ post.tags | jsonify }} | ||
}{% unless forloop.last %},{% endunless %} | ||
|
||
{% endfor %} | ||
] |
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,9 @@ | ||
--- | ||
layout: null | ||
permalink: /api/tags.json | ||
--- | ||
{ | ||
{% for tag in site.tags %} | ||
{{tag[0] | jsonify}}: {{tag[1].size | jsonify}}{% unless forloop.last %},{% endunless %} | ||
{% endfor %} | ||
} |
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,27 @@ | ||
import requests | ||
import os | ||
|
||
tags_get = requests.get('http://127.0.0.1:4000/api/tags.json') | ||
tags = tags_get.json() | ||
|
||
# for tag in tags: | ||
# print(tag+':',tags[tag]) | ||
|
||
build_tags = [tag for tag in tags] | ||
|
||
for root, dirs, files in os.walk('./tag'): | ||
for file_name in files: | ||
tag = file_name[:-3] | ||
if tag in tags and tag in build_tags: | ||
build_tags.remove(tag) | ||
print("Building new tags:", build_tags) | ||
|
||
tag_pattern = '---\n' | ||
tag_pattern += 'layout: tag\n' | ||
tag_pattern += 'title: %s\n' | ||
tag_pattern += 'tag: %s\n' | ||
tag_pattern += '---\n' | ||
|
||
for tag in build_tags: | ||
with open('./tag/'+tag+'.md', 'w') as f: | ||
f.write(tag_pattern % (tag, tag)) |
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,5 @@ | ||
--- | ||
layout: tag | ||
title: Firefox | ||
tag: Firefox | ||
--- |
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,5 @@ | ||
--- | ||
layout: tag | ||
title: algorithm | ||
tag: algorithm | ||
--- |
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,5 @@ | ||
--- | ||
layout: tag | ||
title: binary_tree | ||
tag: binary_tree | ||
--- |
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,5 @@ | ||
--- | ||
layout: tag | ||
title: blog | ||
tag: blog | ||
--- |
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,5 @@ | ||
--- | ||
layout: tag | ||
title: clipboard | ||
tag: clipboard | ||
--- |
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,5 @@ | ||
--- | ||
layout: tag | ||
title: debugger | ||
tag: debugger | ||
--- |
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,5 @@ | ||
--- | ||
layout: tag | ||
title: git | ||
tag: git | ||
--- |
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,5 @@ | ||
--- | ||
layout: tag | ||
title: html2canvas | ||
tag: html2canvas | ||
--- |
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,5 @@ | ||
--- | ||
layout: tag | ||
title: linklist | ||
tag: linklist | ||
--- |
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,5 @@ | ||
--- | ||
layout: tag | ||
title: pnpm | ||
tag: pnpm | ||
--- |
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,5 @@ | ||
--- | ||
layout: tag | ||
title: prime | ||
tag: prime | ||
--- |
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,5 @@ | ||
--- | ||
layout: tag | ||
title: quick_sort | ||
tag: quick_sort | ||
--- |
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,5 @@ | ||
--- | ||
layout: tag | ||
title: safearea | ||
tag: safearea | ||
--- |
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,5 @@ | ||
--- | ||
layout: tag | ||
title: shortest_path | ||
tag: shortest_path | ||
--- |
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,5 @@ | ||
--- | ||
layout: tag | ||
title: vscode | ||
tag: vscode | ||
--- |