From 32137c3812bcaa5cbb61a81ffb4759cce7cee1c1 Mon Sep 17 00:00:00 2001 From: garhve Date: Fri, 9 Dec 2022 17:20:25 +0800 Subject: test blog to check if blog can be rightly placed --- posts/1/index.html | 2 +- posts/2/index.html | 2 +- posts/3/index.html | 2 +- posts/4/index.html | 2 +- posts/5/index.html | 2 +- posts/6/index.html | 2 +- posts/7/index.html | 2 +- posts/8/index.html | 166 ++++++++++++++++++++++++++++++++++ posts/9/index.html | 256 +++++++++++++++++++++++++++++++++++++++++++++++++++++ posts/index.html | 32 ++++++- posts/index.xml | 35 +++++++- 11 files changed, 492 insertions(+), 11 deletions(-) create mode 100644 posts/8/index.html create mode 100644 posts/9/index.html (limited to 'posts') diff --git a/posts/1/index.html b/posts/1/index.html index b6a47de..1d7b93b 100644 --- a/posts/1/index.html +++ b/posts/1/index.html @@ -2,7 +2,7 @@ - + diff --git a/posts/2/index.html b/posts/2/index.html index c389bf2..34292c3 100644 --- a/posts/2/index.html +++ b/posts/2/index.html @@ -2,7 +2,7 @@ - + diff --git a/posts/3/index.html b/posts/3/index.html index de9729a..58992ad 100644 --- a/posts/3/index.html +++ b/posts/3/index.html @@ -2,7 +2,7 @@ - + diff --git a/posts/4/index.html b/posts/4/index.html index b9d798a..0a85b62 100644 --- a/posts/4/index.html +++ b/posts/4/index.html @@ -2,7 +2,7 @@ - + diff --git a/posts/5/index.html b/posts/5/index.html index 8d9484a..a8b84c3 100644 --- a/posts/5/index.html +++ b/posts/5/index.html @@ -2,7 +2,7 @@ - + diff --git a/posts/6/index.html b/posts/6/index.html index 6c2617d..46572dd 100644 --- a/posts/6/index.html +++ b/posts/6/index.html @@ -2,7 +2,7 @@ - + diff --git a/posts/7/index.html b/posts/7/index.html index 788f339..54eae8a 100644 --- a/posts/7/index.html +++ b/posts/7/index.html @@ -2,7 +2,7 @@ - + diff --git a/posts/8/index.html b/posts/8/index.html new file mode 100644 index 0000000..a62c51e --- /dev/null +++ b/posts/8/index.html @@ -0,0 +1,166 @@ + + + + + + + + + + + + + +Getting unified experience + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+

Getting unified experience

+ +
+
+ + + +
+
+ + + +
+
+ +
+ +
+ +

Lately, I’m trying get my tools working seamlessly cross my 2 working machines as well as a server.

+

Since I already heard dotfiles for a while, but didn’t get chance to familiar with. So I start searching around trying to set a dotfile up.

+

Frankly, it is not that simple as I thought, given that my grounds differ from each other: 1x macOS, 1x archLinux, 1x archLinux server.

+

Here’s a brief description: all configuration files I want to put in .config, all plugins and config related files I want to place in .local. +The files I want to sync now are the configs and plugins of vim, zsh, tmux, gpg, and git. Those 5 softwares are my root.

+

The problem is, due to different environment, my config for those machines have some custom setting, such as XDG env, my macOS doesn’t need it.

+ +
+ +
+
+ +
+
+ + +
+ + + + +
+
+
+ + + + + + + + + + diff --git a/posts/9/index.html b/posts/9/index.html new file mode 100644 index 0000000..2826311 --- /dev/null +++ b/posts/9/index.html @@ -0,0 +1,256 @@ + + + + + + + + + + + + + +测试自动创建博客 + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+

测试自动创建博客

+ +
+
+ + + +
+
+ + + +
+
+ +
+ +
+ +

hugo挺不错的,就是太麻烦了。以下几点都是在使用时遇到的一些问题:

+

写作

+

编辑器随便用个支持MD的就行了,这句陈述挺好。

+

但现实是,我家里一台MacBook,一台arch Linux的Thinkpad,公司一台MacBook。 +所以跨平台对我来说就很重要了。我有点洁癖,家目录我都在努力的把config和local +文件整合在各自不同的区域名以至于不那么乱。在每台电脑上下个markdown editor, +同步文件再在每台电脑上额外加个云,想想我都受不了。

+

不过目前我试过了一个软件marktext,功能和UI都很不错,但由于同步 +问题我不太想用。

+

其实我比较倾向于下载个web app搭在我raspberry pi上,再通过公网挂出去, +达到我在任意地方都能使用的目的来着,但目前的app总有这样那样的问题 +使我不是很满意,也就一直耽搁着了,现在也就是通过ssh直接到我的arch里 +直接使用vim写文章,有点别扭… 用vim写markdown。

+

图片

+

图片怎么管理原本也是个问题,我买入了一个存储桶并配置好了nginx, +但这比较适合fetch图片,当我截了新图要上传时,要么登录存储桶要么scp到 +服务器去上传,而且传好后的url也是一个麻烦事。试了各种方法都不太行之后。

+

在Mac端我用了uPic,这个比较方便的是不止可以传图片,其他文件需要 +保存了也可以通过它上传,并且,它支持上传后直接拿到自定义对url,对于 +我自定义了域名去匹配nginx的规则很方便。而且只需第一次配置好, +后面使用即可。

+

Linux端呢,则暂时没有什么好办法,只能老老实实打开网页上传了~

+

发布

+

Hugo的发布其实也是一个问题。在上面说过,我有洁癖,其实我还有一些强迫症。 +自从GitHub被微软收购后,我很少使用了。虽然我只是一介平民,但我还是希望 +尽可能将我不同的指纹分散隔离开来。我用了我自有的服务器去托管我的一些服务, +其中便包括这个博客。 +Hugo我是安装在我的Linux上,我并没有让它接入公网。我有在服务器上托管了一个 +cgit来当我的私人仓库,于是理所当然的,我把public给git到服务器上了。

+

原先,发布一篇博客我的流程为,

+
+

hugo new post -> vim 找到文章 -> 保存或者发布 -> 然后到public文件夹 +push出去。

+
+

太麻烦了,我就写了个简单的脚本来简化一下流程,反正是自用的,所以也不用考虑 +怎么处理不同的位置,并且原先由于发布比较繁琐,草稿就都存在本地了,现在 +我也可以直接将草稿发布出来,看得见,我才有动力写~

+
######################################################################
+# @author      : garhve (dev@garhve.com)
+# @file        : blog
+# @created     : Friday Dec 09, 2022 16:09:42 CST
+# 
+# @description : simplify blog publishing.                                                                             
+######################################################################
+
+p="$(pwd)"
+
+cd "$HOME/Storage/data/blog"
+
+echo "Enter the blog name"
+read -r name
+
+hugo new posts/"$name"
+
+echo "1. en"
+echo "2. cn"
+echo "all option would be default to 1 except 2[1 or 2]: "
+read l
+
+if [ l -eq 1 ]; then
+    lang="en"
+elif [ l -eq 2 ]; then
+    lang="cn"
+else
+    lang="en"
+fi
+[ lang == "cn" ] && mv "content/en/posts/$name" "content/cn/posts/$name"
+vim "content/$lang/posts/$name"
+
+hugo
+cd public
+git add .
+read -r -p "commit message: " com
+git commit -m "$com"
+
+cd "$p"
+

这片文章的出现,也只是我想确认一下能不能正确处理好中文内容。这样一说,突然想起来编辑也挺麻烦的。。 +也许可以将代码优化下以后就省心了,哈哈。

+ +
+ +
+
+ +
+
+ + +
+ + + + +
+
+
+ + + + + + + + + + diff --git a/posts/index.html b/posts/index.html index 30b6e23..bfb8bac 100644 --- a/posts/index.html +++ b/posts/index.html @@ -2,7 +2,7 @@ - + @@ -29,8 +29,8 @@ "accountablePerson" : "garhve", "copyrightHolder" : "garhve", "copyrightYear" : "2022", - "datePublished": "2022-11-07 09:16:15 \u002b0800 CST", - "dateModified" : "2022-11-07 09:16:15 \u002b0800 CST", + "datePublished": "2022-12-09 16:38:56 \u002b0800 CST", + "dateModified" : "2022-12-09 16:38:56 \u002b0800 CST", "url" : "https:\/\/blog.garhve.com\/posts\/", "keywords" : [ ] } @@ -95,6 +95,32 @@

2022

+
+
+ +
+ +
+ +
+
+ +
+ +
+
diff --git a/posts/index.xml b/posts/index.xml index 7c1d263..d73e6c2 100644 --- a/posts/index.xml +++ b/posts/index.xml @@ -6,7 +6,40 @@ Recent content in Posts on blog | garhve's hub Hugo -- gohugo.io en-us - Mon, 07 Nov 2022 09:16:15 +0800 + Fri, 09 Dec 2022 16:38:56 +0800 + + 测试自动创建博客 + https://blog.garhve.com/posts/9/ + Fri, 09 Dec 2022 16:38:56 +0800 + + https://blog.garhve.com/posts/9/ + hugo挺不错的,就是太麻烦了。以下几点都是在使用时遇到的一些问题: +写作 编辑器随便用个支持MD的就行了,这句陈述挺好。 +但现实是,我家里一台MacBook,一台arch Linux的Thinkpad,公司一台MacBook。 所以跨平台对我来说就很重要了。我有点洁癖,家目录我都在努力的把config和local 文件整合在各自不同的区域名以至于不那么乱。在每台电脑上下个markdown editor, 同步文件再在每台电脑上额外加个云,想想我都受不了。 +不过目前我试过了一个软件marktext,功能和UI都很不错,但由于同步 问题我不太想用。 +其实我比较倾向于下载个web app搭在我raspberry pi上,再通过公网挂出去, 达到我在任意地方都能使用的目的来着,但目前的app总有这样那样的问题 使我不是很满意,也就一直耽搁着了,现在也就是通过ssh直接到我的arch里 直接使用vim写文章,有点别扭… 用vim写markdown。 +图片 图片怎么管理原本也是个问题,我买入了一个存储桶并配置好了nginx, 但这比较适合fetch图片,当我截了新图要上传时,要么登录存储桶要么scp到 服务器去上传,而且传好后的url也是一个麻烦事。试了各种方法都不太行之后。 +在Mac端我用了uPic,这个比较方便的是不止可以传图片,其他文件需要 保存了也可以通过它上传,并且,它支持上传后直接拿到自定义对url,对于 我自定义了域名去匹配nginx的规则很方便。而且只需第一次配置好, 后面使用即可。 +Linux端呢,则暂时没有什么好办法,只能老老实实打开网页上传了~ +发布 Hugo的发布其实也是一个问题。在上面说过,我有洁癖,其实我还有一些强迫症。 自从GitHub被微软收购后,我很少使用了。虽然我只是一介平民,但我还是希望 尽可能将我不同的指纹分散隔离开来。我用了我自有的服务器去托管我的一些服务, 其中便包括这个博客。 Hugo我是安装在我的Linux上,我并没有让它接入公网。我有在服务器上托管了一个 cgit来当我的私人仓库,于是理所当然的,我把public给git到服务器上了。 +原先,发布一篇博客我的流程为, +hugo new post -> vim 找到文章 -> 保存或者发布 -> 然后到public文件夹 push出去。 +太麻烦了,我就写了个简单的脚本来简化一下流程,反正是自用的,所以也不用考虑 怎么处理不同的位置,并且原先由于发布比较繁琐,草稿就都存在本地了,现在 我也可以直接将草稿发布出来,看得见,我才有动力写~ +###################################################################### # @author : garhve (dev@garhve.com) # @file : blog # @created : Friday Dec 09, 2022 16:09:42 CST # # @description : simplify blog publishing. + + + + Getting unified experience + https://blog.garhve.com/posts/8/ + Wed, 07 Dec 2022 15:05:30 +0800 + + https://blog.garhve.com/posts/8/ + Lately, I’m trying get my tools working seamlessly cross my 2 working machines as well as a server. +Since I already heard dotfiles for a while, but didn’t get chance to familiar with. So I start searching around trying to set a dotfile up. +Frankly, it is not that simple as I thought, given that my grounds differ from each other: 1x macOS, 1x archLinux, 1x archLinux server. +Here’s a brief description: all configuration files I want to put in . + + Past Is Great https://blog.garhve.com/posts/7/ -- cgit v1.2.3-70-g09d2