试笔:本站的排版样张
工具2025-02-02这一页不讲故事,只用来试笔:本站支持的标题、列表、表格、代码块、标注和脚注都在这里排一遍,改样式时拿它对照。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」。
蓝色标注放结论或备忘。
列表#
无序列表#
- 第一项
- 第二项,带一点强调
- 嵌套的第一项
- 嵌套的第二项
- 第三项
有序列表#
- 先写下来
- 再改一遍
- 最后发出去
待办#
- 代码块支持 diff
- 目录支持到 h4
- 把编辑器的标题也扩到 h4
表格#
| 写法 | 效果 | 用途 |
|---|---|---|
**粗体** | 粗体 | 强调 |
*斜体* | 斜体 | 书名、外文 |
~~删除线~~ | 改了主意的地方 |
长文字的多列表格,用来看手机上的窄列:
| 状态 | 含义 | 说明 |
|---|---|---|
| enabled | 已启用 | 开机时自动启动,/etc/systemd/system 下有对应的符号链接 |
| enabled-runtime | 临时启用 | 链接在 /run/systemd/system 下,重启后消失 |
| static | 静态 | 没有 [Install] 段,不能直接 enable / disable,只能被别的 unit 依赖启动 |
代码#
普通代码块#
没有标语言的代码块按纯文本显示:
这里没有高亮,
只有行号。带语言的代码块:
tailscale status
sudo systemctl restart tailscaled一行特别长的命令,用来看横向滚动:
curl -fsSL https://tailscale.com/install.sh | sh && sudo tailscale up --advertise-exit-node --accept-routes --ssh --hostname=homelab-gateway文件名与新增行#
services:
alist:
image: xhofe/alist:latest
restart: unless-stopped
ports:
- "5244:5244"diff#
-export const SITE_URL = 'https://incohua-blog.l4fire.workers.dev';
+export const SITE_URL = 'https://blog.inmoe.org';
export const SITE_NAME = 'Incohua Notes';行内标注#
标注写在该语言的注释里,渲染后自动去掉。
增删#
const name = 'Incohua Notes';
const domain = 'incohua-blog.l4fire.workers.dev';
const domain = 'blog.inmoe.org'; 高亮#
pnpm build
pnpm astro check
pnpm roundtrip聚焦#
export function readingTime(markdown: string): number {
const { cjk, words } = countWords(markdown);
return Math.max(1, Math.round(cjk / 400 + words / 200));
}指定词与错误 / 警告#
pnpm install
pnpm build
pnpm deploy插图#

图表#
写在 mermaid 代码块里的图,构建期渲染成内联 SVG。流程图,含中文和菱形判断:
时序图:
不支持的类型(饼图)回退成普通代码块,构建日志里有一行告警:
pie title 示例
"A" : 60
"B" : 40折叠#
展开:一段收起来的内容
折叠块里也可以放代码:
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.com
Astro 官方博客Get all the latest news from the Astroverse.
一个打不开的地址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。
脚注#
标题层级#
三级标题#
三级标题进目录,挂在引导线上。
四级标题#
四级标题也进目录,比三级再缩一级。
五级标题#
五级标题不进目录,只在正文里出现。
written in INCOHUA
评论 0
按时间排序