From 3b1ba92e4b544ebba6a1e0146a2bc098f19045c4 Mon Sep 17 00:00:00 2001 From: FlintyLemming Date: Sat, 24 Sep 2022 17:43:16 +0800 Subject: [PATCH] Posts update --- config.yaml | 2 +- .../index.zh-cn.md | 41 +++++++++++++ .../index.zh-cn.md | 58 +++++++++++++++++++ .../index.zh-cn.md | 34 +++++++++++ 4 files changed, 134 insertions(+), 1 deletion(-) create mode 100644 content/post/6a9c208e61194011863b2bfe35798a70/index.zh-cn.md create mode 100644 content/post/bc2a89d7b0e9444b9f4ce7bd94ef7338/index.zh-cn.md create mode 100644 content/post/d1d694eeae164f16ae2b727fcd679eed/index.zh-cn.md diff --git a/config.yaml b/config.yaml index 522799b..ce936f4 100644 --- a/config.yaml +++ b/config.yaml @@ -49,7 +49,7 @@ params: sidebar: emoji: 🍥 - subtitle: 人菜话多 + subtitle: 人菜瘾大 avatar: enabled: true local: true diff --git a/content/post/6a9c208e61194011863b2bfe35798a70/index.zh-cn.md b/content/post/6a9c208e61194011863b2bfe35798a70/index.zh-cn.md new file mode 100644 index 0000000..fa55746 --- /dev/null +++ b/content/post/6a9c208e61194011863b2bfe35798a70/index.zh-cn.md @@ -0,0 +1,41 @@ ++++ +author = "FlintyLemming" +title = "Windows 11 解决搜不到终端的问题" +slug = "6a9c208e61194011863b2bfe35798a70" +date = "2022-09-10" +description = "" +categories = ["Windows"] +tags = ["Windows 11"] +image = "https://img.mitsea.com/blog/posts/2022/09/Windows%2011%20%E8%A7%A3%E5%86%B3%E6%90%9C%E4%B8%8D%E5%88%B0%E7%BB%88%E7%AB%AF%E7%9A%84%E9%97%AE%E9%A2%98/title.jpg?x-oss-process=style/ImageCompress" ++++ + +## 问题 + +中文版 Windows 11 的 Windows Terminal 因为程序名叫“终端”,所以无论是自带的搜索还是 PowerToys Run 都无法通过 “Terminal” 搜到这个程序。 + +![](https://img.mitsea.com/blog/posts/2022/09/Windows%2011%20%E8%A7%A3%E5%86%B3%E6%90%9C%E4%B8%8D%E5%88%B0%E7%BB%88%E7%AB%AF%E7%9A%84%E9%97%AE%E9%A2%98/1.png?x-oss-process=style/ImageCompress) + +![](https://img.mitsea.com/blog/posts/2022/09/Windows%2011%20%E8%A7%A3%E5%86%B3%E6%90%9C%E4%B8%8D%E5%88%B0%E7%BB%88%E7%AB%AF%E7%9A%84%E9%97%AE%E9%A2%98/2.png?x-oss-process=style/ImageCompress) + +## 解决方法 + +本质就是想办法把 Windows Terminal 的 exe 固定到开始菜单,这样就可以搜索到了。 + +1. 打开 Windows Terminal 后,在任务管理器中找到它的进程,右键 - 打开文件所在位置 + + ![](https://img.mitsea.com/blog/posts/2022/09/Windows%2011%20%E8%A7%A3%E5%86%B3%E6%90%9C%E4%B8%8D%E5%88%B0%E7%BB%88%E7%AB%AF%E7%9A%84%E9%97%AE%E9%A2%98/3.png?x-oss-process=style/ImageCompress) + +2. 找到它后,右键 - 固定到“开始”屏幕 + + ![](https://img.mitsea.com/blog/posts/2022/09/Windows%2011%20%E8%A7%A3%E5%86%B3%E6%90%9C%E4%B8%8D%E5%88%B0%E7%BB%88%E7%AB%AF%E7%9A%84%E9%97%AE%E9%A2%98/4.png?x-oss-process=style/ImageCompress) + +3. 默认就是一个名为 WindowsTerminal 的快捷方式,没有空格,可以右键 - 打开文件所在位置自己改下名字 + + ![](https://img.mitsea.com/blog/posts/2022/09/Windows%2011%20%E8%A7%A3%E5%86%B3%E6%90%9C%E4%B8%8D%E5%88%B0%E7%BB%88%E7%AB%AF%E7%9A%84%E9%97%AE%E9%A2%98/5.png?x-oss-process=style/ImageCompress) + +4. 这样就可以搜索到了 + + ![](https://img.mitsea.com/blog/posts/2022/09/Windows%2011%20%E8%A7%A3%E5%86%B3%E6%90%9C%E4%B8%8D%E5%88%B0%E7%BB%88%E7%AB%AF%E7%9A%84%E9%97%AE%E9%A2%98/6.png?x-oss-process=style/ImageCompress) + +Photo by [Viktor Mindt](https://unsplash.com/@vikomio77?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com/?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) + \ No newline at end of file diff --git a/content/post/bc2a89d7b0e9444b9f4ce7bd94ef7338/index.zh-cn.md b/content/post/bc2a89d7b0e9444b9f4ce7bd94ef7338/index.zh-cn.md new file mode 100644 index 0000000..b276060 --- /dev/null +++ b/content/post/bc2a89d7b0e9444b9f4ce7bd94ef7338/index.zh-cn.md @@ -0,0 +1,58 @@ ++++ +author = "FlintyLemming" +title = "Ghost Blog 迁移" +slug = "bc2a89d7b0e9444b9f4ce7bd94ef7338" +date = "2021-03-25" +description = "" +categories = ["Linux", "MineService"] +tags = ["Blog"] +image = "https://img.mitsea.com/blog/posts/2019/10/Ghost%20Blog%20%E8%BF%81%E7%A7%BB/title.jpg?x-oss-process=style/ImageCompress" ++++ + +## 获取原始站点数据 + +这里原来想复杂了,本打算迁移 MySQL 中 Ghost 对应的 Schema,但后来发现其实没必要 + +![](https://img.mitsea.com/blog/posts/2019/10/Ghost%20Blog%20%E8%BF%81%E7%A7%BB/1.png?x-oss-process=style/ImageCompress) + +下面就以 Ghost 自带的功能介绍数据获取 + +### 获取文本数据 + +1. 打开 Ghost 的后台,左边找到 Labs,打开 + + ![](https://img.mitsea.com/blog/posts/2019/10/Ghost%20Blog%20%E8%BF%81%E7%A7%BB/2.png?x-oss-process=style/ImageCompress) + +2. 这里有个 Export your content,点击右侧的 Export,导出一个 json 文件,实际上这里已经包含了所有文本数据 + + ![](https://img.mitsea.com/blog/posts/2019/10/Ghost%20Blog%20%E8%BF%81%E7%A7%BB/3.png?x-oss-process=style/ImageCompress) + +### 获取媒体数据 + +除了文本之外,还需要获取两个重要内容,图片和主题(如果用了第三方) + +1. 通过 sftp 连接到服务器 + + ![](https://img.mitsea.com/blog/posts/2019/10/Ghost%20Blog%20%E8%BF%81%E7%A7%BB/4.png?x-oss-process=style/ImageCompress) + +2. 定位到 Ghost 目录,官方默认的目录是 /var/www/ghost,然后打开里面的 content 目录 + + ![](https://img.mitsea.com/blog/posts/2019/10/Ghost%20Blog%20%E8%BF%81%E7%A7%BB/5.png?x-oss-process=style/ImageCompress) + +3. 需要里面的 images 和 themes,全部拷贝到本地 + + ![](https://img.mitsea.com/blog/posts/2019/10/Ghost%20Blog%20%E8%BF%81%E7%A7%BB/6.png?x-oss-process=style/ImageCompress) + +## 恢复数据 + +1. 在新站的文件目录下,恢复刚才 content 目录下的两个文件夹里的内容 + + ![](https://img.mitsea.com/blog/posts/2019/10/Ghost%20Blog%20%E8%BF%81%E7%A7%BB/7.png?x-oss-process=style/ImageCompress) + +2. 在新站的 Labs 里,导入刚才生成的 json 文件 + + ![](https://img.mitsea.com/blog/posts/2019/10/Ghost%20Blog%20%E8%BF%81%E7%A7%BB/8.png?x-oss-process=style/ImageCompress) + +3. 导入后刷新页面,即可看到文章和图片都已经恢复 + + ![](https://img.mitsea.com/blog/posts/2019/10/Ghost%20Blog%20%E8%BF%81%E7%A7%BB/9.png?x-oss-process=style/ImageCompress) \ No newline at end of file diff --git a/content/post/d1d694eeae164f16ae2b727fcd679eed/index.zh-cn.md b/content/post/d1d694eeae164f16ae2b727fcd679eed/index.zh-cn.md new file mode 100644 index 0000000..e36487e --- /dev/null +++ b/content/post/d1d694eeae164f16ae2b727fcd679eed/index.zh-cn.md @@ -0,0 +1,34 @@ ++++ +author = "FlintyLemming" +title = "Hugo 搭配 Nginx 反代使用" +slug = "d1d694eeae164f16ae2b727fcd679eed" +date = "2022-09-24" +description = "主要就是在启动时加几个参数" +categories = ["MineService"] +tags = ["Blog", "Hugo"] +image = "https://img.mitsea.com/blog/posts/2022/09/Hugo%20%E6%90%AD%E9%85%8D%20Nginx%20%E5%8F%8D%E4%BB%A3%E4%BD%BF%E7%94%A8/title.jpg?x-oss-process=style/ImageCompress" ++++ + +最近把博客迁移到了 Hugo,Hugo 并不算是个纯静态的博客系统。一般来说,是作为一个 go 服务放在后台运行的。通过 `hugo server` 命令可以启动为服务端,默认端口为 1313。但如果直接通过 Nginx 的 proxy_pass 反代为公网服务会遇到一些问题,应该加上一些参数启动。我的启动命令如下。 + +```bash +hugo server --appendPort=false --baseURL="[https://blog.mitsea.com/](https://blog.mitsea.com/)" --liveReloadPort 443 +``` + +## appendPort + +这里需要设置为 false,这样你的 baseURL 就不会变成 <域名>:1313。如果不设置为 false,你在使用搜索等功能的时候,浏览器还是会向 1313 端口发送请求。 + +## baseURL + +这个没啥好说的,肯定要设置。 + +## liveReloadPort + +这个是 Hugo 用来实时更新网页内容的 WebSocket 端口。除了要设置 Nginx 支持 WebSocket,这里还要手动指定下 wss 访问的端口为与 https 相同的 443。 + +更多命令与参数可以查看 Hugo 官方文档。 + +启动好后,再用 Nginx 的 proxy_pass 去反代 Hugo 的 127.0.0.1:1313 就行。 + +> Photo by [op23](https://unsplash.com/@op23?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com/?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)