hexo/page/2/index.html

959 lines
59 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html lang="zh-CN">
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="icon" href="/img/logo.png">
<meta name="author" content="浪子">
<meta name="subtitle" content="一个分享自己生活的博客">
<meta name="description" content="曾梦想仗剑走天涯;因太胖放弃原计划.">
<meta name="keywords" content=",DIY,黑苹果,分享,自由">
<link rel="alternate" href="/atom.xml " title="提剑追梦" type="application/atom+xml">
<title>提剑追梦</title>
<link rel="stylesheet" href="/css/style.css" >
<link rel="stylesheet" href="/css/partial/dark.css" >
<link rel="stylesheet" href="/css/partial/highlight/atom-one-light.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css">
<link rel="stylesheet" href="https://cdnjs.sgcd.net/lxgw-wenkai-screen-webfont/lxgwwenkaigbscreen.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/a2396837/CDN@latest/css/iconfont.css">
<script src="/js/todark.js"></script>
<meta name="generator" content="Hexo 6.3.0"></head>
</html>
<div class="nav index" style="height: 60px;">
<div class="title animated fadeInDown">
<div class="layui-container">
<div class="nav-title"><a href="/" title="提剑追梦">提剑追梦</a></div>
<div class="nav-list">
<button> <span class=""></span><span style="display: block;"></span><span class=""></span> </button>
<ul class="layui-nav" lay-filter="">
<li class="layui-nav-item">
<a href="/search/ ">
<i class=" fas fa-search-plus " style="color: rgb(3 169 244);"></i>
<span class="layui-nav-item-name">搜索</span>
</a>
</li>
<li class="layui-nav-item">
<a href="/ ">
<i class=" fab fa-fort-awesome " style="color: rgb(255 107 107);"></i>
<span class="layui-nav-item-name">首页</span>
</a>
</li>
<li class="layui-nav-item">
<a href="/archives/ ">
<i class=" fas fa-archive " style="color: rgb(10 189 227);"></i>
<span class="layui-nav-item-name">归档</span>
</a>
</li>
<li class="layui-nav-item">
<a href="/tags/ ">
<i class=" fas fa-hashtag " style="color: rgb(254 202 87);"></i>
<span class="layui-nav-item-name">标签</span>
</a>
</li>
<li class="layui-nav-item">
<a href="/fcircle/ ">
<i class=" fas fa-heart " style="color: rgb(29 209 161);"></i>
<span class="layui-nav-item-name">朋友圈</span>
</a>
</li>
<li class="layui-nav-item">
<a href="/links/ ">
<i class=" fab fa-weixin " style="color: hsl(152deg 73% 45%);"></i>
<span class="layui-nav-item-name">友链</span>
</a>
</li>
<li class="layui-nav-item">
<a href="/memos/ ">
<i class=" fas fa-coffee " style="color:#31c7c1;"></i>
<span class="layui-nav-item-name">说说</span>
</a>
</li>
<li class="layui-nav-item">
<a href="/about/ ">
<i class=" fab fa-grav " style="color: rgb(154 106 247);"></i>
<span class="layui-nav-item-name">关于</span>
</a>
</li>
<li class="layui-nav-item" id="btn-toggle-dark">🌙</li>
<span class="layui-nav-bar" style="left: 342px; top: 78px; width: 0px; opacity: 0;"></span>
</ul>
</div>
</div>
</div>
</div>
<header class="header">
<div class="logo">
<a href="/"><img src="https://img.imsun.org/avatar.jpg" onerror=this.onerror=null,this.src="/img/loading.gif"></a>
</div>
</div>
<div class="motto">
<span>曾梦想仗剑走天涯</span>
</div>
<div class="social">
<a class="social-icon" href="https://github.com/jkjoy" target="_blank" title="Github">
<i class="iconfont icon-GitHub" aria-hidden="true"></i>
</a>
<a class="social-icon" href="mailto:jkjoy@163.com" target="_blank" title="Email">
<i class="iconfont icon-email" aria-hidden="true"></i>
</a>
<a class="social-icon" href="/atom.xml" target="_blank" title="rss">
<i class="iconfont icon-rss" aria-hidden="true"></i>
</a>
</div>
</header>
<div id="recent-posts">
<div class="recent-post-item">
<div class="post-title ">
<a href="/posts/20772b2a.html">2023中秋前夕</a>
</div>
<div class="post-meta">
<div class="post-meta-item date">
<span title="发表于 2023.09.28"><i class="far fa-calendar-alt"></i> 2023.09.28</span>
</div>
<div class="post-meta-item updated">
<span title="更新于 2024.05.09"><i class="far fa-calendar-check"></i> 2024.05.09</span>
</div>
<div class="post-meta-item categories">
<i class="fas fa-inbox article-meta__icon"></i> <a href="/categories/%E9%9A%8F%E7%AC%94/">随笔</a>
</div>
<div class="post-meta-item wordcount">
<i class="fas fa-pencil-alt"></i> <span class="post-count">318 字</span>
<i class="far fa-clock"></i> <span class="post-count">1 分钟</span>
</div>
</div>
<div class="content">
<p>又是中秋节,只有4天假.<br>想回湖北老家看看,但是买不到票.<br>于是愿望搁浅.</p>
<hr>
<p>闲鱼账号被处罚了,理由是有交易纠纷.<br>那么既然是纠纷,单方面罚卖家合理吗?<br>我不知道,我选择卸载.</p>
<hr>
<p>服务器方面,由于腾讯云的活动,续费了一年花费336大洋.<br>免费升到4核4G6M的配置.<br>2027-04-20到期.<br>觉得国内竟然比国外还贵一些.</p>
<hr>
<p>家里介绍的相亲对象,聊过一次之后便没有再联系了.<br>年纪大了,可能对爱情就不抱任何期待了吧.<br>用心交流也变的越来越难.<br>考虑更多的是物质方面的东西.</p>
<hr>
<p>至于假期安排大概率是在家西瓜空调WIFI.<br>外面那么拥挤.还是不要出去浪了.</p>
<hr>
<p>如果有妹妹一起出去吃饭也是极好的.</p>
<hr>
<p>没有妹妹,看看电视也是极好的.</p>
<hr>
<p>今天的亚运会英雄联盟四分之一决赛中国队0比2输给了韩国队<br>应该没有人在开始之前就看好这个阵容的吧</p>
<hr>
<p>王者荣耀国家队昨天获得了金牌,而且是以碾压之势获得了冠军</p>
</div>
</div>
<div class="post-footer">
</div>
<div class="recent-post-item">
<div class="post-title ">
<a href="/posts/8084c141.html">如何在Fly.io部署typecho</a>
</div>
<div class="post-meta">
<div class="post-meta-item date">
<span title="发表于 2023.09.06"><i class="far fa-calendar-alt"></i> 2023.09.06</span>
</div>
<div class="post-meta-item updated">
<span title="更新于 2024.05.09"><i class="far fa-calendar-check"></i> 2024.05.09</span>
</div>
<div class="post-meta-item categories">
<i class="fas fa-inbox article-meta__icon"></i> <a href="/categories/%E5%88%86%E4%BA%AB/">分享</a>
</div>
<div class="post-meta-item wordcount">
<i class="fas fa-pencil-alt"></i> <span class="post-count">188 字</span>
<i class="far fa-clock"></i> <span class="post-count">1 分钟</span>
</div>
</div>
<div class="content">
<h2 id="使用项目"><a href="#使用项目" class="headerlink" title="使用项目"></a>使用项目</h2><p><a target="_blank" rel="noopener" href="https://github.com/ttys3/typecho-docker">https://github.com/ttys3/typecho-docker</a></p>
<h2 id="准备工作"><a href="#准备工作" class="headerlink" title="准备工作"></a>准备工作</h2><ul>
<li>注册FLY.IO<br>用以部署typecho</li>
</ul>
<h2 id="安装flyctl"><a href="#安装flyctl" class="headerlink" title="安装flyctl"></a>安装flyctl</h2><p>Install flyctl<br>以WINDOWS为例</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">pwsh -Command &quot;iwr https://fly.io/install.ps1 -useb | iex&quot;</span><br></pre></td></tr></table></figure>
<p>其他系统请参照官方</p>
<h2 id="新建APP"><a href="#新建APP" class="headerlink" title="新建APP"></a>新建APP</h2><p>初始化</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">flyctl launch</span><br></pre></td></tr></table></figure>
<p>按照提示选择会生成一个FLY.TOML文件</p>
<h2 id="编辑FLY-TOML"><a href="#编辑FLY-TOML" class="headerlink" title="编辑FLY.TOML"></a>编辑FLY.TOML</h2><p>添加以下</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br></pre></td><td class="code"><pre><span class="line"># fly.toml app configuration file generated for gotos on 2023-08-12T19:36:14+08:00</span><br><span class="line">#</span><br><span class="line"># See https://fly.io/docs/reference/configuration/ for information about how to use this file.</span><br><span class="line">#</span><br><span class="line"></span><br><span class="line">app = &quot;typecho&quot;</span><br><span class="line">primary_region = &quot;hkg&quot;</span><br><span class="line"></span><br><span class="line">[experimental]</span><br><span class="line"> vm = true</span><br><span class="line"></span><br><span class="line">[build]</span><br><span class="line"> image = &quot;80x86/typecho:latest&quot;</span><br><span class="line"></span><br><span class="line">[env]</span><br><span class="line"> PHP_MAX_EXECUTION_TIME = 600</span><br><span class="line"> PHP_TZ = &quot;Asia/Shanghai&quot;</span><br><span class="line"> </span><br><span class="line">[[mounts]]</span><br><span class="line"> source = &quot;typecho_data&quot;</span><br><span class="line"> destination = &quot;/data&quot;</span><br><span class="line"></span><br><span class="line">[http_service]</span><br><span class="line"> internal_port = 80</span><br><span class="line"> force_https = true</span><br><span class="line"> auto_stop_machines = false</span><br><span class="line"> auto_start_machines = true</span><br><span class="line"> min_machines_running = 1</span><br><span class="line"> processes = [&quot;app&quot;]</span><br></pre></td></tr></table></figure>
<h2 id="添加持久卷"><a href="#添加持久卷" class="headerlink" title="添加持久卷"></a>添加持久卷</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">flyctl volumes create typecho_data --region hkg --size 1</span><br></pre></td></tr></table></figure>
<h2 id="部署"><a href="#部署" class="headerlink" title="部署"></a>部署</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">flyctl deploy</span><br></pre></td></tr></table></figure>
<h2 id="演示地址"><a href="#演示地址" class="headerlink" title="演示地址"></a>演示地址</h2><p><a target="_blank" rel="noopener" href="https://avnvu.fly.dev/">https://avnvu.fly.dev/</a></p>
</div>
</div>
<div class="post-footer">
</div>
<div class="recent-post-item">
<div class="post-title ">
<a href="/posts/9597b72.html">在fly.io部署Gotosocial</a>
</div>
<div class="post-meta">
<div class="post-meta-item date">
<span title="发表于 2023.08.17"><i class="far fa-calendar-alt"></i> 2023.08.17</span>
</div>
<div class="post-meta-item updated">
<span title="更新于 2024.05.09"><i class="far fa-calendar-check"></i> 2024.05.09</span>
</div>
<div class="post-meta-item categories">
<i class="fas fa-inbox article-meta__icon"></i> <a href="/categories/%E5%88%86%E4%BA%AB/">分享</a>
</div>
<div class="post-meta-item wordcount">
<i class="fas fa-pencil-alt"></i> <span class="post-count">552 字</span>
<i class="far fa-clock"></i> <span class="post-count">2 分钟</span>
</div>
</div>
<div class="content">
<h2 id="关于Gotosocial"><a href="#关于Gotosocial" class="headerlink" title="关于Gotosocial"></a>关于Gotosocial</h2><p>GoToSocial 是一个十分轻量(轻量到甚至没有用户界面,需要使用第三方程序登录、兼容 Mastodon 应用进行使用)的 ActivityPub 联邦社交网络程序,自建 GoToSocial 可以避免您的信息因为所在实例倒闭、不可抗力等原因化为乌有。</p>
<h2 id="准备"><a href="#准备" class="headerlink" title="准备"></a>准备</h2><ul>
<li>注册 Fly.io 账号,并绑卡(避免滥用);</li>
<li>注册 Cloudflare 并启用 R2启用 R2 需要绑卡。新建一个储存桶并创建一个 API 令牌。</li>
</ul>
<h2 id="安装-flyctl"><a href="#安装-flyctl" class="headerlink" title="安装 flyctl"></a>安装 flyctl</h2><ul>
<li>Linux</li>
</ul>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">curl -L https://fly.io/install.sh | sh</span><br></pre></td></tr></table></figure>
<ul>
<li>macOS</li>
</ul>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">curl -L https://fly.io/install.sh | sh</span><br></pre></td></tr></table></figure>
<ul>
<li>Windows需要开启 RemoteSigned: 管理员运行</li>
</ul>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">Set-ExecutionPolicy -ExecutionPolicy RemoteSigned</span><br></pre></td></tr></table></figure>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">powershell -Command &quot;iwr https://fly.io/install.ps1 -useb | iex&quot;</span><br></pre></td></tr></table></figure>
<h2 id="登录"><a href="#登录" class="headerlink" title="登录"></a>登录</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">flyctl auth login</span><br><span class="line"></span><br><span class="line"># 若登录失败使用</span><br><span class="line"># flyctl auth login -i </span><br><span class="line"># 输入账号密码进行登录</span><br></pre></td></tr></table></figure>
<h2 id="创建APP"><a href="#创建APP" class="headerlink" title="创建APP"></a>创建APP</h2><p><code>YOURAPPNAME</code>更改为自己希望设置的名称</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">flyctl launch --name YOURAPPNAME --image=superseriousbusiness/gotosocial:latest --region hkg --no-deploy</span><br></pre></td></tr></table></figure>
<h2 id="创建储存卷"><a href="#创建储存卷" class="headerlink" title="创建储存卷"></a>创建储存卷</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">flyctl volumes create social_data --region hkg --size 1</span><br></pre></td></tr></table></figure>
<h2 id="编辑配置"><a href="#编辑配置" class="headerlink" title="编辑配置"></a>编辑配置</h2><p>编辑根目录下的 <code>fly.toml</code> 配置文件,参考下方</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br></pre></td><td class="code"><pre><span class="line">app = &quot;gotos&quot; ## 自定义名称</span><br><span class="line">primary_region = &quot;hkg&quot; ##服务器节点,当前为香港</span><br><span class="line"></span><br><span class="line">[experimental]</span><br><span class="line"> vm = true</span><br><span class="line"></span><br><span class="line">[build]</span><br><span class="line"> image = &quot;superseriousbusiness/gotosocial:latest&quot;</span><br><span class="line"></span><br><span class="line">[env]</span><br><span class="line"> GTS_DB_ADDRESS = &quot;/gotosocial/storage/sqlite.db&quot;</span><br><span class="line"> GTS_DB_TLS_MODE = &quot;enable&quot;</span><br><span class="line"> GTS_DB_TYPE = &quot;sqlite&quot;</span><br><span class="line"> GTS_HOST = &quot;GTS的域名&quot;</span><br><span class="line"> GTS_LETSENCRYPT_ENABLED = &quot;false&quot;</span><br><span class="line"> GTS_STORAGE_BACKEND = &quot;s3&quot;</span><br><span class="line"> GTS_STORAGE_S3_BUCKET = &quot;BUCKET名称&quot;</span><br><span class="line"> GTS_STORAGE_S3_ENDPOINT = &quot;#S3 API&quot;</span><br><span class="line"> GTS_STORAGE_S3_ACCESS_KEY = &quot;#api-tokens&quot;</span><br><span class="line"> GTS_STORAGE_S3_SECRET_KEY = &quot;#api-tokens&quot;</span><br><span class="line"> GTS_STORAGE_S3_PROXY = &quot;true&quot;</span><br><span class="line"> # 添加时区为UTC+8</span><br><span class="line"> TZ = &quot;Asia/Chongqing&quot;</span><br><span class="line"></span><br><span class="line">[[mounts]]</span><br><span class="line"> source = &quot;social_data&quot;</span><br><span class="line"> destination = &quot;/gotosocial/storage&quot;</span><br><span class="line"></span><br><span class="line">[http_service]</span><br><span class="line"> internal_port = 8080</span><br><span class="line"> force_https = true</span><br><span class="line"> auto_stop_machines = false</span><br><span class="line"> auto_start_machines = true</span><br><span class="line"> min_machines_running = 1</span><br><span class="line"> processes = [&quot;app&quot;]</span><br></pre></td></tr></table></figure>
<p>以上配置中<code>GTS_STORAGE_S3_ENDPOINT</code>不需要带<code>https:</code>和最后的<code>/BUCKET名称</code></p>
<h2 id="部署"><a href="#部署" class="headerlink" title="部署"></a>部署</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">flyctl deploy</span><br></pre></td></tr></table></figure>
<p>启动成功后会显示一个URL,能成功访问则代表部署成功。</p>
<h2 id="创建用户和管理员"><a href="#创建用户和管理员" class="headerlink" title="创建用户和管理员"></a>创建用户和管理员</h2><p><code>fly.toml </code>文件目录执行</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">flyctl ssh console</span><br></pre></td></tr></table></figure>
<ul>
<li>创建用户</li>
</ul>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">/gotosocial/gotosocial admin account create --username YOUR_USERNAME --email YOUR@EMAIL.COM --password &#x27;SOME_VERY_GOOD_PASSWD&#x27;</span><br></pre></td></tr></table></figure>
<p><code>YOUR_USERNAME</code>为用户名<br><code>YOUR@EMAIL.COM</code>为邮箱<br><code>SOME_VERY_GOOD_PASSWD</code>为密码,需设置足够复杂,太简单会提示密码不够安全,需重新设置</p>
<ul>
<li>设置管理员</li>
</ul>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">/gotosocial/gotosocial admin account promote --username YOUR_USERNAME</span><br></pre></td></tr></table></figure>
<h2 id="演示"><a href="#演示" class="headerlink" title="演示"></a>演示</h2><p><a target="_blank" rel="noopener" href="https://m.ima.cm/">https://m.ima.cm</a></p>
<p><a target="_blank" rel="noopener" href="https://m.ima.cm/@jkjoy">https://m.ima.cm/@jkjoy</a></p>
<h2 id="下载数据库"><a href="#下载数据库" class="headerlink" title="下载数据库"></a>下载数据库</h2><p><code>fly.toml </code>文件目录执行</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">flyctl sftp get /gotosocial/storage/sqlite.db</span><br></pre></td></tr></table></figure>
</div>
</div>
<div class="post-footer">
</div>
<div class="recent-post-item">
<div class="post-title ">
<a href="/posts/c80a64e9.html">在fly.io部署artalk评论系统</a>
</div>
<div class="post-meta">
<div class="post-meta-item date">
<span title="发表于 2023.08.15"><i class="far fa-calendar-alt"></i> 2023.08.15</span>
</div>
<div class="post-meta-item updated">
<span title="更新于 2024.05.09"><i class="far fa-calendar-check"></i> 2024.05.09</span>
</div>
<div class="post-meta-item categories">
<i class="fas fa-inbox article-meta__icon"></i> <a href="/categories/%E6%8E%A8%E8%8D%90/">推荐</a>
</div>
<div class="post-meta-item wordcount">
<i class="fas fa-pencil-alt"></i> <span class="post-count">194 字</span>
<i class="far fa-clock"></i> <span class="post-count">1 分钟</span>
</div>
</div>
<div class="content">
<p>众所周知<code>Fly.io</code>是一个免费的SAAS平台<br>提供三个内存为256MB的服务器,总3G硬盘空间.<br>为防止滥用,需要绑定信用卡.</p>
<h2 id="准备"><a href="#准备" class="headerlink" title="准备"></a>准备</h2><p>安装官方的命令行工具flyctl</p>
<h2 id="初始化"><a href="#初始化" class="headerlink" title="初始化"></a>初始化</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">flyctl launch</span><br></pre></td></tr></table></figure>
<p>根据提示创建一个app</p>
<h2 id="创建一个1G的硬盘"><a href="#创建一个1G的硬盘" class="headerlink" title="创建一个1G的硬盘"></a>创建一个1G的硬盘</h2><p>1G的硬盘用来储存评论数据绰绰有余了</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">flyctl volumes create artalk_data --region hkg --size 1</span><br></pre></td></tr></table></figure>
<h2 id="编辑FLY-TOML"><a href="#编辑FLY-TOML" class="headerlink" title="编辑FLY.TOML"></a>编辑FLY.TOML</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br></pre></td><td class="code"><pre><span class="line">#根据自动生成的FLY.TOML文件修改</span><br><span class="line">app = &quot;atim&quot; </span><br><span class="line">primary_region = &quot;hkg&quot;</span><br><span class="line"></span><br><span class="line">[build]</span><br><span class="line"> image = &quot;artalk/artalk-go&quot;</span><br><span class="line"></span><br><span class="line">[http_service]</span><br><span class="line"> internal_port = 23366</span><br><span class="line"> force_https = true</span><br><span class="line"> auto_stop_machines = true</span><br><span class="line"> auto_start_machines = true</span><br><span class="line"> min_machines_running = 0</span><br><span class="line"> processes = [&quot;app&quot;]</span><br><span class="line"></span><br><span class="line">[[mounts]]</span><br><span class="line"> source = &quot;artalk_data&quot;</span><br><span class="line"> destination = &quot;/data&quot;</span><br><span class="line"></span><br><span class="line">[experimental]</span><br><span class="line"> vm = true</span><br></pre></td></tr></table></figure>
<h2 id="在-fly-toml-文件目录执行"><a href="#在-fly-toml-文件目录执行" class="headerlink" title="在 fly.toml 文件目录执行"></a>在 fly.toml 文件目录执行</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">flyctl ssh console</span><br></pre></td></tr></table></figure>
<p>创建一个管理员账号</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">./artalk admin</span><br></pre></td></tr></table></figure>
<p>如需重启则执行</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">flyctl apps restart</span><br></pre></td></tr></table></figure>
</div>
</div>
<div class="post-footer">
</div>
<div class="recent-post-item">
<div class="post-title ">
<a href="/posts/88a97a51.html">如何在Fly.io部署Memos</a>
</div>
<div class="post-meta">
<div class="post-meta-item date">
<span title="发表于 2023.08.15"><i class="far fa-calendar-alt"></i> 2023.08.15</span>
</div>
<div class="post-meta-item updated">
<span title="更新于 2024.05.09"><i class="far fa-calendar-check"></i> 2024.05.09</span>
</div>
<div class="post-meta-item categories">
<i class="fas fa-inbox article-meta__icon"></i> <a href="/categories/%E5%88%86%E4%BA%AB/">分享</a>
</div>
<div class="post-meta-item wordcount">
<i class="fas fa-pencil-alt"></i> <span class="post-count">314 字</span>
<i class="far fa-clock"></i> <span class="post-count">1 分钟</span>
</div>
</div>
<div class="content">
<h2 id="项目"><a href="#项目" class="headerlink" title="项目"></a>项目</h2><p><a target="_blank" rel="noopener" href="https://github.com/hu3rror/memos-on-fly">https://github.com/hu3rror/memos-on-fly</a></p>
<h2 id="准备工作"><a href="#准备工作" class="headerlink" title="准备工作"></a>准备工作</h2><ul>
<li>注册FLY.IO<br>用以部署memos</li>
<li>注册B2C<br><a target="_blank" rel="noopener" href="https://www.backblaze.com/cloud-storage">https://www.backblaze.com/cloud-storage</a><br> 用以同步备份memos数据库<br> 新建BUCKET,并获取<code>&lt;keyId&gt;</code><code>&lt;applicationKey&gt;</code></li>
</ul>
<h2 id="安装flyctl"><a href="#安装flyctl" class="headerlink" title="安装flyctl"></a>安装flyctl</h2><p>Install flyctl<br>以WINDOWS为例</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">pwsh -Command &quot;iwr https://fly.io/install.ps1 -useb | iex&quot;</span><br></pre></td></tr></table></figure>
<p>其他系统请参照官方</p>
<h2 id="新建APP"><a href="#新建APP" class="headerlink" title="新建APP"></a>新建APP</h2><p>初始化</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">flyctl launch</span><br></pre></td></tr></table></figure>
<p>按照提示选择会生成一个FLY.TOML文件</p>
<h2 id="编辑FLY-TOML"><a href="#编辑FLY-TOML" class="headerlink" title="编辑FLY.TOML"></a>编辑FLY.TOML</h2><p>添加以下</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line">[build]</span><br><span class="line"> image = &quot;ghcr.io/hu3rror/memos-litestream:latest&quot;</span><br><span class="line">#如果不需要备份数据库则可以选择官方的docker镜像ghcr.io/usememos/memos:latest</span><br><span class="line">#使用官方镜像可以删掉env的部分</span><br><span class="line">[env]</span><br><span class="line"> # Details see: https://litestream.io/guides/backblaze/</span><br><span class="line"> LITESTREAM_REPLICA_BUCKET = &quot;B2C桶名称&quot; # change to your litestream bucket name</span><br><span class="line"> LITESTREAM_REPLICA_ENDPOINT = &quot;s3.us-east-005.backblazeb2.com&quot; # change to your litestream endpoint url</span><br><span class="line"> LITESTREAM_REPLICA_PATH = &quot;memos_prod.db&quot; # keep the default or change to whatever path you want</span><br><span class="line"></span><br><span class="line">[[mounts]]</span><br><span class="line"> source = &quot;memos_data&quot;</span><br><span class="line"> destination = &quot;/var/opt/memos&quot;</span><br><span class="line"></span><br><span class="line">[http_service]</span><br><span class="line"> internal_port = 5230</span><br><span class="line"> force_https = true</span><br><span class="line"> auto_stop_machines = false</span><br><span class="line"> auto_start_machines = true</span><br><span class="line"> min_machines_running = 0</span><br></pre></td></tr></table></figure>
<h2 id="添加持久卷"><a href="#添加持久卷" class="headerlink" title="添加持久卷"></a>添加持久卷</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">flyctl volumes create memos_data --region hkg --size 1</span><br></pre></td></tr></table></figure>
<h2 id="密钥"><a href="#密钥" class="headerlink" title="密钥"></a>密钥</h2><p>将B2存储的密钥添加到fly的密钥存储中,使用官方镜像可以忽略此步骤</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">flyctl secrets set LITESTREAM_ACCESS_KEY_ID=&quot;&lt;keyId&gt;&quot; LITESTREAM_SECRET_ACCESS_KEY=&quot;&lt;applicationKey&gt;&quot;</span><br></pre></td></tr></table></figure>
<h2 id="部署"><a href="#部署" class="headerlink" title="部署"></a>部署</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">flyctl deploy</span><br></pre></td></tr></table></figure>
<h2 id="演示地址"><a href="#演示地址" class="headerlink" title="演示地址"></a>演示地址</h2><p><a target="_blank" rel="noopener" href="https://memosim.fly.dev/">https://memosim.fly.dev/</a><br>绑定域名演示<br><a target="_blank" rel="noopener" href="https://imad.top/">https://imad.top</a></p>
</div>
</div>
<div class="post-footer">
</div>
<div class="recent-post-item">
<div class="post-title ">
<a href="/posts/e48ebe86.html">使用 Docker 构建 Pleroma 实例</a>
</div>
<div class="post-meta">
<div class="post-meta-item date">
<span title="发表于 2023.07.24"><i class="far fa-calendar-alt"></i> 2023.07.24</span>
</div>
<div class="post-meta-item updated">
<span title="更新于 2024.05.09"><i class="far fa-calendar-check"></i> 2024.05.09</span>
</div>
<div class="post-meta-item categories">
<i class="fas fa-inbox article-meta__icon"></i> <a href="/categories/%E6%8E%A8%E8%8D%90/">推荐</a>
</div>
<div class="post-meta-item wordcount">
<i class="fas fa-pencil-alt"></i> <span class="post-count">502 字</span>
<i class="far fa-clock"></i> <span class="post-count">2 分钟</span>
</div>
</div>
<div class="content">
<p>Pleroma 是一个去中心化的社区程序,其基于 ActivityPub 协议。<br>而 ActivityPub 包括 MastodonPawoo 等、Misskeymisskey.io 等、Pleroma 等等。<br>在这些开源产品中Pleroma 实机上部署环境步骤复杂繁琐。<br>但它是对服务器性能要求最低的微博客工具,它的配置要求多低呢?<br>现在 docker 的出现大大简化了部署的方式,只需要简单三步即可轻松搭建实例。</p>
<p>本文将介绍如何使用 docker 构建 Pleroma 实例。<br>以宝塔面板为例</p>
<h3 id="先安装docker"><a href="#先安装docker" class="headerlink" title="先安装docker"></a>先安装docker</h3><p>在应用商店中查找docker并安装</p>
<h3 id="获取-docker-compose-yml-模板"><a href="#获取-docker-compose-yml-模板" class="headerlink" title="获取 docker-compose.yml 模板"></a>获取 docker-compose.yml 模板</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">git clone https://git.pleroma.social/pleroma/pleroma-docker-compose.git</span><br><span class="line">cd pleroma-docker-compose </span><br></pre></td></tr></table></figure>
<p>接下来所有操作(除 nginx 配置)如果没有加以说明都在这个目录下进行。</p>
<h3 id="需要修改的内容"><a href="#需要修改的内容" class="headerlink" title="需要修改的内容"></a>需要修改的内容</h3><p>打开<code>./enviroments/pleroma/pleroma.env</code>,修改其中的配置:</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">DB_USER=pleroma # 数据库用户名</span><br><span class="line">DB_PASS=pleroma # 数据库密码</span><br><span class="line">DB_HOST=pleroma-db # 数据库地址</span><br><span class="line">DB_NAME=pleroma # 数据库名</span><br><span class="line">INSTANCE_NAME=Pleroma # 实例名</span><br><span class="line">ADMIN_EMAIL=admin@ops.pleroma.social # 管理员邮箱</span><br><span class="line">NOTIFY_EMAIL=pleroma+admin@ops.pleroma.social # 通知邮箱</span><br><span class="line">DOMAIN=s.pwq.app # 实例域名</span><br><span class="line">PORT=4000 # 实例运行端口</span><br></pre></td></tr></table></figure>
<p>只需要修改域名和邮箱即可<br>打开<code>./volumes/pleroma/config.exs</code><br>在下面添加</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">import Config</span><br><span class="line">config :pleroma, configurable_from_database: true</span><br></pre></td></tr></table></figure>
<h3 id="启动容器"><a href="#启动容器" class="headerlink" title="启动容器"></a>启动容器</h3><p>随后运行 </p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker-compose up -d</span><br></pre></td></tr></table></figure>
<p>启动容器。</p>
<h3 id="添加反向代理"><a href="#添加反向代理" class="headerlink" title="添加反向代理"></a>添加反向代理</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line">#PROXY-START/</span><br><span class="line"></span><br><span class="line">location ^~ /</span><br><span class="line">&#123;</span><br><span class="line"> # 4000 是你的实例容器运行端口,如果你修改过,记得改成你的端口。</span><br><span class="line"> proxy_pass http://127.0.0.1:4000;</span><br><span class="line"> proxy_set_header Host $host;</span><br><span class="line"> proxy_set_header X-Real-IP $remote_addr;</span><br><span class="line"> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;</span><br><span class="line"> proxy_set_header REMOTE-HOST $remote_addr;</span><br><span class="line"> proxy_set_header Upgrade $http_upgrade;</span><br><span class="line"> proxy_set_header Connection $connection_upgrade;</span><br><span class="line"> # proxy_hide_header Upgrade;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="创建管理员账户"><a href="#创建管理员账户" class="headerlink" title="创建管理员账户"></a>创建管理员账户</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker exec -it pleroma ./opt/pleroma/bin/pleroma_ctl user new admin 邮箱 --admin</span><br></pre></td></tr></table></figure>
<p>运行后会出现一个链接,复制在浏览器即可重置密码.</p>
<h3 id="修改文件夹权限"><a href="#修改文件夹权限" class="headerlink" title="修改文件夹权限"></a>修改文件夹权限</h3><p><code>/root/pleroma-docker-compose/volumes/pleroma</code>下的<code>uploads</code>权限设置为<code>777</code><br>当然如果你用S3协议的对象存储则不需要修改<br>直接在后台设置S3即可.</p>
<h3 id="演示地址"><a href="#演示地址" class="headerlink" title="演示地址"></a>演示地址</h3><p><a target="_blank" rel="noopener" href="https://chaihu.top/">https://chaihu.top</a></p>
</div>
</div>
<div class="post-footer">
</div>
<div class="recent-post-item">
<div class="post-title ">
<a href="/posts/bc338f20.html">群晖CPU和内存占满的排查记录</a>
</div>
<div class="post-meta">
<div class="post-meta-item date">
<span title="发表于 2023.07.07"><i class="far fa-calendar-alt"></i> 2023.07.07</span>
</div>
<div class="post-meta-item updated">
<span title="更新于 2024.05.09"><i class="far fa-calendar-check"></i> 2024.05.09</span>
</div>
<div class="post-meta-item categories">
<i class="fas fa-inbox article-meta__icon"></i> <a href="/categories/%E5%88%86%E4%BA%AB/">分享</a>
</div>
<div class="post-meta-item wordcount">
<i class="fas fa-pencil-alt"></i> <span class="post-count">191 字</span>
<i class="far fa-clock"></i> <span class="post-count">1 分钟</span>
</div>
</div>
<div class="content">
<h2 id="起因"><a href="#起因" class="headerlink" title="起因"></a>起因</h2><p>最近一段时间群晖老是CPU和内存满载,桌面安装的套件自动停止<br>一开始我认为是迅雷NAS版的问题,可是重装几次问题依旧.</p>
<h2 id="排查"><a href="#排查" class="headerlink" title="排查"></a>排查</h2><p>打开菜单-<code>资源监控</code>-<code>任务管理器</code><br>发现虚拟机的CPU占用了80%,于是卸载虚拟机的套件.重启.<br>问题依旧.<br>继续查看<code>任务管理器</code>.<br>发现<code>video station</code>内存占用9G以上,回想起自己曾经安装过<code>video station</code>的刮削补丁.<br>于是,卸载补丁,重启<br>完美解决.</p>
<h2 id="总结"><a href="#总结" class="headerlink" title="总结"></a>总结</h2><p>不要安装一些以为很有用的第三方补丁.<br>其实没什么用.<br>还会造成一些莫名其妙的问题.<br>NAS还是稳定为主,不折腾了.</p>
</div>
</div>
<div class="post-footer">
</div>
<div class="recent-post-item">
<div class="post-title ">
<a href="/posts/1c81ee10.html">LEDE 软路由安装“koolss”离线插件包提示含非法关键字的解决方法</a>
</div>
<div class="post-meta">
<div class="post-meta-item date">
<span title="发表于 2023.06.16"><i class="far fa-calendar-alt"></i> 2023.06.16</span>
</div>
<div class="post-meta-item updated">
<span title="更新于 2024.05.09"><i class="far fa-calendar-check"></i> 2024.05.09</span>
</div>
<div class="post-meta-item categories">
<i class="fas fa-inbox article-meta__icon"></i> <a href="/categories/%E5%88%86%E4%BA%AB/">分享</a>
</div>
<div class="post-meta-item wordcount">
<i class="fas fa-pencil-alt"></i> <span class="post-count">42 字</span>
<i class="far fa-clock"></i> <span class="post-count">1 分钟</span>
</div>
</div>
<div class="content">
...
</div>
</div>
<div class="post-footer">
<div class="readmore"><a href="/posts/1c81ee10.html">阅读全文 »</a></div>
</div>
<div class="recent-post-item">
<div class="post-title ">
<a href="/posts/63a51e75.html">群晖docker出现注册表无法访问的解决办法</a>
</div>
<div class="post-meta">
<div class="post-meta-item date">
<span title="发表于 2023.06.15"><i class="far fa-calendar-alt"></i> 2023.06.15</span>
</div>
<div class="post-meta-item updated">
<span title="更新于 2024.05.09"><i class="far fa-calendar-check"></i> 2024.05.09</span>
</div>
<div class="post-meta-item categories">
<i class="fas fa-inbox article-meta__icon"></i> <a href="/categories/%E5%88%86%E4%BA%AB/">分享</a>
</div>
<div class="post-meta-item wordcount">
<i class="fas fa-pencil-alt"></i> <span class="post-count">338 字</span>
<i class="far fa-clock"></i> <span class="post-count">1 分钟</span>
</div>
</div>
<div class="content">
...
</div>
</div>
<div class="post-footer">
<div class="readmore"><a href="/posts/63a51e75.html">阅读全文 »</a></div>
</div>
<div class="recent-post-item">
<div class="post-title ">
<a href="/posts/286ad0c6.html">用Memos API实现hexo博客的动态说说页面</a>
</div>
<div class="post-meta">
<div class="post-meta-item date">
<span title="发表于 2023.06.13"><i class="far fa-calendar-alt"></i> 2023.06.13</span>
</div>
<div class="post-meta-item updated">
<span title="更新于 2024.05.09"><i class="far fa-calendar-check"></i> 2024.05.09</span>
</div>
<div class="post-meta-item categories">
<i class="fas fa-inbox article-meta__icon"></i> <a href="/categories/%E5%88%86%E4%BA%AB/">分享</a>
</div>
<div class="post-meta-item wordcount">
<i class="fas fa-pencil-alt"></i> <span class="post-count">184 字</span>
<i class="far fa-clock"></i> <span class="post-count">1 分钟</span>
</div>
</div>
<div class="content">
<p>2023.12.1 更新<br>修复显示使用第三方S3储存的图片</p>
<hr>
<p>新建一个页面</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo new page Memos</span><br></pre></td></tr></table></figure>
<p>修改<code>Memos/index.md</code>内容为</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br></pre></td><td class="code"><pre><span class="line">---</span><br><span class="line">title: Memos</span><br><span class="line">comments: false</span><br><span class="line">date: 2023-06-07 14:17:13</span><br><span class="line">---</span><br><span class="line">&lt;div class=&#x27;memo-nums&#x27;&gt;</span><br><span class="line"> &lt;p class=&#x27;note note-info memo-nums-text&#x27;&gt;</span><br><span class="line"> 共发布了 &lt;span id=&quot;memosCount&quot;&gt;不知道多少&lt;/span&gt; 条说说</span><br><span class="line"> &lt;/p&gt;</span><br><span class="line">&lt;/div&gt;</span><br><span class="line">&lt;div id=&quot;bber&quot;&gt;&lt;/div&gt;</span><br><span class="line">&lt;script type=&quot;text/javascript&quot;&gt;</span><br><span class="line"> var bbMemos = &#123;</span><br><span class="line"> memos : &#x27;https://memos.ee/&#x27;,</span><br><span class="line"> limit : &#x27;20&#x27;, </span><br><span class="line"> creatorId:&#x27;1&#x27;,</span><br><span class="line"> domId: &#x27;&#x27;, </span><br><span class="line"> &#125;</span><br><span class="line">&lt;/script&gt;</span><br><span class="line">&lt;script src=&quot;https://blogcdn.loliko.cn/memos2/js/marked.js&quot;&gt;&lt;/script&gt;</span><br><span class="line">&lt;script src=&quot;https://blogcdn.loliko.cn/memos2/js/memos.js?v0.0.1&quot;&gt;&lt;/script&gt;</span><br></pre></td></tr></table></figure>
<p>即可~</p>
<p>代码来源于网络~</p>
</div>
</div>
<div class="post-footer">
</div>
</div>
<nav class="paginator">
<a class="prev" href="/">< 上一页</a>
<a class="next" href="/page/3/">下一页 ></a>
</nav>
<a id="gotop" href="javascript:" title="返回顶部"><i class="fa fa-arrow-up"></i></a>
<div id="bottom-outer">
<div id="bottom-inner">
© 2020 <i class="fa fa-heart" id="heart"></i> 浪子
<br>
Powered by
<a target="_blank" rel="noopener" href="http://hexo.io">hexo</a> | Theme is <a target="_blank" rel="noopener" href="https://github.com/a2396837/hexo-theme-blank/">blank</a>
<div class="icp-info">
<a href="" target="_blank"> </a>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/layui-src@2.5.5/dist/layui.min.js"></script>
<script src="/js/script.js"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js"></script>
<script>
window.lazyLoadOptions = {
elements_selector: 'img',
threshold: 0
}
</script>
<script src="https://cdn.jsdelivr.net/npm/vanilla-lazyload/dist/lazyload.iife.min.js"></script>
<script>
var images = $('img').not('.nav-logo img').not('.card img').not($('a>img')).not('.reward-content img')
images.each(function (i, o) {
var lazyloadSrc = $(o).attr('data-src') ? $(o).attr('data-src') : $(o).attr('src')
$(o).wrap(`<a href="${lazyloadSrc}" data-fancybox="group" data-caption="${$(o).attr('alt')}" class="fancybox"></a>`)
})
</script>
<script src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js"></script>
<script>
$().fancybox({
selector: '[data-fancybox]',
loop: true,
transitionEffect: 'slide',
protect: true,
buttons: ['slideShow', 'fullScreen', 'thumbs', 'close']
})
</script>
<div id="QPlayer">
<div id="pContent">
<div id="player">
<span class="cover"></span>
<div class="ctrl">
<div class="musicTag marquee">
<strong>Title</strong>
<span> - </span>
<span class="artist">Artist</span>
</div>
<div class="progress">
<div class="timer left">0:00</div>
<div class="contr">
<div class="rewind icon"></div>
<div class="playback icon"></div>
<div class="fastforward icon"></div>
</div>
<div class="right">
<div class="liebiao icon"></div>
</div>
</div>
</div>
</div>
<div class="ssBtn">
<div class="adf"><i class="fas fa-music" style="color: #Fff;"></i></div>
</div>
</div>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/a2396837/CDN@latest/css/audio.css">
<ol id="playlist"></ol>
</div>
<script src="https://cdn.jsdelivr.net/npm/jquery.marquee@1.5.0/jquery.marquee.min.js"></script>
<script>
var playlist = [];
playlist.push({title:'我要开花',artist:'二手玫瑰',mp3:'https://xy07-1251893119.cos.ap-beijing-1.myqcloud.com/%E4%BA%8C%E6%89%8B%E7%8E%AB%E7%91%B0%20-%20%E6%88%91%E8%A6%81%E5%BC%80%E8%8A%B1.mp3',cover:'https://p1.music.126.net/DSTg1dR7yKsyGq4IK3NL8A==/109951163046050093.jpg'})
var isRotate = true;
var autoplay = false;
</script>
<script src="https://cdn.jsdelivr.net/gh/a2396837/CDN@latest/js/player.js"></script>
<script>
function bgChange(){
var lis= $('.lib');
for(var i=0; i<lis.length; i+=2)
lis[i].style.background = 'rgba(246, 246, 246, 0.5)';
}
window.onload = bgChange;
</script>
<script src="https://cdn.jsdelivr.net/npm/instant.page/instantpage.min.js" type="module" defer></script>
<script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.4/dist/clipboard.min.js"></script>
<script>
!function (e, t, a) {
var initCopyCode = function(){
var copyHtml = '';
copyHtml += '<button class="btn-copy" data-clipboard-snippet="">';
copyHtml += ' <i class="fa fa-clipboard"></i><span>复制</span>';
copyHtml += '</button>';
$(".highlight .code pre").before(copyHtml);
new ClipboardJS('.btn-copy', {
target: function(trigger) {
return trigger.nextElementSibling;
}
});
}
initCopyCode();
}(window, document);
</script>
<script>
var btntop = $('#gotop');
btntop.on('click', function (e) {
e.preventDefault();
$('html, body').animate({ scrollTop: 0 }, '300');
});
var $table = $('.content table').not($('figure.highlight > table'))
$table.each(function () {
$(this).wrap('<div class="table-wrap"></div>')
})
</script>
</html>