<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>奇怪的技能 &#8211; CYFOR&#039;blog</title>
	<atom:link href="https://www.cyfor.cn/category/pm-day/odd/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.cyfor.cn</link>
	<description>是个人，还活着，争取再活几年</description>
	<lastBuildDate>Thu, 21 Aug 2025 07:24:21 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.5</generator>

<image>
	<url>https://www.cyfor.cn/wp-content/uploads/2020/04/cropped-狗粮-2-150x150.png</url>
	<title>奇怪的技能 &#8211; CYFOR&#039;blog</title>
	<link>https://www.cyfor.cn</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>腾讯云EdgeOne Pages默认浅克隆无法获取全部项目Git记录</title>
		<link>https://www.cyfor.cn/%e8%85%be%e8%ae%af%e4%ba%91edgeone-pages%e9%bb%98%e8%ae%a4%e6%b5%85%e5%85%8b%e9%9a%86%e6%97%a0%e6%b3%95%e8%8e%b7%e5%8f%96%e5%85%a8%e9%83%a8%e9%a1%b9%e7%9b%aegit%e8%ae%b0%e5%bd%95/</link>
					<comments>https://www.cyfor.cn/%e8%85%be%e8%ae%af%e4%ba%91edgeone-pages%e9%bb%98%e8%ae%a4%e6%b5%85%e5%85%8b%e9%9a%86%e6%97%a0%e6%b3%95%e8%8e%b7%e5%8f%96%e5%85%a8%e9%83%a8%e9%a1%b9%e7%9b%aegit%e8%ae%b0%e5%bd%95/#respond</comments>
		
		<dc:creator><![CDATA[CYFOR]]></dc:creator>
		<pubDate>Fri, 13 Jun 2025 01:40:32 +0000</pubDate>
				<category><![CDATA[奇怪的技能]]></category>
		<category><![CDATA[追星]]></category>
		<category><![CDATA[CI/CD]]></category>
		<category><![CDATA[vuepress]]></category>
		<category><![CDATA[周杰伦]]></category>
		<category><![CDATA[开源]]></category>
		<category><![CDATA[网站]]></category>
		<category><![CDATA[腾讯云]]></category>
		<guid isPermaLink="false">https://www.cyfor.cn/?p=211</guid>

					<description><![CDATA[添加完整克隆的构建命令，解决腾讯云 EdgeOne Pages 浅克隆无法获取全部Git信息问题
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="1910" height="933" src="https://www.cyfor.cn/wp-content/uploads/2025/06/image-1.png" alt="JayChou's WIKI 更新日志" class="wp-image-215" srcset="https://www.cyfor.cn/wp-content/uploads/2025/06/image-1.png 1910w, https://www.cyfor.cn/wp-content/uploads/2025/06/image-1-300x147.png 300w, https://www.cyfor.cn/wp-content/uploads/2025/06/image-1-1024x500.png 1024w, https://www.cyfor.cn/wp-content/uploads/2025/06/image-1-768x375.png 768w, https://www.cyfor.cn/wp-content/uploads/2025/06/image-1-1536x750.png 1536w" sizes="(max-width: 1910px) 100vw, 1910px" /></figure>



<p>自从把 JayChou&#8217;s wiki 的 CI 迁移到腾讯云 EdgeOne Pages 就发现了一个问题，好像每个页面的撰写时间都是错的，全部显示的是最近一次构建的时间（实际上是最近一次提交的时间），一直想探究下怎么回事，是不是我项目配置有问题，之前检查过Vuepress-Hope有关页面元数据的的文档，没有发现任何我的项目存在错误的。</p>



<p>直到昨天想根据hope提供的插件方法在每个页面增加更新日志，提交更新后访问，每个页面的更新日志都是相同的最近一次提交的消息。试着访问了 Vercel 和 Netlify 的默认项目域名发现其他CICD平台都是正常展示的，这就不能忍了。</p>



<p>问了 DeepSeek 才得到正确答案，是因为<strong>腾讯云 EdgeOne Pages 的浅克隆机制</strong>：</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p><strong>默认浅克隆 (Shallow Clone)</strong>：</p>



<ul id="block-7d108256-a1e9-4223-ad79-36397062c1bb" class="wp-block-list">
<li>EdgeOne Pages 在构建时默认使用&nbsp;<code>git clone --depth=1</code>（只克隆最近一次提交）</li>



<li>导致 Git 插件无法访问完整历史记录，只能获取到最近一次提交信息</li>
</ul>
</blockquote>



<p>DeepSeek同时给出了解决办法：</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>方案一：强制深度克隆（推荐）</p>



<p>在&nbsp;<code>package.json</code>&nbsp;的构建命令前添加深度克隆指令：<br><code>"scripts": {<br>"prebuild": "git fetch --unshallow || true",<br>"build": "vuepress build src"<br>}</code></p>



<p>方案二：自定义构建命令</p>



<p><code>git config core.quotepath false &amp;&amp;<br>git fetch --unshallow &amp;&amp;<br>npm install &amp;&amp;<br>npm run build</code></p>
</blockquote>



<p>不想在项目Git提交记录拉屎测试了（拉了太多了），所以选择了在腾讯的控制台里改构建命令，注意 DeekSeek 给出的命令是有问题的，正确的构建命令应该是</p>



<p><code>git config core.quotepath false &amp;&amp; git fetch --unshallow &amp;&amp; pnpm docs:build</code></p>



<figure class="wp-block-image size-full"><img decoding="async" width="1750" height="866" src="https://www.cyfor.cn/wp-content/uploads/2025/06/image.png" alt="腾讯云 EdgeOne Pages 配置" class="wp-image-213" srcset="https://www.cyfor.cn/wp-content/uploads/2025/06/image.png 1750w, https://www.cyfor.cn/wp-content/uploads/2025/06/image-300x148.png 300w, https://www.cyfor.cn/wp-content/uploads/2025/06/image-1024x507.png 1024w, https://www.cyfor.cn/wp-content/uploads/2025/06/image-768x380.png 768w, https://www.cyfor.cn/wp-content/uploads/2025/06/image-1536x760.png 1536w" sizes="(max-width: 1750px) 100vw, 1750px" /></figure>



<p>重新部署，完美 一切都正常了。</p>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.cyfor.cn/%e8%85%be%e8%ae%af%e4%ba%91edgeone-pages%e9%bb%98%e8%ae%a4%e6%b5%85%e5%85%8b%e9%9a%86%e6%97%a0%e6%b3%95%e8%8e%b7%e5%8f%96%e5%85%a8%e9%83%a8%e9%a1%b9%e7%9b%aegit%e8%ae%b0%e5%bd%95/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>修改index.scss给VuePress增加图片左右滑动区块</title>
		<link>https://www.cyfor.cn/%e4%bf%ae%e6%94%b9index-scss%e7%bb%99vuepress%e5%a2%9e%e5%8a%a0%e5%9b%be%e7%89%87%e5%b7%a6%e5%8f%b3%e6%bb%91%e5%8a%a8%e5%8c%ba%e5%9d%97/</link>
					<comments>https://www.cyfor.cn/%e4%bf%ae%e6%94%b9index-scss%e7%bb%99vuepress%e5%a2%9e%e5%8a%a0%e5%9b%be%e7%89%87%e5%b7%a6%e5%8f%b3%e6%bb%91%e5%8a%a8%e5%8c%ba%e5%9d%97/#respond</comments>
		
		<dc:creator><![CDATA[CYFOR]]></dc:creator>
		<pubDate>Tue, 20 May 2025 03:00:22 +0000</pubDate>
				<category><![CDATA[奇怪的技能]]></category>
		<category><![CDATA[追星]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[vuepress]]></category>
		<category><![CDATA[开源]]></category>
		<category><![CDATA[网站]]></category>
		<guid isPermaLink="false">https://www.cyfor.cn/?p=202</guid>

					<description><![CDATA[通过在styles\index.scss添加自定义全局样式CSS，实现VuePress图片左右滑动效果
]]></description>
										<content:encoded><![CDATA[
<p>更新<a href="http://www.jaychou.wiki" target="_blank" rel="noopener">JayChou-Wiki</a>时从各处收集了很多历史图片资源，VuePress的是基于MarkDown文件生成的页面，所以支持md的插入图片语法和html标签。因为用了<a href="https://theme-hope.vuejs.press/zh/" target="_blank" rel="noopener">hope</a>主题，内置了<a href="https://theme-hope.vuejs.press/zh/guide/feature/photo-swipe.html" target="_blank" rel="noopener">图片预览插件</a>，实现了以下交互效果：<br></p>



<p>&#8211; 左右滑动按顺序浏览页面内其他的图片<br>&#8211; 查看图片的描述<br>&#8211; 对图片进行缩放<br>&#8211; 全屏浏览图片<br>&#8211; 下载图片<br>&#8211; 分享图片</p>



<p>但无法实现图片的左右滑动，当单个页面需要引用大量图片时，即便每张图片都单独设置了尺寸，也会显得很杂乱。找了很久解决方案，在hope页面的<a href="https://github.com/vuepress-theme-hope/vuepress-theme-hope/edit/main/docs/theme/src/zh/guide/feature/photo-swipe.md" target="_blank" rel="noopener">源码仓库</a>中发现作者本人是直接写的html平铺效果。</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="500" src="https://www.cyfor.cn/wp-content/uploads/2025/05/image-1024x500.png" alt="github-hope-photo-swipe.md" class="wp-image-203" srcset="https://www.cyfor.cn/wp-content/uploads/2025/05/image-1024x500.png 1024w, https://www.cyfor.cn/wp-content/uploads/2025/05/image-300x147.png 300w, https://www.cyfor.cn/wp-content/uploads/2025/05/image-768x375.png 768w, https://www.cyfor.cn/wp-content/uploads/2025/05/image-1536x751.png 1536w, https://www.cyfor.cn/wp-content/uploads/2025/05/image.png 1911w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">github-hope-photo-swipe.md</figcaption></figure>



<p>但是每个页面都单独写html也太麻烦了，所以使用AiAgent（忘记是阿里通义灵码还是腾讯CodeBuddy了，反正这种小任务都差不多）在<strong>src.vuepress\styles\index.scss</strong>添加了<a href="https://theme-hope.vuejs.press/zh/config/style.html" target="_blank" rel="noopener">自定义全局样式</a>，最终实现效果如下：</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="500" src="https://www.cyfor.cn/wp-content/uploads/2025/05/image-1-1024x500.png" alt="jaychou.wiki自定义vuepress图片左右滑动效果" class="wp-image-204" srcset="https://www.cyfor.cn/wp-content/uploads/2025/05/image-1-1024x500.png 1024w, https://www.cyfor.cn/wp-content/uploads/2025/05/image-1-300x147.png 300w, https://www.cyfor.cn/wp-content/uploads/2025/05/image-1-768x375.png 768w, https://www.cyfor.cn/wp-content/uploads/2025/05/image-1-1536x751.png 1536w, https://www.cyfor.cn/wp-content/uploads/2025/05/image-1.png 1911w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<pre class="wp-block-code"><code><code>// 图片滑动组件样式
.image-scroll-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  margin: 1rem 0;
}

.image-scroll-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1rem 0;
}

.image-scroll-content {
  display: flex;
  gap: 1rem;
  padding: 0 1rem;
  min-width: max-content;
}

.image-scroll-content img {
  height: 200px;
  min-width: 300px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

// 图片说明文本样式
.image-scroll-content figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.image-scroll-content figcaption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #666;
  text-align: center;
}

@media (max-width: 768px) {
  .image-scroll-content img {
    height: 150px;
    min-width: 200px;
  }
  
  .image-scroll-content figcaption {
    font-size: 0.8rem;
  }
}</code></code></pre>



<p>使用时直接在页面中添加：</p>



<pre class="wp-block-code"><code>&lt;div class="image-scroll-container">
  &lt;div class="image-scroll-wrapper">
    &lt;div class="image-scroll-content">
        &lt;figure>
            &lt;img src="图片链接" alt="图片标签" />
            &lt;figcaption>图片显示名&lt;/figcaption>
        &lt;/figure>
    &lt;/div>
  &lt;/div>
&lt;/div></code></pre>
]]></content:encoded>
					
					<wfw:commentRss>https://www.cyfor.cn/%e4%bf%ae%e6%94%b9index-scss%e7%bb%99vuepress%e5%a2%9e%e5%8a%a0%e5%9b%be%e7%89%87%e5%b7%a6%e5%8f%b3%e6%bb%91%e5%8a%a8%e5%8c%ba%e5%9d%97/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>VuePress踩坑记录</title>
		<link>https://www.cyfor.cn/vuepress_boom/</link>
					<comments>https://www.cyfor.cn/vuepress_boom/#respond</comments>
		
		<dc:creator><![CDATA[CYFOR]]></dc:creator>
		<pubDate>Thu, 24 Apr 2025 09:05:32 +0000</pubDate>
				<category><![CDATA[奇怪的技能]]></category>
		<category><![CDATA[追星]]></category>
		<category><![CDATA[vuepress]]></category>
		<category><![CDATA[周杰伦]]></category>
		<category><![CDATA[开源]]></category>
		<guid isPermaLink="false">https://www.cyfor.cn/?p=176</guid>

					<description><![CDATA[这是一个创建了很久的页面，一直在草稿箱里&#46;&#46;&#46;]]></description>
										<content:encoded><![CDATA[
<p>这是一个创建了很久的页面，一直在草稿箱里，总觉得之前写过了什么东西，因为等cn域名备案所以没发布，但备案下来之后看竟然是空的。所以一直在草稿箱里。</p>



<p>好么，刚觉得这个需要删了，就给我贡献素材了</p>



<p>25-04-24 Markdown内的HTML标签内使用相对路径链接错误<br>可能因为vue是单页应用，html表格中不能直接使用/show/2001这样的相对路径导航，可以正常跳转但会导致页面样式错误，必须使用完整的https://链接<br>更新：好像不是因为这个，发布到线上之后发现问题还是存在！！应该是页面内容少就会出现这个问题，人麻了</p>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.cyfor.cn/vuepress_boom/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>使用Waline给Vuepress增加评论功能</title>
		<link>https://www.cyfor.cn/waline-to-vuepress/</link>
					<comments>https://www.cyfor.cn/waline-to-vuepress/#respond</comments>
		
		<dc:creator><![CDATA[CYFOR]]></dc:creator>
		<pubDate>Thu, 17 Apr 2025 01:42:49 +0000</pubDate>
				<category><![CDATA[奇怪的技能]]></category>
		<category><![CDATA[vuepress]]></category>
		<guid isPermaLink="false">https://www.cyfor.cn/?p=142</guid>

					<description><![CDATA[Vuepress-Waline的配置]]></description>
										<content:encoded><![CDATA[
<p>因为JayChou&#8217;wiki是用的vuepress构建的，vuepress作为一个纯静态文档，是没有逻辑交互的，比如评论服务。但vuepress官方开发了很多支持插件，包括评论插件，在做JayChou&#8217;wiki时采用了Waline作为评论系统，只记录一下配置，以免日后再需要。内容摘抄<a href="https://guanqr.com/tech/website/introduction-and-basic-setting-of-waline/#%E4%B8%BA%E4%BD%95%E4%BD%BF%E7%94%A8%E8%AF%84%E8%AE%BA%E7%B3%BB%E7%BB%9F" target="_blank" rel="noopener">Waline 评论系统的介绍与基础配置</a>。</p>



<h2 class="wp-block-heading">部署</h2>



<p>参考<a href="https://waline.js.org/" target="_blank" rel="noopener">官方网站</a>，数据引擎LeanCloud&nbsp;，服务端Vercel。</p>



<h2 class="wp-block-heading">开启邮件提醒功能</h2>



<p>在 Vercel 的项目中添加以下新的环境变量：</p>



<ul class="wp-block-list">
<li style="font-style:normal;font-weight:300" class="has-small-font-size"><code>AUTHOR_EMAIL</code>：博主邮箱，用来区分发布的评论是否是博主本身发布的。如果是博主发布的则不进行提醒通知。</li>



<li style="font-style:normal;font-weight:300" class="has-small-font-size"><code>SMTP_SERVICE</code>：SMTP 邮件发送服务提供商，可以在<a href="https://github.com/nodemailer/nodemailer/blob/master/lib/well-known/services.json" target="_blank" rel="noreferrer noopener">这个页面</a>查看所有支持的运营商。如果没在列表中的可以自行配置&nbsp;<code>SMTP_HOST</code>&nbsp;和&nbsp;<code>SMTP_PORT</code>。</li>



<li style="font-style:normal;font-weight:300" class="has-small-font-size"><code>SMTP_HOST</code>：SMTP 服务器地址，如果未配置&nbsp;<code>SMTP_SERVICE</code>&nbsp;的话该项必填。</li>



<li style="font-style:normal;font-weight:300" class="has-small-font-size"><code>SMTP_PORT</code>：SMTP 服务器端口，如果未配置&nbsp;<code>SMTP_SERVICE</code>&nbsp;的话该项必填。</li>



<li style="font-style:normal;font-weight:300" class="has-small-font-size"><code>SMTP_USER</code>：SMTP 邮件发送服务的用户名，一般为登录邮箱。</li>



<li style="font-style:normal;font-weight:300" class="has-small-font-size"><code>SMTP_PASS</code>：SMTP 邮件发送服务的密码，一般为邮箱登录密码，部分邮箱（例如 163 邮箱）是单独的 SMTP 密码。</li>



<li style="font-style:normal;font-weight:300" class="has-small-font-size"><code>SITE_NAME</code>：网站名称，用于在消息中显示。</li>



<li style="font-style:normal;font-weight:300" class="has-small-font-size"><code>SITE_URL</code>：网站地址，用于在消息中显示。</li>



<li style="font-style:normal;font-weight:300" class="has-small-font-size"><code>SENDER_NAME</code>：自定义发送邮件的发件人，选填。</li>



<li style="font-style:normal;font-weight:300" class="has-small-font-size"><code>SENDER_EMAIL</code>：自定义发送邮件的发件地址，选填。</li>



<li style="font-style:normal;font-weight:300" class="has-small-font-size"><code>MAIL_SUBJECT</code>：评论回复邮件标题自定义。</li>



<li style="font-style:normal;font-weight:300" class="has-small-font-size"><code>MAIL_TEMPLATE</code>：评论回复邮件内容自定义。</li>



<li style="font-style:normal;font-weight:300" class="has-small-font-size"><code>MAIL_SUBJECT_ADMIN</code>：新评论通知邮件标题自定义。</li>



<li style="font-style:normal;font-weight:300" class="has-small-font-size"><code>MAIL_TEMPLATE_ADMIN</code>：新评论通知邮件内容自定义。</li>
</ul>



<h2 class="wp-block-heading">自定义邮件回复标题和内容</h2>



<p><code>MAIL_SUBJECT</code>、<code>MAIL_TEMPLATE</code>、<code>MAIL_SUBJECT_ADMIN</code>、<code>MAIL_TEMPLATE_ADMIN</code>&nbsp;四个环境变量是用来自定义回复邮件标题和内容的。不过一般而言，邮件回复的时候，标题和内容都不是固定的。比如说 A 回复了某条评论，系统发送邮件通知评论作者 B 的时候，标题最好含有 B 的名字。内容也应该含有 A 对 B 的什么评论作出了什么评论。这些内容会随着评论作者和评论内容的不同进行改变，所以不能直接简单的设置成固定的内容，需要设定一个回复模板。</p>



<p>模板可以通过&nbsp;<code>self</code>、<code>parent</code>&nbsp;和&nbsp;<code>site</code>&nbsp;对象传递参数，其中分别包含以下变量：</p>



<ul class="wp-block-list">
<li><code>self</code>：该条评论本身变量备注<code>nick</code>评论者姓名<code>mail</code>评论者邮箱<code>link</code>评论者网址<code>url</code>文章地址<code>comment</code>评论内容</li>



<li><code>parent</code>：该条评论的回复对象（父评论）变量备注<code>nick</code>评论者姓名<code>mail</code>评论者邮箱<code>link</code>评论者网址<code>type</code>评论者类型<code>comment</code>评论内容</li>



<li><code>site</code>：网站配置变量备注<code>name</code>博客名字<code>url</code>博客网址<code>postUrl</code>评论完整网址</li>
</ul>



<p>比如想要显示评论者姓名，就用&nbsp;<code>{{self.nick}}</code>。这样一来，我们就可以对上述四个环境变量设定模板。不过由于 Vercel 的环境变量大小限制为 4KB，如果你的模板存储需求比较大，需要直接使用代码配置。</p>



<p><font _mstmutation="1">使用代码配置则需要到 GitHub 上自动创建的那个私人仓库。仓库中有一个名为&nbsp;&nbsp;的文件，最初的内容为：</font><code>index.js</code></p>



<p>在&nbsp;<code>{}</code>&nbsp;中添加相关配置即可。下面是完整的代码：</p>



<p><font _mstmutation="1">在&nbsp;<code>index.js</code>文件中，还可以设定安全域名、违禁词、IP 禁止名单等等</font></p>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.cyfor.cn/waline-to-vuepress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>利用CloudFlare配置重定向</title>
		<link>https://www.cyfor.cn/cloudflare-cdn-301/</link>
					<comments>https://www.cyfor.cn/cloudflare-cdn-301/#respond</comments>
		
		<dc:creator><![CDATA[CYFOR]]></dc:creator>
		<pubDate>Thu, 17 Apr 2025 01:36:28 +0000</pubDate>
				<category><![CDATA[奇怪的技能]]></category>
		<category><![CDATA[301]]></category>
		<category><![CDATA[CloudFlare]]></category>
		<category><![CDATA[网站]]></category>
		<guid isPermaLink="false">https://www.cyfor.cn/?p=146</guid>

					<description><![CDATA[使用CloudFlare的CDN服务实现域名的301重定向，无需额外服务器。]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-large"><img decoding="async" src="https://www.cyfor.cn/wp-content/uploads/2024/06/cloudflare-launches-automatic-platform-optimization-for-wordpress-edited.png" alt="cloudflare"/></figure>



<p>去年注册了两个新域名，包括博客的和jaychou-wiki的，但jauchou-wiki已经开始收录了，况且域名也是要保留的，备案号也会注销。传统的保留参数重定向应该是用nginx配置，但专门去再买一台服务器有点过分了，找了下CloudFlare的重定向规则，记录一下以备不时。（比国内的好用多了啊，dnspod只支持转发到根域名，还不支持未备案域名，那么已备案域名重定向算空壳网站还是算未悬挂备案号啊？）</p>



<h2 class="wp-block-heading">前置条件</h2>



<p>保证开启CloudFlare的CDN小云朵，不然规则不会生效<strong>（所以实际上这个301是靠CDN实现的）</strong></p>


<div class="wp-block-image is-style-default">
<figure class="aligncenter size-large"><img decoding="async" src="https://www.cyfor.cn/wp-content/uploads/2024/06/image.png" alt="cloudflare配置"/><figcaption class="wp-element-caption">cloudflare配置</figcaption></figure></div>


<p>在规则-创建规则的列表创建新重定向规则。</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img decoding="async" src="https://www.cyfor.cn/wp-content/uploads/2024/06/image-1.png" alt=""/></figure></div>


<h2 class="wp-block-heading">配置参数</h2>



<h3 class="wp-block-heading">匹配条件</h3>



<p>CloudFlare的重定向规则需要先选择条件，即是所有这个根域名的流量全部重定向还是匹配到设置的条件后重定向，如果是确定长期弃用的域名可以选<code>所有传入请求</code>，如果根域名下有其他二级域名还有其他用途，最好选择<code>自定义筛选表达式</code></p>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img decoding="async" src="https://www.cyfor.cn/wp-content/uploads/2024/06/image-2.png" alt="" style="width:840px;height:auto"/></figure></div>


<p>选择后需要配置条件，字段可选的有很多，包括Cookie、国家、url等，因为是废弃域名，选择主机名（即解析的域名），填入想转发的域名，如www.aaa.com</p>



<h3 class="wp-block-heading">定向规则</h3>



<p>接下来配置重定向规则，类型选择了静态，则所有匹配的流量均转发到一个固定的url链接，但我们是要实现带参数转发，所以选择动态。</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img decoding="async" src="https://www.cyfor.cn/wp-content/uploads/2024/06/image-3.png" alt=""/></figure></div>


<p>填入表达式，保留url路径参数的表达式为</p>



<pre class="wp-block-code"><code>concat("https://www.bbb.com", http.request.uri.path)</code></pre>



<p>最终效果就是访问 www.aaa.com/ccc.html，浏览器会获取到301状态码，跳转到www.bbb.com/ccc.html</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.cyfor.cn/cloudflare-cdn-301/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>宝塔这个二缺</title>
		<link>https://www.cyfor.cn/%e5%ae%9d%e5%a1%94%e8%bf%99%e4%b8%aa%e4%ba%8c%e7%bc%ba/</link>
					<comments>https://www.cyfor.cn/%e5%ae%9d%e5%a1%94%e8%bf%99%e4%b8%aa%e4%ba%8c%e7%bc%ba/#respond</comments>
		
		<dc:creator><![CDATA[CYFOR]]></dc:creator>
		<pubDate>Fri, 07 Jun 2024 09:53:28 +0000</pubDate>
				<category><![CDATA[奇怪的技能]]></category>
		<category><![CDATA[随记]]></category>
		<guid isPermaLink="false">https://www.cyfor.cn/?p=128</guid>

					<description><![CDATA[宝塔这个傻逼]]></description>
										<content:encoded><![CDATA[
<p>给jaychouwiki买了个CDN流量包，感觉用不掉，就寻思把博客也一起套上吧，按常规逻辑配置好，结果打不开，或者只显示文字（纯html，无样式）。</p>



<p>反复修改多次配置都没用，最后终于发现问题了，宝塔的ssl关闭状态下还是会默认https访问（不是浏览器缓存，隐私模式也这样）。</p>



<p>最终源站的https继续开启，回源host设置为加速域名，回源协议也https，终于正常了。。。</p>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.cyfor.cn/%e5%ae%9d%e5%a1%94%e8%bf%99%e4%b8%aa%e4%ba%8c%e7%bc%ba/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>基于宝塔Docker自建Bitwarden密码管理</title>
		<link>https://www.cyfor.cn/%e5%9f%ba%e4%ba%8e%e5%ae%9d%e5%a1%94docker%e8%87%aa%e5%bb%babitwarden%e5%af%86%e7%a0%81%e7%ae%a1%e7%90%86/</link>
					<comments>https://www.cyfor.cn/%e5%9f%ba%e4%ba%8e%e5%ae%9d%e5%a1%94docker%e8%87%aa%e5%bb%babitwarden%e5%af%86%e7%a0%81%e7%ae%a1%e7%90%86/#respond</comments>
		
		<dc:creator><![CDATA[CYFOR]]></dc:creator>
		<pubDate>Wed, 21 Apr 2021 07:37:08 +0000</pubDate>
				<category><![CDATA[奇怪的技能]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[宝塔]]></category>
		<guid isPermaLink="false">https://www.cyfor.cn/?p=40</guid>

					<description><![CDATA[宝塔安装Docker 宝塔应用列表搜索d&#46;&#46;&#46;]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading">宝塔安装Docker</h3>



<p>宝塔应用列表搜索docker安装</p>



<h3 class="wp-block-heading">Docker中安装Bitwarden</h3>



<ul class="wp-block-list"><li>获取源<br>打开镜像管理，获取Bitwarden_rs的官方镜像bitwardenrs/server<br>（Bitwarden_rs是Bitwarden的民间第三方版本）</li><li>创建容器<br>容器端口为80，服务端口随便填一个未使用的端口（不能冲突）；<br>服务器目录填上/www/wwwroot/xxxx.com（可以先创建网站，然后用网站的所在目录），容器目录为/data；<br>以上两个都需要点一下加号，不然不会保存。<br>完成后点击提交<br></li></ul>



<figure class="wp-block-image"><img decoding="async" src="https://www.lizi.tw/wp-content/uploads/2020/03/KQLLl9.png" alt="宝塔面板搭建 Docker bitwardenrs 教程"/></figure>



<h3 class="wp-block-heading">添加网站</h3>



<p>新建一个网站，域名填上（这步可以在创建docker之前），数据库不创建，PHP版本选纯静态。<br>设置网站，选SSL，申请一个免费的SSL，开启强制HTTPS；<br>点击反向代理，添加一个反代，目标URL为http://127.0.0.1:xxxx（端口为刚才创建容器时的端口）。</p>



<h3 class="wp-block-heading">放行端口</h3>



<p>安全设置里放行容器的端口，然后就可以直接访问域名了（要解析过）</p>



<h3 class="wp-block-heading">关闭注册</h3>



<p>另外<br>关闭注册：第一次注册好之后，第二次启动的时候，使用ssh连接到服务器。</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>docker run -d –name 容器名称 \<br>-e SIGNUPS_ALLOWED=false \<br>-v 目录映射:/data/ \<br>-p 端口映射:80 \<br>bitwardenrs/server:latest</p></blockquote>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.cyfor.cn/%e5%9f%ba%e4%ba%8e%e5%ae%9d%e5%a1%94docker%e8%87%aa%e5%bb%babitwarden%e5%af%86%e7%a0%81%e7%ae%a1%e7%90%86/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>产品工作常用工具集</title>
		<link>https://www.cyfor.cn/%e4%ba%a7%e5%93%81%e5%b7%a5%e4%bd%9c%e5%b8%b8%e7%94%a8%e5%b7%a5%e5%85%b7%e9%9b%86/</link>
					<comments>https://www.cyfor.cn/%e4%ba%a7%e5%93%81%e5%b7%a5%e4%bd%9c%e5%b8%b8%e7%94%a8%e5%b7%a5%e5%85%b7%e9%9b%86/#respond</comments>
		
		<dc:creator><![CDATA[CYFOR]]></dc:creator>
		<pubDate>Tue, 16 Mar 2021 12:33:00 +0000</pubDate>
				<category><![CDATA[产品日常]]></category>
		<category><![CDATA[奇怪的技能]]></category>
		<category><![CDATA[产品]]></category>
		<category><![CDATA[导航]]></category>
		<category><![CDATA[工具集]]></category>
		<category><![CDATA[网站集]]></category>
		<guid isPermaLink="false">https://www.cyfor.cn/?p=34</guid>

					<description><![CDATA[虽然已经不太去折腾操作系统了，但是每次新&#46;&#46;&#46;]]></description>
										<content:encoded><![CDATA[
<p>虽然已经不太去折腾操作系统了，但是每次新设备、出问题、新公司都会遇到需要下很多东西。列出来还是方便一些，需要的时候直接导航。<br>常用的微信、钉钉、QQ之类以及日常需要使用的Axure不会出现在列表。<br>本文持续更新：2021-3-15</p>



<h2 class="wp-block-heading">工具集</h2>



<ul class="wp-block-list"><li>Lunacy<br>免费的图标设计工具，Windows平台，兼容Sketch</li><li>Axure&#8230;的一个汉化包<br>我记得有一个汉化包做的比Axure中文网好，忘记了，以后补</li><li><a href="https://u.tools/" data-type="URL" data-id="https://u.tools/" target="_blank" rel="noreferrer noopener">uTools</a><br>效率工具，类似于IOS的捷径</li><li><a href="https://www.voidtools.com/zh-cn/" target="_blank" rel="noreferrer noopener">Everything</a><br>强大的搜索工具，可快速搜索全盘，可使用通配符高级检索，后来用过Listary之后就不用了囧&#8230;</li><li><a href="https://www.listary.com/" target="_blank" rel="noreferrer noopener">Listary</a><br>强大的快捷启动工具，顺便可以快捷检索文件，后来用过uTools后就不用了囧&#8230;（但我的快捷搜索好像不见了）</li></ul>



<h2 class="wp-block-heading">网站</h2>



<ul class="wp-block-list"><li><a href="https://freecrackdownload.com/" target="_blank" rel="noreferrer noopener">freecrackdownload</a><br>一个&#8230;.破解软件下载网站，英文，应该大部分人的盗版Axure就是这家网站提供的&#8230;<br>（支持正版从我做起）</li><li><a href="http://hao.199it.com/" data-type="URL" data-id="http://hao.199it.com/" target="_blank" rel="noreferrer noopener">大数据导航</a><br>一个网站导航，集合了超多的数据类网站，分类展示。包含Google趋势/百度指数/阿里云Quick BI/霍普金斯/COVID-19追踪工具/世界经济可视化/GlobalStat/Google数据集搜索/世界财富与收入数据库/微信指数/微博指数</li></ul>



<h2 class="wp-block-heading">参考集</h2>



<ul class="wp-block-list"><li><a href="https://www.pmdaniu.com/storages/124009/a1cf94cc2ce64f54b21c1117db9c6c9e-70319/start.html#g=1&amp;p=%E5%BA%94%E7%94%A8%E6%A6%82%E5%86%B5" target="_blank" rel="noreferrer noopener">数据统计面板后台原型</a><br>基本包含所有C端产品用户数据统计功能</li></ul>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.cyfor.cn/%e4%ba%a7%e5%93%81%e5%b7%a5%e4%bd%9c%e5%b8%b8%e7%94%a8%e5%b7%a5%e5%85%b7%e9%9b%86/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>文本绘图用法（PlantUML）</title>
		<link>https://www.cyfor.cn/%e6%96%87%e6%9c%ac%e7%bb%98%e5%9b%be%e7%94%a8%e6%b3%95%ef%bc%88plantuml%ef%bc%89/</link>
					<comments>https://www.cyfor.cn/%e6%96%87%e6%9c%ac%e7%bb%98%e5%9b%be%e7%94%a8%e6%b3%95%ef%bc%88plantuml%ef%bc%89/#respond</comments>
		
		<dc:creator><![CDATA[CYFOR]]></dc:creator>
		<pubDate>Thu, 11 Mar 2021 11:09:00 +0000</pubDate>
				<category><![CDATA[产品日常]]></category>
		<category><![CDATA[奇怪的技能]]></category>
		<category><![CDATA[PlantUML]]></category>
		<category><![CDATA[制图]]></category>
		<category><![CDATA[文本绘图]]></category>
		<guid isPermaLink="false">https://www.cyfor.cn/?p=30</guid>

					<description><![CDATA[简介 PlantUML是一个开源项目，支&#46;&#46;&#46;]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">简介</h2>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:100%">
<p><strong>PlantUML</strong>是一个开源项目，支持快速绘制开发工作中使用到的UML图，包含：</p>



<ul class="wp-block-list"><li><a href="https://plantuml.com/zh/sequence-diagram" target="_blank" rel="noopener">时序图</a></li><li><a href="https://plantuml.com/zh/use-case-diagram" target="_blank" rel="noopener">用例图</a></li><li><a href="https://plantuml.com/zh/class-diagram" target="_blank" rel="noopener">类图</a></li><li><a href="https://plantuml.com/zh/object-diagram" target="_blank" rel="noopener">对象图</a></li><li><a href="https://plantuml.com/zh/activity-diagram-beta" target="_blank" rel="noopener">活动图</a>&nbsp;</li><li><a href="https://plantuml.com/zh/component-diagram" target="_blank" rel="noopener">组件图</a></li><li><a href="https://plantuml.com/zh/deployment-diagram" target="_blank" rel="noopener">部署图</a></li><li><a href="https://plantuml.com/zh/state-diagram" target="_blank" rel="noopener">状态图</a></li><li><a href="https://plantuml.com/zh/timing-diagram" target="_blank" rel="noopener">定时图</a></li></ul>



<p>以及部分非UML图:</p>



<ul class="wp-block-list"><li><a href="https://plantuml.com/zh/json" target="_blank" rel="noopener">JSON data</a></li><li><a href="https://plantuml.com/zh/yaml" target="_blank" rel="noopener">YAML data</a></li><li><a href="https://plantuml.com/zh/nwdiag" target="_blank" rel="noopener">Network diagram (nwdiag)</a></li><li><a href="https://plantuml.com/zh/salt" target="_blank" rel="noopener">线框图形界面</a></li><li><a href="https://plantuml.com/zh/archimate-diagram" target="_blank" rel="noopener">架构图</a></li><li><a href="https://plantuml.com/zh/activity-diagram-beta#sdl" target="_blank" rel="noopener">规范和描述语言 (SDL)</a></li><li><a href="https://plantuml.com/zh/ditaa" target="_blank" rel="noopener">Ditaa diagram</a></li><li><a href="https://plantuml.com/zh/gantt-diagram" target="_blank" rel="noopener">甘特图</a></li><li><a href="https://plantuml.com/zh/mindmap-diagram" target="_blank" rel="noopener">思维导图</a></li><li><a href="https://plantuml.com/zh/wbs-diagram" target="_blank" rel="noopener">Work Breakdown Structure diagram</a></li><li><a href="https://plantuml.com/zh/ascii-math" target="_blank" rel="noopener">以 AsciiMath 或 JLaTeXMath 符号的数学公式</a></li><li><a href="https://plantuml.com/zh/ie-diagram" target="_blank" rel="noopener">Entity Relationship diagram</a></li></ul>



<h2 class="wp-block-heading">支持PlantUML的编辑器</h2>



<h3 class="wp-block-heading">离线</h3>



<ul class="wp-block-list"><li>IDE<br>如VSCode，需安装插件</li><li>官方编辑器<br>安装Java环境和Graphviz&nbsp;，下载PlantUML.jar运行</li></ul>



<h3 class="wp-block-heading">在线</h3>



<ul class="wp-block-list"><li>语雀</li></ul>
</div>
</div>



<h2 class="wp-block-heading">基本用法</h2>



<h3 class="wp-block-heading">时序图</h3>



<p>声明产品的行为顺序，每条消息对应一条触发事件。</p>



<h4 class="wp-block-heading">基本用法</h4>



<pre class="wp-block-code has-small-font-size"><code>示例：
<code>@startuml
用户 -&gt; 认证中心: 登录操作
认证中心 -&gt; 缓存: 存放token
用户 &lt;- 认证中心 : 认证成功返回token
用户 -&gt; 认证中心: 下次访问头部携带token认证
认证中心 &lt;- 缓存: key=token+ip获取token
其他服务 &lt;- 认证中心: 存在且校验成功则跳转到用户请求的其他服务
其他服务 -&gt; 用户: 信息
@enduml</code>
<img decoding="async" src="https://s.plantuml.com/imgw/img-5adbd84d8507708906039dff84006af7.webp"></code></pre>



<p>-&gt;或&#8211;&gt;表示实线箭头，此写法无需事先声明对象，开始编写前首先声明开始与结束，内容为需表现的对象间的触发事件，及该事件的内容。</p>



<h4 class="wp-block-heading">进阶用法</h4>



<pre class="wp-block-code"><code></code></pre>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.cyfor.cn/%e6%96%87%e6%9c%ac%e7%bb%98%e5%9b%be%e7%94%a8%e6%b3%95%ef%bc%88plantuml%ef%bc%89/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
