livebug / livebug.github.io Goto Github PK
View Code? Open in Web Editor NEWblogs by hugo geng
Home Page: https://livebug.github.io/
blogs by hugo geng
Home Page: https://livebug.github.io/
https://livebug.github.io/blogs/20240225-linux-proxy-common-questions/?
前提 你得有一个代理 我的场景是wsl,使用主机打开的 clash 代理
clash for windows 支持端口代理,所以在wsl中需要科学上网的场景可以走这个代理提高访问速度
理论可行,实现优点曲折。
小插曲,wsl2的网络模式与wsl1不一致,本质上是两台机器,通过网络链接,所以需要知道windows的IP,在wsl网络里的IP,
1# windows下执行 ipconfig即可看到 2> ipconfig 3以太网适配器 vEthernet (WSL (Hyper-V firewall)): 4 5 连接特定的 DNS 后缀 . . . . . . . : 6 本地链接 IPv6 地址. . . . . . . . : fe80::e4ec:39b6:69cb:8afe%42 7 IPv4 地址 . . . . . . . . . . . . : 172.31.192.1 8 子网掩码 . . . . .
https://livebug.github.io/blogs/20231014-add-gitalk/
https://livebug.github.io/blogs/20231014-hugo-new-content/
hugo new content
创建新的内容文件并自动设置日期和标题。它将根据提供的路径猜测要创建的文件类型。
1hugo new content [path] [flags] hugo 新建文章,基本就是路径加文件名的命令,并不能只写名字,自动补全时间戳这种,自己写一个吧
1# 基本新建命令 2hugo new blogs/xxxxx.md hugonew.sh 脚本
1post_name=$1 2post_name=echo $post_name | tr -s ''
# 去除多余空格 3post_name= echo ${post_name} | sed 's/[ ]/-/g'
# 替换空格为 - 4echo ${post_name} 5date_string=date +%Y%m%d
# 日期字符串 6date_string=date +%Y%m%d%H%M%S
# 毫秒字符串 7date 8hugo new blogs/${post_name}.md
1sh hugonew.sh "tests dsds SDASD " 2tests-dsds-SDASD 3Sat Oct 14 22:19:43 CST 2023 4Content "/home/sharif/myblog/content/blogs/tests-dsds-SDASD.
https://livebug.github.io/blogs/20231014-hugo-new-content/
hugo new content
创建新的内容文件并自动设置日期和标题。它将根据提供的路径猜测要创建的文件类型。
1hugo new content [path] [flags] hugo 新建文章,基本就是路径加文件名的命令,并不能只写名字,自动补全时间戳这种,自己写一个吧
1# 基本新建命令 2hugo new blogs/xxxxx.md hugonew.sh 脚本
1post_name=$1 2post_name=echo $post_name | tr -s ''
# 去除多余空格 3post_name= echo ${post_name} | sed 's/[ ]/-/g'
# 替换空格为 - 4echo ${post_name} 5date_string=date +%Y%m%d
# 日期字符串 6date_string=date +%Y%m%d%H%M%S
# 毫秒字符串 7date 8hugo new blogs/${post_name}.md
1sh hugonew.sh "tests dsds SDASD " 2tests-dsds-SDASD 3Sat Oct 14 22:19:43 CST 2023 4Content "/home/sharif/myblog/content/blogs/tests-dsds-SDASD.
https://livebug.github.io/blogs/20231008-diff-category-tags/
category是一级分类,type是二级分类。
Category:书面用词,指归属有确切定义的种类、类别或类目。买衣服要买衬衫,牛仔裤,帽子,鞋等,这些用Category.
Type:是常用词,侧重所属“类型“,指有相同本质特点的同类事物。衬衫要长袖,半袖,花格,白色,黑色等,这些用Type。
https://livebug.github.io/blogs/20231014-hugo-new-content/?
hugo new content
创建新的内容文件并自动设置日期和标题。它将根据提供的路径猜测要创建的文件类型。
1hugo new content [path] [flags] hugo 新建文章,基本就是路径加文件名的命令,并不能只写名字,自动补全时间戳这种,自己写一个吧
1# 基本新建命令 2hugo new blogs/xxxxx.md hugonew.sh 脚本
1post_name=$1 2post_name=echo $post_name | tr -s ''
# 去除多余空格 3post_name= echo ${post_name} | sed 's/[ ]/-/g'
# 替换空格为 - 4echo ${post_name} 5date_string=date +%Y%m%d
# 日期字符串 6date_string=date +%Y%m%d%H%M%S
# 毫秒字符串 7date 8hugo new blogs/${post_name}.md
1sh hugonew.sh "tests dsds SDASD " 2tests-dsds-SDASD 3Sat Oct 14 22:19:43 CST 2023 4Content "/home/sharif/myblog/content/blogs/tests-dsds-SDASD.
https://livebug.github.io/blogs/20230930-github-actions/
介绍背景:
博客网站myblog仓库底下有两个子库,一个子库是用来存储markdown文章的blogs仓库,一个是用来存储public内容的github pages库 livebug.github.io仓库
当博客网站样式更新提交,或者文章提交,触发myblog仓库的 actions ,执行完之后发布到pages仓库
开发myblog仓库的提交 actions 1# Sample workflow for building and deploying a Hugo site to GitHub Pages 2name: Deploy Hugo site to Pages 3 4on: 5 # Runs on pushes targeting the default branch 6 push: 7 branches: ["master"] 8 9 # Allows you to run this workflow manually from the Actions tab 10 workflow_dispatch: 11 12# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages 13permissions: 14 contents: read 15 pages: write 16 id-token: write 17 18# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.