summaryrefslogtreecommitdiff
path: root/cn/posts/2/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'cn/posts/2/index.html')
-rw-r--r--cn/posts/2/index.html239
1 files changed, 239 insertions, 0 deletions
diff --git a/cn/posts/2/index.html b/cn/posts/2/index.html
new file mode 100644
index 0000000..8e51f09
--- /dev/null
+++ b/cn/posts/2/index.html
@@ -0,0 +1,239 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8" />
+ <meta name="generator" content="Hugo 0.108.0">
+
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
+ <meta name="author" content="garhve" />
+ <meta property="og:url" content="https://blog.garhve.com/cn/posts/2/" />
+ <link rel="canonical" href="https://blog.garhve.com/cn/posts/2/" /><link rel="apple-touch-icon" href="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" />
+ <link rel="icon" href="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" />
+ <link rel="shortcut" href="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /><link rel="alternate" type="application/atom+xml" href="https://blog.garhve.comindex.xml" title="blog | garhve&#39;s hub">
+
+ <script type="application/ld+json">
+ {
+ "@context" : "http://schema.org",
+ "@type" : "BlogPosting",
+ "mainEntityOfPage": {
+ "@type": "WebPage",
+ "@id": "https:\/\/blog.garhve.com"
+ },
+ "articleSection" : "posts",
+ "name" : "测试自动创建博客",
+ "headline" : "测试自动创建博客",
+ "description" : "hugo挺不错的,就是太麻烦了。以下几点都是在使用时遇到的一些问题:\n写作 编辑器随便用个支持MD的就行了,这句陈述挺好。\n但现实是,我家里一台MacBook,一台arch Linux的Thinkpad,公司一台MacBook。 所以跨平台对我来说就很重要了。我有点洁癖,家目录我都在努力的把config和local 文件整合在各自不同的区域名以至于不那么乱。在每台电脑上下个markdown editor, 同步文件再在每台电脑上额外加个云,想想我都受不了。\n不过目前我试过了一个软件marktext,功能和UI都很不错,但由于同步 问题我不太想用。\n其实我比较倾向于下载个web app搭在我raspberry pi上,再通过公网挂出去, 达到我在任意地方都能使用的目的来着,但目前的app总有这样那样的问题 使我不是很满意,也就一直耽搁着了,现在也就是通过ssh直接到我的arch里 直接使用vim写文章,有点别扭\u0026hellip; 用vim写markdown。并且由于通过ssh到电脑里写的文章,预览比较困难\u0026hellip; 先将就一下吧,看看有没有什么好的办法解决它。\n图片 图片怎么管理原本也是个问题,我买入了一个存储桶并配置好了nginx, 但这比较适合fetch图片,当我截了新图要上传时,要么登录存储桶要么scp到 服务器去上传,而且传好后的url也是一个麻烦事。试了各种方法都不太行之后。\n在Mac端我用了uPic,这个比较方便的是不止可以传图片,其他文件需要 保存了也可以通过它上传,并且,它支持上传后直接拿到自定义对url,对于 我自定义了域名去匹配nginx的规则很方便。而且只需第一次配置好, 后面使用即可。\nLinux端呢,则暂时没有什么好办法,只能老老实实打开网页上传了~\n发布 Hugo的发布其实也是一个问题。在上面说过,我有洁癖,其实我还有一些强迫症。 自从GitHub被微软收购后,我很少使用了。虽然我只是一介平民,但我还是希望 尽可能将我不同的指纹分散隔离开来。我用了我自有的服务器去托管我的一些服务, 其中便包括这个博客。 Hugo我是安装在我的Linux上,我并没有让它接入公网。我有在服务器上托管了一个 cgit来当我的私人仓库,于是理所当然的,我把public给git到服务器上了。\n原先,发布一篇博客我的流程为,\nhugo new post -\u0026gt; vim 找到文章 -\u0026gt; 保存或者发布 -\u0026gt; 然后到public文件夹 push出去。\n太麻烦了,我就写了个简单的脚本来简化一下流程,反正是自用的,所以也不用考虑 怎么处理不同的位置,并且原先由于发布比较繁琐,草稿就都存在本地了,现在 我也可以直接将草稿发布出来,看得见,我才有动力写~\n这片文章的出现,也只是我想确认一下能不能正确处理好中文内容。这样一说,突然想起来编辑也挺麻烦的。。 也许可以将代码优化下以后就省心了,哈哈。\n更新:拖了三天,终于把代码补完了~ blog.sh\n# usage: prog new\/edit\/push [en\/cn] push() { read -r -p \u0026#34;Do you want to push?[y\/n] \u0026#34; ans .",
+ "inLanguage" : "en-US",
+ "author" : "garhve",
+ "creator" : "garhve",
+ "publisher": "garhve",
+ "accountablePerson" : "garhve",
+ "copyrightHolder" : "garhve",
+ "copyrightYear" : "2022",
+ "datePublished": "2022-12-09 16:38:56 \u002b0800 CST",
+ "dateModified" : "2022-12-09 16:38:56 \u002b0800 CST",
+ "url" : "https:\/\/blog.garhve.com\/cn\/posts\/2\/",
+ "keywords" : [ ]
+ }
+</script>
+<title>测试自动创建博客</title>
+ <meta property="og:title" content="测试自动创建博客" />
+ <meta property="og:type" content="article" />
+ <meta property="og:description" content="hugo挺不错的,就是太麻烦了。以下几点都是在使用时遇到的一些问题:
+写作 编辑器随便用个支持MD的就行了,这句陈述挺好。
+但现实是,我家里一台MacBook,一台arch Linux的Thinkpad,公司一台MacBook。 所以跨平台对我来说就很重要了。我有点洁癖,家目录我都在努力的把config和local 文件整合在各自不同的区域名以至于不那么乱。在每台电脑上下个markdown editor, 同步文件再在每台电脑上额外加个云,想想我都受不了。
+不过目前我试过了一个软件marktext,功能和UI都很不错,但由于同步 问题我不太想用。
+其实我比较倾向于下载个web app搭在我raspberry pi上,再通过公网挂出去, 达到我在任意地方都能使用的目的来着,但目前的app总有这样那样的问题 使我不是很满意,也就一直耽搁着了,现在也就是通过ssh直接到我的arch里 直接使用vim写文章,有点别扭&amp;hellip; 用vim写markdown。并且由于通过ssh到电脑里写的文章,预览比较困难&amp;hellip; 先将就一下吧,看看有没有什么好的办法解决它。
+图片 图片怎么管理原本也是个问题,我买入了一个存储桶并配置好了nginx, 但这比较适合fetch图片,当我截了新图要上传时,要么登录存储桶要么scp到 服务器去上传,而且传好后的url也是一个麻烦事。试了各种方法都不太行之后。
+在Mac端我用了uPic,这个比较方便的是不止可以传图片,其他文件需要 保存了也可以通过它上传,并且,它支持上传后直接拿到自定义对url,对于 我自定义了域名去匹配nginx的规则很方便。而且只需第一次配置好, 后面使用即可。
+Linux端呢,则暂时没有什么好办法,只能老老实实打开网页上传了~
+发布 Hugo的发布其实也是一个问题。在上面说过,我有洁癖,其实我还有一些强迫症。 自从GitHub被微软收购后,我很少使用了。虽然我只是一介平民,但我还是希望 尽可能将我不同的指纹分散隔离开来。我用了我自有的服务器去托管我的一些服务, 其中便包括这个博客。 Hugo我是安装在我的Linux上,我并没有让它接入公网。我有在服务器上托管了一个 cgit来当我的私人仓库,于是理所当然的,我把public给git到服务器上了。
+原先,发布一篇博客我的流程为,
+hugo new post -&amp;gt; vim 找到文章 -&amp;gt; 保存或者发布 -&amp;gt; 然后到public文件夹 push出去。
+太麻烦了,我就写了个简单的脚本来简化一下流程,反正是自用的,所以也不用考虑 怎么处理不同的位置,并且原先由于发布比较繁琐,草稿就都存在本地了,现在 我也可以直接将草稿发布出来,看得见,我才有动力写~
+这片文章的出现,也只是我想确认一下能不能正确处理好中文内容。这样一说,突然想起来编辑也挺麻烦的。。 也许可以将代码优化下以后就省心了,哈哈。
+更新:拖了三天,终于把代码补完了~ blog.sh
+# usage: prog new/edit/push [en/cn] push() { read -r -p &amp;#34;Do you want to push?[y/n] &amp;#34; ans ." />
+ <meta name="description" content="hugo挺不错的,就是太麻烦了。以下几点都是在使用时遇到的一些问题:
+写作 编辑器随便用个支持MD的就行了,这句陈述挺好。
+但现实是,我家里一台MacBook,一台arch Linux的Thinkpad,公司一台MacBook。 所以跨平台对我来说就很重要了。我有点洁癖,家目录我都在努力的把config和local 文件整合在各自不同的区域名以至于不那么乱。在每台电脑上下个markdown editor, 同步文件再在每台电脑上额外加个云,想想我都受不了。
+不过目前我试过了一个软件marktext,功能和UI都很不错,但由于同步 问题我不太想用。
+其实我比较倾向于下载个web app搭在我raspberry pi上,再通过公网挂出去, 达到我在任意地方都能使用的目的来着,但目前的app总有这样那样的问题 使我不是很满意,也就一直耽搁着了,现在也就是通过ssh直接到我的arch里 直接使用vim写文章,有点别扭&amp;hellip; 用vim写markdown。并且由于通过ssh到电脑里写的文章,预览比较困难&amp;hellip; 先将就一下吧,看看有没有什么好的办法解决它。
+图片 图片怎么管理原本也是个问题,我买入了一个存储桶并配置好了nginx, 但这比较适合fetch图片,当我截了新图要上传时,要么登录存储桶要么scp到 服务器去上传,而且传好后的url也是一个麻烦事。试了各种方法都不太行之后。
+在Mac端我用了uPic,这个比较方便的是不止可以传图片,其他文件需要 保存了也可以通过它上传,并且,它支持上传后直接拿到自定义对url,对于 我自定义了域名去匹配nginx的规则很方便。而且只需第一次配置好, 后面使用即可。
+Linux端呢,则暂时没有什么好办法,只能老老实实打开网页上传了~
+发布 Hugo的发布其实也是一个问题。在上面说过,我有洁癖,其实我还有一些强迫症。 自从GitHub被微软收购后,我很少使用了。虽然我只是一介平民,但我还是希望 尽可能将我不同的指纹分散隔离开来。我用了我自有的服务器去托管我的一些服务, 其中便包括这个博客。 Hugo我是安装在我的Linux上,我并没有让它接入公网。我有在服务器上托管了一个 cgit来当我的私人仓库,于是理所当然的,我把public给git到服务器上了。
+原先,发布一篇博客我的流程为,
+hugo new post -&amp;gt; vim 找到文章 -&amp;gt; 保存或者发布 -&amp;gt; 然后到public文件夹 push出去。
+太麻烦了,我就写了个简单的脚本来简化一下流程,反正是自用的,所以也不用考虑 怎么处理不同的位置,并且原先由于发布比较繁琐,草稿就都存在本地了,现在 我也可以直接将草稿发布出来,看得见,我才有动力写~
+这片文章的出现,也只是我想确认一下能不能正确处理好中文内容。这样一说,突然想起来编辑也挺麻烦的。。 也许可以将代码优化下以后就省心了,哈哈。
+更新:拖了三天,终于把代码补完了~ blog.sh
+# usage: prog new/edit/push [en/cn] push() { read -r -p &amp;#34;Do you want to push?[y/n] &amp;#34; ans ." />
+ <meta property="og:locale" content="en-us" /><meta property="og:image" content="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" />
+
+
+
+
+ <style>@font-face{font-family:huanzi;src:url(/fonts/huanzi.woff2)format('woff2')}@font-face{font-family:fira code;src:url(/fonts/FiraCode-Regular.woff2)format('woff2')}body{font-family:bree serif,huanzi,sans-serif;-webkit-font-smoothing:antialiased;margin:0 20px}article{max-width:800px;margin-left:auto;margin-right:auto}a{color:#000;text-decoration:none}a:hover{font-weight:600;text-decoration:underline}.post-ads{margin:50px 0}.markdown-body{font-size:18px;max-width:100%}.markdown-body a{text-decoration:underline;text-decoration-color:#000}.markdown-body blockquote{margin:0;padding:0 1em;color:#57606a;border-left:.25em solid #d0d7de}.markdown-body pre{padding:16px;overflow:auto;border-radius:10px}.markdown-body code{padding:.2em .4em;font-size:80%;background-color:inherit;border-radius:6px;font-family:fira code,monospace}code{text-size-adjust:100%;-ms-text-size-adjust:100%;-moz-text-size-adjust:100%;-webkit-text-size-adjust:100%}table{width:100%}.markdown-body pre>code{padding:0;font-size:70%;background-color:inherit;border:0;font-family:fira code,monospace}.Chinese .markdown-body{line-height:200%}.site-date-catalog{font-size:2rem}.header-title{font-size:2rem;font-weight:700;margin-top:32px;font-family:bungee shade,sans-serif}.header-title a{text-decoration:none}.header-subtitle{color:#666}.header-items{margin:10px 0}.header-item{margin:0 5px}.header-line{width:100%;border-width:2px;border-color:#482936;border-style:solid none none none}.lang-switch{font-weight:600}#posts-list{min-height:600px}.posts-line{font-size:1.2rem;margin:12px 0}.posts-categories{font-size:.8rem;margin:auto;text-align:center}.posts-category{padding:3px 0;border:#000 2px solid;border-radius:5px}.site-footer{margin-top:50px}.site-footer-item{margin-right:12px}.post-content img{max-width:100%;display:block;margin-right:auto;margin-top:12px}.post-header{margin-bottom:50px}.post-title{font-size:2rem;font-weight:600}.post-tags{display:inline;font-weight:600;padding:2px 5px;margin-right:6px;border:#000 2px solid;border-radius:5px}.post-date{font-weight:800;font-style:italic}.post-author{float:right;font-weight:600}.page-content{min-height:60%}.post-content{margin-bottom:50px}.post-content p{hyphens:auto;line-height:1.8;text-justify:ideographic;margin-bottom:1em}.related-content{border-width:3px;border-style:solid;border-color:#000;padding:0 10px;margin-bottom:50px;margin-top:100px}.related-content li{margin:5px 0}.taxonomy-term{font-size:3rem}.gallery-img{text-align:center}.gallery-img span{text-align:center}.gallery-img-desc{font-size:.8em;font-weight:800}#disqus_thread{position:relative}#disqus_thread:after{content:"";display:block;height:55px;width:100%;position:absolute;bottom:0;background:#fff}@media screen and (max-width:600px){.header-title,.header-subtitle,.header-items{text-align:center}.posts-line{font-size:16px}.markdown-body{font-size:16px}.post-title{font-size:2rem}.post-content p{letter-spacing:.05em}}@media screen and (max-width:48em){.posts-category{display:none}}</style>
+
+
+ <style>.container,.container-fluid{margin-right:auto;margin-left:auto}.container-fluid{padding-right:2rem;padding-left:2rem}.row{box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:initial;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-.5rem;margin-left:-.5rem}.row.reverse{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.col.reverse{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.col-xs,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-offset-0,.col-xs-offset-1,.col-xs-offset-10,.col-xs-offset-11,.col-xs-offset-12,.col-xs-offset-2,.col-xs-offset-3,.col-xs-offset-4,.col-xs-offset-5,.col-xs-offset-6,.col-xs-offset-7,.col-xs-offset-8,.col-xs-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-xs{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-xs-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-xs-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-xs-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-xs-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-xs-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-xs-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-xs-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-xs-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-xs-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-xs-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-xs-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-xs-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-xs-offset-0{margin-left:0}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-11{margin-left:91.66666667%}.start-xs{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-xs{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-xs{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-xs{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-xs{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-xs{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-xs{-ms-flex-pack:distribute;justify-content:space-around}.between-xs{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-xs{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-xs{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}@media only screen and (min-width:48em){.container{width:49rem}.col-sm,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-offset-0,.col-sm-offset-1,.col-sm-offset-10,.col-sm-offset-11,.col-sm-offset-12,.col-sm-offset-2,.col-sm-offset-3,.col-sm-offset-4,.col-sm-offset-5,.col-sm-offset-6,.col-sm-offset-7,.col-sm-offset-8,.col-sm-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-sm{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-sm-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-sm-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-sm-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-sm-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-sm-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-sm-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-sm-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-sm-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-sm-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-sm-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-sm-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-sm-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-sm-offset-0{margin-left:0}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-11{margin-left:91.66666667%}.start-sm{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-sm{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-sm{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-sm{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-sm{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-sm{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-sm{-ms-flex-pack:distribute;justify-content:space-around}.between-sm{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-sm{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-sm{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}@media only screen and (min-width:64em){.container{width:65rem}.col-md,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-offset-0,.col-md-offset-1,.col-md-offset-10,.col-md-offset-11,.col-md-offset-12,.col-md-offset-2,.col-md-offset-3,.col-md-offset-4,.col-md-offset-5,.col-md-offset-6,.col-md-offset-7,.col-md-offset-8,.col-md-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-md{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-md-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-md-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-md-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-md-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-md-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-md-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-md-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-md-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-md-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-md-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-md-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-md-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-md-offset-0{margin-left:0}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-3{margin-left:25%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-6{margin-left:50%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-9{margin-left:75%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-11{margin-left:91.66666667%}.start-md{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-md{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-md{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-md{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-md{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-md{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-md{-ms-flex-pack:distribute;justify-content:space-around}.between-md{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-md{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-md{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}@media only screen and (min-width:75em){.container{width:76rem}.col-lg,.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-offset-0,.col-lg-offset-1,.col-lg-offset-10,.col-lg-offset-11,.col-lg-offset-12,.col-lg-offset-2,.col-lg-offset-3,.col-lg-offset-4,.col-lg-offset-5,.col-lg-offset-6,.col-lg-offset-7,.col-lg-offset-8,.col-lg-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-lg{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-lg-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-lg-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-lg-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-lg-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-lg-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-lg-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-lg-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-lg-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-lg-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-lg-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-lg-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-lg-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-lg-offset-0{margin-left:0}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-11{margin-left:91.66666667%}.start-lg{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-lg{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-lg{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-lg{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-lg{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-lg{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-lg{-ms-flex-pack:distribute;justify-content:space-around}.between-lg{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-lg{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-lg{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}</style>
+
+
+
+
+ <link href="/index.xml" rel="alternate" type="application/rss+xml"
+ title="blog | garhve&#39;s hub">
+
+ <link rel="preconnect" href="https://fonts.gstatic.com">
+ <link href="https://fonts.googleapis.com/css?family=Bree+Serif|Bungee+Shade" rel="stylesheet">
+
+
+
+</head>
+
+
+<body>
+ <article class="post Chinese" id="article">
+ <div class="row">
+ <div class="col-xs-12">
+ <div class="site-header">
+
+<header>
+ <div class="header-title">
+ <a href="/cn/"
+ >Garhve</a
+ >
+ </div>
+ <div class="header-subtitle"></div>
+</header>
+<div class="row end-md center-xs header-items">
+</div>
+<div class="row end-xs">
+
+ <div class="lang-switch col-xs-3 col-xs-offset-9">
+ <a href="/en/">English</a>
+ </div>
+
+</div>
+<div class="header-line"></div>
+
+ </div>
+ <header class="post-header">
+ <h1 class="post-title">测试自动创建博客</h1>
+
+ <div class="row post-desc">
+ <div class="col-xs-6">
+
+ <time class="post-date" datetime="2022-12-09 16:38:56 CST">
+ 09 Dec 2022
+ </time>
+
+ </div>
+ <div class="col-xs-6">
+
+ <div class="post-author">
+ <a target="_blank" href="https://garhve.com">@garhve</a>
+ </div>
+
+ </div>
+ </div>
+
+ </header>
+
+ <div class="post-content markdown-body">
+
+ <p>hugo挺不错的,就是太麻烦了。以下几点都是在使用时遇到的一些问题:</p>
+<h3 id="写作">写作</h3>
+<p>编辑器随便用个支持MD的就行了,这句陈述挺好。</p>
+<p>但现实是,我家里一台MacBook,一台arch Linux的Thinkpad,公司一台MacBook。
+所以跨平台对我来说就很重要了。我有点洁癖,家目录我都在努力的把config和local
+文件整合在各自不同的区域名以至于不那么乱。在每台电脑上下个markdown editor,
+同步文件再在每台电脑上额外加个云,想想我都受不了。</p>
+<p>不过目前我试过了一个软件marktext,功能和UI都很不错,但由于同步
+问题我不太想用。</p>
+<p>其实我比较倾向于下载个web app搭在我raspberry pi上,再通过公网挂出去,
+达到我在任意地方都能使用的目的来着,但目前的app总有这样那样的问题
+使我不是很满意,也就一直耽搁着了,现在也就是通过ssh直接到我的arch里
+直接使用vim写文章,有点别扭&hellip; 用vim写markdown。并且由于通过ssh到电脑里写的文章,预览比较困难&hellip;
+先将就一下吧,看看有没有什么好的办法解决它。</p>
+<h3 id="图片">图片</h3>
+<p>图片怎么管理原本也是个问题,我买入了一个存储桶并配置好了nginx,
+但这比较适合fetch图片,当我截了新图要上传时,要么登录存储桶要么scp到
+服务器去上传,而且传好后的url也是一个麻烦事。试了各种方法都不太行之后。</p>
+<p>在Mac端我用了uPic,这个比较方便的是不止可以传图片,其他文件需要
+保存了也可以通过它上传,并且,它支持上传后直接拿到自定义对url,对于
+我自定义了域名去匹配nginx的规则很方便。而且只需第一次配置好,
+后面使用即可。</p>
+<p>Linux端呢,则暂时没有什么好办法,只能老老实实打开网页上传了~</p>
+<h3 id="发布">发布</h3>
+<p>Hugo的发布其实也是一个问题。在上面说过,我有洁癖,其实我还有一些强迫症。
+自从GitHub被微软收购后,我很少使用了。虽然我只是一介平民,但我还是希望
+尽可能将我不同的指纹分散隔离开来。我用了我自有的服务器去托管我的一些服务,
+其中便包括这个博客。
+Hugo我是安装在我的Linux上,我并没有让它接入公网。我有在服务器上托管了一个
+cgit来当我的私人仓库,于是理所当然的,我把public给git到服务器上了。</p>
+<p>原先,发布一篇博客我的流程为,</p>
+<blockquote>
+<p>hugo new post -&gt; vim 找到文章 -&gt; 保存或者发布 -&gt; 然后到public文件夹
+push出去。</p>
+</blockquote>
+<p>太麻烦了,我就写了个简单的脚本来简化一下流程,反正是自用的,所以也不用考虑
+怎么处理不同的位置,并且原先由于发布比较繁琐,草稿就都存在本地了,现在
+我也可以直接将草稿发布出来,看得见,我才有动力写~</p>
+<p>这片文章的出现,也只是我想确认一下能不能正确处理好中文内容。这样一说,突然想起来编辑也挺麻烦的。。
+也许可以将代码优化下以后就省心了,哈哈。</p>
+<p>更新:拖了三天,终于把代码补完了~ <a href="https://git.garhve.com/codes/tree/bash/blog.sh?id=46e07255bbe67b1dbf93dcd7f33e25f10eb8f8de">blog.sh</a></p>
+<div class="highlight"><pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span><span style="font-style:italic"># usage: prog new/edit/push [en/cn]</span>
+</span></span><span style="display:flex;"><span>
+</span></span><span style="display:flex;"><span>push() {
+</span></span><span style="display:flex;"><span> read -r -p <span style="font-style:italic">&#34;Do you want to push?[y/n] &#34;</span> ans
+</span></span><span style="display:flex;"><span>...
+</span></span><span style="display:flex;"><span>[ $# -lt 1 ] &amp;&amp; echo <span style="font-style:italic">&#34;usage: </span><span style="font-weight:bold">$(</span>basename $0<span style="font-weight:bold">)</span><span style="font-style:italic"> new/edit/push [en/cn]&#34;</span>
+</span></span><span style="display:flex;"><span>
+</span></span><span style="display:flex;"><span>[ $1 == <span style="font-style:italic">&#34;new&#34;</span> ] &amp;&amp; new <span style="font-style:italic">&#34;</span>$2<span style="font-style:italic">&#34;</span>
+</span></span><span style="display:flex;"><span>[ $1 == <span style="font-style:italic">&#34;edit&#34;</span> ] &amp;&amp; edit <span style="font-style:italic">&#34;</span>$2<span style="font-style:italic">&#34;</span>
+</span></span><span style="display:flex;"><span>[ $1 == <span style="font-style:italic">&#34;push&#34;</span> ] &amp;&amp; push
+</span></span></code></pre></div><p>以后只需要在文件夹里<code>./blog.sh action language</code> 即可。
+大大方便了使用呀。
+<img src="https://assets.garhve.com/pictures/screenshots/2022/12/wIAgJv.png" alt="wIAgJv">
+也许以后就能多写写了(bushi)</p>
+
+ </div>
+
+ <div class="row">
+ <div class="col-xs-12">
+
+ </div>
+ </div>
+
+
+ <div style="height: 50px;"></div>
+
+
+ <div class="site-footer">
+
+
+
+</div>
+
+ </div>
+ </div>
+ </article>
+
+
+
+<script>
+
+
+
+
+
+</script>
+
+
+
+</body>
+
+</html>