jekyll-theme-writeon 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: bdf9eb2ff921dfb94d4b12258e366461dc066fa2f748b66154471f0802a114a5
4
+ data.tar.gz: 1b4951afb5dc0a82fc16c50a7cd93e14858a6e892d4981d28060e5993e18066d
5
+ SHA512:
6
+ metadata.gz: e18fea4581d851dae658aa478fc3825c255e6e5906480aab82d3e55b2f240a37ef1382e7a8351774c88610a23ce227f0ce2804ad2974eee9083fdcbb5dd36077
7
+ data.tar.gz: 2a16089b3ffbb147c0780c14140565bc251179d70969f01a2ddb1d71bd50ced7e7759a43683a35397e3319755cea1eaed20ec086f65de3f18e5e2c8a4db9e9c3
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2026 grisse
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,66 @@
1
+ # jekyll-theme-writeon
2
+
3
+ Writeon is a minimal Jekyll theme for writers who believe content should come first. With a clean design, a simple layout, and a focus on readability, it puts your words at the center of the experience.
4
+
5
+ No unnecessary decorations. No endless customization. Just a quiet space to write, publish, and share your thoughts.
6
+
7
+ Write first. Design less.
8
+
9
+ ## Screenshots
10
+
11
+ ![](_screenshots/featured-image-index-pc.png.png)
12
+
13
+ ![](_screenshots/featured-image-post-pc.png)
14
+
15
+ ![](_screenshots/featured-image-index-mobile.png)
16
+
17
+ ![](_screenshots/featured-image-post-mobile.png)
18
+
19
+ ## Installation
20
+
21
+ Add this line to your Jekyll site's `Gemfile`:
22
+
23
+ ```ruby
24
+ gem "jekyll-theme-writeon"
25
+ ```
26
+
27
+ And add this line to your Jekyll site's `_config.yml`:
28
+
29
+ ```yaml
30
+ theme: jekyll-theme-writeon
31
+ ```
32
+
33
+ And then execute:
34
+
35
+ $ bundle
36
+
37
+ Or install it yourself as:
38
+
39
+ $ gem install jekyll-theme-writeon
40
+
41
+ ## Usage
42
+
43
+ Customize the theme through _config.yml. Configure your site title, description, theme_config, and other settings to suit your needs.
44
+
45
+ To add tags you must add a file with the tag name in _my_tags. In the file you add 2 variables: slug used to reference the tag and name which is displayed in the article header.
46
+
47
+ Writeon provides simple page layouts and reusable includes for building a clean, content-focused blog. Its styles and assets are designed to keep the interface minimal and the reading experience comfortable.
48
+
49
+ For detailed configuration options and examples, see the theme's source code and documentation.
50
+
51
+ ## Contributing
52
+
53
+ Bug reports and pull requests are welcome on GitHub at https://github.com/grisse/jekyll-theme-writeon. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](https://www.contributor-covenant.org/) code of conduct.
54
+
55
+ ## Development
56
+
57
+ To set up your environment to develop this theme, run `bundle install`.
58
+
59
+ Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
60
+
61
+ When your theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled.
62
+ To add a custom directory to your theme-gem, please edit the regexp in `jekyll-theme-writeon.gemspec` accordingly.
63
+
64
+ ## License
65
+
66
+ The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/_config.yml ADDED
@@ -0,0 +1,84 @@
1
+ # Site-wide settings
2
+ title: GRISSE的个人网站 - GRISSE's Personal Website # name of the site
3
+ name: GRISSE # name of site's author
4
+ avatar: "/assets/image/avatar.jpg"
5
+ email: grisse.cn@gmail.com # email of site's author
6
+ url: https://grisse.github.io # root address of the site
7
+ baseurl: "" # subpath of the site, e.g. "/blog" (leave it blank "" if you're site shouldn't use a subpath)
8
+ description: > # description of the site (multiple lines allowed)
9
+ Software Engineer. I blog about <a href="/tag/web-development/">web development</a>, <a href="/tag/machine-learning/">machine learning</a>, and <a href="/tags/">more topics</a>.
10
+
11
+ favicon: "favicon.ico"
12
+ lang: zh
13
+ timezone: Asia/Shanghai
14
+
15
+ # Specific settings
16
+ theme_config:
17
+ back_home_text: "返回首页" # customize text for homepage link in post layout
18
+ date_format: "%Y年%m月%d日" # customize how date is formatted
19
+ github_url: "https://github.com/grisse/grisse.github.io"
20
+ google_analytics: ""
21
+ baidu_analytics: ""
22
+ links:
23
+ - title: Github
24
+ url: "https://github.com/grisse"
25
+ - title: X(Twitter)
26
+ url: "https://x.com/realgrisse"
27
+ - title: Email
28
+ url: "mailto:grisse.cn@gmail.com"
29
+ - title: RSS
30
+ url: "/feed.xml"
31
+
32
+ # Handling Reading
33
+ safe: false
34
+ exclude: ["README.md"]
35
+ encoding: "utf-8"
36
+ paginate_path: /posts/page/:num/
37
+ permalink: posts/:slug
38
+
39
+ # Filtering Content
40
+ # limit_posts: 10
41
+
42
+ sass:
43
+ style: :compressed
44
+
45
+ collections:
46
+ my_tags:
47
+ output: true
48
+ permalink: /tag/:slug/
49
+
50
+ # Default layout
51
+ defaults:
52
+ -
53
+ scope:
54
+ path: ""
55
+ type: my_tags
56
+ values:
57
+ layout: articles_by_tag
58
+ -
59
+ scope:
60
+ type: "pages"
61
+ values:
62
+ layout: "page"
63
+ -
64
+ scope:
65
+ type: "posts"
66
+ values:
67
+ layout: "post"
68
+
69
+ # Plugins
70
+ plugins:
71
+ - jekyll-sitemap
72
+ - jekyll-seo-tag
73
+ - jekyll-feed
74
+ - jekyll-redirect-from
75
+ - jemoji
76
+ - jekyll-mentions
77
+ - jekyll-avatar
78
+
79
+ # Conversion
80
+ highlighter: rouge
81
+ excerpt_separator: "<!--more-->"
82
+ markdown: kramdown
83
+ kramdown:
84
+ input: GFM
@@ -0,0 +1 @@
1
+ <a href="{{ "/" | relative_url }}">{{ site.theme_config.back_home_text }}</a>
@@ -0,0 +1,11 @@
1
+ <script>
2
+ var _hmt = _hmt || [];
3
+ (function() {
4
+ var hm = document.createElement("script");
5
+ hm.type = 'text/javascript';
6
+ hm.async = true;
7
+ hm.src = "//hm.baidu.com/hm.js?{{ site.theme_config.baidu_analytics }}";
8
+ var s = document.getElementsByTagName("script")[0];
9
+ s.parentNode.insertBefore(hm, s);
10
+ })();
11
+ </script>
@@ -0,0 +1,6 @@
1
+ {% comment %}
2
+ Placeholder to allow defining custom head, in principle, you can add anything here, e.g. favicons:
3
+
4
+ 1. Head over to https://realfavicongenerator.net/ to add your own favicons.
5
+ 2. Customize default _includes/custom-head.html in your source directory and insert the given code snippet.
6
+ {% endcomment %}
@@ -0,0 +1,8 @@
1
+ <div class="footer">
2
+ &copy; {{ site.time | date: '%Y' }}
3
+ <a href="{{ site.url | relative_url }}">{{ site.title }}</a>
4
+ · <span>Powered by <a href="https://jekyllrb.com/" target="_blank">Jekyll</a> & <a href="https://github.com/grisse/jekyll-theme-writeon" target="_blank">Writeon Theme</a>.</span>
5
+ <p>
6
+ 本站内容采用<a rel="license" href="https://creativecommons.org/licenses/by-nc/4.0/">知识共享署名-非商业性使用 4.0 国际许可协议</a>进行许可
7
+ </p>
8
+ </div>
@@ -0,0 +1,8 @@
1
+ <script async src="https://www.googletagmanager.com/gtag/js?id={{ site.theme_config.google_analytics }}"></script>
2
+ <script>
3
+ window.dataLayer = window.dataLayer || [];
4
+ function gtag(){window.dataLayer.push(arguments);}
5
+ gtag('js', new Date());
6
+
7
+ gtag('config', '{{ site.theme_config.google_analytics }}');
8
+ </script>
@@ -0,0 +1,22 @@
1
+ <head>
2
+ <meta charset="utf-8">
3
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
4
+ <meta name="viewport" content="width=device-width, initial-scale=1">
5
+
6
+ {%- seo -%}
7
+ {%- feed_meta -%}
8
+
9
+ <link rel="shortcut icon" type="image/x-icon" href="{{ site.favicon | relative_url }}" />
10
+ <link rel="stylesheet" href="{{ '/assets/css/style.css' | relative_url }}">
11
+ <link rel="sitemap" type="application/xml" title="Sitemap" href="{{ '/sitemap.xml' | relative_url }}" />
12
+
13
+ {%- if jekyll.environment == 'production' and site.theme_config.google_analytics -%}
14
+ {%- include google-analytics.html -%}
15
+ {%- endif -%}
16
+ {%- if jekyll.environment == 'production' and site.theme_config.baidu_analytics -%}
17
+ {%- include baidu-analytics.html -%}
18
+ {%- endif -%}
19
+
20
+ {%- include custom-head.html -%}
21
+
22
+ </head>
@@ -0,0 +1,10 @@
1
+ <aside class="logo">
2
+ <a href="{{ "/" | relative_url }}">
3
+ <img src="{{ site.avatar | relative_url }}" class="avatar" alt="{{ site.name }}">
4
+ </a>
5
+ <div class="title">
6
+ <h1>
7
+ <a class="title-link" href="{{ "/" | relative_url }}">{{ site.name }}</a>
8
+ </h1>
9
+ </div>
10
+ </aside>
@@ -0,0 +1,4 @@
1
+ {% comment %}
2
+ Use this to insert markup before the closing body tag.
3
+ For example, scripts that need to be executed after the document has finished loading.
4
+ {% endcomment %}
@@ -0,0 +1,25 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ <article class="typo">
6
+ <h1>#{{ page.title }}</h1>
7
+ {% if site.tags[page.slug] %}
8
+ <ul>
9
+ {% for post in site.tags[page.slug] %}
10
+ <li>
11
+ <a href="{{ post.url | relative_url }}" title="{{ post.title }}">
12
+ {{ post.title }}
13
+ </a>
14
+ <small><span style="padding: 0 .5rem;">-</span>{{ post.date | date: site.theme_config.date_format }}</small>
15
+ </li>
16
+ {% endfor %}
17
+ </ul>
18
+ {% else %}
19
+ <p>
20
+ There are no posts in {{ page.slug }}.
21
+ </p>
22
+ {% endif %}
23
+ </article>
24
+
25
+ <a href="{{ "/tags" | relative_url }}">返回Tags页面</a>
@@ -0,0 +1,12 @@
1
+ <!DOCTYPE html>
2
+ <html lang="{{ page.lang | default: site.lang | default: 'en' }}">
3
+ {%- include head.html -%}
4
+ <body>
5
+ {% include header.html %}
6
+ <main>
7
+ {{ content | replace: '&#8617;', '&#8617;&#xfe0e;' }}
8
+ </main>
9
+ {%- include footer.html -%}
10
+ {%- include sub-footer.html -%}
11
+ </body>
12
+ </html>
@@ -0,0 +1,28 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ <article class="typo home">
6
+ <h1>关于我</h1>
7
+ <p>
8
+ {{ site.description }}
9
+ </p>
10
+ <a href="{{ "/about/" | relative_url }}">More about me →</a>
11
+ <h4>链接</h4>
12
+ <div style="overflow-x: auto;">
13
+ <ul style="display: flex; flex-wrap: nowrap; gap: 16px; list-style: none; padding: 0; margin: 0;">
14
+ {%- for entry in site.theme_config.links -%}
15
+ <li><a href="{{ entry.url | relative_url }}">{{ entry.title }}</a></li>
16
+ {%- endfor -%}
17
+ </ul>
18
+ </div>
19
+ <h1>文章</h1>
20
+ <ul>
21
+ {% for post in site.posts %}
22
+ <li data-tags="{{ post.tags | jsonify | cgi_escape}}">
23
+ <a href="{{ post.url | relative_url }}">{{ post.title }}</a>
24
+ <small><span>-</span>{{ post.date | date: site.theme_config.date_format }}</small>
25
+ </li>
26
+ {% endfor %}
27
+ </ul>
28
+ </article>
@@ -0,0 +1,11 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ <article class="typo">
6
+ <h1>{{ page.title }}</h1>
7
+
8
+ {{ content }}
9
+ </article>
10
+
11
+ {%-include back_link.html-%}
@@ -0,0 +1,31 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ <noscript>
6
+ <style>
7
+ article .footnotes {
8
+ display: block;
9
+ }
10
+ </style>
11
+ </noscript>
12
+
13
+ <article class="typo">
14
+ <h1>{{ page.title }}</h1>
15
+
16
+ <p>
17
+ <address><a href="{{ "/" | relative_url }}">{{ site.name }}</a></address>
18
+ <small><time datetime="{{ page.date }}">{{ page.date | date: site.theme_config.date_format }}</time></small>
19
+ <span>
20
+ {% for tag in page.tags %}
21
+ {{site.my_tags}}
22
+ {% assign tag_name = site.my_tags | where: "slug", tag | map: "name" | first %}
23
+ <a href="{{ 'tag/' | relative_url }}{{ tag }}" title="See all posts with tag '{{ tag_name }}'">#{{ tag_name }}</a>
24
+ {% endfor %}
25
+ </span>
26
+ </p>
27
+
28
+ {{ content }}
29
+ </article>
30
+
31
+ {%-include back_link.html-%}
@@ -0,0 +1,30 @@
1
+ ---
2
+ layout: page
3
+ ---
4
+
5
+ {% assign my_tags = site.collections | where: "label", "my_tags" | first %}
6
+ {% assign sorted_tags = site.tags | sort %}
7
+ <ul style="display: flex; flex-wrap: wrap;">
8
+ {% for tag in sorted_tags %}
9
+ {% assign tag_slug = tag | first %}
10
+ {% assign upcase_tag_slug = tag_slug | upcase %}
11
+ {% assign no_of_posts = tag | last | size %}
12
+
13
+ {% for my_tag in my_tags.docs %}
14
+ {% if tag_slug == my_tag.slug %}
15
+ {% assign tag_name = my_tag.name %}
16
+ {% endif %}
17
+ {% endfor %}
18
+
19
+ {% assign upcase_tag_name = tag_name | default: "Untitled" | upcase %}
20
+
21
+ {% if upcase_tag_slug != "PROJECT" %}
22
+ <li style="margin-right: 40px;">
23
+ <a href="{{ 'tag/' | relative_url }}{{ tag_slug }}" title="See all posts by {{ upcase_tag_name }} tag">
24
+ <span>{{ upcase_tag_name }} <small>({{ no_of_posts }})</small></span>
25
+ </a>
26
+ </li>
27
+ {% endif %}
28
+ {% assign tag_name = "" %}
29
+ {% endfor %}
30
+ </ul>
data/_sass/_base.scss ADDED
@@ -0,0 +1,209 @@
1
+ body {
2
+ padding: 20px;
3
+ margin: 0;
4
+
5
+ @media (min-width: 992px) {
6
+ padding: 35px 50px;
7
+ }
8
+
9
+ }
10
+
11
+ code {
12
+ border-radius: 3px;
13
+ background: #f5f5f5;
14
+ padding: 2px 6px;
15
+ }
16
+
17
+ pre code {
18
+ border-radius: 0;
19
+ background: none;
20
+ padding: 0;
21
+ }
22
+
23
+ .highlighter-rouge {
24
+ font-size: 0.8rem;
25
+ pre {
26
+ overflow: auto;
27
+ }
28
+ }
29
+
30
+ table {
31
+ font-size: 0.75rem;
32
+ }
33
+
34
+ .note {
35
+ background: #fff;
36
+ box-shadow: 0px 0px 8px rgba( 0, 0, 0, 0.2 );
37
+ padding: 20px 20px 50px;
38
+ position: fixed;
39
+ bottom: 0;
40
+ left: 0;
41
+ transition-property: transform;
42
+ transition-duration: 0.6s;
43
+ transition-timing-function: ease;
44
+ -webkit-transition-property: -webkit-transform;
45
+ -webkit-transition-duration: 0.6s;
46
+ -webkit-transition-timing-function: ease;
47
+ transform: translateY( calc( 100% + 8px ) );
48
+ -webkit-transform: translateY( calc( 100% + 8px ) );
49
+ font-size: 14px;
50
+ line-height: 1.7em;
51
+ width: 100%;
52
+ box-sizing: border-box;
53
+
54
+ &.shown {
55
+ transform: translateY( 0 );
56
+ -webkit-transform: translateY( 0 );
57
+ }
58
+
59
+ @media (min-width: 768px) {
60
+ right: 40px;
61
+ padding-bottom: 20px;
62
+ max-width: 400px;
63
+ left: auto;
64
+ bottom: 40px;
65
+ border-radius: 8px;
66
+ transition-property: opacity, transform;
67
+ -webkit-transition-property: opacity, -webkit-transform;
68
+ transition-duration: 0.3s;
69
+ -webkit-transition-duration: 0.3s;
70
+ opacity: 0;
71
+ transform: scale( 0.1 ) translateZ( 0 );
72
+ -webkit-transform: scale( 0.1 ) translateZ( 0 );
73
+
74
+ &.shown {
75
+ transform: scale( 1 ) translateZ( 0 );
76
+ -webkit-transform: scale( 1 ) translateZ( 0 );
77
+ opacity: 1;
78
+ }
79
+
80
+ }
81
+
82
+ }
83
+
84
+ .logo {
85
+ display: flex;
86
+ flex-direction: row;
87
+ align-items: center;
88
+
89
+ .avatar {
90
+ display: block;
91
+ background-clip: padding-box;
92
+ border-radius: 50%;
93
+ height: 50px;
94
+ width: 3.125rem;
95
+ margin-bottom: 0;
96
+ margin-left: auto;
97
+ margin-right: auto;
98
+ margin-top: inherit;
99
+ }
100
+
101
+ .title {
102
+ align-items: center;
103
+ display: flex;
104
+ justify-content: space-between;
105
+ margin: .8125rem 0 .8125rem .4875rem;
106
+
107
+ h1 {
108
+ font-size: 1.5rem;
109
+ font-weight: 600;
110
+ line-height: 2.4375rem;
111
+ margin: 0;
112
+ }
113
+
114
+ .title-link {
115
+ color: #222
116
+ }
117
+ }
118
+
119
+ @media (min-width: 992px) {
120
+ position: fixed;
121
+ flex-direction: column;
122
+ align-items: center;
123
+ top: 50px;
124
+ right: 50px;
125
+
126
+ .avatar {
127
+ display: block;
128
+ transition: transform 0.4s;
129
+ -webkit-transition: -webkit-transform 0.4s;
130
+ box-sizing: border-box;
131
+ line-height: 80px;
132
+ height: 80px;
133
+ width: 80px;
134
+ border-radius: 80px;
135
+ }
136
+
137
+ .title {
138
+ margin: 0;
139
+ text-align: center;
140
+ }
141
+ }
142
+
143
+ }
144
+
145
+ article {
146
+ max-width: 1024px;
147
+
148
+ .footnote {
149
+ border: 0;
150
+ }
151
+
152
+ .footnotes {
153
+ margin: 40px 0;
154
+
155
+ .reversefootnote {
156
+ border: 0;
157
+ }
158
+
159
+ }
160
+
161
+ }
162
+
163
+ article.home {
164
+
165
+ ul {
166
+
167
+ li {
168
+ margin: 10px 0;
169
+
170
+ a {
171
+ color: #000;
172
+ display: inline-block;
173
+ box-sizing: border-box;
174
+ }
175
+
176
+ small {
177
+ font-size: 0.8rem;
178
+ display: block;
179
+
180
+ span {
181
+ display: none;
182
+ }
183
+ }
184
+
185
+ @media (min-width: 768px) {
186
+ small {
187
+ display: inline;
188
+
189
+ span {
190
+ padding: 0 .5rem;
191
+ display: inline;
192
+ }
193
+ }
194
+ }
195
+
196
+ }
197
+
198
+ }
199
+ }
200
+
201
+ .footer {
202
+ margin-top: 2rem;
203
+ font-size: 12px;
204
+ color: #ccc;
205
+
206
+ a {
207
+ color: #ccc;
208
+ }
209
+ }
@@ -0,0 +1,209 @@
1
+ .highlight table td { padding: 5px; }
2
+ .highlight table pre { margin: 0; }
3
+ .highlight .cm {
4
+ color: #999988;
5
+ font-style: italic;
6
+ }
7
+ .highlight .cp {
8
+ color: #999999;
9
+ font-weight: bold;
10
+ }
11
+ .highlight .c1 {
12
+ color: #999988;
13
+ font-style: italic;
14
+ }
15
+ .highlight .cs {
16
+ color: #999999;
17
+ font-weight: bold;
18
+ font-style: italic;
19
+ }
20
+ .highlight .c, .highlight .cd {
21
+ color: #999988;
22
+ font-style: italic;
23
+ }
24
+ .highlight .err {
25
+ color: #a61717;
26
+ background-color: #e3d2d2;
27
+ }
28
+ .highlight .gd {
29
+ color: #000000;
30
+ background-color: #ffdddd;
31
+ }
32
+ .highlight .ge {
33
+ color: #000000;
34
+ font-style: italic;
35
+ }
36
+ .highlight .gr {
37
+ color: #aa0000;
38
+ }
39
+ .highlight .gh {
40
+ color: #999999;
41
+ }
42
+ .highlight .gi {
43
+ color: #000000;
44
+ background-color: #ddffdd;
45
+ }
46
+ .highlight .go {
47
+ color: #888888;
48
+ }
49
+ .highlight .gp {
50
+ color: #555555;
51
+ }
52
+ .highlight .gs {
53
+ font-weight: bold;
54
+ }
55
+ .highlight .gu {
56
+ color: #aaaaaa;
57
+ }
58
+ .highlight .gt {
59
+ color: #aa0000;
60
+ }
61
+ .highlight .kc {
62
+ color: #000000;
63
+ font-weight: bold;
64
+ }
65
+ .highlight .kd {
66
+ color: #000000;
67
+ font-weight: bold;
68
+ }
69
+ .highlight .kn {
70
+ color: #000000;
71
+ font-weight: bold;
72
+ }
73
+ .highlight .kp {
74
+ color: #000000;
75
+ font-weight: bold;
76
+ }
77
+ .highlight .kr {
78
+ color: #000000;
79
+ font-weight: bold;
80
+ }
81
+ .highlight .kt {
82
+ color: #445588;
83
+ font-weight: bold;
84
+ }
85
+ .highlight .k, .highlight .kv {
86
+ color: #000000;
87
+ font-weight: bold;
88
+ }
89
+ .highlight .mf {
90
+ color: #009999;
91
+ }
92
+ .highlight .mh {
93
+ color: #009999;
94
+ }
95
+ .highlight .il {
96
+ color: #009999;
97
+ }
98
+ .highlight .mi {
99
+ color: #009999;
100
+ }
101
+ .highlight .mo {
102
+ color: #009999;
103
+ }
104
+ .highlight .m, .highlight .mb, .highlight .mx {
105
+ color: #009999;
106
+ }
107
+ .highlight .sb {
108
+ color: #d14;
109
+ }
110
+ .highlight .sc {
111
+ color: #d14;
112
+ }
113
+ .highlight .sd {
114
+ color: #d14;
115
+ }
116
+ .highlight .s2 {
117
+ color: #d14;
118
+ }
119
+ .highlight .se {
120
+ color: #d14;
121
+ }
122
+ .highlight .sh {
123
+ color: #d14;
124
+ }
125
+ .highlight .si {
126
+ color: #d14;
127
+ }
128
+ .highlight .sx {
129
+ color: #d14;
130
+ }
131
+ .highlight .sr {
132
+ color: #009926;
133
+ }
134
+ .highlight .s1 {
135
+ color: #d14;
136
+ }
137
+ .highlight .ss {
138
+ color: #990073;
139
+ }
140
+ .highlight .s {
141
+ color: #d14;
142
+ }
143
+ .highlight .na {
144
+ color: #008080;
145
+ }
146
+ .highlight .bp {
147
+ color: #999999;
148
+ }
149
+ .highlight .nb {
150
+ color: #0086B3;
151
+ }
152
+ .highlight .nc {
153
+ color: #445588;
154
+ font-weight: bold;
155
+ }
156
+ .highlight .no {
157
+ color: #008080;
158
+ }
159
+ .highlight .nd {
160
+ color: #3c5d5d;
161
+ font-weight: bold;
162
+ }
163
+ .highlight .ni {
164
+ color: #800080;
165
+ }
166
+ .highlight .ne {
167
+ color: #990000;
168
+ font-weight: bold;
169
+ }
170
+ .highlight .nf {
171
+ color: #990000;
172
+ font-weight: bold;
173
+ }
174
+ .highlight .nl {
175
+ color: #990000;
176
+ font-weight: bold;
177
+ }
178
+ .highlight .nn {
179
+ color: #555555;
180
+ }
181
+ .highlight .nt {
182
+ color: #000080;
183
+ }
184
+ .highlight .vc {
185
+ color: #008080;
186
+ }
187
+ .highlight .vg {
188
+ color: #008080;
189
+ }
190
+ .highlight .vi {
191
+ color: #008080;
192
+ }
193
+ .highlight .nv {
194
+ color: #008080;
195
+ }
196
+ .highlight .ow {
197
+ color: #000000;
198
+ font-weight: bold;
199
+ }
200
+ .highlight .o {
201
+ color: #000000;
202
+ font-weight: bold;
203
+ }
204
+ .highlight .w {
205
+ color: #bbbbbb;
206
+ }
207
+ .highlight {
208
+ background-color: #f8f8f8;
209
+ }
data/_sass/_typo.scss ADDED
@@ -0,0 +1,346 @@
1
+ @charset "utf-8";
2
+
3
+ /* 防止用户自定义背景颜色对网页的影响,添加让用户可以自定义字体 */
4
+ html {
5
+ color: #333;
6
+ background: #fff;
7
+ -webkit-text-size-adjust: 100%;
8
+ -ms-text-size-adjust: 100%;
9
+ text-rendering: optimizelegibility;
10
+ }
11
+
12
+ /* 如果你的项目仅支持 IE9+ | Chrome | Firefox 等,推荐在 <html> 中添加 .borderbox 这个 class */
13
+ html.borderbox *, html.borderbox *:before, html.borderbox *:after {
14
+ -moz-box-sizing: border-box;
15
+ -webkit-box-sizing: border-box;
16
+ box-sizing: border-box;
17
+ }
18
+
19
+ /* 内外边距通常让各个浏览器样式的表现位置不同 */
20
+ body, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, blockquote, th, td, hr, button, article, aside, details, figcaption, figure, footer, header, menu, nav, section {
21
+ margin: 0;
22
+ padding: 0;
23
+ }
24
+
25
+ /* 重设 HTML5 标签, IE 需要在 js 中 createElement(TAG) */
26
+ article, aside, details, figcaption, figure, footer, header, menu, nav, section {
27
+ display: block;
28
+ }
29
+
30
+ /* HTML5 媒体文件跟 img 保持一致 */
31
+ audio, canvas, video {
32
+ display: inline-block;
33
+ }
34
+
35
+ /* 要注意表单元素并不继承父级 font 的问题 */
36
+ body, button, input, select, textarea {
37
+ font: 300 1em/1.8 PingFang SC, Lantinghei SC, Microsoft Yahei, Hiragino Sans GB, Microsoft Sans Serif, WenQuanYi Micro Hei, sans;
38
+ }
39
+
40
+ button::-moz-focus-inner,
41
+ input::-moz-focus-inner {
42
+ padding: 0;
43
+ border: 0;
44
+ }
45
+
46
+ /* 去掉各Table cell 的边距并让其边重合 */
47
+ table {
48
+ border-collapse: collapse;
49
+ border-spacing: 0;
50
+ }
51
+
52
+ /* 去除默认边框 */
53
+ fieldset, img {
54
+ border: 0;
55
+ }
56
+
57
+ /* 块/段落引用 */
58
+ blockquote {
59
+ position: relative;
60
+ color: #999;
61
+ font-weight: 400;
62
+ border-left: 1px solid #1abc9c;
63
+ padding-left: 1em;
64
+ margin: 1em 3em 1em 2em;
65
+ }
66
+
67
+ @media only screen and ( max-width: 640px ) {
68
+ blockquote {
69
+ margin: 1em 0;
70
+ }
71
+ }
72
+
73
+ /* Firefox 以外,元素没有下划线,需添加 */
74
+ acronym, abbr {
75
+ border-bottom: 1px dotted;
76
+ font-variant: normal;
77
+ }
78
+
79
+ /* 添加鼠标问号,进一步确保应用的语义是正确的(要知道,交互他们也有洁癖,如果你不去掉,那得多花点口舌) */
80
+ abbr {
81
+ cursor: help;
82
+ }
83
+
84
+ /* 一致的 del 样式 */
85
+ del {
86
+ text-decoration: line-through;
87
+ }
88
+
89
+ address, caption, cite, code, dfn, em, th, var {
90
+ font-style: normal;
91
+ font-weight: 400;
92
+ }
93
+
94
+ /* 去掉列表前的标识, li 会继承,大部分网站通常用列表来很多内容,所以应该当去 */
95
+ ul, ol {
96
+ list-style: none;
97
+ }
98
+
99
+ /* 对齐是排版最重要的因素, 别让什么都居中 */
100
+ caption, th {
101
+ text-align: left;
102
+ }
103
+
104
+ q:before, q:after {
105
+ content: '';
106
+ }
107
+
108
+ /* 统一上标和下标 */
109
+ sub, sup {
110
+ font-size: 75%;
111
+ line-height: 0;
112
+ position: relative;
113
+ }
114
+
115
+ :root sub, :root sup {
116
+ vertical-align: baseline; /* for ie9 and other modern browsers */
117
+ }
118
+
119
+ sup {
120
+ top: -0.5em;
121
+ }
122
+
123
+ sub {
124
+ bottom: -0.25em;
125
+ }
126
+
127
+ /* 让链接在 hover 状态下显示下划线 */
128
+ a {
129
+ color: #164bc5;
130
+ }
131
+
132
+ a:hover {
133
+ color: #0f9640;
134
+ text-decoration: underline;
135
+ }
136
+
137
+ .typo a {
138
+ color: #333;
139
+ border-bottom: 1px solid #333;
140
+ }
141
+
142
+ .typo a:hover {
143
+ border-bottom-color: #555;
144
+ color: #555;
145
+ text-decoration: none;
146
+ }
147
+
148
+ /* 默认不显示下划线,保持页面简洁 */
149
+ ins, a {
150
+ text-decoration: none;
151
+ }
152
+
153
+ /* 专名号:虽然 u 已经重回 html5 Draft,但在所有浏览器中都是可以使用的,
154
+ * 要做到更好,向后兼容的话,添加 class="typo-u" 来显示专名号
155
+ * 关于 <u> 标签:http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-u-element
156
+ * 被放弃的是 4,之前一直搞错 http://www.w3.org/TR/html401/appendix/changes.html#idx-deprecated
157
+ * 一篇关于 <u> 标签的很好文章:http://html5doctor.com/u-element/
158
+ */
159
+ u, .typo-u {
160
+ text-decoration: underline;
161
+ }
162
+
163
+ /* 标记,类似于手写的荧光笔的作用 */
164
+ mark {
165
+ background: #fffdd1;
166
+ border-bottom: 1px solid #ffedce;
167
+ padding: 2px;
168
+ margin: 0 5px;
169
+ }
170
+
171
+ /* 代码片断 */
172
+ pre, code, pre tt {
173
+ font-family: Courier, 'Courier New', monospace;
174
+ }
175
+
176
+ pre {
177
+ border: 1px solid #ddd;
178
+ padding: 1em 1.5em;
179
+ display: block;
180
+ -webkit-overflow-scrolling: touch;
181
+ }
182
+
183
+ /* 一致化 horizontal rule */
184
+ hr {
185
+ border: none;
186
+ border-bottom: 1px solid #cfcfcf;
187
+ margin-bottom: 0.8em;
188
+ height: 10px;
189
+ }
190
+
191
+ /* 底部印刷体、版本等标记 */
192
+ small, .typo-small,
193
+ /* 图片说明 */
194
+ figcaption {
195
+ font-size: 0.9em;
196
+ color: #888;
197
+ }
198
+
199
+ strong, b {
200
+ font-weight: bold;
201
+ color: #000;
202
+ }
203
+
204
+ /* 可拖动文件添加拖动手势 */
205
+ [draggable] {
206
+ cursor: move;
207
+ }
208
+
209
+ .clearfix:before, .clearfix:after {
210
+ content: "";
211
+ display: table;
212
+ }
213
+
214
+ .clearfix:after {
215
+ clear: both;
216
+ }
217
+
218
+ .clearfix {
219
+ zoom: 1;
220
+ }
221
+
222
+ /* 强制文本换行 */
223
+ .textwrap, .textwrap td, .textwrap th {
224
+ word-wrap: break-word;
225
+ word-break: break-all;
226
+ }
227
+
228
+ .textwrap-table {
229
+ table-layout: fixed;
230
+ }
231
+
232
+ /* 提供 serif 版本的字体设置: iOS 下中文自动 fallback 到 sans-serif */
233
+ .serif {
234
+ font-family: Palatino, Optima, Georgia, serif;
235
+ }
236
+
237
+ /* 保证块/段落之间的空白隔行 */
238
+ .typo p, .typo pre, .typo ul, .typo ol, .typo dl, .typo form, .typo hr, .typo table,
239
+ .typo-p, .typo-pre, .typo-ul, .typo-ol, .typo-dl, .typo-form, .typo-hr, .typo-table, blockquote {
240
+ margin-bottom: 1.2em
241
+ }
242
+
243
+ h1, h2, h3, h4, h5, h6 {
244
+ font-family: PingFang SC, Verdana, Helvetica Neue, Microsoft Yahei, Hiragino Sans GB, Microsoft Sans Serif, WenQuanYi Micro Hei, sans-serif;
245
+ font-weight: 100;
246
+ color: #000;
247
+ line-height: 1.35;
248
+ }
249
+
250
+ /* 标题应该更贴紧内容,并与其他块区分,margin 值要相应做优化 */
251
+ .typo h1, .typo h2, .typo h3, .typo h4, .typo h5, .typo h6,
252
+ .typo-h1, .typo-h2, .typo-h3, .typo-h4, .typo-h5, .typo-h6 {
253
+ margin-top: 1.2em;
254
+ margin-bottom: 0.6em;
255
+ line-height: 1.35;
256
+ }
257
+
258
+ .typo h1, .typo-h1 {
259
+ font-size: 2em;
260
+ }
261
+
262
+ .typo h2, .typo-h2 {
263
+ font-size: 1.8em;
264
+ }
265
+
266
+ .typo h3, .typo-h3 {
267
+ font-size: 1.6em;
268
+ }
269
+
270
+ .typo h4, .typo-h4 {
271
+ font-size: 1.4em;
272
+ }
273
+
274
+ .typo h5, .typo h6, .typo-h5, .typo-h6 {
275
+ font-size: 1.2em;
276
+ }
277
+
278
+ /* 在文章中,应该还原 ul 和 ol 的样式 */
279
+ .typo ul, .typo-ul {
280
+ margin-left: 1.3em;
281
+ list-style: disc;
282
+ }
283
+
284
+ .typo ol, .typo-ol {
285
+ list-style: decimal;
286
+ margin-left: 1.9em;
287
+ }
288
+
289
+ .typo li ul, .typo li ol, .typo-ul ul, .typo-ul ol, .typo-ol ul, .typo-ol ol {
290
+ margin-bottom: 0.8em;
291
+ margin-left: 2em;
292
+ }
293
+
294
+ .typo li ul, .typo-ul ul, .typo-ol ul {
295
+ list-style: circle;
296
+ }
297
+
298
+ /* 同 ul/ol,在文章中应用 table 基本格式 */
299
+ .typo table th, .typo table td, .typo-table th, .typo-table td, .typo table caption {
300
+ border: 1px solid #ddd;
301
+ padding: 0.5em 1em;
302
+ color: #666;
303
+ }
304
+
305
+ .typo table th, .typo-table th {
306
+ background: #fbfbfb;
307
+ }
308
+
309
+ .typo table thead th, .typo-table thead th {
310
+ background: #f1f1f1;
311
+ }
312
+
313
+ .typo table caption {
314
+ border-bottom: none;
315
+ }
316
+
317
+ /* 去除 webkit 中 input 和 textarea 的默认样式 */
318
+ .typo-input, .typo-textarea {
319
+ -webkit-appearance: none;
320
+ border-radius: 0;
321
+ }
322
+
323
+ .typo-em, .typo em, legend, caption {
324
+ color: #000;
325
+ font-weight: inherit;
326
+ }
327
+
328
+ /* 着重号,只能在少量(少于100个字符)且全是全角字符的情况下使用 */
329
+ .typo-em {
330
+ position: relative;
331
+ }
332
+
333
+ .typo-em:after {
334
+ position: absolute;
335
+ top: 0.65em;
336
+ left: 0;
337
+ width: 100%;
338
+ overflow: hidden;
339
+ white-space: nowrap;
340
+ content: "・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・";
341
+ }
342
+
343
+ /* Responsive images */
344
+ .typo img {
345
+ max-width: 100%;
346
+ }
@@ -0,0 +1,7 @@
1
+ ---
2
+ ---
3
+
4
+ @import
5
+ "typo",
6
+ "base",
7
+ "syntax-highlighting";
Binary file
metadata ADDED
@@ -0,0 +1,79 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jekyll-theme-writeon
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - grisse
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2026-10-18 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: jekyll
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '4.4'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '4.4'
27
+ description:
28
+ email:
29
+ - grisse.cn@gmail.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - LICENSE.txt
35
+ - README.md
36
+ - _config.yml
37
+ - _includes/back_link.html
38
+ - _includes/baidu-analytics.html
39
+ - _includes/custom-head.html
40
+ - _includes/footer.html
41
+ - _includes/google-analytics.html
42
+ - _includes/head.html
43
+ - _includes/header.html
44
+ - _includes/sub-footer.html
45
+ - _layouts/articles_by_tag.html
46
+ - _layouts/default.html
47
+ - _layouts/home.html
48
+ - _layouts/page.html
49
+ - _layouts/post.html
50
+ - _layouts/tags.html
51
+ - _sass/_base.scss
52
+ - _sass/_syntax-highlighting.scss
53
+ - _sass/_typo.scss
54
+ - assets/css/style.scss
55
+ - assets/image/avatar.jpg
56
+ homepage: https://github.com/grisse/jekyll-theme-writeon
57
+ licenses:
58
+ - MIT
59
+ metadata: {}
60
+ post_install_message:
61
+ rdoc_options: []
62
+ require_paths:
63
+ - lib
64
+ required_ruby_version: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '3.0'
69
+ required_rubygems_version: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ version: '0'
74
+ requirements: []
75
+ rubygems_version: 3.5.14
76
+ signing_key:
77
+ specification_version: 4
78
+ summary: A minimal Jekyll theme for content-focused blogs — write first, design less.
79
+ test_files: []