From 665d40f8db114f84516558834393c877b195e2a5 Mon Sep 17 00:00:00 2001 From: Yufan Sheng Date: Fri, 15 Nov 2024 14:21:43 +0800 Subject: [PATCH] chore: enable the toc settings for selected articles. --- src/components/comment/Comments.astro | 6 ++++-- src/content/posts/2011/2011-10-31-explorer-keyboard.mdx | 1 + src/content/posts/2011/2011-12-16-one-hundred-days.mdx | 1 + src/content/posts/2011/2011-12-20-who-is-singing.mdx | 1 + .../posts/2012/2012-07-25-the-first-year-of-blogging.mdx | 1 + .../posts/2013/2013-04-27-the-best-way-to-learn-css.mdx | 3 +++ src/content/posts/2014/2014-03-15-the-poem-of-forget.mdx | 1 + .../posts/2015/2015-05-31-how-to-choose-your-tools.mdx | 1 + .../2015/2015-07-04-gossip-on-profligate-spending.mdx | 1 + src/content/posts/2015/2015-12-08-rest-api-desgin.mdx | 3 +++ src/content/posts/2016/2016-02-04-oauth-on-kong.mdx | 1 + .../2016/2016-05-06-introduction-to-webpack-part-1.mdx | 1 + src/content/posts/2016/2016-08-15-future-plan-on-kids.mdx | 7 ++++--- .../2017-06-28-atelier-firis-first-year-walk-through.mdx | 1 + ...09-30-evolution-of-data-structures-in-yandexmetrica.mdx | 1 + src/content/posts/2017/2017-12-24-teruteru-1.mdx | 1 + src/content/posts/2018/2018-01-13-teruteru-2.mdx | 1 + 17 files changed, 27 insertions(+), 5 deletions(-) diff --git a/src/components/comment/Comments.astro b/src/components/comment/Comments.astro index 4eb67b4..c8b6d3c 100644 --- a/src/components/comment/Comments.astro +++ b/src/components/comment/Comments.astro @@ -13,8 +13,10 @@ interface Props { const { commentKey, title } = Astro.props; const comments = await loadComments(commentKey, title, 0); -// Increase the PV. -await increaseViews(commentKey, title); +// Increase the PV in production environment. +if (options.isProd()) { + await increaseViews(commentKey, title); +} ---
diff --git a/src/content/posts/2011/2011-10-31-explorer-keyboard.mdx b/src/content/posts/2011/2011-10-31-explorer-keyboard.mdx index 660baa7..816f324 100644 --- a/src/content/posts/2011/2011-10-31-explorer-keyboard.mdx +++ b/src/content/posts/2011/2011-10-31-explorer-keyboard.mdx @@ -11,6 +11,7 @@ tags: - 网络 - 平板 category: 杂思 +toc: true cover: /images/2020/09/2020090422185883.jpg summary: 数字时代已经到来。伴随着网络的普及,人们的工作、学习、交流方式逐渐转移到了电子设备上。与之相伴而生的键盘输入方式也逐渐为大家所接受,成了一种格局,或者说是一种文化。 --- diff --git a/src/content/posts/2011/2011-12-16-one-hundred-days.mdx b/src/content/posts/2011/2011-12-16-one-hundred-days.mdx index d540287..e212c81 100644 --- a/src/content/posts/2011/2011-12-16-one-hundred-days.mdx +++ b/src/content/posts/2011/2011-12-16-one-hundred-days.mdx @@ -8,6 +8,7 @@ tags: - 百日 - 纪念 category: 杂思 +toc: true cover: /images/2024/04/2024041519424200.jpg summary: 时间终会一点一滴磨平我们青春的印迹,那散在记忆里的片段退去了华丽的色彩,留下的还有什么呢? --- diff --git a/src/content/posts/2011/2011-12-20-who-is-singing.mdx b/src/content/posts/2011/2011-12-20-who-is-singing.mdx index e2d8e94..3502551 100644 --- a/src/content/posts/2011/2011-12-20-who-is-singing.mdx +++ b/src/content/posts/2011/2011-12-20-who-is-singing.mdx @@ -10,6 +10,7 @@ tags: - 听,是谁在唱歌 - 老歌 category: 杂思 +toc: true cover: /images/2022/04/2022041519522100.jpg summary: 听着奶茶的甜美的嗓音,便是一种恬静的享受。冬日里的午后,音箱里放着那首“听,是谁在唱歌”,像是有一种魔力般的感染,让人回忆许久。而仔细回想,都是种呼唤…… --- diff --git a/src/content/posts/2012/2012-07-25-the-first-year-of-blogging.mdx b/src/content/posts/2012/2012-07-25-the-first-year-of-blogging.mdx index 761a417..53fd8ad 100644 --- a/src/content/posts/2012/2012-07-25-the-first-year-of-blogging.mdx +++ b/src/content/posts/2012/2012-07-25-the-first-year-of-blogging.mdx @@ -7,6 +7,7 @@ tags: - 博客 - 写作 category: 文章 +toc: true summary: 有一天晚上,在 QQ 上和一个准备写博的人聊了很久。那个人问我,写博客会不会很累?我想了想,也不知道该如何回答这个问题。 cover: /images/2012/07/2012072523060500.jpg --- diff --git a/src/content/posts/2013/2013-04-27-the-best-way-to-learn-css.mdx b/src/content/posts/2013/2013-04-27-the-best-way-to-learn-css.mdx index 5d1995e..f187258 100644 --- a/src/content/posts/2013/2013-04-27-the-best-way-to-learn-css.mdx +++ b/src/content/posts/2013/2013-04-27-the-best-way-to-learn-css.mdx @@ -7,6 +7,9 @@ tags: - CSS - HTML category: 编程 +toc: + minHeadingLevel: 1 + maxHeadingLevel: 2 summary: CSS 与 HTML 相结合地进行工作;HTML 整理出页面的结构,CSS 使它们看起来更加漂亮并且加入了细节上的交互。作为一个网站设计者你应该认真地学习这些语言。 cover: /images/2013/04/2013042823510900.jpg --- diff --git a/src/content/posts/2014/2014-03-15-the-poem-of-forget.mdx b/src/content/posts/2014/2014-03-15-the-poem-of-forget.mdx index 54d0097..9eb880c 100644 --- a/src/content/posts/2014/2014-03-15-the-poem-of-forget.mdx +++ b/src/content/posts/2014/2014-03-15-the-poem-of-forget.mdx @@ -6,6 +6,7 @@ updated: 2020-09-06 13:09:12 tags: - 爱情 category: 文章 +toc: true cover: /images/2024/04/2024041620281800.jpg summary: 有人说,记忆就像一首歌,你记不得它的词,却忘不了熟悉的曲调。香香姐姐说,记忆就像是陈年的女儿红,时间愈久才弥香。而我说:记忆,就是已经结痂的疤,每一次被迫想起,都扯得血肉模糊。 --- diff --git a/src/content/posts/2015/2015-05-31-how-to-choose-your-tools.mdx b/src/content/posts/2015/2015-05-31-how-to-choose-your-tools.mdx index af15f76..ae7ddc9 100644 --- a/src/content/posts/2015/2015-05-31-how-to-choose-your-tools.mdx +++ b/src/content/posts/2015/2015-05-31-how-to-choose-your-tools.mdx @@ -6,6 +6,7 @@ updated: 2020-09-06 14:10:21 tags: - 软件 category: 杂谈 +toc: true cover: /images/2024/04/2024041520204000.jpg summary: 我一向不喜欢做一名所谓的“传教者”,向你推荐哪个软件好用,哪个软件比哪个软件好用,做什么事有什么好的软件可以实现。很多时候别人问我类似的软件推荐需求时,我都尽量避免回答。 --- diff --git a/src/content/posts/2015/2015-07-04-gossip-on-profligate-spending.mdx b/src/content/posts/2015/2015-07-04-gossip-on-profligate-spending.mdx index 9f13ae2..cffe57b 100644 --- a/src/content/posts/2015/2015-07-04-gossip-on-profligate-spending.mdx +++ b/src/content/posts/2015/2015-07-04-gossip-on-profligate-spending.mdx @@ -6,6 +6,7 @@ updated: 2023-12-02 15:14:44 tags: - 败家 category: 杂谈 +toc: true cover: /images/2023/12/2023120213463189.png summary: 当年玩基三的时候流行着这么一句话:一入基三深似海,从此节操是路人。对于我这个用惯了Apple的人而言,可能感触最深的话就是,一入苹果深似海,从此金钱不够买。 --- diff --git a/src/content/posts/2015/2015-12-08-rest-api-desgin.mdx b/src/content/posts/2015/2015-12-08-rest-api-desgin.mdx index b5ac1dc..0016efd 100644 --- a/src/content/posts/2015/2015-12-08-rest-api-desgin.mdx +++ b/src/content/posts/2015/2015-12-08-rest-api-desgin.mdx @@ -4,6 +4,9 @@ slug: rest-api-design date: 2015-12-08 14:30:45 updated: 2020-09-10 06:26:16 category: 编程 +toc: + minHeadingLevel: 1 + maxHeadingLevel: 2 cover: /images/2024/04/2024041520433700.jpg summary: 在软件行业快速发展的今天,传统的软件授权已经不能足以满足一个IT类的公司的发展。虽然在大部分公司里,它还是现金池的直接源头。 --- diff --git a/src/content/posts/2016/2016-02-04-oauth-on-kong.mdx b/src/content/posts/2016/2016-02-04-oauth-on-kong.mdx index 5372117..35eb723 100644 --- a/src/content/posts/2016/2016-02-04-oauth-on-kong.mdx +++ b/src/content/posts/2016/2016-02-04-oauth-on-kong.mdx @@ -6,6 +6,7 @@ updated: 2020-09-04 20:29:36 tags: - Kong category: 编程 +toc: true cover: /images/2020/09/2020090420223787.jpg summary: 一个完整的 OAuth 2.0 认证需要好几步,然而,Kong只完成最后几步,实际使用时需要开发上层的服务。 --- diff --git a/src/content/posts/2016/2016-05-06-introduction-to-webpack-part-1.mdx b/src/content/posts/2016/2016-05-06-introduction-to-webpack-part-1.mdx index ec2554a..f60eccd 100644 --- a/src/content/posts/2016/2016-05-06-introduction-to-webpack-part-1.mdx +++ b/src/content/posts/2016/2016-05-06-introduction-to-webpack-part-1.mdx @@ -6,6 +6,7 @@ updated: 2020-09-04 19:31:49 tags: - 前端 category: 编程 +toc: true cover: /images/2020/09/2020090419260539.png summary: Webpack 是近段时间非常流行的前端流程处理工具,用于实时执行构建任务和预处理你的文件。 --- diff --git a/src/content/posts/2016/2016-08-15-future-plan-on-kids.mdx b/src/content/posts/2016/2016-08-15-future-plan-on-kids.mdx index bc884d8..a1def8e 100644 --- a/src/content/posts/2016/2016-08-15-future-plan-on-kids.mdx +++ b/src/content/posts/2016/2016-08-15-future-plan-on-kids.mdx @@ -5,6 +5,7 @@ date: 2016-08-14 23:15:57 updated: 2020-09-04 12:44:48 category: 文章 cover: /images/2020/09/2020090412370067.jpg +toc: true summary: 按照中国目前的计划生育策略,在不考虑交高额罚金的情况下,我能被允许养育的最高子女数量为两个。按照未来生活水平的提高和自我对于生活品质的追求,我不可能也没有精力抚养过多的孩子。 --- @@ -16,7 +17,7 @@ summary: 按照中国目前的计划生育策略,在不考虑交高额罚金 那么按照第一胎的情况,分别有不同的考虑。 -### 如果第一胎是女儿 +## 如果第一胎是女儿 我一向坚持男孩穷养,女孩富养的观点。但是说明的是,这里的穷和富并不是传统意义上的穷和富。 @@ -26,11 +27,11 @@ summary: 按照中国目前的计划生育策略,在不考虑交高额罚金 这么一对比,在一开始就富养,尤其是较为富裕的零花钱给予。一是让女孩一开始养成资金的管理,二是能让她有更多的钱进行自我兴趣的释放。(省的被个穷小子三言两语就骗了一辈子的幸福,哼!)富养的另一好处,就是女孩子的各方面能力会更加多样,我不会要求自己的小孩会这会那,报各种艺术班。一,我没那么多钱。二,小孩不一定愿意学。三,我觉得能喜欢一件事并一直坚持下去才能真正做好。但是,只要是她喜欢的爱好,我会全力支持。我觉得,这种方式养成的萝莉,才是最吼得! -### 如果第一胎是男孩 +## 如果第一胎是男孩 第一胎一定要女儿,我压根就不会做男孩的考虑。 -### 二胎什么时候要 +## 二胎什么时候要 按照我个人的生活规划,我的计划是28岁结婚,顺便还能去 Tokyo 看个奥运会,搞个蜜月啥的。所以,我要一胎的时候最小也应该是29岁。因为秋季适合女性怀孕,按照妊娠280天的大概计算,应该是在第二年夏季预产。所以二胎理论上,我希望在一胎上小学的时候要,那个时候我未来的老婆应该是在33~38岁间。一来,按照女性的生理周期,38岁之后的排卵就开始减少,卵巢的卵子的质量也明显不如年轻的时候,就女性自身的各方面生育质量也不如以前。 diff --git a/src/content/posts/2017/2017-06-28-atelier-firis-first-year-walk-through.mdx b/src/content/posts/2017/2017-06-28-atelier-firis-first-year-walk-through.mdx index f69d4c0..3813b83 100644 --- a/src/content/posts/2017/2017-06-28-atelier-firis-first-year-walk-through.mdx +++ b/src/content/posts/2017/2017-06-28-atelier-firis-first-year-walk-through.mdx @@ -8,6 +8,7 @@ tags: - 游戏 - 菲莉丝 category: 文章 +toc: true cover: /images/2019/05/2019050909531558.jpg summary: 这作不知道是不是因为变革太大,还是 BUG 太多,日版销量暴死,本人买完繁中后才看到要出 PC 的新闻。 --- diff --git a/src/content/posts/2017/2017-09-30-evolution-of-data-structures-in-yandexmetrica.mdx b/src/content/posts/2017/2017-09-30-evolution-of-data-structures-in-yandexmetrica.mdx index d883d9f..38db81d 100644 --- a/src/content/posts/2017/2017-09-30-evolution-of-data-structures-in-yandexmetrica.mdx +++ b/src/content/posts/2017/2017-09-30-evolution-of-data-structures-in-yandexmetrica.mdx @@ -7,6 +7,7 @@ tags: - 数据库 - 存储 category: 编程 +toc: true cover: /images/2019/05/2019051818284917.jpg summary: Yandex.Metrica 是世界第二大的线上分析系统,Metrica 处理来自网站或者应用的数据流,将它解析成可分析的格式。 --- diff --git a/src/content/posts/2017/2017-12-24-teruteru-1.mdx b/src/content/posts/2017/2017-12-24-teruteru-1.mdx index 33ed1f0..f1c3789 100644 --- a/src/content/posts/2017/2017-12-24-teruteru-1.mdx +++ b/src/content/posts/2017/2017-12-24-teruteru-1.mdx @@ -7,6 +7,7 @@ tags: - 晴天娃娃 - 小简 category: 小说 +toc: true cover: /images/2019/05/2019051818154567.jpg summary: 送你一个晴天娃娃,你若安好,便是晴天。记忆太散,故事太杂,我无法把那么多细枝末节串成一串,只能略带总结地回想。就好比花间十二声,你看着四季的风云变化,记述着个个回味的故事…… --- diff --git a/src/content/posts/2018/2018-01-13-teruteru-2.mdx b/src/content/posts/2018/2018-01-13-teruteru-2.mdx index bac155c..03b7ca4 100644 --- a/src/content/posts/2018/2018-01-13-teruteru-2.mdx +++ b/src/content/posts/2018/2018-01-13-teruteru-2.mdx @@ -7,6 +7,7 @@ tags: - 晴天娃娃 - 小简 category: 小说 +toc: true cover: /images/2019/05/2019050902101874.jpg summary: 小雨曾在笔记本的扉页上写道:“樱花不及樱桃,相见不如想念。”彼时大明湖畔的春天,似乎在下着一场樱花雪,小雨在电话这头跟小简说,本来想在今天去见你的 ---