技术分享 Public Site
这是一个使用hugo构建工具构建的静态网站,用于技术的分享,不涉及政治以及涉密资料。 This is a static website built using the hugo build tool, used for sharing technology, and does not involve politics or confidential information.
Visit Public Repositories!Latest Posts
Featured Pages
让Hugo主题能够灵活地显示文章的封面图片 😸
让 Hugo 主题能够灵活地显示文章的封面图片,并且希望它能同时支持两种主流的图片引用方式:1. **页面包 (Page Bundle)**:图片与 `.md` 文件存放在同一个目录下,路径只写文件名。2. **Static 目录**:图片存放在全局的 `static/images/` 目录下,路径写成根相对路径(如 `/images/cat-hacker.png`)。
2026年4月1日
使用自定义域名访问 GitLab 私有仓库
🎯 关键
一部分gitlab的配置可以通过在web端通过登录root用户进行admin修改。部分需要修改服务器下关于gitlab的配置文件。
Gitlab主要配置文件
一、GitLab 最核心的配置文件(99% 的修改都在这)
1. /etc/gitlab/gitlab.rb(主配置文件,必记!)
- 作用:GitLab 所有全局配置的「入口文件」,包括外部访问 URL、端口、存储路径、邮件、SSL、LDAP、内置组件(Nginx/PostgreSQL/Redis)等,是你唯一需要手动修改的配置文件。
- 特点:默认全是注释(
#开头),只需要取消注释并修改对应参数,无需手写配置;修改后不会立即生效,需要执行命令生成实际配置。 - 新手常用配置示例:
# 1. 设置GitLab外部访问地址(最基础配置)
external_url …2026年4月1日
在WSL2构建 GitLab 私有仓库
- 如果WSL2有多个ubuntu,如ubuntu22和ubunut24,只要有一个主机占用了gitlab所需要的端口,就不能正常使用gitlab。
- 尽量使用官方教程使用apt包管理工具进行安装。
- 使用docker部署gitlab在WSL2上很麻烦。
- 部署后,如果需要让别人访问部署再WSL2中的Gitlab,最好再配置一个frp服务器和一个frp客户端,使得其他人可以通过frp服务,通过公网IP进行访问WSL2(个人笔记本或台式机)上的Gitlab服务
- 关于frp的部署网上有很多教程,对于AI Agent 给出的部署方案,需要一定的鉴别能力,如果行不通果断看frp的部署教程视频,不要浪费太多时间。
2026年4月1日
Hugo Bootstrap Theme alpha
Hugo theme for a secure, blazing fast and SEO-ready static website, using Bootstrap 5.
2026年4月1日
Bootstrap Carousel 🎠
Bootstrap is bundled with tens of components that can be reused to provide a good user experience and user interactions in a web page.
2026年4月1日
Bootstrap Components ✨
Bootstrap is bundled with tens of components that can be reused to provide a good user experience and user interactions in a web page.
2026年4月1日
Security Best Practices 🔒
Improve code health of your web page following these best practices. Prevent security vulnerabilities
2026年4月1日