惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

J
Java Code Geeks
Martin Fowler
Martin Fowler
B
Blog RSS Feed
D
DataBreaches.Net
L
LangChain Blog
月光博客
月光博客
S
SegmentFault 最新的问题
阮一峰的网络日志
阮一峰的网络日志
V
Visual Studio Blog
美团技术团队
Jina AI
Jina AI
博客园 - 司徒正美
雷峰网
雷峰网
Last Week in AI
Last Week in AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
IT之家
IT之家
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
小众软件
小众软件
罗磊的独立博客
博客园_首页
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
A
About on SuperTechFans
Engineering at Meta
Engineering at Meta

爱吃肉的猫

那就,再相逢 Butterfly的魔改教程:最新评论页 离歌不夜天 前端分享 - 滑动阻尼效果 Butterfly的魔改教程:右键菜单 音乐分享 - doi微醺氛围 Butterfly的魔改教程:动态相册页 近况记事 - 11 微信公众号:Ai大模型让回复更具智能化 近况记事 - 10 PWA:让你的网站变成桌面应用APP Healthy Love Butterfly的魔改教程:关于本站 近况记事 - 9 Butterfly的魔改教程:待办清单 TrollStore - 不掉签助手 近况记事 - 8 Twikoo评论回复邮件模版 过一个很特别的七夕 The Young Boy and the Sea 思考题目:混乱是阶梯 近况记事 - 7 Butterfly的魔改教程:即刻短文页 Butterfly的魔改教程:loading加载动画 差旅游记 再见,不惑之年:二十又一 近况记事 - 6 Butterfly的魔改教程:自定页数跳转 堆友AI作图:3D资源设计平台,堆出你的未来 【QD-Today】自建私有自动签到服务
Butterfly的魔改教程:文章订阅页
亦小封 · 2023-08-15 · via 爱吃肉的猫

样式参考@张洪Heo,邮件订阅功能实现:follow

效果预览

创建数据

  • 创建并修改 [blogRoot]/source/subscribe/index.md 页面
1
2
3
4
5
6
7
8
9
10
---
title: 订阅本站
date: 2023-07-28 13:01:46
type: subscribe
top_img: false
aside: false
comments: false
---

<!-- 页面内容 -->
  • 创建 [blogRoot]/themes/butterfly/layout/includes/page/subscribe.pug 页面文件,并新增以下内容
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
.rss-plan-list
a.rss-plan-item.rss-plan-wechat(href="/wechatOA/" title="公众号" target="_blank")
.rss-plan-description 推送精选文章<br>推送全文
.rss-plan-info-group
.rss-plan-title 公众号订阅
.rss-plan-info 推荐的订阅方式
img.rss-plan-icon.no-lightbox(src="https://img.meuicat.com/blog/11.webp")
a.rss-plan-item.rss-plan-mail(onclick="icat.submitInfo()" title="follow")
.rss-plan-description 推送全部文章<br>更新推送简介
.rss-plan-info-group
.rss-plan-title 邮件订阅
.rss-plan-info 推荐的订阅方式
img.rss-plan-icon.no-lightbox(src="https://img.meuicat.com/blog/12.webp")
a.rss-plan-item.rss-plan-rss(href="/rss2.xml" title="rss" target="_blank")
.rss-plan-description 推送全部文章<br>推送简介
.rss-plan-info-group
.rss-plan-title RSS
.rss-plan-info 备用订阅方式
img.rss-plan-icon.no-lightbox(src="https://img.meuicat.com/blog/13.webp")

hr

.submit-box
include follow.pug

!= page.content

script
var icat = {
submitInfo: function() {
var submitBox = document.querySelector('.submit-box')

if (submitBox.classList.contains('display')) {
submitBox.classList.remove('display')
} else {
submitBox.classList.add('display')
} // 订阅页点击
}
  • 新增 [blogRoot]/themes/butterfly/layout/page.pug 页面内容项使其匹配
    + 号直接删除 即是正常缩进)
1
2
3
4
5
6
7
8
9
    ···
case page.type
+ when 'subscribe'
+ include includes/page/subscribe.pug
when 'photo'
include includes/page/photo.pug
when 'tags'
include includes/page/tags.pug
···
  • 新建 [blogRoot]/source/css/subscribe.css 样式文件,并新增以下内容
    (也可以在自建的css文件里新增内容)
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
#post .tag_share + #follow {
margin-top: 40px;
}
.rss-plan-list {
display: flex;
width: 100%;
flex-direction: row;
flex-wrap: wrap;
margin: 0 -4px;
position: relative;
justify-content: space-between;
}
.rss-plan-item:visited {
color: var(--icat-white);
}
.rss-plan-item.rss-plan-wechat {
background: #27c125;
}
.rss-plan-item.rss-plan-mail {
background: var(--icat-blue);
}
.rss-plan-item.rss-plan-rss {
background: var(--icat-orange);
}
.rss-plan-item {
border-radius: 12px;
display: flex;
flex-direction: column;
justify-content: space-between;
min-width: 240px;
height: 240px;
margin: 6px 0;
overflow: hidden;
text-decoration: none;
width: calc(100% / 3 - 8px);
filter: brightness(1);
transition: .3s;
border: var(--style-border);
box-shadow: var(--icat-shadow-border);
}
.rss-plan-item:hover {
filter: brightness(1.1)
}
@media screen and (max-width: 1024px) {
.rss-plan-item {
width:calc(100% / 2 - 4px)
}
.rss-plan-item:first-child {
width: 100%
}
}
@media screen and (max-width: 768px) {
.rss-plan-item {
width:100%
}
}


.rss-plan-description {
font-size: 16px;
color: var(--icat-white);
margin: 26px 0 0 30px;
line-height: 20px;
}
.rss-plan-info-group {
position: relative;
margin: 0 0 26px 30px;
color: var(--icat-white);
}
.rss-plan-title {
font-size: 36px;
font-weight: 700;
width: fit-content;
line-height: 1;
}
.rss-plan-info {
width: fit-content;
opacity: .6;
}
img.rss-plan-icon {
position: absolute;
bottom: -50px;
right: -20px;
height: 140px;
-webkit-user-drag: none;
user-select: none;
-webkit-transition: all 1.2s cubic-bezier(.39,.575,.565,1) !important;
-moz-transition: all 1.2s cubic-bezier(.39,.575,.565,1) !important;
-o-transition: all 1.2s cubic-bezier(.39,.575,.565,1) !important;
-ms-transition: all 1.2s cubic-bezier(.39,.575,.565,1) !important;
transition: all 1.2s cubic-bezier(.39,.575,.565,1) !important;
transform-origin: bottom right;
filter: blur(8px);
opacity: .6;
}
.rss-plan-item:hover img.rss-plan-icon {
bottom: -40px;
right: -10px;
filter: blur(0);
opacity: 1
}
.rss-plan-item:hover {
text-decoration: none !important;
}


.follow-it-form-subscribe {
position: relative;
display: block;
padding: 26px;
width: 100%;
height: auto;
border-radius: 12px;
border: var(--style-border);
box-shadow: var(--icat-shadow-border);
background-color: var(--icat-background);
}
@media screen and (min-width: 768px) and (max-width: 1920px) {
.follow-it-form-subscribe::before {
content: '';
background: url(https://img.meuicat.com/blog/follow.svg);
position: absolute;
top: 30px;
right: 26px;
width: 122px;
height: 25px;
filter: blur(2px);
}
}
.follow-it-form-subscribe .heading {
width: 100%;
margin-bottom: 0.5rem;
}
.follow-it-form-subscribe .heading h5 {
margin: 0 0 0.2rem 0;
color: var(--icat-fontcolor);
font-size: 18px;
}
.follow-it-form-subscribe .input-field {
margin-top: 20px;
width: 100%;
}
.follow-it-form-subscribe .input-field input {
width: 100%;
height: 48px;
border-radius: 6px;
border: 2px solid var(--icat-card-border);
outline: none;
}
.follow-it-form-subscribe .input-field input::placeholder,
.follow-it-form-subscribe .input-field input {
opacity: .6;
background: var(--icat-secondbg);
color: var(--icat-fontcolor);
font-size: 14px;
font-weight: 500;
line-height: 20px;
text-align: center;
}
.follow-it-form-subscribe .submit-button {
margin-top: 16px;
width: 100%;
}
.follow-it-form-subscribe .submit-button button {
width: 100%;
height: 42px;
border: 0;
border-radius: 6px;
line-height: 0;
color: var(--icat-white);
background: var(--icat-black);
box-shadow: var(--icat-shadow-border);
transition: .3s;
}
.follow-it-form-subscribe .submit-button button:hover {
cursor: pointer;
background: var(--icat-blue);
}
.submit-box {
opacity: 0;
height: 0;
transition: all .3s ease 0s;
}
.submit-box.display {
opacity: 1;
height: auto;
}



  • _config.butterfly.yml 主题配置文件中 inject 下的 head 引入 subscribe.css 样式
1
2
3
4
5
6
7
8
9
10
  ···

inject:
head:
- <link rel="stylesheet" href="/css/subscribe.css">
- ···
bottom:
- ···

···
  • 新增 [blogRoot]/source/subscribe/index.md 页面内容
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
# 订阅本站

首先,对每一位来到这里的iCat喵友们说声 "有幸遇见 很高兴认识你" 👋
创立iCat的初衷也是想着每一个人都可以像猫咪那样过的有仪式感;傲娇性随时放射;有位猫主子宠着
也是想能够有一个让自己积累知识、积累兴趣的地方;是属于自己的温暖小窝;也是偌大的社会里的属于自己的内心避风港
和他人分享,会让这些成为积累和沉淀。如果能够帮助到更多的人,帮助更多人解决问题,那一定是非常棒的事情

与大多数垂直类的技术博客不同,这里的种类会非常的繁杂,有技能的教程干货、有生活上的吐槽和想法;所以一般我研究什么、发现了什么都会分享在这里
这些就是创造 MueiCat 的本意,也是我分享生活的方式。有幸能和你相遇在这里,相信我们能共同留下一段美好记忆


## 微信公众号

iCat的微信公众号原本有五个账号,但现在属于我个人的就剩一个[「小王爱吃糖」](/wechatOA/)
等工作不是那么繁忙后,会将公众号处理一番。暂定为一些我觉得有价值,很重要,比较精彩的文章。后面也会同步将博客文章同步至公众号内,但并不是所有。建议所有用户订阅


## 邮件通知

邮件通知采用follow的rss更新采集通知功能,能在本博客更新后发一封邮件通知到您。当然了,这需要你留下你的邮件地址

点击上方 `邮件订阅` ,填入你的邮件地址订阅即可

## RSS订阅

你可以使用第三方RSS客户端接收到博客的文章摘要通知

https://meuicat.com/rss2.xml
  • 创建 [blogRoot]/themes/butterfly/layout/includes/page/follow.pug 页面文件,并新增以下内容
1
2
3
4
5
6
7
8
9
10
form#follow(action="https://api.follow.it/subscribe?pub=YDgVmI6K0mm9l1_CRzUY_g" method="post" target="_blank")
.follow-it-form-subscribe(style="position: relative;")
.heading
h5(style="font-weight: bold; text-align: center;") 订阅本站文章:
.input-field
input(type="email" name="email" placeholder="填入您的邮箱地址" spellcheck="false")
.submit-button
button(type="submit" onclick="ga('send','event', 'Form','Submit','Affiliate');" style="font-weight: bold; font-size: 14px; text-align: center;") 确认订阅
if is_page()
hr

follow

  • {follow的订阅id}的获取:Settings - Affiliate program - For theme creators - Set-up guide - 2.Add a subscription form

  • 列如:https://api.follow.it/subscribe?pub=YDgVmI6K0mm9l1_CRzUY_g,就是 {follow的订阅id}

引用站外地址,注意辨别

follow.it

follow.it:适合所有人的内容订阅工具(rss,newsletter等方式齐全)

更多订阅

本站已在文章页底部植入次模块功能

  • 新增 [blogRoot]/themes/butterfly/layout/post.pug 页面内容
    (**+** 号直接删除 即是正常缩进)
1
2
3
4
5
6
7
8
9
10
      ···

if (theme.post_meta.post.tags)
.post-meta__tag-list
each item, index in page.tags.data
a(href=url_for(item.path)).post-meta__tags #[=item.name]
include includes/third-party/share/index.pug
+ include includes/page/follow.pug

···

Butterfly的魔改教程:文章订阅页

此文章版权归 MeuiCat 所有,完整转载,请注明来源!