试笔:本站的排版样张

字号
字体
版心
外观
天空

试笔:本站的排版样张

I

Incohua

••2 分钟阅读

新换的纸,先试试笔。这一页把本站支持的写法都排一遍,以后改样式时打开它,哪里歪了一眼就能看出来。

文字#

正文用衬线体。中文与 English 混排,数字像 2026、3.14、100% 也一样。粗体用来强调,斜体用来标书名或外文,删除线留给改了主意的地方,inline code 写命令和路径,链接带下划线。

高亮有三种颜色:玫瑰色、琥珀色和天蓝色。

一段特别长的链接,用来看折行:https://developers.cloudflare.com/r2/api/s3/api/#implemented-object-level-operations-and-their-supported-parameters

引用#

当第一颗卫星飞向大气层外,我们便以为自己终有一日会征服宇宙。

标注#

黄色标注放提示,比如「改完记得跑 pnpm roundtrip」。

蓝色标注放结论或备忘。


列表#

无序列表#

  • 第一项
  • 第二项,带一点强调
    • 嵌套的第一项
    • 嵌套的第二项
  • 第三项

有序列表#

  1. 先写下来
  2. 再改一遍
  3. 最后发出去

待办#

  • 代码块支持 diff
  • 目录支持到 h4
  • 把编辑器的标题也扩到 h4

表格#

写法效果用途
**粗体**粗体强调
*斜体*斜体书名、外文
~~删除线~~删除线改了主意的地方

长文字的多列表格,用来看手机上的窄列:

状态含义说明
enabled已启用开机时自动启动,/etc/systemd/system 下有对应的符号链接
enabled-runtime临时启用链接在 /run/systemd/system 下,重启后消失
static静态没有 [Install] 段,不能直接 enable / disable,只能被别的 unit 依赖启动

代码#

普通代码块#

没有标语言的代码块按纯文本显示:

text
这里没有高亮,
只有行号。

带语言的代码块:

bash
tailscale status
sudo systemctl restart tailscaled

一行特别长的命令,用来看横向滚动:

bash
curl -fsSL https://tailscale.com/install.sh | sh && sudo tailscale up --advertise-exit-node --accept-routes --ssh --hostname=homelab-gateway

文件名与新增行#

docker-compose.yml
services:
  alist:
    image: xhofe/alist:latest
    restart: unless-stopped
    ports:
      - "5244:5244"

diff#

diff
diff --git a/src/consts.ts b/src/consts.ts
--- a/src/consts.ts
+++ b/src/consts.ts
@@ -1,2 +1,2 @@
-export const SITE_URL = 'https://incohua-blog.l4fire.workers.dev';
+export const SITE_URL = 'https://blog.inmoe.org';
 export const SITE_NAME = 'Incohua Notes';

行内标注#

标注写在该语言的注释里,渲染后自动去掉。

增删#

ts
const name = 'Incohua Notes';
const domain = 'incohua-blog.l4fire.workers.dev'; 
const domain = 'blog.inmoe.org'; 

高亮#

bash
pnpm build
pnpm astro check
pnpm roundtrip

聚焦#

ts
export function readingTime(markdown: string): number {
  const { cjk, words } = countWords(markdown);
  return Math.max(1, Math.round(cjk / 400 + words / 200)); 
}

指定词与错误 / 警告#

bash
pnpm install
pnpm build
pnpm deploy

插图#

Cloudflare R2 概述页,右上角展开了 API 菜单
图 1 插图下面是说明文字,点图可以放大

图表#

写在 mermaid 代码块里的图,构建期渲染成内联 SVG。流程图,含中文和菱形判断:

时序图:

不支持的类型(饼图)回退成普通代码块,构建日志里有一行告警:

mermaid
pie title 示例
  "A" : 60
  "B" : 40

折叠#

展开:一段收起来的内容

折叠块里也可以放代码:

bash
pnpm stats --headings typesetting-specimen

链接卡片#

单独成段的站外链接会变成卡片,标题是链接文字。

Astro 源码The web framework for content-driven websites. Contribute to withastro/astro development by creating an account on GitHub.github.comTailscale 子网路由Use subnet routers to give devices outside your local network access to services within specific subnets. Extend your private network with Tailscale.tailscale.comAstro 官方博客Get all the latest news from the Astroverse.astro.build一个打不开的地址example.invalidSubnet routers · Tailscale DocsUse subnet routers to give devices outside your local network access to services within specific subnets. Extend your private network with Tailscale.tailscale.com

链接夹在句子里时保持普通链接,比如Astro 源码就只是行内的一个链接。

站内链接单独成段也不变卡片:

回到首页

白名单站点的外链前有小图标,换行时图标和首字不分开:kubectl 这样的命令行工具和 GitHub 上这个长长的仓库名称放在一起会换行,用来检查图标位置,以及 Subnet routers and Tailscale documentation page title that is long enough to wrap onto the next line。

脚注#

脚注的编号写在句末1,说明统一放在文末2。

标题层级#

三级标题#

三级标题进目录,挂在引导线上。

四级标题#

四级标题也进目录,比三级再缩一级。

五级标题#

五级标题不进目录,只在正文里出现。


  1. 这是第一条脚注。↩
  2. 第二条脚注,点末尾的箭头回到正文。↩

评论 0

按时间排序
评论还没开通
  1. 还没有评论。