Total Pageviews

Sunday, 22 March 2026

hexo-theme-next

 

Elegant theme for Hexo.

notes.iissnan.com

The community-maintained version is here: NexT v6 and v7 

NexT is a high quality elegant Hexo theme. It is crafted from scratch, with love.

gitter-image mnt-image travis-image rel-image hexo-image lic-image

Live Preview

More NexT examples here.

Installation

1. Change dir to hexo root directory. There must be node_modules, source, themes and other directories:

$ cd hexo
$ ls
_config.yml  node_modules  package.json  public  scaffolds  source  themes

2. Get theme from GitHub. There are several variants to do it:

At most cases stable. Recommended for most users.

curl-tar-wget-image

$ mkdir themes/next
$ curl -s https://api.github.com/repos/iissnan/hexo-theme-next/releases/latest | grep tarball_url | cut -d '"' -f 4 | wget -i - -O- | tar -zx -C themes/next --strip-components=1

You must define version. Replace v5.1.2 with any version from tags list.

curl-tar-image

$ mkdir themes/next
$ curl -L https://api.github.com/repos/iissnan/hexo-theme-next/tarball/v5.1.2 | tar -zxv -C themes/next --strip-components=1

git-image

$ git clone --branch v5.1.2 https://github.com/iissnan/hexo-theme-next themes/next

May be unstable, but includes latest features. Recommended for developers.

curl-tar-image

$ mkdir themes/next
$ curl -L https://api.github.com/repos/iissnan/hexo-theme-next/tarball | tar -zxv -C themes/next --strip-components=1

git-image

$ git clone https://github.com/iissnan/hexo-theme-next themes/next

Clone command will give you the whole repository. And in any time you can switch to any tagged release.
Get tags list:

$ cd themes/next
$ git tag -l
…
v5.0.0
v5.0.1
v5.1.0
v5.1.1
v5.1.2

For example, you want to switch on v5.1.0 tagged release version. Input the following command:

$ git checkout tags/v5.1.0
Note: checking out 'tags/v5.1.0'.
…
HEAD now on 1f72f68... CSS: Remove global list-style setting of ul

And if you want to switch back on master branch, input this command:

$ git checkout master

3. Set theme in main hexo root config _config.yml file:

theme: next

Bugs

For those who also encounter Error: Cannot find module 'hexo-util' issue, please check your NPM version.

  • > 3: Still not work. Please remove node_modules directory and reinstall using npm install.
  • < 3: Please add hexo-util explicitly via npm install --save-dev hexo-util to you site package deps.

Update

$ cd themes/next
$ git pull

Bugs

Commit your changes or stash them before you can merge

You must Commit, Stash or Discard local changes. See here how to do it.

Theme configurations using Hexo data files (#328)

Currently, it is not smooth to update NexT theme from pulling or downloading new releases. It is quite often running into conflict status when updating NexT theme via git pull, or need to merge configurations manually when upgrading to new releases.

At present, NexT encourages users to store some options in site's _config.yml and other options in theme's _config.yml. This approach is applicable, but has some drawbacks:

  1. Configurations are splited into two pieces
  2. Users maybe confuse which place should be for options

In order to resolve this issue, NexT will take advantage of Hexo Data files. Because Data files is introduced in Hexo 3, so you need upgrade Hexo to 3.0 (or above) to use this feature.

If you prefer Hexo 2.x, you can still use the old approach for configurations. NexT is still compatible with Hexo 2.x.

Benefits

With this feature, now you can put all your configurations into one place (source/_data/next.yml), you don't need to touch next/_config.yml. If there are any new options in new releases, you just need to copy those options from next/_config.yml, paste into _data/next.yml and set their values to whatever you want.

How to use this feature

  1. Please ensure you are using Hexo 3 (or above)
  2. Create an file named next.yml in site's source/_data directory (create _data directory if it did not exist)
  3. Copy NexT theme options both in site's _config.yml and theme's _config.yml into next.yml.
  4. Use --config source/_data/next.yml parameter to start server, generate or deploy.
    For example: hexo clean --config source/_data/next.yml && hexo g --config source/_data/next.yml.

FROM  https://github.com/iissnan/hexo-theme-next

-------

相关帖子: https://briteming.blogspot.com/2013/06/linux-vps-hexo.html

Saturday, 21 March 2026

通用的运行环境版本管理神器ASDF

一款适合个人或团队开发使用的通用运行环境版本管理神器 ASDF。与高性能计算任务不同,个人或团队开发项目一般来说都是使用独立的设备或环境,然后通过代码版本跟踪 git 等来进行异步协作。所以说,在每个人的单个或多个设备上都安装配置 Modules 显得有点不太现实和高效。但是项目开发所需的代码环境确实有的时候可能比较复杂,比如说同时需要 Ruby、NodeJS、Java、Python 四种环境,而且可能对于每种环境还有版本的限制。这样一来,光配置这一堆环境就要花上大半天时间了。

ASDF 简介

  ASDF 提供了全平台通用的环境配置方案,使用单个命令行工具和交互界面就可以管理超复杂的运行环境。以往针对不同运行环境,需要使用不同的配置文件来进行版本的声明。对于 ASDF,只需要一个可共享的 .tool-versions 配置文件即可。ASDF 涵盖了包括 Ruby、NodeJS、Java、PHP、.Net 在内的几百种运行环境,具体可以查看 ASDF 插件列表 了解更多。

  另外,ASDF 完全支持包括 Bash、Zsh、Fish 和 Elvish 在内的常用 shell 类型,并提供补全功能。在类似 Github Actions 等的 CI/CD 工作流中,也可以轻松使用 ASDF。值得一提的是,笔者翻译了 ASDF 文档的中文版本并被官方采纳,现在 ASDF 官网支持英语、巴西语和中文三种语言。

为何不选其他方案

Docker

  很显然,如果大家的设备上都有 Docker 环境且 CPU 架构相同的话,Docker 无疑是最省心的方案。Docker 镜像的确可以轻松涵盖所有开发环境和实际运行环境(Apache 等 HTTP 服务器、数据库以及其他)。相比笨重的 VMware 或 Virtualbox 虚拟机镜像而言,Docker 镜像也更加小巧、便捷。而且团队可以通过在内部搭建自己的 Docker 镜像仓库,来分享这些镜像给所有参与项目的开发者。唯一可能会有问题的是,设备 CPU 架构和操作系统的多样性可能会给实际操作带来了不小的问题。实际上可能会有 Windows 系统、Linux 系统、MacOS 系统以及 Intel 架构、AMD 架构、ARM 架构(如 M1、M2 等)。可行的解决方法是,尽可能地构建更多架构的镜像。

Anaconda

  Anaconda 现在可能已经完全超出了一个 Python 环境管理工具,有的时候也可以当成通用软件或环境管理器来用。但是毕竟还是以科学计算为主要目的,如果项目仅仅是 Python、R 语言可能还是比较合适的,对于实际编程所需的其他运行环境来说可能还是支持不够的。

小提示

  据笔者所知,在 conda-forge 频道里的确有 PHP 等编程语言的支持。除此之外,也有一些热心开发者在个人频道提供了 java-jdk、golang 等编程环境支持。

云开发

  云开发主要是指基于云基础设施的在线代码开发环境,主要的代表有:

  • Cloud9:笔者最早接触过的云开发,目前已被 AWS 收购,更名为 AWS Cloud9。
  • Codespaces:由 Azure 提供云服务、Github 负责运营的一站式云开发环境。
  • Gitpod:基于 VS Code 研发的优秀云开发环境,早期以“便捷、快速”著称,较先于 Codespaces 出现。
  • Cloud Studio:由腾讯云提供云服务、基于 VS Code 的国产云开发环境,能够很好地支持个人开发、招聘笔试、课堂教学、应用快捷部署等各种场景。
  • CodeArts IDE Online:由华为云提供云服务、基于 VS Code 的国产云开发环境。除了一般云开发所具备的特点,还支持华为鲲鹏原生环境,能够很好地满足跨架构应用开发的需求。
  • DevStudio:由阿里云提供云服务、基于 VS Code 的国产云开发环境。支持应用开发全流程管理,与阿里云各项基础服务紧密结合,适合大规模团队使用。

除了以上列举的云开发之外,也有一些比较传统的小型云开发实践,比如说知名的 JSFiddleCodePenReplit 等。虽然说这些云开发主要是适合较小代码库,但在实际学习过程中用处也是很大的。

  云开发不仅兼顾了传统开发过程中的协同与流程,又将资源与环境整合在云里面,自然而然是最好的解决方案。随着 VS Code 在开发者之间的流行和云服务提供商的努力,基于 VS Code 的云开发环境层出不穷。即使云开发环境本身免费,云也还是要按量按时计费的。对于还没有足够支持上云的团队或个人来说,ASDF 依然是个不错的选择。

实践

环境需求

  • Linux/Unix 环境(Linux、MacOS、Windows WSL)
  • git
  • bash 等(此处以 zsh 为例)

环境配置:

# 下载源码到 ~/.asdf 目录
git clone https://github.com/asdf-vm/asdf ~/.asdf --branch v0.11.3

# 在 ~/.zshrc 文件中加入内容
tee -a ~/.zshrc << EOF
. "$HOME/.asdf/asdf.sh"
EOF

# 激活配置
source ~/.zshrc

# 验证
╰─$ asdf version
v0.11.3-0adc6c1

 安装插件

  由于 ASDF 支持插件较多,这里以 Python 环境为例介绍安装ASDF的插件:

# 添加插件
asdf plugin add python

# 查看已安装插件
╰─$ asdf plugin list


# 查看最新 Python 版本
╰─$ asdf latest python
3.11.2

# ASDF 安装 Python 3.11.2 (latest)
╰─$ asdf install python latest
python-build 3.11.2 /home/ubuntu/.asdf/installs/python/3.11.2
Downloading Python-3.11.2.tar.xz...
-> https://www.python.org/ftp/python/3.11.2/Python-3.11.2.tar.xz
Installing Python-3.11.2...
Installed Python-3.11.2 to /home/ubuntu/.asdf/installs/python/3.11.2

# 查看已安装 Python 版本列表
╰─$ asdf list
python
  3.11.2

使用
  ASDF 提供全局版本(Global)和本地版本(Local)两种方式定义运行环境版本。全局版本是系统级别的,类似于 PATH 变量中定义的;本地版本则是为了某个代码库或者部分代码准备的,通常在目录中的 .tool-versions 文件里定义。为了区分全局和本地的效果差别,这里再安装一个指定 Python 版本:

# 查询 Python 插件支持的所有版本
╰─$ asdf list all python
2.1.3
2.2.3
......
stackless-3.7.5

# 安装 Python 3.9.0
╰─$ asdf install python 3.9.0
python-build 3.9.0 /home/zhonger/.asdf/installs/python/3.9.0
Downloading Python-3.9.0.tar.xz...
-> https://www.python.org/ftp/python/3.9.0/Python-3.9.0.tar.xz
Installing Python-3.9.0...
patching file Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
patching file configure
patching file configure.ac
Installed Python-3.9.0 to /home/zhonger/.asdf/installs/python/3.9.0

# 查看已安装 Python 版本列表
╰─$ asdf list
python
  3.11.2
  3.9.0

# 查看当前系统 Python 及 Python3 版本
╰─$ python -V
No python executable found for python system

╰─$ python3 -V
Python 3.10.6

# 更改全局版本为 3.11.2 并查看
╰─$ asdf list
python
 *3.11.2
  3.9.0

╰─$ python -V
Python 3.11.2

# 创建子目录指定本地版本并查看
mkdir py && cd py
asdf local python 3.9.0

╰─$ python -V
Python 3.9.0

# 返回父目录查看 Python 版本
╰─$ cd .. && python -V
Python 3.11.2

# 查看当前系统 Python3 版本
╰─$ python3 -V
Python 3.10.6

小提示
  这里有一点比较有趣的是:由于 ASDF 接管的 python 命令而非 python3 命令,所以 python3 命令输出的版本依然还是系统安装版本。
其他相关

  如果想要恢复到系统指定版本,可以很容易使用 asdf global python system 命令。当然,对于本地版本,可以使用 asdf local python system 来实现。除此之外,还有一些常规操作如下:

# 查看 Python 指定版本安装位置
╰─$ asdf where python 3.11.2
/home/zhonger/.asdf/installs/python/3.11.2

# 查看命令所在位置
╰─$ asdf which python
/home/zhonger/.asdf/installs/python/3.11.2/bin/python

# 查看当前 ASDF 管理的运行环境
╰─$ asdf current
python          3.11.2          /home/ubuntu/.tool-versions

# 查看全局和本地版本配置文件
╰─$ cat ~/.tool-versions
python 3.11.2

╰─$ cat ~/py/.tool-versions
python 3.9.0

参考资料

https://asdf-vm.com/zh-hans/guide/getting-started.html

https://asdf-vm.com/zh-hans/manage/versions.html











部署Jekyll的主题程序jth(支持分页)

 首先fork这个项目https://github.com/zhonger/jekyll-theme-H2O-ac,我fork后,得到的项目地址是https://github.com/briteming/jth

然后在此处 https://github.com/briteming/jth/tree/master/_posts 新建源帖2026-03-21-fh.md ,内容为:

---
layout: post
title: '战马'
date: 2026-03-21T15:21:00
cover: 'https://images.unsplash.com/photo-1653629154302-8687b83825e2'
tags: 
- misc1
- misc2
---

此处写正文或html代码

(详见 https://github.com/briteming/jth/blob/master/_posts/2026-03-21-fh.md?plain=1)

然后访问vercel.com/new,导入项目https://github.com/briteming/jth。点击import按钮,

然后在跳到的页面里,输入 Build Command的值:jekyll build

输入 Output Directory的值:_site

然后点击deploy按钮,等待部署完成。如图:


 部署完成后,我得到网址https://jth.vercel.app/

 项目地址:

 https://github.com/zhonger/jekyll-theme-H2O-ac

 https://github.com/briteming/jth

博客地址: 

https://jth.vercel.app/

https://jth.vercel.app/blog/index.html

我这是第一次 部署Jekyll主题程序到vercel平台

--------------------------------------------------------

 https://github.com/briteming/hpgi/

 https://hpgi.vercel.app/

----------------------------------------------------- 

 

中國三年前的布局,救了現在的伊朗一命

 

老电影-绿海天涯,王心刚/王馥荔/吴海燕主演

 https://www.bilibili.com/video/BV1xbsEzkEXw/

 王心刚/王馥荔/吴海燕,这些人是当年的俊男美女。

在线网页记事本工具

 https://wordpad.cc/
    一个非常简单的在线记事本,界面干净,没有广告,服务端存储,如果需要记录敏感信息,需要谨慎。这个记事本工具支持生成分享链接和设置访问密码,也算一层屏障。

 https://www.memonotepad.com/
    很复古风格的一个在线记事本工具,木纹材质的背景,写东西非常舒适,支持创建多条笔记,以及简单的搜索。在未登录状态下,仅支持浏览器本地存储,刷新页面内容也不会丢失。也可以选择创建用户来保存到笔记工具的服务器上


https://dictation.io/speech
    这个网页笔记本工具支持简单的排版,比如加粗,颜色,项目符号,不过它的特色是语音输入功能,使用的 Google 语音输入,支持的语言不少,不过识别率可能没有专门的语音输入应用那么高。如果仅仅编辑笔记,这个工具并不会保存你的内容到服务器,只是浏览器本地存储,不过如何使用语音输入,因为用到 Google 服务,所以可能会有数据传输。

https://shrib.com/
    一个非常简洁的在线记事本软件,它支持简单的文本编辑(支持 Markdown 语法),并且支持自动保存到云端,会为每个笔记生成一个永久链接,方便分享给别人查看和修改,如果你需要记录隐私敏感的信息,这点需要格外注意。

https://notepad-online.com/en/
    简洁的在线记事本工具,支持简单的富文本样式,它有两个版本,新版本支持建立多条笔记和更换页面配色和字体等,两个版本都使用浏览器本地存在,刷新页面数据并不会丢失,你的数据是你自己的。

https://notepad.js.org/
    功能非常强大的网页记事本工具,干净无广告,支持简单的字体段落和背景材质定制,笔记完全使用浏览器本地存储,数据安全,刷新页面数据也不会丢失,甚至支持离线模式,断网也能使用,支持全屏模式和专注模式,相比其它笔记本工具,它还支持画中画模式,可以在桌面右下角显示浮动小窗口,方便在其它标签页或者应用打开时记录笔记;支持计时器和白噪音,



Thursday, 19 March 2026

r2-webdav

Use Cloudflare Workers to provide a WebDav interface for Cloudflare R2. 

Deploy to Cloudflare Workers

Currently the server advertises WebDAV Class 1 and Class 2 (LOCK/UNLOCK) support.

Usage

Change wrangler.toml to your own.

[[r2_buckets]]
binding = 'bucket' # <~ valid JavaScript variable name, don't change this
bucket_name = 'webdav'

Then use wrangler to deploy.

wrangler deploy

wrangler secret put USERNAME
wrangler secret put PASSWORD

Development

With wrangler, you can run and deploy your Worker with the following commands:

# run your Worker in an ideal development workflow (with a local server, file watcher & more)
$ npm run dev

# deploy your Worker globally to the Cloudflare network (update your wrangler.toml file for configuration)
$ npm run deploy

Test

Use litmus to test.

GitHub Actions runs the basic, copymove, props, and locks litmus suites against wrangler dev --local. The http suite is currently excluded because local Workers runs still time out on the interim Expect: 100-continue response check.

from  https://github.com/abersheeran/r2-webdav