From 7cc4c54ef638eea648726939e0ce5e06f90d01bb Mon Sep 17 00:00:00 2001 From: Ivan Li Date: Tue, 19 Jul 2022 23:06:55 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BD=A0=E5=A5=BD=EF=BC=8C=E6=88=91?= =?UTF-8?q?=E7=9A=84=E6=9C=8B=E5=8F=8B=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 2 -- data/authors/sparrowhawk.md | 12 ------------ data/blog/code-sample.md | 38 ------------------------------------- data/blog/first-article.md | 19 +++++++++++++++++++ 4 files changed, 19 insertions(+), 52 deletions(-) delete mode 100644 data/authors/sparrowhawk.md delete mode 100644 data/blog/code-sample.md create mode 100644 data/blog/first-article.md diff --git a/.drone.yml b/.drone.yml index 72810ff..a8caedd 100644 --- a/.drone.yml +++ b/.drone.yml @@ -16,8 +16,6 @@ steps: cache_from: - docker-registry.ivanli.cc/ivan/tailwind-nextjs-blog-base:${DRONE_BRANCH}${DRONE_TAG}-amd64 dockerfile: Dockerfile - build_args: - - BUILDKIT_INLINE_CACHE=1 target: base tags: - '${DRONE_COMMIT_SHA:0:8}-amd64' diff --git a/data/authors/sparrowhawk.md b/data/authors/sparrowhawk.md deleted file mode 100644 index 5cef90b..0000000 --- a/data/authors/sparrowhawk.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -name: Sparrow Hawk -avatar: /static/images/sparrowhawk-avatar.jpg -occupation: Wizard of Earthsea -company: Earthsea -twitter: https://twitter.com/sparrowhawk -linkedin: https://www.linkedin.com/sparrowhawk ---- - -At birth, Ged was given the child-name Duny by his mother. He was born on the island of Gont, as a son of a bronzesmith. His mother died before he reached the age of one. As a small boy, Ged had overheard the village witch, his maternal aunt, using various words of power to call goats. Ged later used the words without an understanding of their meanings, to surprising effect. - -The witch knew that using words of power effectively without understanding them required innate power, so she endeavored to teach him what little she knew. After learning more from her, he was able to call animals to him. Particularly, he was seen in the company of wild sparrowhawks so often that his "use name" became Sparrowhawk. diff --git a/data/blog/code-sample.md b/data/blog/code-sample.md deleted file mode 100644 index a293a84..0000000 --- a/data/blog/code-sample.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: Sample .md file -date: '2016-03-08' -tags: ['markdown', 'code', 'features'] -draft: false -summary: Example of a markdown file with code blocks and syntax highlighting ---- - -A sample post with markdown. - -## Inline Highlighting - -Sample of inline highlighting `sum = parseInt(num1) + parseInt(num2)` - -## Code Blocks - -Some Javascript code - -```javascript -var num1, num2, sum -num1 = prompt('Enter first number') -num2 = prompt('Enter second number') -sum = parseInt(num1) + parseInt(num2) // "+" means "add" -alert('Sum = ' + sum) // "+" means combine into a string -``` - -Some Python code 🐍 - -```python -def fib(): - a, b = 0, 1 - while True: # First iteration: - yield a # yield 0 to start with and then - a, b = b, a + b # a will now be 1, and b will also be 1, (0 + 1) - -for index, fibonacci_number in zip(range(10), fib()): - print('{i:3}: {f:3}'.format(i=index, f=fibonacci_number)) -``` diff --git a/data/blog/first-article.md b/data/blog/first-article.md new file mode 100644 index 0000000..ea4fae4 --- /dev/null +++ b/data/blog/first-article.md @@ -0,0 +1,19 @@ +--- +title: 你好,我的朋友! +date: '2022-07-19' +tags: ['Blog', 'Markdown', 'Next.js', 'Tailwind CSS'] +draft: false +summary: 这是本站当前版本的第一篇文章。2015 - 2022,希望是最后一次重开博客。 +--- + +2015 年开始,我开发了自己的第一个博客站,当时还是使用 PHP 5 + MySQL + HTML + CSS 3 开发的。当时非常地执着,不想用 JavaScript,希望用纯 CSS 实现所有功能。当然,这所有功能也很朴素。不过最后好像还是加上了一些 JavaScript 代码。当年使用 PHP,主要是因为更早之前,我一直在运营和维护 Discuz! 论坛,混“机油”圈。当时认识了很多网友呢。 + +后来,博客慢慢迭代,之后的后端都是使用 Node.js 了,前端从 Vue (Nuxt.js) -> Angular -> React (Next.js)。现在,我发现文章存数据库里是非常不明智的选择,因为我每次重写博客,都不想迁移文章……是的,就是不想……以至于后来,我开始考虑从文件生成静态站点。毕竟我们现在拥有 Markdown 这么棒的格式。 + +本来 22 年初的时候就准备放弃 React 版本的博客了,为什么要放弃呢?因为去年一年一直在研究微服务,全部自己实现确实费时费力,博客迟迟没有完全完成,所以当时那版博客也没有在主域名上部署。后来我就一直在使用 Logseq 做笔记,写文章。不过我发现这家伙确实不方便完整地将内容无损地转换为静态站点……这就是现在这版本博客上线的原因了。这么想想我的主域名吃灰了一年有余了…… + +不知道会不会坚持经常更新博客,因为我还是比较喜欢记录一些碎片内容,以备将来回顾。而博文主要还是为了做一些分享。做分享,动力还是有些不足,而且学海无涯,要学的东西还是真的多。精力有限,估计短期是无法预见能有经常分享的机会了。 + +总之,先上线再说。后面会陆续添加评论、评分和通知功能。会尽量使用开源、自部署的程序。自从看上了容器化和容器编排技术,我已经爱上了用开源项目自部署一堆服务,配合使用。 + +_日积月累,厚积薄发。_