文章发布流程记录

Posted by Dorck on November 12, 2021

隔了两个月未更新本地文章到 Github,今天突然想去发布两篇,结果流程命令全然忘记了。为防止以后出现类似情况,这里描述一下文章发布的工作流,仅作记录使用。

Posts

Blogging is baked into Jekyll. You write blog posts as text files and Jekyll provides everything you need to turn it into a blog.

The Posts Folder

The _posts folder is where your blog posts live. You typically write posts in Markdown, HTML is also supported.

Creating Posts

To create a post, add a file to your _posts directory with the following format:

1
YEAR-MONTH-DAY-title.MARKUP

Where YEAR is a four-digit number, MONTH and DAY are both two-digit numbers, and MARKUP is the file extension representing the format used in the file. For example, the following are examples of valid post filenames:

1
2
2011-12-31-new-years-eve-is-awesome.md
2012-09-12-how-to-write-a-blog.md

All blog post files must begin with front matter which is typically used to set a layout or other meta data. For a simple example this can just be empty:

1
2
3
4
5
6
7
8
9
10
---
layout: post
title:  "Welcome to Jekyll!"
---

# Welcome

**Hello world**, this is my first Jekyll blog post.

I hope you like it!

Use the post_url tag to link to other posts without having to worry about the URLs breaking when the site permalink style changes.

Be aware of character sets

Content processors can modify certain characters to make them look nicer. For example, the smart extension in Redcarpet converts standard, ASCII quotation characters to curly, Unicode ones. In order for the browser to display those characters properly, define the charset meta value by including <meta charset="utf-8"> in the <head> of your layout.

Including images and resources

At some point, you’ll want to include images, downloads, or other digital assets along with your text content. One common solution is to create a folder in the root of the project directory called something like assets, into which any images, files or other resources are placed. Then, from within any post, they can be linked to using the site’s root as the path for the asset to include. The best way to do this depends on the way your site’s (sub)domain and path are configured, but here are some simple examples in Markdown:

Including an image asset in a post:

1
2
... which is shown in the screenshot below:
![My helpful screenshot](/assets/screenshot.jpg)

Linking to a PDF for readers to download:

1
... you can [get the PDF](/assets/mydoc.pdf) directly.

Displaying an index of posts

Creating an index of posts on another page should be easy thanks to Liquid and its tags. Here’s a simple example of how to create a list of links to your blog posts:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<ul>
  
    <li>
      <a href="/android/2023/09/16/deep-link/">Android上的Deep-Link技术调研</a>
    </li>
  
    <li>
      <a href="/2023/05/04/app-init-process/">Launcher进程启动过程剖析</a>
    </li>
  
    <li>
      <a href="/2023/04/29/java-producer-consumer-model/">回顾Java中经典的生产/消费者模型</a>
    </li>
  
    <li>
      <a href="/2023/04/22/android-initialization/">Android系统启动流程剖析</a>
    </li>
  
    <li>
      <a href="/2023/04/21/aosp-download/">AOSP在Mac上的编译实践(上)</a>
    </li>
  
    <li>
      <a href="/skill/2023/04/16/code-shortcut/">效率编程之快捷键篇</a>
    </li>
  
    <li>
      <a href="/android/2023/04/07/android-thread-creation/">Android系统中线程的创建过程</a>
    </li>
  
    <li>
      <a href="/skill/2023/03/29/chatgpt-talk/">简单聊聊 ChatGPT</a>
    </li>
  
    <li>
      <a href="/android/2023/03/27/about-prof-dir/">Android系统中关于/proc目录的点滴</a>
    </li>
  
    <li>
      <a href="/2023/03/19/min-number/">把数组排成最小的数</a>
    </li>
  
    <li>
      <a href="/gradle/2022/09/21/gradle-property/">Gradle手札之Properties配置</a>
    </li>
  
    <li>
      <a href="/skill/2022/09/13/git-user-guide/">Git用户手札</a>
    </li>
  
    <li>
      <a href="/skill/2022/09/06/github-actions-auto-publish/">GitHub Actions实践之自动发布组件</a>
    </li>
  
    <li>
      <a href="/gradle/2022/08/28/how-to-publish-gradle-plugin/">关于发布Gradle插件到Maven开放仓库的碎碎念</a>
    </li>
  
    <li>
      <a href="/kotlin/2022/08/27/kotlin-dsl-bad-feeling/">记一次Kotlin DSL的糟糕体验</a>
    </li>
  
    <li>
      <a href="/gradle/2022/08/20/component-publication-plugin/">Gradle手札之组件发布迅疾如风</a>
    </li>
  
    <li>
      <a href="/android/2022/08/10/android-lint/">Android代码检查之自定义Lint</a>
    </li>
  
    <li>
      <a href="/gradle/2022/07/26/publish-library-to-github-repo/">发布组件到GitHub Packages</a>
    </li>
  
    <li>
      <a href="/other/2022/07/16/change-article-comments/">关于博客更换评论系统的一场厮杀</a>
    </li>
  
    <li>
      <a href="/gradle/2022/06/30/gradle-command-line-interface/">Gradle手札之命令行接口一览</a>
    </li>
  
    <li>
      <a href="/kotlin/2022/05/05/kotlin-companion-object/">揭开 Kotlin 中的 companion object 的奥秘</a>
    </li>
  
    <li>
      <a href="/pattern-design/2022/04/24/pattern-design-note/">行为型设计模式一览</a>
    </li>
  
    <li>
      <a href="/skill/2022/04/17/sublime-auto-launch/">Sublime Text在Mac上开机自启动问题</a>
    </li>
  
    <li>
      <a href="/gradle/2022/04/17/gradle-dep-management/">Gradle 组件依赖版本管理</a>
    </li>
  
    <li>
      <a href="/android/2022/04/10/context-instance/">如何维护一个全局 Context</a>
    </li>
  
    <li>
      <a href="/2022/03/19/sort-collections/">常见排序算法整理</a>
    </li>
  
    <li>
      <a href="/computer/2022/03/13/memory-allocation/">操作系统地址空间与内存分配</a>
    </li>
  
    <li>
      <a href="/computer/2022/03/12/os-boot-process/">操作系统的启动过程</a>
    </li>
  
    <li>
      <a href="/computer/2022/03/12/know-what-os/">操作系统原理的基本概念和组成</a>
    </li>
  
    <li>
      <a href="/skill/2022/02/27/git-emoji-commit/">Git emoji 提交规约</a>
    </li>
  
    <li>
      <a href="/indie/2022/02/27/indie-developer-skills/">独立开发者需奉行的原则</a>
    </li>
  
    <li>
      <a href="/skill/2021/11/12/git-default-editor/">Git 默认编辑器替换</a>
    </li>
  
    <li>
      <a href="/skill/2021/11/12/article-publications-flow/">文章发布流程记录</a>
    </li>
  
    <li>
      <a href="/android/2021/08/08/collection-copy/">关于 StateFlow 使用的一次车祸现场</a>
    </li>
  
    <li>
      <a href="/tools/2021/08/07/markdown-drawing/">Markdown 流程图绘制的二三事儿</a>
    </li>
  
    <li>
      <a href="/other/2021/08/05/about-avoid-useless-learning/">关于如何避免低效学习的所思</a>
    </li>
  
    <li>
      <a href="/android/2020/08/12/MotionLayout-part2/">MotionLayout:打开动画新世界大门(partII)</a>
    </li>
  
    <li>
      <a href="/android/2020/06/29/android-proguard/">一篇文章带你领略Android混淆的魅力</a>
    </li>
  
    <li>
      <a href="/flutter/2020/04/19/flutter-tips/">Flutter 开发小结 | Tips</a>
    </li>
  
    <li>
      <a href="/flutter/2020/02/18/flutter-timer/">Flutter 中“倒计时”的那些事儿</a>
    </li>
  
    <li>
      <a href="/android/2019/10/19/motionlayout-part1/">MotionLayout:打开动画新世界大门(partI)</a>
    </li>
  
    <li>
      <a href="/android/2019/08/11/android-tools-attribute/">是时候让 Android Tools 属性拯救你了</a>
    </li>
  
    <li>
      <a href="/kotlin/2019/05/21/kotlin-when/">带你领略 Kotlin 中的 “when”魔法</a>
    </li>
  
    <li>
      <a href="/android/architecture/2018/12/24/mvp-presenter/">Android中的 MVP:如何使 Presenter 层系统化?</a>
    </li>
  
    <li>
      <a href="/kotlin/2018/12/22/kotlin-functions/">当 Kotlin 中的监听器包含多个方法时,如何让它 “巧夺天工”?</a>
    </li>
  
    <li>
      <a href="/kotlin/2018/12/11/kotlin-anko/">Android Kotlin 快速开发之 Anko 魔法</a>
    </li>
  
    <li>
      <a href="/2018/05/20/constraintlayout/">带你领略 ConstraintLayout 1.1 的新功能</a>
    </li>
  
</ul>

You have full control over how (and where) you display your posts, and how you structure your site. You should read more about how templates work with Jekyll if you want to know more.

Note that the post variable only exists inside the for loop above. If you wish to access the currently-rendering page/posts’s variables (the variables of the post/page that has the for loop in it), use the page variable instead.

Tags and Categories

Jekyll has first class support for tags and categories in blog posts.

Tags

Tags for a post are defined in the post’s front matter using either the key tag for a single entry or tags for multiple entries. Since Jekyll expects multiple items mapped to the key tags, it will automatically split a string entry if it contains whitespace. For example, while front matter tag: classic hollywood will be processed into a singular entity "classic hollywood", front matter tags: classic hollywood will be processed into an array of entries ["classic", "hollywood"].

Irrespective of the front matter key chosen, Jekyll stores the metadata mapped to the plural key which is exposed to Liquid templates.

All tags registered in the current site are exposed to Liquid templates via site.tags. Iterating over site.tags on a page will yield another array with two items, where the first item is the name of the tag and the second item being an array of posts with that tag.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
  <h3>ConstraintLayout</h3>
  <ul>
    
      <li><a href="/2018/05/20/constraintlayout/">带你领略 ConstraintLayout 1.1 的新功能</a></li>
    
  </ul>

  <h3>Kotlin</h3>
  <ul>
    
      <li><a href="/kotlin/2022/05/05/kotlin-companion-object/">揭开 Kotlin 中的 companion object 的奥秘</a></li>
    
      <li><a href="/android/2021/08/08/collection-copy/">关于 StateFlow 使用的一次车祸现场</a></li>
    
      <li><a href="/kotlin/2019/05/21/kotlin-when/">带你领略 Kotlin 中的 “when”魔法</a></li>
    
      <li><a href="/kotlin/2018/12/22/kotlin-functions/">当 Kotlin 中的监听器包含多个方法时,如何让它 “巧夺天工”?</a></li>
    
      <li><a href="/kotlin/2018/12/11/kotlin-anko/">Android Kotlin 快速开发之 Anko 魔法</a></li>
    
  </ul>

  <h3>Anko</h3>
  <ul>
    
      <li><a href="/kotlin/2018/12/11/kotlin-anko/">Android Kotlin 快速开发之 Anko 魔法</a></li>
    
  </ul>

  <h3>翻译</h3>
  <ul>
    
      <li><a href="/kotlin/2018/12/22/kotlin-functions/">当 Kotlin 中的监听器包含多个方法时,如何让它 “巧夺天工”?</a></li>
    
  </ul>

  <h3>MVP</h3>
  <ul>
    
      <li><a href="/android/architecture/2018/12/24/mvp-presenter/">Android中的 MVP:如何使 Presenter 层系统化?</a></li>
    
  </ul>

  <h3>Android architecture</h3>
  <ul>
    
      <li><a href="/pattern-design/2022/04/24/pattern-design-note/">行为型设计模式一览</a></li>
    
      <li><a href="/android/architecture/2018/12/24/mvp-presenter/">Android中的 MVP:如何使 Presenter 层系统化?</a></li>
    
  </ul>

  <h3>Android</h3>
  <ul>
    
      <li><a href="/skill/2022/09/06/github-actions-auto-publish/">GitHub Actions实践之自动发布组件</a></li>
    
      <li><a href="/gradle/2022/08/28/how-to-publish-gradle-plugin/">关于发布Gradle插件到Maven开放仓库的碎碎念</a></li>
    
      <li><a href="/gradle/2022/06/30/gradle-command-line-interface/">Gradle手札之命令行接口一览</a></li>
    
      <li><a href="/gradle/2022/04/17/gradle-dep-management/">Gradle 组件依赖版本管理</a></li>
    
      <li><a href="/android/2022/04/10/context-instance/">如何维护一个全局 Context</a></li>
    
      <li><a href="/android/2020/06/29/android-proguard/">一篇文章带你领略Android混淆的魅力</a></li>
    
      <li><a href="/android/2019/08/11/android-tools-attribute/">是时候让 Android Tools 属性拯救你了</a></li>
    
  </ul>

  <h3>tools</h3>
  <ul>
    
      <li><a href="/android/2019/08/11/android-tools-attribute/">是时候让 Android Tools 属性拯救你了</a></li>
    
  </ul>

  <h3>MotionLayout</h3>
  <ul>
    
      <li><a href="/android/2020/08/12/MotionLayout-part2/">MotionLayout:打开动画新世界大门(partII)</a></li>
    
      <li><a href="/android/2019/10/19/motionlayout-part1/">MotionLayout:打开动画新世界大门(partI)</a></li>
    
  </ul>

  <h3>Android 动画</h3>
  <ul>
    
      <li><a href="/android/2020/08/12/MotionLayout-part2/">MotionLayout:打开动画新世界大门(partII)</a></li>
    
      <li><a href="/android/2019/10/19/motionlayout-part1/">MotionLayout:打开动画新世界大门(partI)</a></li>
    
  </ul>

  <h3>Flutter</h3>
  <ul>
    
      <li><a href="/flutter/2020/04/19/flutter-tips/">Flutter 开发小结 | Tips</a></li>
    
      <li><a href="/flutter/2020/02/18/flutter-timer/">Flutter 中“倒计时”的那些事儿</a></li>
    
  </ul>

  <h3>Proguard</h3>
  <ul>
    
      <li><a href="/android/2020/06/29/android-proguard/">一篇文章带你领略Android混淆的魅力</a></li>
    
  </ul>

  <h3>杂谈</h3>
  <ul>
    
      <li><a href="/skill/2021/11/12/article-publications-flow/">文章发布流程记录</a></li>
    
      <li><a href="/other/2021/08/05/about-avoid-useless-learning/">关于如何避免低效学习的所思</a></li>
    
  </ul>

  <h3>学习方法</h3>
  <ul>
    
      <li><a href="/tools/2021/08/07/markdown-drawing/">Markdown 流程图绘制的二三事儿</a></li>
    
      <li><a href="/other/2021/08/05/about-avoid-useless-learning/">关于如何避免低效学习的所思</a></li>
    
  </ul>

  <h3>工具</h3>
  <ul>
    
      <li><a href="/skill/2022/04/17/sublime-auto-launch/">Sublime Text在Mac上开机自启动问题</a></li>
    
      <li><a href="/tools/2021/08/07/markdown-drawing/">Markdown 流程图绘制的二三事儿</a></li>
    
  </ul>

  <h3>图表绘制</h3>
  <ul>
    
      <li><a href="/tools/2021/08/07/markdown-drawing/">Markdown 流程图绘制的二三事儿</a></li>
    
  </ul>

  <h3>协程</h3>
  <ul>
    
      <li><a href="/android/2021/08/08/collection-copy/">关于 StateFlow 使用的一次车祸现场</a></li>
    
  </ul>

  <h3>集合</h3>
  <ul>
    
      <li><a href="/android/2021/08/08/collection-copy/">关于 StateFlow 使用的一次车祸现场</a></li>
    
  </ul>

  <h3>Java</h3>
  <ul>
    
      <li><a href="/android/2021/08/08/collection-copy/">关于 StateFlow 使用的一次车祸现场</a></li>
    
  </ul>

  <h3>文章发布</h3>
  <ul>
    
      <li><a href="/skill/2021/11/12/article-publications-flow/">文章发布流程记录</a></li>
    
  </ul>

  <h3>开发技巧</h3>
  <ul>
    
      <li><a href="/gradle/2022/04/17/gradle-dep-management/">Gradle 组件依赖版本管理</a></li>
    
      <li><a href="/skill/2021/11/12/git-default-editor/">Git 默认编辑器替换</a></li>
    
  </ul>

  <h3>效率工具</h3>
  <ul>
    
      <li><a href="/skill/2023/04/16/code-shortcut/">效率编程之快捷键篇</a></li>
    
      <li><a href="/skill/2021/11/12/git-default-editor/">Git 默认编辑器替换</a></li>
    
  </ul>

  <h3>Git</h3>
  <ul>
    
      <li><a href="/skill/2022/09/13/git-user-guide/">Git用户手札</a></li>
    
      <li><a href="/skill/2022/02/27/git-emoji-commit/">Git emoji 提交规约</a></li>
    
      <li><a href="/skill/2021/11/12/git-default-editor/">Git 默认编辑器替换</a></li>
    
  </ul>

  <h3>Indie</h3>
  <ul>
    
      <li><a href="/indie/2022/02/27/indie-developer-skills/">独立开发者需奉行的原则</a></li>
    
  </ul>

  <h3>开发规范</h3>
  <ul>
    
      <li><a href="/skill/2022/02/27/git-emoji-commit/">Git emoji 提交规约</a></li>
    
  </ul>

  <h3>操作系统</h3>
  <ul>
    
      <li><a href="/computer/2022/03/13/memory-allocation/">操作系统地址空间与内存分配</a></li>
    
      <li><a href="/computer/2022/03/12/os-boot-process/">操作系统的启动过程</a></li>
    
      <li><a href="/computer/2022/03/12/know-what-os/">操作系统原理的基本概念和组成</a></li>
    
  </ul>

  <h3>Operation system</h3>
  <ul>
    
      <li><a href="/computer/2022/03/13/memory-allocation/">操作系统地址空间与内存分配</a></li>
    
      <li><a href="/computer/2022/03/12/os-boot-process/">操作系统的启动过程</a></li>
    
      <li><a href="/computer/2022/03/12/know-what-os/">操作系统原理的基本概念和组成</a></li>
    
  </ul>

  <h3>计算机基础</h3>
  <ul>
    
      <li><a href="/computer/2022/03/13/memory-allocation/">操作系统地址空间与内存分配</a></li>
    
      <li><a href="/computer/2022/03/12/os-boot-process/">操作系统的启动过程</a></li>
    
      <li><a href="/computer/2022/03/12/know-what-os/">操作系统原理的基本概念和组成</a></li>
    
  </ul>

  <h3>数据结构</h3>
  <ul>
    
      <li><a href="/2023/03/19/min-number/">把数组排成最小的数</a></li>
    
      <li><a href="/2022/03/19/sort-collections/">常见排序算法整理</a></li>
    
  </ul>

  <h3>排序</h3>
  <ul>
    
      <li><a href="/2023/03/19/min-number/">把数组排成最小的数</a></li>
    
      <li><a href="/2022/03/19/sort-collections/">常见排序算法整理</a></li>
    
  </ul>

  <h3>Context</h3>
  <ul>
    
      <li><a href="/android/2022/04/10/context-instance/">如何维护一个全局 Context</a></li>
    
  </ul>

  <h3>Gradle</h3>
  <ul>
    
      <li><a href="/skill/2022/09/06/github-actions-auto-publish/">GitHub Actions实践之自动发布组件</a></li>
    
      <li><a href="/kotlin/2022/08/27/kotlin-dsl-bad-feeling/">记一次Kotlin DSL的糟糕体验</a></li>
    
      <li><a href="/android/2022/08/10/android-lint/">Android代码检查之自定义Lint</a></li>
    
      <li><a href="/gradle/2022/06/30/gradle-command-line-interface/">Gradle手札之命令行接口一览</a></li>
    
      <li><a href="/gradle/2022/04/17/gradle-dep-management/">Gradle 组件依赖版本管理</a></li>
    
  </ul>

  <h3>依赖管理</h3>
  <ul>
    
      <li><a href="/gradle/2022/04/17/gradle-dep-management/">Gradle 组件依赖版本管理</a></li>
    
  </ul>

  <h3>奇技淫巧</h3>
  <ul>
    
      <li><a href="/skill/2022/04/17/sublime-auto-launch/">Sublime Text在Mac上开机自启动问题</a></li>
    
  </ul>

  <h3>设计模式</h3>
  <ul>
    
      <li><a href="/pattern-design/2022/04/24/pattern-design-note/">行为型设计模式一览</a></li>
    
  </ul>

  <h3>评论系统</h3>
  <ul>
    
      <li><a href="/other/2022/07/16/change-article-comments/">关于博客更换评论系统的一场厮杀</a></li>
    
  </ul>

  <h3>Jekyll</h3>
  <ul>
    
      <li><a href="/other/2022/07/16/change-article-comments/">关于博客更换评论系统的一场厮杀</a></li>
    
  </ul>

  <h3>Gitalk</h3>
  <ul>
    
      <li><a href="/other/2022/07/16/change-article-comments/">关于博客更换评论系统的一场厮杀</a></li>
    
  </ul>

  <h3>Giscus</h3>
  <ul>
    
      <li><a href="/other/2022/07/16/change-article-comments/">关于博客更换评论系统的一场厮杀</a></li>
    
  </ul>

  <h3>Github</h3>
  <ul>
    
      <li><a href="/gradle/2022/07/26/publish-library-to-github-repo/">发布组件到GitHub Packages</a></li>
    
  </ul>

  <h3>Github Packages</h3>
  <ul>
    
      <li><a href="/gradle/2022/07/26/publish-library-to-github-repo/">发布组件到GitHub Packages</a></li>
    
  </ul>

  <h3>Maven publish</h3>
  <ul>
    
      <li><a href="/gradle/2022/07/26/publish-library-to-github-repo/">发布组件到GitHub Packages</a></li>
    
  </ul>

  <h3>Lint</h3>
  <ul>
    
      <li><a href="/android/2022/08/10/android-lint/">Android代码检查之自定义Lint</a></li>
    
  </ul>

  <h3>静态代码检查</h3>
  <ul>
    
      <li><a href="/android/2022/08/10/android-lint/">Android代码检查之自定义Lint</a></li>
    
  </ul>

  <h3>Android Library</h3>
  <ul>
    
      <li><a href="/gradle/2022/08/20/component-publication-plugin/">Gradle手札之组件发布迅疾如风</a></li>
    
  </ul>

  <h3>Gradle Plugin</h3>
  <ul>
    
      <li><a href="/gradle/2022/08/28/how-to-publish-gradle-plugin/">关于发布Gradle插件到Maven开放仓库的碎碎念</a></li>
    
      <li><a href="/gradle/2022/08/20/component-publication-plugin/">Gradle手札之组件发布迅疾如风</a></li>
    
  </ul>

  <h3>Maven</h3>
  <ul>
    
      <li><a href="/gradle/2022/08/20/component-publication-plugin/">Gradle手札之组件发布迅疾如风</a></li>
    
  </ul>

  <h3>GitHub</h3>
  <ul>
    
      <li><a href="/gradle/2022/08/20/component-publication-plugin/">Gradle手札之组件发布迅疾如风</a></li>
    
  </ul>

  <h3>Kotlin DSL</h3>
  <ul>
    
      <li><a href="/kotlin/2022/08/27/kotlin-dsl-bad-feeling/">记一次Kotlin DSL的糟糕体验</a></li>
    
  </ul>

  <h3>Maven Publishing</h3>
  <ul>
    
      <li><a href="/skill/2022/09/06/github-actions-auto-publish/">GitHub Actions实践之自动发布组件</a></li>
    
      <li><a href="/gradle/2022/08/28/how-to-publish-gradle-plugin/">关于发布Gradle插件到Maven开放仓库的碎碎念</a></li>
    
  </ul>

  <h3>Maven Plugin Portal</h3>
  <ul>
    
      <li><a href="/gradle/2022/08/28/how-to-publish-gradle-plugin/">关于发布Gradle插件到Maven开放仓库的碎碎念</a></li>
    
  </ul>

  <h3>Maven Central</h3>
  <ul>
    
      <li><a href="/skill/2022/09/06/github-actions-auto-publish/">GitHub Actions实践之自动发布组件</a></li>
    
      <li><a href="/gradle/2022/08/28/how-to-publish-gradle-plugin/">关于发布Gradle插件到Maven开放仓库的碎碎念</a></li>
    
  </ul>

  <h3>工作技巧</h3>
  <ul>
    
      <li><a href="/skill/2023/03/29/chatgpt-talk/">简单聊聊 ChatGPT</a></li>
    
      <li><a href="/skill/2022/09/13/git-user-guide/">Git用户手札</a></li>
    
  </ul>

  <h3>版本控制</h3>
  <ul>
    
      <li><a href="/skill/2022/09/13/git-user-guide/">Git用户手札</a></li>
    
  </ul>

  <h3>Project Properties</h3>
  <ul>
    
      <li><a href="/gradle/2022/09/21/gradle-property/">Gradle手札之Properties配置</a></li>
    
  </ul>

  <h3>System Properties</h3>
  <ul>
    
      <li><a href="/gradle/2022/09/21/gradle-property/">Gradle手札之Properties配置</a></li>
    
  </ul>

  <h3>Build Environment</h3>
  <ul>
    
      <li><a href="/gradle/2022/09/21/gradle-property/">Gradle手札之Properties配置</a></li>
    
  </ul>

  <h3>算法</h3>
  <ul>
    
      <li><a href="/2023/03/19/min-number/">把数组排成最小的数</a></li>
    
  </ul>

  <h3>Linux</h3>
  <ul>
    
      <li><a href="/android/2023/03/27/about-prof-dir/">Android系统中关于/proc目录的点滴</a></li>
    
  </ul>

  <h3>APM</h3>
  <ul>
    
      <li><a href="/android/2023/03/27/about-prof-dir/">Android系统中关于/proc目录的点滴</a></li>
    
  </ul>

  <h3>性能分析</h3>
  <ul>
    
      <li><a href="/android/2023/03/27/about-prof-dir/">Android系统中关于/proc目录的点滴</a></li>
    
  </ul>

  <h3>ANR</h3>
  <ul>
    
      <li><a href="/android/2023/03/27/about-prof-dir/">Android系统中关于/proc目录的点滴</a></li>
    
  </ul>

  <h3>proc</h3>
  <ul>
    
      <li><a href="/android/2023/03/27/about-prof-dir/">Android系统中关于/proc目录的点滴</a></li>
    
  </ul>

  <h3>ChatGPT</h3>
  <ul>
    
      <li><a href="/skill/2023/03/29/chatgpt-talk/">简单聊聊 ChatGPT</a></li>
    
  </ul>

  <h3>线程</h3>
  <ul>
    
      <li><a href="/android/2023/04/07/android-thread-creation/">Android系统中线程的创建过程</a></li>
    
  </ul>

  <h3>源码分析</h3>
  <ul>
    
      <li><a href="/2023/05/04/app-init-process/">Launcher进程启动过程剖析</a></li>
    
      <li><a href="/2023/04/22/android-initialization/">Android系统启动流程剖析</a></li>
    
      <li><a href="/android/2023/04/07/android-thread-creation/">Android系统中线程的创建过程</a></li>
    
  </ul>

  <h3>native</h3>
  <ul>
    
      <li><a href="/android/2023/04/07/android-thread-creation/">Android系统中线程的创建过程</a></li>
    
  </ul>

  <h3>Android studio</h3>
  <ul>
    
      <li><a href="/skill/2023/04/16/code-shortcut/">效率编程之快捷键篇</a></li>
    
  </ul>

  <h3>Coding</h3>
  <ul>
    
      <li><a href="/skill/2023/04/16/code-shortcut/">效率编程之快捷键篇</a></li>
    
  </ul>

  <h3>Mac</h3>
  <ul>
    
      <li><a href="/skill/2023/04/16/code-shortcut/">效率编程之快捷键篇</a></li>
    
  </ul>

  <h3>repo</h3>
  <ul>
    
      <li><a href="/2023/04/21/aosp-download/">AOSP在Mac上的编译实践(上)</a></li>
    
  </ul>

  <h3>framework</h3>
  <ul>
    
      <li><a href="/2023/04/21/aosp-download/">AOSP在Mac上的编译实践(上)</a></li>
    
  </ul>

  <h3>AOSP</h3>
  <ul>
    
      <li><a href="/2023/04/21/aosp-download/">AOSP在Mac上的编译实践(上)</a></li>
    
  </ul>

  <h3>APP启动</h3>
  <ul>
    
      <li><a href="/2023/04/22/android-initialization/">Android系统启动流程剖析</a></li>
    
  </ul>

  <h3>多线程</h3>
  <ul>
    
      <li><a href="/2023/04/29/java-producer-consumer-model/">回顾Java中经典的生产/消费者模型</a></li>
    
  </ul>

  <h3>BlockingQueue</h3>
  <ul>
    
      <li><a href="/2023/04/29/java-producer-consumer-model/">回顾Java中经典的生产/消费者模型</a></li>
    
  </ul>

  <h3>APP启动过程</h3>
  <ul>
    
      <li><a href="/2023/05/04/app-init-process/">Launcher进程启动过程剖析</a></li>
    
  </ul>

  <h3>Launcher</h3>
  <ul>
    
      <li><a href="/2023/05/04/app-init-process/">Launcher进程启动过程剖析</a></li>
    
  </ul>

  <h3>App Link</h3>
  <ul>
    
      <li><a href="/android/2023/09/16/deep-link/">Android上的Deep-Link技术调研</a></li>
    
  </ul>

  <h3>Deep Link</h3>
  <ul>
    
      <li><a href="/android/2023/09/16/deep-link/">Android上的Deep-Link技术调研</a></li>
    
  </ul>

Categories

Categories of a post work similar to the tags above:

  • They can be defined via the front matter using keys category or categories (that follow the same logic as for tags)
  • All categories registered in the site are exposed to Liquid templates via site.categories which can be iterated over (similar to the loop for tags above.)

The similarity between categories and tags however, ends there.

Unlike tags, categories for posts can also be defined by a post’s file path. Any directory above _post will be read-in as a category. For example, if a post is at path movies/horror/_posts/2019-05-21-bride-of-chucky.markdown, then movies and horror are automatically registered as categories for that post.

When the post also has front matter defining categories, they just get added to the existing list if not present already.

The hallmark difference between categories and tags is that categories of a post may be incorporated into the generated URL for the post, while tags cannot be.

Therefore, depending on whether front matter has category: classic hollywood, or categories: classic hollywood, the example post above would have the URL as either movies/horror/classic%20hollywood/2019/05/21/bride-of-chucky.html or movies/horror/classic/hollywood/2019/05/21/bride-of-chucky.html respectively.

Post excerpts

You can access a snippet of a posts’s content by using excerpt variable on a post. By default this is the first paragraph of content in the post, however it can be customized by setting a excerpt_separator variable in front matter or _config.yml.

1
2
3
4
5
6
7
8
9
---
excerpt_separator: <!--more-->
---

Excerpt with multiple paragraphs

Here's another paragraph in the excerpt.
<!--more-->
Out-of-excerpt

Here’s an example of outputting a list of blog posts with an excerpt:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
<ul>
  
    <li>
      <a href="/android/2023/09/16/deep-link/">Android上的Deep-Link技术调研</a>
      <blockquote>
  <p><em>本文是两年前输出的文章,可能与现在的成熟方案存在部分细节上“代沟”,请诸位选择性阅读,适当参考即可。</em></p>
</blockquote>


    </li>
  
    <li>
      <a href="/2023/05/04/app-init-process/">Launcher进程启动过程剖析</a>
      <p>上一篇<a href="https://dorck.cn/2023/04/22/android-initialization/">文章</a>我们对 Android 系统启动过程做了一定了解,本文将继续分析 Launcher 进程的启动流程。</p>


    </li>
  
    <li>
      <a href="/2023/04/29/java-producer-consumer-model/">回顾Java中经典的生产/消费者模型</a>
      <h3 id="概述">概述</h3>


    </li>
  
    <li>
      <a href="/2023/04/22/android-initialization/">Android系统启动流程剖析</a>
      <p>Android 手机从长按开机到应用的启动阶段都经历了些什么呢?Android 启动过程涉及一系列操作,首先是启动 ROM,接着是引导加载程序、内核启动、init、Zygote 和 SystemServer 创建等过程。整个过程涉及到虚拟机的启动、Binder 线程池的创建以及各项系统服务启动等过程。熟悉 APP 启动过程还可以帮助我们打破性能优化瓶颈,助力于启动性能的提升。下面是启动过程涉及到的关键进程和服务:</p>


    </li>
  
    <li>
      <a href="/2023/04/21/aosp-download/">AOSP在Mac上的编译实践(上)</a>
      <p>AOSP,即 Android Open Source Project,对于 Android 开发者来说再熟悉不过的项目,本文将着重介绍如何在 MacOS Monterey 环境上下载完整的 AOSP 源码。</p>


    </li>
  
    <li>
      <a href="/skill/2023/04/16/code-shortcut/">效率编程之快捷键篇</a>
      <p>这是一个关于如何<strong>效率编程</strong>的系列专题,未来将会涉及诸如工具、脚本、插件、开源框架等各方面,只要能够帮助我们提升开发效率。</p>


    </li>
  
    <li>
      <a href="/android/2023/04/07/android-thread-creation/">Android系统中线程的创建过程</a>
      <p>我们都知道,Android 中线程创建过程需要追溯到 Native 层面,最终是委托给一个 Linux 标准线程 pthread 来执行的,所以 Android 中线程状态本质上是 Native 线程的一种映射。Android 中运行的线程可以分为两种:一种是 attach 到虚拟机的,即虚拟机线程;另一种是没有 attach 到虚拟机的。今天我们就分别从源码层面来看看 Android 系统中 Java 和 Native 层线程的创建过程。</p>


    </li>
  
    <li>
      <a href="/skill/2023/03/29/chatgpt-talk/">简单聊聊 ChatGPT</a>
      <p>关于国内如何注册和使用 ChatGPT 可以参考这篇文章:<a href="https://chatgpt-plus.github.io/chatgpt/">国内注册一个属于自己的免费ChatGPT账号</a>。本文不是扫盲贴,只是通过这两天对 ChatGPT 的使用体验来随便聊聊。</p>


    </li>
  
    <li>
      <a href="/android/2023/03/27/about-prof-dir/">Android系统中关于/proc目录的点滴</a>
      <p>Android 系统有着这么一个神奇的“文件“目录存放着 CPU 及设备所运行进程的相关数据,这对于我们从事 APM 应用性能监控有着莫大的帮助。当然这种监控应用及手机系统信息的方式并非无中生有,早在 Android Framework 中就已经涉及它的踪迹,比如 ANR 发生时,系统会去 dump 及上报打印相关 CPU、进程、线程等信息到 log 中。而这些信息是借助 <a href="https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-13.0.0_r36/core/java/com/android/internal/os/ProcessCpuTracker.java">ProcessCpuTracker</a> 这个类来实现获取的,该类内部正是通过读取系统 /proc/ 目录的相关“文件”来提取和转化的。本文的重点当然不是去分析 ANR 如何产生,主要来看下 <strong>proc/</strong> 的庐山真面目。</p>


    </li>
  
    <li>
      <a href="/2023/03/19/min-number/">把数组排成最小的数</a>
      <p>本文是对于 <a href="https://dorck.cn/2022/03/19/sort-collections/">常用排序算法合集</a> 的扩展应用。</p>


    </li>
  
    <li>
      <a href="/gradle/2022/09/21/gradle-property/">Gradle手札之Properties配置</a>
      <p>Gradle 很多构建属性可以通过 Properties 来设置。<strong>Properties</strong> 文件格式可由 <code class="language-plaintext highlighter-rouge">java.util.Properties</code> 解析,其中包含若干键值对,类似 <code class="language-plaintext highlighter-rouge">Map&lt;String,String&gt;</code> 格式数据来存储。</p>


    </li>
  
    <li>
      <a href="/skill/2022/09/13/git-user-guide/">Git用户手札</a>
      <h2 id="git-的由来">Git 的由来</h2>


    </li>
  
    <li>
      <a href="/skill/2022/09/06/github-actions-auto-publish/">GitHub Actions实践之自动发布组件</a>
      <p>在<a href="https://dorck.cn/gradle/2022/08/28/how-to-publish-gradle-plugin/">关于发布Gradle插件到Maven开放仓库的碎碎念</a>一文中简单介绍了如何发布一款 Gradle 插件到 Maven Central。虽说最终发布只需要本地执行 <code class="language-plaintext highlighter-rouge">./gradlew publishPlugins</code> 命令即可快速发布完成,但每次发布都需要区分本地和远程仓库的环境差异,然后手动配置。举个最简单的例子:我不希望本地敏感信息上传到远程仓库中,所以,每次执行完发布操作还需要手动擦除敏感信息,还是比较麻烦的。另外,有没有一种方式可以完全解放双手,甚至不需要执行上述命令然后等待其漫长地发布过程呢?自然是存在的,就是本文要介绍的 GitHub Actions。</p>


    </li>
  
    <li>
      <a href="/gradle/2022/08/28/how-to-publish-gradle-plugin/">关于发布Gradle插件到Maven开放仓库的碎碎念</a>
      <p>早几年前发布过几个开源库到 Jcenter 上,有一段时间没关注 GitHub 也就逐渐淡忘了。最近几天刚好想起此事,也就打算迁移一下历史组件,顺便将前阵子搞的一个 Gradle 插件也发布一下,于是便有了这篇文章。以下仅记录发布涉及的主要步骤以及遇到的一些坑,前车之鉴,后车之师而已矣。</p>


    </li>
  
    <li>
      <a href="/kotlin/2022/08/27/kotlin-dsl-bad-feeling/">记一次Kotlin DSL的糟糕体验</a>
      <p>昨天在用 Kotlin 写 Gradle 插件的时候遇到个奇怪的问题,折磨良久,最后才发现是 Kotlin Dsl 的坑。我们先来看下这段代码:</p>


    </li>
  
    <li>
      <a href="/gradle/2022/08/20/component-publication-plugin/">Gradle手札之组件发布迅疾如风</a>
      <p>大浪淘沙,随着 jcenter 的落幕,组件发布逐渐转向了 maven central 仓库。各种平台层出不穷,不论组件存储在何处,作为开发更加关注的是组件发布的效率,这也正是本文接下来想要阐述的主题。</p>


    </li>
  
    <li>
      <a href="/android/2022/08/10/android-lint/">Android代码检查之自定义Lint</a>
      <h3 id="概述">概述</h3>


    </li>
  
    <li>
      <a href="/gradle/2022/07/26/publish-library-to-github-repo/">发布组件到GitHub Packages</a>
      <p>使用过 Maven Central 的朋友应该都体会过组件发布流程的繁琐,于是乎心里萌生了一个想法:是否可以将组件发布到 GitHub 仓库呢?果断去 Google 了一下,果不其然,GitHub 提供了 <a href="https://docs.github.com/cn/actions/publishing-packages">GitHub Packages</a> 可以让作为开发者组件发布的分发仓库。下面来看下如何具体实现本地 Library 发布到 GitHub Packages 以及在项目中下载依赖库。</p>


    </li>
  
    <li>
      <a href="/other/2022/07/16/change-article-comments/">关于博客更换评论系统的一场厮杀</a>
      <p>从去年建站 <strong><em>dorck.cn</em></strong> 开始到现在,我已经陆续更换过三四次评论系统了,以至于最近半年甚至都未开启这个功能,只因为它们太不稳定或者体验太差。有一阵子没更新博客了,重拾起来一段时间之后发现评论功能还是要有的,毕竟要客观了解到他人对于文章内容质量的看法,沟通的平台少不了的,更重要的一点是:以后遇到相关知识点还能应急性地自我评论,补充一二思路。</p>


    </li>
  
    <li>
      <a href="/gradle/2022/06/30/gradle-command-line-interface/">Gradle手札之命令行接口一览</a>
      <h3 id="概述">概述</h3>


    </li>
  
    <li>
      <a href="/kotlin/2022/05/05/kotlin-companion-object/">揭开 Kotlin 中的 companion object 的奥秘</a>
      <p>Kotlin 中有个所谓的伴生对象(companion object),一般使用过程中我们会将它作为 Java 静态成员使用方式的替代品:</p>


    </li>
  
    <li>
      <a href="/pattern-design/2022/04/24/pattern-design-note/">行为型设计模式一览</a>
      <blockquote>
  <p>设计模式要干的事情就是解耦,创建型模式是将创建和使用代码解耦,结构型模式是将不同功能代码解耦,行为型模式是将不同的行为代码解耦。借助设计模式,我们利用更好的代码结构,将一大坨代码拆分成职责更单一的小类,让其满足开闭原则、高内聚低耦合等特性,以此来控制和应对代码的复杂性,提高代码的可扩展性。</p>
</blockquote>


    </li>
  
    <li>
      <a href="/skill/2022/04/17/sublime-auto-launch/">Sublime Text在Mac上开机自启动问题</a>
      <p>去年自从重新下载了 Sublime Text 来作为主要的代码及文本阅读工具后就一直“苦开机自启动问题久矣”,每次开机Sublime Text 都会自动打开一个空的文件,极度影响使用体验(我又不是每次打开电脑都需要用 sublime🤮)。于是乎,稍微 Google 搜索了下如何关闭 Sublime Text 自启动,其实也很简单,此处记录下以防忘记。</p>


    </li>
  
    <li>
      <a href="/gradle/2022/04/17/gradle-dep-management/">Gradle 组件依赖版本管理</a>
      <p>日常 Android 开发过程中,我们总需要在各个 module 中依赖各种第三方远程组件,像下面这样:</p>


    </li>
  
    <li>
      <a href="/android/2022/04/10/context-instance/">如何维护一个全局 Context</a>
      <p>一般来说,App 在运行的时候,势必存在一个 Application 对象,而日常开发中我们离不开 Context,获取资源、启动组件等等都需要这位“管家”的帮助。那么,平时我们是怎么获取 Context 的?</p>


    </li>
  
    <li>
      <a href="/2022/03/19/sort-collections/">常见排序算法整理</a>
      <blockquote>
  <p><strong><em>今日寄语:靡不有初,鲜克有终。</em></strong></p>
</blockquote>


    </li>
  
    <li>
      <a href="/computer/2022/03/13/memory-allocation/">操作系统地址空间与内存分配</a>
      <h2 id="内存分层体系">内存分层体系</h2>


    </li>
  
    <li>
      <a href="/computer/2022/03/12/os-boot-process/">操作系统的启动过程</a>
      <h3 id="操作系统启动过程">操作系统启动过程</h3>


    </li>
  
    <li>
      <a href="/computer/2022/03/12/know-what-os/">操作系统原理的基本概念和组成</a>
      <h3 id="操作系统概念">操作系统概念</h3>


    </li>
  
    <li>
      <a href="/skill/2022/02/27/git-emoji-commit/">Git emoji 提交规约</a>
      <p>执行 <code class="language-plaintext highlighter-rouge">git commit</code> 时使用 emoji 为本次提交打上一个 “标签”, 使得此次 commit 的主要工作得以凸现,也能够使得其在整个提交历史中易于区分与查找。</p>


    </li>
  
    <li>
      <a href="/indie/2022/02/27/indie-developer-skills/">独立开发者需奉行的原则</a>
      <p><img src="/img/in-post/post-other/indie_hackers_post.jpg" alt="indie_hackers_post" /></p>


    </li>
  
    <li>
      <a href="/skill/2021/11/12/git-default-editor/">Git 默认编辑器替换</a>
      <p>一般情况下,Git 的默认编辑器是 vim,对于新手来说上手可能比较困难。例如常见地我们输入 <code class="language-plaintext highlighter-rouge">git commit</code> 会看到如下场景,终端自动通过 vim 打开了本地 git 文件:</p>


    </li>
  
    <li>
      <a href="/skill/2021/11/12/article-publications-flow/">文章发布流程记录</a>
      <p>隔了两个月未更新本地文章到 Github,今天突然想去发布两篇,结果流程命令全然忘记了。为防止以后出现类似情况,这里描述一下文章发布的工作流,仅作记录使用。</p>


    </li>
  
    <li>
      <a href="/android/2021/08/08/collection-copy/">关于 StateFlow 使用的一次车祸现场</a>
      <p>最近了解了一下 Kotlin 中的协程,这两天得闲就想着把 Flow 拿来练练手,没想到车祸现场立马就来了。</p>


    </li>
  
    <li>
      <a href="/tools/2021/08/07/markdown-drawing/">Markdown 流程图绘制的二三事儿</a>
      <p>作为一位经常出入各大博客站点的取经人来说,<strong>Markdown</strong> 显然已经成为一项必备技能。很多人平时写文档或者博客都会用常见的 Markdown 编辑器,如:有道、Atom、Typora等等。我们经常会有绘图需求,常见的有流程图、类图、序列图和甘特图等等,然而,当你还在苦苦寻找一些免费易用的画图软件时,殊不知 Markdown 早就已经具备了此项功能。</p>


    </li>
  
    <li>
      <a href="/other/2021/08/05/about-avoid-useless-learning/">关于如何避免低效学习的所思</a>
      <p>医者,讲究对症下药,何谓“<strong>低效</strong>”?</p>


    </li>
  
    <li>
      <a href="/android/2020/08/12/MotionLayout-part2/">MotionLayout:打开动画新世界大门(partII)</a>
      <p>距离上一篇文章「 <a href="https://juejin.im/post/5d595328f265da03c34bfa59">MotionLayout:打开动画新世界大门(partI)</a>」已经过去了很久,由于个人原因,<strong>MotionLayout</strong> 系列文章姗姗来迟。在之前的文章中,我们领略到了 MotionLayout 的魅力,了解到它继承自 <em>ConstraintLayout</em>,并具有它“约束布局”的特性。同时,关于如何创建和使用 <code class="language-plaintext highlighter-rouge">MotionScene</code> 及其内部的 <code class="language-plaintext highlighter-rouge">KeyFrameSet</code> 也都做了一些简单介绍。那么,本文来带大家进一步探索 <strong><code class="language-plaintext highlighter-rouge">KeyFrameSet</code></strong> 这个大家族中的“神秘宝藏”,并针对上文中留下的一些<strong>彩蛋</strong>进行讲解,来看看<strong>如何实现 MotionLayout 与其他控件的联动</strong>。<!-- more --></p>


    </li>
  
    <li>
      <a href="/android/2020/06/29/android-proguard/">一篇文章带你领略Android混淆的魅力</a>
      <p>在 Android 日常开发过程中,<strong>混淆</strong>是我们开发 App 的一项必不可少的技能。只要是我们亲身经历过 App 打包上线的过程,或多或少都需要了解一些代码混淆的基本操作。那么,混淆到底是什么?它的好处有哪些?具体效果如何?别急,下面我们来一一探索它的”独特”魅力🐳。</p>


    </li>
  
    <li>
      <a href="/flutter/2020/04/19/flutter-tips/">Flutter 开发小结 | Tips</a>
      <p>接触 Flutter 已经有一阵子了,期间记录了很多开发小问题,苦于忙碌没时间整理,最近项目进度步上正轨,借此机会抽出点时间来统一记录这些问题,并分享项目开发中的一点心得以及多平台打包的一些注意事项,希望能对大家有所帮助😁。</p>


    </li>
  
    <li>
      <a href="/flutter/2020/02/18/flutter-timer/">Flutter 中“倒计时”的那些事儿</a>
      <p>好久不见了,文章有一段时间没有更新了,最近一直在沉迷工作无法自拨😂。上周,应公司号召以及上次Google大会中Flutter宣讲的感染,计划将公司新项目采用Flutter技术实现。大概花了几天熟悉了一下Flutter基础语法和结构组成,便着手开始项目的搭建和基础模块功能开发,毕竟只有通过实战才能加快新技术的熟悉和“消化”。</p>


    </li>
  
    <li>
      <a href="/android/2019/10/19/motionlayout-part1/">MotionLayout:打开动画新世界大门(partI)</a>
      <p>最初接触到 <strong>MotionLayout</strong> 是在国外知名博客的 <a href="https://medium.com/google-developers">Android 专栏</a>上。第一眼见到 <code class="language-plaintext highlighter-rouge">MotionLayout</code> 时无疑是兴奋的,在经过使用和熟悉了这个布局组件之后,我就想将这份喜悦传递给国内开发者,从此“拳打”设计,“脚踢”产品😁。当然,由于关于 <code class="language-plaintext highlighter-rouge">MotionLayout</code> 的外文专栏相关介绍已足够详细,所以本文仅对其进行总结和简单应用。老规矩,正文开始前先上一张图:</p>


    </li>
  
    <li>
      <a href="/android/2019/08/11/android-tools-attribute/">是时候让 Android Tools 属性拯救你了</a>
      <p>日常开发过程中,我们都会遇到这样一种场景:我们写出的 UI 效果在对接数据之前需要提前进行预览,进而调整  UI 细节和排版问题。我们一般的做法是什么样的?如果存在像 TextView 或者 ImageView 这种基础控件,你是不是还在通过诸如 <em><code class="language-plaintext highlighter-rouge">android:text="xxx"</code></em> 和 <em><code class="language-plaintext highlighter-rouge">android:src="@drawable/xxx"</code></em> 的方式来测试和预览UI效果?当然你肯定也会遇到这些“脏数据”给你带来的困扰:测试的时候某些地方出现了本不该出现的数据,事后可能一拍脑门才发现,原来是布局中控件预览数据没有清除导致的。</p>


    </li>
  
    <li>
      <a href="/kotlin/2019/05/21/kotlin-when/">带你领略 Kotlin 中的 “when”魔法</a>
      <p>提到 <strong><code class="language-plaintext highlighter-rouge">when</code></strong>,大家都会联想到 Java 中的 <strong><code class="language-plaintext highlighter-rouge">switch</code></strong>,然而在 kotlin 中,<code class="language-plaintext highlighter-rouge">when</code> 显然比 Java 中的 <code class="language-plaintext highlighter-rouge">switch</code> 要强大得多。首先,我们先来看看 when 的特点:</p>


    </li>
  
    <li>
      <a href="/android/architecture/2018/12/24/mvp-presenter/">Android中的 MVP:如何使 Presenter 层系统化?</a>
      <blockquote>
  <ul>
    <li>原文地址:<a href="https://antonioleiva.com/mvp-android/">MVP for Android: how to organize the presentation layer</a></li>
    <li>原文作者:<a href="https://antonioleiva.com">Antonio Leiva</a></li>
  </ul>
</blockquote>


    </li>
  
    <li>
      <a href="/kotlin/2018/12/22/kotlin-functions/">当 Kotlin 中的监听器包含多个方法时,如何让它 “巧夺天工”?</a>
      <p>我经常遇到的一个问题是在使用 Kotlin 时如何简化具有多个方法的监听器的交互。对于具有只具有一个方法的监听器(或任何接口)很简单:Kotlin 会自动让您用 lambda 替换它。但对于具有多个方法的监听器来说,情况并非如此。</p>


    </li>
  
    <li>
      <a href="/kotlin/2018/12/11/kotlin-anko/">Android Kotlin 快速开发之 Anko 魔法</a>
      <p>众所周知,目前 kotlin 已经作为 Google 官方推荐的 Android 开发语言,目前 GitHub 上面关于 kotlin 的项目已然呈现一片势不可挡的热度。作为一名 Android 开发者,学好 koltin 已经成为我们必须 get 的技能,而想要在工作中使用 kotlin 快速开发项目,Anko 无疑成为首选利器!</p>


    </li>
  
    <li>
      <a href="/2018/05/20/constraintlayout/">带你领略 ConstraintLayout 1.1 的新功能</a>
      <blockquote>
  <ul>
    <li>原文地址:<a href="https://medium.com/google-developers/introducing-constraint-layout-1-1-d07fc02406bc">Introducing Constraint Layout 1.1</a></li>
    <li>原文作者:<a href="https://medium.com/@objcode?source=post_header_lockup">Sean McQuillan</a></li>
  </ul>
</blockquote>


    </li>
  
</ul>

Drafts

Drafts are posts without a date in the filename. They’re posts you’re still working on and don’t want to publish yet. To get up and running with drafts, create a _drafts folder in your site’s root and create your first draft:

1
2
3
4
.
├── _drafts
│   └── a-draft-post.md
...

To preview your site with drafts, run jekyll serve or jekyll build with the --drafts switch. Each will be assigned the value modification time of the draft file for its date, and thus you will see currently edited drafts as the latest posts.

Post command line

The Jekyll gem makes a jekyll executable available to you in your terminal.

The jekyll program has several commands but the structure is always:

1
2
3
4
5
jekyll command [argument] [option] [argument_to_option]

Examples:
    jekyll new site/ --blank
    jekyll serve --config _alternative_config.yml

Typically you’ll use jekyll serve while developing locally and jekyll build when you need to generate the site for production.

For a full list of options and their argument, see Build Command Options.

Here are some of the most common commands:

  • jekyll new PATH - Creates a new Jekyll site with default gem-based theme at specified path. The directories will be created as necessary.
  • jekyll new PATH --blank - Creates a new blank Jekyll site scaffold at specified path.
  • jekyll build or jekyll b - Performs a one off build your site to ./_site (by default).
  • jekyll serve or jekyll s - Builds your site any time a source file changes and serves it locally.
  • jekyll clean - Removes all generated files: destination folder, metadata file, Sass and Jekyll caches.
  • jekyll help - Shows help, optionally for a given subcommand, e.g. jekyll help build.
  • jekyll new-theme - Creates a new Jekyll theme scaffold.
  • jekyll doctor - Outputs any deprecation or configuration issues.

To change Jekyll’s default build behavior have a look through the configuration options.

以上内容皆来自 Jekyll 官网,更多内容可前往:http://jekyllrb.com/docs/

中文可参考:Jekyll中的配置和模板语法


许可协议: 署名-非商业性使用-禁止演绎 4.0 国际 转载请保留原文链接及作者。