Skip to content

Commit 22fd404

Browse files
author
zhihong
committed
second commit
1 parent a3f476c commit 22fd404

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
title: "建站记录"
3+
last_modified_at: 2024-09-29T11:12:02
4+
categories:
5+
- Blog
6+
tags:
7+
---
8+
## 2024年9月27日
9+
 首次搭建起个人博客。照着网上的教程来,有时也会一头雾水,幸好,功夫不负有心人,终于搭建好了。完事之后,总结一下博客搭建的技术原理和框架,以便日后回顾。
10+
11+
**技术原理:**
12+
13+
 搭建个人博客最基本的一点是需要一个机器,可以保存和发布自己的博客。其次若想将自己的博客在网络上公开,要使该机器可以访问互联网,此时就可以在浏览器中输入`IP`地址和端口号访问自己博客了。接着若想通过名字访问博客,需要购买一个域名,将`IP`地址和域名映射。之后,若想降低你的博客网站被`Hacker`攻击的风险,可以申请一个`SSL`证书,以此来增强网站安全性。
14+
15+
**框架搭建:**
16+
17+
- [`Github`][Github]:保存、发布和公开自己的博客。
18+
- [`namesilo`][Namesilo]:注册域名
19+
- [`Cloudflare`][Cloudflare]:域名映射,并支持[`SSL`][SSL]
20+
- [`Jekyll`][Jekyll]:博客生成。
21+
22+
[Github]:https://github.com/
23+
[Namesilo]:https://www.namesilo.com/
24+
[Cloudflare]:https://www.cloudflare-cn.com/
25+
[Jekyll]:https://jekyllrb.com/
26+
[SSL]:https://wiki.openssl.org/index.php/SSL_and_TLS_Protocols
27+
28+
## 2024年9月30日
29+
 最近尝试使用Github Action来自动完成博客的发布,但在部署中遇到了点问题,网上看到了[两种解决方式](https://github.com/github/pages-gem/issues/399),但都对我都不起效果。部署中问题如下:
30+
```shell
31+
Run bundle exec jekyll build --baseurl ""
32+
bundle exec jekyll build --baseurl ""
33+
shell: /usr/bin/bash -e {0}
34+
env:
35+
GITHUB_PAGES: true
36+
JEKYLL_ENV: production
37+
To use retry middleware with Faraday v2.0+, install `faraday-retry` gem
38+
Configuration file: /home/runner/work/upupupCoder.github.io/upupupCoder.github.io/_config.yml
39+
Source: /home/runner/work/upupupCoder.github.io/upupupCoder.github.io
40+
Destination: /home/runner/work/upupupCoder.github.io/upupupCoder.github.io/_site
41+
Incremental build: disabled. Enable with --incremental
42+
Generating...
43+
Remote Theme: Using theme mmistakes/minimal-mistakes
44+
Jekyll Feed: Generating feed for posts
45+
GitHub Metadata: No GitHub API authentication could be found. Some fields may be missing or have incorrect data.
46+
GitHub Metadata: Error processing value 'url':
47+
Liquid Exception: No repo name found. Specify using PAGES_REPO_NWO environment variables, 'repository' in your configuration, or set up an 'origin' git remote pointing to your github.com repository. in /_layouts/single.html
48+
ERROR: YOUR SITE COULD NOT BE BUILT:
49+
------------------------------------
50+
No repo name found. Specify using PAGES_REPO_NWO environment variables, 'repository' in your configuration, or set up an 'origin' git remote pointing to your github.com repository.
51+
Error: Process completed with exit code 1.
52+
```
53+
 有点不太没明白,为啥执行任务时,会报这个错误,`jekyll.yml`文件时由`Github Action`自动生成的,不应该出错误啊。搞了1天,真没办法😤。
54+
55+
 先通过`Deploy from a branch`来进行博客发布吧!这个问题之后再来解决,感觉解决这个问题,需要熟悉一下[`liquid`][liquid][`Github Action`][github action][`workflow`][github workflow]
56+
57+
 若有盆友有此法解决这个问题,请及时告知我,不胜感激!
58+
59+
 Thank you :)
60+
61+
[liquid]:https://liquid.bootcss.com/#:~:text=Liquid%20%E6%98%AF%E4%B8%80%E9%97%A8
62+
[github action]:https://docs.github.com/en/actions
63+
[github workflow]:https://docs.github.com/en/actions/writing-workflows
64+
65+
## 待更新
66+
## 未来计划:
67+
68+
- 中英文支持
69+
- 页面美化
70+

0 commit comments

Comments
 (0)