change internal link to relative

try highlight
rm remote Source Serif
This commit is contained in:
dongdigua 2023-02-11 13:50:46 +08:00
parent ae90146ba9
commit c9993bddeb
6 changed files with 100 additions and 30 deletions

View File

@ -52,6 +52,7 @@ jobs:
cd _site && tree
sudo ./patches/icons.sh
sudo ./patches/color.sh
sudo patch -p1 < ./patches/bbs_gbk_utf8-highlight-adwaita.patch
- name: Upload artifact
uses: actions/upload-pages-artifact@v1

View File

@ -9,19 +9,6 @@ https://github.com/rgb-24bit/org-html-theme-list org-joshua
font-style: normal;
}
@font-face{ /* FROM https://tlakh.xyz */
font-family: Source Serif;
font-display: auto;
src: url(https://cdn.jsdelivr.net/npm/@fontsource/source-serif-4@4.5.16/files/source-serif-4-all-400-normal.woff) format('woff');
font-style: normal;
}
@font-face{
font-family: Source Serif;
font-display: auto;
src: url(https://cdn.jsdelivr.net/npm/@fontsource/source-serif-4@4.5.16/files/source-serif-4-all-400-italic.woff) format('woff');
font-style: italic;
}
@media all
{
body {

View File

@ -4,7 +4,7 @@
* What Happened
After switching to f37, something changed:
- [[https://dongdigua.github.io/wayland#dm][sddm]] don't work
- [[./wayland.org::#dm][sddm]] don't work
- sway don't have environment variables
- v2rayA don't start automatically

View File

@ -17,20 +17,6 @@
(require 'ox)
(require 'webfeeder))
;; https://emacs.stackexchange.com/questions/36366/disable-auto-id-generation-in-org-mode-html-export
;; BUG: will cause toc not working, but I don't use much, so just add id manually
(defun html-body-id-filter (output backend info)
"Remove random ID attributes generated by Org."
(when (eq backend 'html)
(replace-regexp-in-string
" href=\"#org[[:alnum:]]\\{7\\}\""
""
(replace-regexp-in-string
" id=\"[[:alpha:]-]*org[[:alnum:]]\\{7\\}\""
""
output t)
t)))
(add-to-list 'org-export-filter-final-output-functions 'html-body-id-filter)
(setq org-html-validation-link nil
org-export-with-toc 1
@ -63,6 +49,7 @@
:html-postamble t
)))
;; from .emacs
(defun my/orgurl (proto)
(defvar proto proto) ;; important
@ -74,6 +61,22 @@
(my/orgurl "gopher")
(my/orgurl "gemini")
;; https://emacs.stackexchange.com/questions/36366/disable-auto-id-generation-in-org-mode-html-export
;; BUG: will cause toc not working, but I don't use much, so just add id manually
(defun html-body-id-filter (output backend info)
"Remove random ID attributes generated by Org."
(when (eq backend 'html)
(replace-regexp-in-string
" href=\"#org[[:alnum:]]\\{7\\}\""
""
(replace-regexp-in-string
" id=\"[[:alpha:]-]*org[[:alnum:]]\\{7\\}\""
""
output t)
t)))
(add-to-list 'org-export-filter-final-output-functions 'html-body-id-filter)
(defun myweb-publish ()
"Publish myweb."
(interactive)

View File

@ -231,7 +231,7 @@ kern.utc_offset=480
* Daily?
弄了那么多, 现在可以算是日常使用了
** [[https://dongdigua.github.io/mailinglist][mail]]
** [[./mailinglist.org][mail]]
** 性能调优
:PROPERTIES:
@ -283,7 +283,7 @@ iwx0 at pci0 dev 20 function 3 "Intel Wi-Fi 6 AX201" rev 0x20, msix
我有时候会想访问 Linux 上的文件, 但是似乎不支持 btrfs...
** [[https://dongdigua.github.io/bbs_gbk_utf8][支线任务: 中文 BBS GBK 转 UTF8]]
** [[./bbs_gbk_utf8.org][支线任务: 中文 BBS GBK 转 UTF8]]
* Footnotes

View File

@ -0,0 +1,79 @@
--- ../bbs_gbk_utf8.html 2023-02-11 13:09:55.659432422 +0800
+++ bbs_gbk_utf8.html 2023-02-11 13:29:23.784185878 +0800
@@ -236,49 +236,49 @@
<div class="org-src-container">
-<pre class="src src-C"><span style="font-weight: bold;">#include</span> <span style="font-style: italic;">&lt;stdio.h&gt;</span>
-<span style="font-weight: bold;">#include</span> <span style="font-style: italic;">&lt;iconv.h&gt;</span>
+<pre class="src src-C"><span style="color: #e67e80;">#include</span> <span style="color: #4E9A06;">&lt;stdio.h&gt;</span>
+<span style="color: #e67e80;">#include</span> <span style="color: #4E9A06;">&lt;iconv.h&gt;</span>
-<span style="font-weight: bold;">#define</span> <span style="font-weight: bold; font-style: italic;">UTF8_SIZE</span> 4
+<span style="color: #e67e80;">#define</span> <span style="color: #0084C8; font-weight: bold;">UTF8_SIZE</span> 4
-<span style="font-weight: bold; text-decoration: underline;">int</span>
-<span style="font-weight: bold;">convert_one</span>(<span style="font-weight: bold; text-decoration: underline;">iconv_t</span> <span style="font-weight: bold; font-style: italic;">cd</span>)
+<span style="color: #2F8B58; font-weight: bold;">int</span>
+<span style="color: #00578E; font-weight: bold;">convert_one</span>(<span style="color: #2F8B58; font-weight: bold;">iconv_t</span> <span style="color: #0084C8; font-weight: bold;">cd</span>)
{
- <span style="font-weight: bold; text-decoration: underline;">char</span> <span style="font-weight: bold; font-style: italic;">inbuf</span>[2] = {0};
- <span style="font-weight: bold; text-decoration: underline;">char</span> <span style="font-weight: bold; font-style: italic;">outbuf</span>[UTF8_SIZE] = {0};
- <span style="font-weight: bold; text-decoration: underline;">size_t</span> <span style="font-weight: bold; font-style: italic;">insize</span> = 1;
- <span style="font-weight: bold; text-decoration: underline;">size_t</span> <span style="font-weight: bold; font-style: italic;">outsize</span> = UTF8_SIZE;
-
- <span style="font-weight: bold; text-decoration: underline;">char</span> <span style="font-weight: bold; font-style: italic;">c</span> = getchar();
- <span style="font-weight: bold;">if</span> (c == EOF)
- <span style="font-weight: bold;">return</span> 1;
+ <span style="color: #2F8B58; font-weight: bold;">char</span> <span style="color: #0084C8; font-weight: bold;">inbuf</span>[2] = {0};
+ <span style="color: #2F8B58; font-weight: bold;">char</span> <span style="color: #0084C8; font-weight: bold;">outbuf</span>[UTF8_SIZE] = {0};
+ <span style="color: #2F8B58; font-weight: bold;">size_t</span> <span style="color: #0084C8; font-weight: bold;">insize</span> = 1;
+ <span style="color: #2F8B58; font-weight: bold;">size_t</span> <span style="color: #0084C8; font-weight: bold;">outsize</span> = UTF8_SIZE;
+
+ <span style="color: #2F8B58; font-weight: bold;">char</span> <span style="color: #0084C8; font-weight: bold;">c</span> = getchar();
+ <span style="color: #A52A2A; font-weight: bold;">if</span> (c == EOF)
+ <span style="color: #A52A2A; font-weight: bold;">return</span> 1;
inbuf[0] = c;
- <span style="font-weight: bold; text-decoration: underline;">char</span> * <span style="font-weight: bold; font-style: italic;">pIn</span> = inbuf;
- <span style="font-weight: bold; text-decoration: underline;">char</span> * <span style="font-weight: bold; font-style: italic;">pOut</span> = (<span style="font-weight: bold; text-decoration: underline;">char</span>*) outbuf;
+ <span style="color: #2F8B58; font-weight: bold;">char</span> * <span style="color: #0084C8; font-weight: bold;">pIn</span> = inbuf;
+ <span style="color: #2F8B58; font-weight: bold;">char</span> * <span style="color: #0084C8; font-weight: bold;">pOut</span> = (<span style="color: #2F8B58; font-weight: bold;">char</span>*) outbuf;
- <span style="font-weight: bold; text-decoration: underline;">size_t</span> <span style="font-weight: bold; font-style: italic;">iconv_result</span> = iconv(cd, &amp;pIn, &amp;insize, &amp;pOut, &amp;outsize);
- <span style="font-weight: bold;">if</span> (iconv_result == (<span style="font-weight: bold; text-decoration: underline;">size_t</span>) -1) {
+ <span style="color: #2F8B58; font-weight: bold;">size_t</span> <span style="color: #0084C8; font-weight: bold;">iconv_result</span> = iconv(cd, &amp;pIn, &amp;insize, &amp;pOut, &amp;outsize);
+ <span style="color: #A52A2A; font-weight: bold;">if</span> (iconv_result == (<span style="color: #2F8B58; font-weight: bold;">size_t</span>) -1) {
inbuf[1] = getchar();
insize = 2;
iconv(cd, &amp;pIn, &amp;insize, &amp;pOut, &amp;outsize);
}
- <span style="font-weight: bold;">for</span> (<span style="font-weight: bold; text-decoration: underline;">int</span> <span style="font-weight: bold; font-style: italic;">i</span> = 0; i &lt; UTF8_SIZE; i++) {
- <span style="font-weight: bold;">if</span> (outbuf[i] != 0)
+ <span style="color: #A52A2A; font-weight: bold;">for</span> (<span style="color: #2F8B58; font-weight: bold;">int</span> <span style="color: #0084C8; font-weight: bold;">i</span> = 0; i &lt; UTF8_SIZE; i++) {
+ <span style="color: #A52A2A; font-weight: bold;">if</span> (outbuf[i] != 0)
putchar(outbuf[i]);
fflush(stdout);
}
- <span style="font-weight: bold;">return</span> 0;
+ <span style="color: #A52A2A; font-weight: bold;">return</span> 0;
}
-<span style="font-weight: bold; text-decoration: underline;">int</span>
-<span style="font-weight: bold;">main</span>(<span style="font-weight: bold; text-decoration: underline;">void</span>)
+<span style="color: #2F8B58; font-weight: bold;">int</span>
+<span style="color: #00578E; font-weight: bold;">main</span>(<span style="color: #2F8B58; font-weight: bold;">void</span>)
{
- <span style="font-weight: bold; text-decoration: underline;">iconv_t</span> <span style="font-weight: bold; font-style: italic;">cd</span> = iconv_open(<span style="font-style: italic;">"UTF8"</span>, <span style="font-style: italic;">"GBK"</span>);
- <span style="font-weight: bold;">while</span> (1)
- <span style="font-weight: bold;">if</span> (convert_one(cd) == 1) <span style="font-weight: bold;">break</span>;
+ <span style="color: #2F8B58; font-weight: bold;">iconv_t</span> <span style="color: #0084C8; font-weight: bold;">cd</span> = iconv_open(<span style="color: #4E9A06;">"UTF8"</span>, <span style="color: #4E9A06;">"GBK"</span>);
+ <span style="color: #A52A2A; font-weight: bold;">while</span> (1)
+ <span style="color: #A52A2A; font-weight: bold;">if</span> (convert_one(cd) == 1) <span style="color: #A52A2A; font-weight: bold;">break</span>;
iconv_close(cd);
- <span style="font-weight: bold;">return</span> 0;
+ <span style="color: #A52A2A; font-weight: bold;">return</span> 0;
}
</pre>
</div>
\ No newline at end of file