Skip to content

Commit eacec38

Browse files
committed
Added 404 error page and updated site configurations
A custom 404 error page has been added to improve user experience when encountering broken or non-existent links. Site configurations have also been updated, including changes in tagline, description, URL, language settings, SEO settings, social media links and more. Additionally, improvements were made to the website's header and head HTML files for better metadata handling and display of titles.
1 parent 50d737a commit eacec38

File tree

60 files changed

+821
-239
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+821
-239
lines changed

404.html

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
layout: page
3+
title: 找不到頁面 | 404 Not Found
4+
description: 很抱歉,您訪問的頁面不存在。請返回首頁或瀏覽我們的熱門文章。
5+
permalink: /404.html
6+
---
7+
8+
<div class="columns">
9+
<div class="column is-8-desktop is-offset-2-desktop">
10+
<div class="content">
11+
<h1 class="title is-2 has-text-centered">找不到頁面 (404)</h1>
12+
<h2 class="subtitle has-text-centered">很抱歉,您訪問的頁面不存在。</h2>
13+
14+
<div class="has-text-centered">
15+
<a href="{{ site.baseurl }}/" class="button is-primary is-medium">返回首頁</a>
16+
</div>
17+
18+
<div class="notification is-light mt-6">
19+
<h3 class="title is-4">您可能會對以下熱門文章感興趣:</h3>
20+
<ul>
21+
{% for post in site.posts limit:5 %}
22+
<li><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></li>
23+
{% endfor %}
24+
</ul>
25+
</div>
26+
27+
<div class="notification is-light mt-4">
28+
<h3 class="title is-4">按分類瀏覽:</h3>
29+
<div class="tags">
30+
{% for category in site.categories %}
31+
<a class="tag is-link is-medium" href="{{ site.baseurl }}/categories/{{ category[0] | slugify }}">
32+
{{ category[0] }}
33+
</a>
34+
{% endfor %}
35+
</div>
36+
</div>
37+
</div>
38+
</div>
39+
</div>
40+
41+
<script>
42+
// 記錄 404 頁面訪問
43+
document.addEventListener('DOMContentLoaded', function() {
44+
if (typeof ga === 'function') {
45+
ga('send', 'event', '404', 'view', location.pathname + location.search);
46+
}
47+
});
48+
</script>

_config.yml

+33-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# Site Settings
22
title: 密碼龐克 Cypherpunks Taiwan
3-
tagline: "Cypherpunks Taiwan"
3+
tagline: "密碼學使自由和隱私再次偉大 | Cypherpunks Taiwan"
44
5-
description: "密碼學使自由和隱私再次偉大。Cryptography makes freedom and privacy great again."
5+
description: "密碼龐克是一個專注於密碼學、比特幣、區塊鏈和隱私技術的台灣社群。我們相信密碼學使自由和隱私再次偉大。Cryptography makes freedom and privacy great again."
66
baseurl:
7-
url:
7+
url: https://cypherpunks-core.github.io
88
permalink: pretty
9+
lang: zh-TW
910

1011
paginate: 7
1112
paginate_path: "/blog/page:num"
@@ -27,6 +28,8 @@ exclude:
2728
- vendor/cache/
2829
- vendor/gems/
2930
- vendor/ruby/
31+
- README.md
32+
- optimize_posts.py
3033

3134
livereload: true
3235

@@ -36,22 +39,47 @@ sass:
3639

3740
google_analytics: UA-131051587-3
3841

42+
# SEO 相關設置
43+
author:
44+
name: Cypherpunks Taiwan
45+
46+
47+
# 社交媒體設置
48+
social:
49+
name: Cypherpunks Taiwan
50+
links:
51+
- https://github.com/cypherpunks-core
52+
- https://www.facebook.com/CypherpunksTW/
53+
- https://www.youtube.com/channel/UCBRErExyxjRSuPLBjfL2GVA
54+
55+
# Open Graph 設置
56+
logo: /img/logo.png
57+
social_image: /img/hero.png
58+
59+
# Twitter 卡片設置
60+
twitter:
61+
username: CypherpunksTW
62+
card: summary_large_image
63+
3964
defaults:
4065
-
4166
scope:
4267
path: ""
4368
type: "pages"
4469
values:
4570
show_sidebar: true
71+
image: /img/hero.png
72+
lang: zh-TW
4673
-
4774
scope:
4875
path: ""
4976
type: "posts"
5077
values:
5178
author: "Cypherpunks Core"
5279
layout: post
53-
image: https://via.placeholder.com/1200x800
80+
image: /img/hero.png
5481
show_sidebar: true
82+
lang: zh-TW
5583

5684
markdown: kramdown
5785
highlighter: rouge
@@ -62,5 +90,5 @@ collections:
6290
products:
6391
output: true
6492
layout: product
65-
image: https://via.placeholder.com/800x600
93+
image: /img/hero.png
6694
show_sidebar: false

_includes/head.html

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,29 @@
11
<head>
22
<meta charset="utf-8">
33
<meta name="viewport" content="width=device-width, initial-scale=1">
4-
<title>{{ page.title }} - {{ site.title }}</title>
4+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
5+
<title>{% if page.title %}{{ page.title }} - {{ site.title }}{% else %}{{ site.title }} - {{ site.tagline }}{% endif %}</title>
56
<link rel="stylesheet" href="{{ site.baseurl }}/assets/css/app.css">
67
<link rel="shortcut icon" type="image/png" href="{{ site.baseurl }}/favicon.png" />
8+
<link rel="canonical" href="{{ site.url }}{{ page.url | replace:'index.html','' }}" />
9+
<meta name="keywords" content="{% if page.tags %}{{ page.tags | join: ', ' }}{% else %}cypherpunks, 密碼龐克, 比特幣, 區塊鏈, 隱私, 密碼學{% endif %}">
10+
<meta name="author" content="{% if page.author %}{{ page.author }}{% else %}{{ site.author.name }}{% endif %}">
11+
<!-- 添加網站語言標記 -->
12+
<meta property="og:locale" content="{{ page.lang | default: site.lang | default: 'zh-TW' }}">
13+
<!-- 添加結構化資料 -->
14+
<script type="application/ld+json">
15+
{
16+
"@context": "https://schema.org",
17+
"@type": "WebSite",
18+
"name": "{{ site.title }}",
19+
"url": "{{ site.url }}"
20+
}
21+
</script>
722
<script defer src="https://use.fontawesome.com/releases/v5.3.1/js/all.js"></script>
823
{% seo %}
924
{%- if site.google_analytics -%}
1025
{%- include google-analytics.html -%}
1126
{%- endif -%}
1227
{%- include head-scripts.html -%}
28+
{%- include json-ld.html -%}
1329
</head>

_includes/header.html

+31-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
2-
<nav class="navbar is-primary" >
1+
<nav class="navbar is-primary">
32
<div class="container">
43
<div class="navbar-brand">
54
<a href="{{ site.baseurl }}/" class="navbar-item">
@@ -13,7 +12,8 @@
1312
</div>
1413
<div class="navbar-menu" id="navMenu">
1514
<div class="navbar-start">
16-
<a href="{{ site.baseurl }}/" class="navbar-item {% if page.url == "/" %}is-active{% endif %}">Home</a>
15+
<a href="{{ site.baseurl }}/" class="navbar-item {% if page.url == "/" %}is-active{% endif %}">首頁</a>
16+
<a href="{{ site.baseurl }}/blog/" class="navbar-item {% if page.url contains '/blog/' %}is-active{% endif %}">部落格</a>
1717
{% if site.data.navigation %}
1818
{% for item in site.data.navigation %}
1919
{% if item.dropdown %}
@@ -30,6 +30,34 @@
3030
{% endif %}
3131
{% endfor %}
3232
{% endif %}
33+
<a href="{{ site.baseurl }}/about/" class="navbar-item {% if page.url contains '/about/' %}is-active{% endif %}">關於我們</a>
34+
<a href="{{ site.baseurl }}/sitemap/" class="navbar-item {% if page.url contains '/sitemap/' %}is-active{% endif %}">網站地圖</a>
35+
</div>
36+
37+
<div class="navbar-end">
38+
<div class="navbar-item">
39+
<a href="{{ site.baseurl }}/search/" class="button is-primary is-inverted">
40+
<span class="icon">
41+
<i class="fas fa-search"></i>
42+
</span>
43+
<span>搜尋</span>
44+
</a>
45+
</div>
46+
47+
<div class="navbar-item">
48+
<div class="buttons">
49+
<a href="https://github.com/cypherpunks-core" class="button is-white" target="_blank" rel="noopener">
50+
<span class="icon">
51+
<i class="fab fa-github"></i>
52+
</span>
53+
</a>
54+
<a href="https://www.facebook.com/CypherpunksTW/" class="button is-white" target="_blank" rel="noopener">
55+
<span class="icon">
56+
<i class="fab fa-facebook"></i>
57+
</span>
58+
</a>
59+
</div>
60+
</div>
3361
</div>
3462
</div>
3563
</div>

_includes/json-ld.html

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<!-- JSON-LD 結構化數據 -->
2+
<script type="application/ld+json">
3+
{
4+
"@context": "https://schema.org",
5+
"@type": "Organization",
6+
"name": "{{ site.title }}",
7+
"url": "{{ site.url }}",
8+
"logo": "{{ site.url }}/favicon.png",
9+
"sameAs": [
10+
"https://github.com/cypherpunks-core",
11+
"https://www.facebook.com/CypherpunksTW/",
12+
"https://www.youtube.com/channel/UCBRErExyxjRSuPLBjfL2GVA"
13+
],
14+
"description": "{{ site.description }}",
15+
"founder": {
16+
"@type": "Person",
17+
"name": "Cypherpunks Taiwan Team"
18+
}
19+
}
20+
</script>
21+
22+
{% if page.layout == "post" %}
23+
<!-- 文章結構化數據 -->
24+
<script type="application/ld+json">
25+
{
26+
"@context": "https://schema.org",
27+
"@type": "BlogPosting",
28+
"headline": "{{ page.title }}",
29+
"description": "{{ page.description | default: page.excerpt | strip_html | strip_newlines | truncate: 160 }}",
30+
"mainEntityOfPage": {
31+
"@type": "WebPage",
32+
"@id": "{{ site.url }}{{ page.url }}"
33+
},
34+
"author": {
35+
"@type": "Person",
36+
"name": "{{ page.author | default: site.author.name }}"
37+
},
38+
"datePublished": "{{ page.date | date_to_xmlschema }}",
39+
"dateModified": "{{ page.date | date_to_xmlschema }}",
40+
"image": {
41+
"@type": "ImageObject",
42+
"url": "{{ site.url }}{{ page.image | default: '/img/hero.png' }}"
43+
},
44+
"publisher": {
45+
"@type": "Organization",
46+
"name": "{{ site.title }}",
47+
"logo": {
48+
"@type": "ImageObject",
49+
"url": "{{ site.url }}/favicon.png"
50+
}
51+
},
52+
"keywords": "{{ page.tags | join: ', ' }}",
53+
"articleSection": "{{ page.categories | first }}"
54+
}
55+
</script>
56+
{% endif %}
57+
58+
{% if page.layout == "page" and page.url == "/" %}
59+
<!-- 網站首頁結構化數據 -->
60+
<script type="application/ld+json">
61+
{
62+
"@context": "https://schema.org",
63+
"@type": "WebSite",
64+
"name": "{{ site.title }}",
65+
"url": "{{ site.url }}",
66+
"description": "{{ site.description }}",
67+
"potentialAction": {
68+
"@type": "SearchAction",
69+
"target": "{{ site.url }}/search/?q={search_term_string}",
70+
"query-input": "required name=search_term_string"
71+
}
72+
}
73+
</script>
74+
{% endif %}

_includes/post-card.html

+31-7
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,49 @@
1-
<div class="card">
1+
<div class="card" itemscope itemtype="http://schema.org/BlogPosting">
22
{% if post.image %}
33
<div class="card-image">
4-
<img src="{{ post.image }}" alt="{{ post.title }}">
4+
<img src="{{ post.image }}" alt="{{ post.title }}" itemprop="image">
55
</div>
66
{% else %}
77
<header class="card-header">
8-
<a class="card-header-title" href="{{ site.baseurl }}{{ post.url }}">{{ post.title}}</a>
8+
<a class="card-header-title" href="{{ site.baseurl }}{{ post.url }}" itemprop="headline">{{ post.title}}</a>
99
</header>
1010
{% endif %}
1111
<div class="card-content">
1212
<div class="content">
1313
{% if post.image %}
14-
<a class="title is-4" href="{{ site.baseurl }}{{ post.url }}">{{ post.title}}</a>
14+
<a class="title is-4" href="{{ site.baseurl }}{{ post.url }}" itemprop="headline">{{ post.title}}</a>
15+
{% endif %}
16+
<p itemprop="description">
17+
{% if post.description %}
18+
{{ post.description | truncate: 160 }}
19+
{% else %}
20+
{{ post.excerpt | strip_html | truncate: 160 }}
21+
{% endif %}
22+
</p>
23+
24+
<!-- 添加文章標籤 -->
25+
{% if post.tags.size > 0 %}
26+
<div class="tags">
27+
{% for tag in post.tags limit:3 %}
28+
<span class="tag is-light"><a href="{{ site.baseurl }}/tags/{{ tag | slugify }}">{{ tag }}</a></span>
29+
{% endfor %}
30+
</div>
1531
{% endif %}
16-
<p>{{ post.excerpt }}</p>
1732
</div>
1833
<div class="has-text-centered">
19-
<a href="{{ site.baseurl }}{{ post.url }}" class="button is-primary">Read more</a>
34+
<a href="{{ site.baseurl }}{{ post.url }}" class="button is-primary" aria-label="閱讀文章:{{ post.title }}">閱讀更多</a>
2035
</div>
2136
</div>
2237
<footer class="card-footer">
23-
<p class="card-footer-item">Published: {{ post.date | date: "%b %-d, %Y" }}</p>
38+
<p class="card-footer-item">
39+
<time datetime="{{ post.date | date_to_xmlschema }}" itemprop="datePublished">
40+
發布於: {{ post.date | date: "%Y年%-m月%-d日" }}
41+
</time>
42+
</p>
43+
{% if post.author %}
44+
<p class="card-footer-item" itemprop="author" itemscope itemtype="http://schema.org/Person">
45+
<span itemprop="name">{{ post.author }}</span>
46+
</p>
47+
{% endif %}
2448
</footer>
2549
</div>

_posts/2018-12-6-密碼龐克網站12月新上架.markdown

+4-3
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,18 @@ title: Cypherpunks Taiwan 密碼龐克網站12月新上架
44
date: 2018-12-6
55
categories:
66
- news
7-
description: 「Cypherpunks Taiwan 密碼龐克」網站 2018年12月新開張。
7+
description: 「Cypherpunks Taiwan 密碼龐克」網站 2018年12月新開張 日籍比特幣創業家東晃慈(Koji Higashi)為「Cypherpunks
8+
Taiwan 密碼龐克」網站計畫的創辦人
89
image: /img/1.jpg
910
published: true
1011
hero_image: /img/hero.png
1112
tags:
1213
- cypherpunks
1314
---
1415

15-
「Cypherpunks Taiwan 密碼龐克」網站 2018年12月新開張。日籍比特幣創業家東晃慈(Koji Higashi)為「Cypherpunks Taiwan 密碼龐克」網站計畫的創辦人。同時也是日本東京區塊鏈共同工作空間 [HashHub](https://www.hashhub.tokyo/) 的共同創辦人東晃慈先生,多年旅居臺北、高雄等城市,深入觀察台灣比特幣社群、以太坊社群,以及區塊鏈新創生態圈的發展態勢,認為台灣區塊鏈技術社群,除了異常熱鬧的臉書社群之外,應可以考慮建立一個網站平台,並且擁有自己的中文技術論壇討論區。
16+
# 「Cypherpunks Taiwan 密碼龐克」網站 2018年12月新開張。日籍[[比特幣](/tags/bitcoin)](/tags/bitcoin)創業家東晃慈(Koji Higashi)為「Cypherpunks Taiwan 密碼龐克」網站計畫的創辦人。同時也是日本東京區塊鏈共同工作空間 [HashHub](https://www.hashhub.tokyo/) 的共同創辦人東晃慈先生,多年旅居臺北、高雄等城市,深入觀察台灣比特幣社群、以太坊社群,以及區塊鏈新創生態圈的發展態勢,認為台灣區塊鏈技術社群,除了異常熱鬧的臉書社群之外,應可以考慮建立一個網站平台,並且擁有自己的中文技術論壇討論區。
1617

17-
![](/img/1.jpg)
18+
![圖片描述]/img/1.jpg
1819

1920
他的首要動機是能幫助台灣的區塊鏈技術社群飛速成長,希望能藉由聚焦技術討論的網站,包括區塊鏈、智能合約、比特幣、以太坊 、第二層協議等議題,協助需要掌握第一手資訊的研究員、軟體開發者、技術社群朋友們,更快速找到解答,並且在討論不同的議題時,也能贏得寶貴的友誼。
2021

_posts/2019-01-07-回顧2018:數字看比特幣發展趨勢.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ tags:
1414
- cypherpunks
1515
---
1616

17-
> 原文標題:Bitcoin By the Numbers: 2018 Recap 作者:Jameson Lopp
17+
# > 原文標題:Bitcoin By the Numbers: 2018 Recap 作者:Jameson Lopp
1818
> 來源:[https://medium.com/@lopp/bitcoin-by-the-numbers-2018-recap-68a91789d804](https://medium.com/@lopp/bitcoin-by-the-numbers-2018-recap-68a91789d804)
1919
2020
比特幣軟體工程師 Jameson Lopp,同時也是知名加密貨幣數據分析網站 Statoshi.info 的創辦人,今年1月1日在Medium平台發表文章「Bitcoin By the Numbers: 2018 Recap」,藉收集數據、統計分析,回顧了2018年一整年,以及展望比特幣未來的發展趨勢。文中指出,比特幣在日益複雜的生態系統中走在最前端,並在各個面向持續成長。比特幣發展走了十年,來到第十年,仍固執地拒絕倒下。

_posts/2019-01-10-Bitcoin比特幣中文社團.markdown

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ tags:
1313
- bitcoin
1414
---
1515

16-
“Bitcoin 比特幣中文社團”建立於 2013年4月3日是全台灣最大以比特幣區塊鏈為主題的Facebook社團,統計至2019年1月該社團的人數已經達到四萬三千多人。
16+
# “Bitcoin 比特幣中文社團”建立於 2013年4月3日是全台灣最大以比特幣[[區塊鏈](/tags/blockchain)](/tags/blockchain)為主題的Facebook社團,統計至2019年1月該社團的人數已經達到四萬三千多人。
1717
社團中討論的議題相當多元,雖然社團命名為“Bitcoin 比特幣中文社團”,但該社團討論的內容並不僅侷限在比特幣相關的主題,在該版中經常可以看到其他山寨幣的討論,如Litecoin、Dogecoin、Ethereum…等。
1818

19-
![](/img/5.png)
19+
![圖片描述]/img/5.png
2020

2121
討論的方向包羅萬象,有技術、價格預測、交易所使用者心得、冷錢包的開箱文、全世界關注的區塊鏈相關的新聞與政策。
2222

23-
![](/img/4.png)
23+
![圖片描述]/img/4.png
2424

2525
Link : [https://www.facebook.com/groups/bitcoin.tw/](https://www.facebook.com/groups/bitcoin.tw/)

0 commit comments

Comments
 (0)