-- [CST 2026-10-30 Friday 21:00:32]
This commit is contained in:
biss committed 2026-10-30 21:00:32 +08:00
commit 72637c0b6d
164 files changed
+65653

No files matched your search

+1
View File
@@ -0,0 +1 @@
{"title":"在Openwrt中安装OpenClash","slug":"2b2fb1a7","url":"https://blog.biss.click/posts/2b2fb1a7/","date":"2025-09-02T21:00:00.000Z","updated":null,"summary":"这篇文章详细介绍了在OpenWrt系统中安装OpenClash的过程。作者通过Web管理页面和终端命令两种方式进行了安装,并强调了推荐启用Smart内核。安装完成后,作者提到了配置步骤,包括下载内核和导入配置文件,最后表达了对于zashboard界面简洁美观的个人喜好。整篇文章内容连贯,条理清晰,为读者提供了完整的安装指南。","tags":["Openwrt","Openclash"],"categories":["技术"],"series":null,"seriesOrder":null,"contentFormat":"text/markdown","content":"# 前言\n因为一直想要实现从软路由上进行代理,所以买到了一个Cudy Tr3000刷系统折腾。用这篇文章记录一下安装的过程。\n# 安装\n可以通过web管理页面安装,搜索openclash。\n\n<center><img src=\"https://pic.biss.click/i/2025/09/02/z5y0d1.png\" alt=\"image\" /></center>\n\n当然也可以在终端中执行命令:\n\n```bash\nopkg update\nopkg install bash iptables dnsmasq-full curl ca-bundle ipset ip-full iptables-mod-tproxy iptables-mod-extra ruby ruby-yaml kmod-tun kmod-inet-diag unzip luci-compat luci luci-base\nopkg install luci-app-openclash\n```\n# 配置\n首先需要下载内核,推荐启用Smart内核。\n\n<center><img src=\"https://pic.biss.click/i/2025/09/02/zcllg4.png\" alt=\"image\" /></center>\n\n然后导入配置:\n\n<center><img src=\"https://pic.biss.click/i/2025/09/02/zdut38.png\" alt=\"image\" /></center>\n\n然后就可以开心使用啦!\n感觉zashboard简洁好看一些,看自己感觉啦\n<center><img src=\"https://pic.biss.click/i/2025/09/02/zfix7i.png\" alt=\"image\" /></center>"}
+1
View File
@@ -0,0 +1 @@
{"title":"自定义分类条","slug":"33249733","url":"https://blog.biss.click/posts/33249733/","date":"2025-08-14T16:25:49.000Z","updated":null,"summary":"这篇文章介绍了如何在博客系统中自定义分类栏的设计和实现过程。首先,通过Pug模板语言创建了一个名为categoryBar.pug的文件,用于定义分类栏的结构和样式。接着,在Stylus样式文件category-bar.styl中详细定义了分类栏的样式,包括内边距、背景颜色、边框圆角等,并设置了滚动条的样式。最后,在JavaScript文件main.js中添加了一个setCategoryBarActive函数,用于根据当前页面路径自动激活相应的分类项。此外,还讨论了如何将自定义的分类栏集成到主题中,并提供了相关的Pug混入代码。整个过程确保了分类栏的可定制性和易维护性。","tags":["网站"],"categories":["建站手札"],"series":"webcustom","seriesOrder":null,"contentFormat":"text/markdown","content":"{% note warning %}\n注意:本文为早期 Hexo / Butterfly 魔改记录,本站现已迁移到 Astro,相关代码、路径或插件可能已经失效,仅作历史参考。\n{% endnote %}\n\n{% note warning 1 %}\n修改有风险,请注意备份\n{% endnote %}\n今天来自定义分类条\n# 添加pug\n新建文件`[BlogRoot]\\themes\\butterfly\\layout\\includes\\categoryBar.pug`文件,写入:\n```pug\n.category-bar-items#category-bar-items(class=is_home() ? 'home' : '')\n .category-bar-item(class=is_home() ? 'select' : '', id=\"category-bar-home\")\n a(href=url_for('/'))= __('博客首页')\n each item in site.categories.find({ parent: { $exists: false } }).data\n .category-bar-item(class=select ? (select === item.name ? 'select' : '') : '', id=item.name)\n a(href=url_for(item.path))= item.name\n .category-bar-item\n a(href=url_for('/archives/'))= __('文章存档')\ndiv.category-bar-right\n a.category-bar-more(href=url_for('/categories/'))= __('更多分类')\n```\n# 样式文件\n以上就是该滚动条的结构,下面我们开始实现样式的定义,新建文件`[BlogRoot]\\themes\\butterfly\\source\\css\\_layout\\category-bar.styl`写入以下文件:\n\n```scss\n#category-bar\n padding 7px 11px\n background var(--card-bg)\n border-radius 8px\n display flex\n white-space nowrap\n overflow hidden\n transition 0.3s\n height 50px\n width 100%\n justify-content space-between\n user-select none\n align-items center\n margin-bottom 20px\n\n .category-bar-right\n display flex\n border-radius 8px\n align-items center\n\n .category-bar-more\n margin-left 4px\n margin-right 4px\n font-weight 700\n border-radius 8px\n padding 0 8px\n\n .category-bar-items\n width 100%\n white-space nowrap\n overflow-x scroll\n scrollbar-width: none\n -ms-overflow-style: none\n overflow-y hidden\n display flex\n border-radius 8px\n align-items center\n height 30px\n\n &::-webkit-scrollbar\n display: none\n\n .category-bar-item\n a\n padding .1rem .5rem\n margin-right 6px\n font-weight 700\n border-radius 8px\n display flex\n align-items center\n height 30px\n\n &.select\n a\n background #3eb8be\n color var(--btn-color)\n```\n# 添加js\n打开`[BlogRoot]\\themes\\butterfly\\source\\js\\main.js`,添加js函数,`refreshFn`函数的上面:\n```js\n const setCategoryBarActive = () => {\n const categoryBar = document.querySelector(\"#category-bar\");\n const currentPath = decodeURIComponent(window.location.pathname);\n const isHomePage = currentPath === GLOBAL_CONFIG.root;\n\n if (categoryBar) {\n const categoryItems = categoryBar.querySelectorAll(\".category-bar-item\");\n categoryItems.forEach(item => item.classList.remove(\"select\"));\n\n const activeItemId = isHomePage ? \"category-bar-home\" : currentPath.split(\"/\").slice(-2, -1)[0];\n const activeItem = document.getElementById(activeItemId);\n\n if (activeItem) {\n activeItem.classList.add(\"select\");\n }\n }\n};\n```\n引用函数\n```js\nwindow.refreshFn = function () {\n initAdjust()\n\n if (GLOBAL_CONFIG_SITE.isPost) {\n GLOBAL_CONFIG.noticeOutdate !== undefined && addPostOutdateNotice()\n GLOBAL_CONFIG.relativeDate.post && relativeDate(document.querySelectorAll('#post-meta time'))\n } else {\n GLOBAL_CONFIG.relativeDate.homepage && relativeDate(document.querySelectorAll('#recent-posts time'))\n GLOBAL_CONFIG.runtime && addRuntime()\n addLastPushDate()\n toggleCardCategory()\n setCategoryBarActive() // 自己加的,用于切换类别栏目\n }\n```\n# 添加到主题\n修改`[BlogRoot]\\themes\\butterfly\\layout\\includes\\mixins\\indexPostUI.pug`,添加\n```diff\nmixin indexPostUI()\n - const indexLayout = theme.index_layout\n - const masonryLayoutClass = (indexLayout === 6 || indexLine truncated
+1
View File
@@ -0,0 +1 @@
{"title":"安装gitea","slug":"34725d47","url":"https://blog.biss.click/posts/34725d47/","date":"2026-02-07T06:32:04.000Z","updated":null,"summary":"这篇文章详细介绍了如何在2C2G的服务器上安装Gitea,包括获取二进制文件、创建用户和工作目录、创建系统服务、创建数据库以及安装Runner等步骤。Gitea作为一个轻量级的自助Git服务,适合用于托管网站源码。文章还提供了关于如何配置反向代理和数据库的信息,以及如何使用Docker运行Gitea Runner以实现GitHub Actions功能。通过这些步骤,用户可以在自己的服务器上成功部署Gitea,并利用其进行版本控制和自动化工作流程。","tags":["gitea"],"categories":["技术"],"series":null,"seriesOrder":null,"contentFormat":"text/markdown","content":"今天想把网站的源码转移到自建git仓,所以先来安装gitea吧(gitlab过于庞大,服务器配置不够)\nPS:我的服务器为2C2G\n\n# 安装gitea\n这里用二进制文件安装\n## 获取二进制文件:\n```bash\nwget -O gitea https://dl.gitea.com/gitea/1.25.4/gitea-1.25.4-linux-amd64\nchmod +x gitea\ncp gitea /usr/local/bin/gitea\n```\n\n## 创建用户\n这一步不是必须的,但是推荐这样,用root用户很容易出问题。\n\n```bash\n# On Ubuntu/Debian:\nadduser \\\n --system \\\n --shell /bin/bash \\\n --gecos 'Git Version Control' \\\n --group \\\n --disabled-password \\\n --home /home/git \\\n git\n\n# On Fedora/RHEL/CentOS:\ngroupadd --system git\nadduser \\\n --system \\\n --shell /bin/bash \\\n --comment 'Git Version Control' \\\n --gid git \\\n --home-dir /home/git \\\n --create-home \\\n git\n```\n\n## 创建工作目录\n\n```bash\nmkdir -p /var/lib/gitea/{custom,data,log}\nchown -R git:git /var/lib/gitea/\nchmod -R 750 /var/lib/gitea/\nmkdir /etc/gitea\nchown root:git /etc/gitea\nchmod 770 /etc/gitea\nchmod 750 /etc/gitea\nchmod 640 /etc/gitea/app.ini\n```\n\n## 创建系统服务\n\n直接把github上面的挪过来就可以\n\n{% link service文件,github,https://github.com/go-gitea/gitea/blob/release/v1.25/contrib/systemd/gitea.service %}\n\n然后注册服务并启动\n```bash\nsudo systemctl enable gitea\nsudo systemctl start gitea\n```\n\n## 创建数据库\n可以用MySQL数据库或者PostgreSQL,创建一个数据库在web页面填写进去就行。\n\n反向代理略过,和普通网站的反向代理配置没有什么区别。\n\n# 安装runner\n这个runner也不是必须的,是为了实现github的action功能;在2C2G服务器上我看运行的还可以,当然,只是这个hexo博客的自动构建,占用资源也少;\n使用doker,这也是官方建议。以下是compose文件:\n\n```yaml\n\nservices:\n runner:\n image: gitea/act_runner:latest\n ports:\n - 8088:8088\n environment:\n - CONFIG_FILE=/config.yaml\n - GITEA_INSTANCE_URL=https://git.biss.click\n - GITEA_RUNNER_REGISTRATION_TOKEN= #替换成自己的token\n volumes:\n - ./config.yaml:/config.yaml\n - ./data:/data\n - /var/run/docker.sock:/var/run/docker.sock # 允许 Runner 调用宿主机 Docker\n\n```\ntoken在管理后台 工作流-运行器-新建运行器获取\nconfig文件需要这样生成\n\n```bash\ndocker run --entrypoint=\"\" --rm -it docker.io/gitea/act_runner:latest act_runner generate-config > config.yaml\n```\n\n在后台工作流运行器可以看见就没问题了。"}
Loaded 3 of 164 files, more files were not shown because too many files have changed in this diff. Show more