hexo-blog-encrypt 插件无法加密很多主题的文章目录,我使用的 hexo-theme-yun 也是如此。这篇文章记录了如何解决这个问题。

Demo:

The hexo-blog-encrypt plugin can’t encrypt the table of contents for many themes, and the hexo-theme-yun I use is no exception. This article documents how to solve this problem.

Demo:

阅读更多
Wiki教程GitHubJS

对于博客内容加密这件事,在有后端服务器的情况下,是一件比较简单的事情,但是对于静态博客来说,就比较麻烦了。Hexo 博客里面有个非常著名的加密插件 hexo-blog-encrypt,它的大概原理是在 hexo g 的时候对 HTML 的内容进行加密,然后在输入正确的密码后解密出正确的 HTML 内容。

在插件的 issue 列表里面一个 Won’t fix 的 issue 里面提到一个问题是这个插件解密后导致 Dplayer 播放器显示不出来。

https://github.com/D0n9X1n/hexo-blog-encrypt/issues/190

最后的结论是受限于 Hexo 静态博客的特性,这个问题不会被修复。

Encrypting blog content is a fairly simple task when you have a backend server, but for static blogs it’s much more troublesome. There’s a very famous encryption plugin for Hexo blogs, hexo-blog-encrypt. Its rough principle: it encrypts the HTML content during hexo g, then decrypts it to reveal the correct HTML after the correct password is entered.

In the plugin’s issue tracker, a Won’t fix issue mentions that after decryption, the Dplayer player fails to display.

https://github.com/D0n9X1n/hexo-blog-encrypt/issues/190

The final conclusion was that, due to the nature of Hexo static blogs, this issue will not be fixed.

阅读更多
Wiki教程GitHubJS

本文编写一个简单的 Linux 内核模块,然后在 QEMU 中使用 insmod 加载模块, lsmod 查看模块信息, rmmod 卸载模块来进行测试工作。

实验环境在前文Linux Kernel 从编译到运行 和 为 Linux Kernel 添加系统调用 中已经准备好了,这里不再赘述。

编译模块的工作流程如下:

  1. 环境准备

  2. 编写模块代码

  3. 编写 Makefile

  4. 编译模块

  5. 加载、卸载测试

This article writes a simple Linux kernel module, then tests it in QEMU by loading it with insmod, checking its info with lsmod, and unloading it with rmmod.

The experimental environment was already prepared in Linux Kernel: From Compilation to Running and Adding a System Call to the Linux Kernel, so I won’t repeat it here.

The module compilation workflow is as follows:

  1. Environment preparation

  2. Writing the module code

  3. Writing the Makefile

  4. Compiling the module

  5. Load/unload testing

Wiki教程LinuxKernel

系统调用是用户空间和内核空间之间的接口,是用户程序与操作系统之间的桥梁。

Linux 内核提供了一系列的系统调用,用户程序可以通过这些系统调用来请求内核执行某些操作。

比如,open 系统调用用于打开一个文件,read 系统调用用于读取文件内容,write 系统调用用于写入文件内容等。

本文将介绍如何为 Linux Kernel 添加一个新的系统调用。

System calls are the interface between user space and kernel space, serving as the bridge between user programs and the operating system.

The Linux kernel provides a series of system calls that user programs can use to request the kernel to perform certain operations.

For example, the open system call opens a file, the read system call reads file content, and the write system call writes file content.

This article explains how to add a new system call to the Linux kernel.

Wiki教程LinuxKernel

本文记录如何在 Ubuntu 24.04 系统上编译和运行 Linux kernel.

主机配置如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
                         ./+o+-       wgxls@server
yyyyy- -yyyyyy+ OS: Ubuntu 24.04 noble
://+//////-yyyyyyo Kernel: x86_64 Linux 6.8.0-49-generic
.++ .:/++++++/-.+sss/` Uptime: 22h 2m
.:++o: /++++++++/:--:/- Packages: 1924
o:+o+:++.`..```.-/oo+++++/ Shell: bash
.:+o:+o/. `+sssoo+/ Resolution: 2560x1440
.++/+:+oo+o:` /sssooo. DE: GNOME 46.0.1
/+++//+:`oo+o /::--:. WM: Mutter
\+/+o+++`o++o ++////. WM Theme: Adwaita
.++.o+++oo+:` /dddhhh. GTK Theme: Yaru-purple-dark [GTK2/3]
.+.o+oo:. `oddhhhh+ Icon Theme: Yaru-purple
\+.++o+o``-````.:ohdhhhhh+ Font: Ubuntu Sans 11
`:o+++ `ohhhhhhhhyo++os: Disk: 701G / 2.3T (31%)
.o:`.syhhhhhhh/.oo++o` CPU: AMD Ryzen 7 4800U with Radeon Graphics @ 16x 1.8GHz
/osyyyyyyo++ooo+++/ GPU: AMD/ATI Renoir [Radeon RX Vega 6 (Ryzen 4000/5000 Mobile Series)]
````` +oo+++o\: RAM: 10147MiB / 15489MiB
`oo++.

This article documents how to compile and run the Linux kernel on Ubuntu 24.04.

Host configuration:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
                         ./+o+-       wgxls@server
yyyyy- -yyyyyy+ OS: Ubuntu 24.04 noble
://+//////-yyyyyyo Kernel: x86_64 Linux 6.8.0-49-generic
.++ .:/++++++/-.+sss/` Uptime: 22h 2m
.:++o: /++++++++/:--:/- Packages: 1924
o:+o+:++.`..```.-/oo+++++/ Shell: bash
.:+o:+o/. `+sssoo+/ Resolution: 2560x1440
.++/+:+oo+o:` /sssooo. DE: GNOME 46.0.1
/+++//+:`oo+o /::--:. WM: Mutter
\+/+o+++`o++o ++////. WM Theme: Adwaita
.++.o+++oo+:` /dddhhh. GTK Theme: Yaru-purple-dark [GTK2/3]
.+.o+oo:. `oddhhhh+ Icon Theme: Yaru-purple
\+.++o+o``-````.:ohdhhhhh+ Font: Ubuntu Sans 11
`:o+++ `ohhhhhhhhyo++os: Disk: 701G / 2.3T (31%)
.o:`.syhhhhhhh/.oo++o` CPU: AMD Ryzen 7 4800U with Radeon Graphics @ 16x 1.8GHz
/osyyyyyyo++ooo+++/ GPU: AMD/ATI Renoir [Radeon RX Vega 6 (Ryzen 4000/5000 Mobile Series)]
````` +oo+++o\: RAM: 10147MiB / 15489MiB
`oo++.
Wiki教程LinuxKernel

hexo-img-onerror 是一个为 Hexo 网站添加备用图片源的插件。License

故名思义,它的实现原理是为每一个 img 标签添加一个 onerror 事件,当图片加载失败时,会自动替换为备用图片。

如图所示:

hexo-img-onerror is a plugin that adds a fallback image source to Hexo websites. License

As its name suggests, it works by attaching an onerror event to every img tag: when an image fails to load, it is automatically replaced with the fallback image.

As shown below:

阅读更多
WikiGitHubJS