Qing Shan Typography

by 许青山
5
4
3
2
1
Score: 50/100

Description

Typora-inspired reading typography for Obsidian

Reviews

No reviews yet.

Stats

1
stars
82
downloads
0
forks
24
days
15
days
15
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
24
commits

Latest Version

16 days ago

Changelog

修复媒体排版、首行缩进、深色对比度及设置恢复问题。自动测试与隔离 Obsidian 验证共 118 项通过。

README file from

Github

Qing Shan Typography

青山 · Typora 正文排版 — Typora-inspired reading typography for Obsidian.

The community directory lists this plugin as Qing Shan Typography; the Chinese name is 青山 · Typora 正文排版. Keep Obsidian's wikilinks, embeds, and block references, while getting Typora's calm reading rhythm.

Light reading view

Dark reading view

Features

  • Responsive reading width: 860px by default, 1024px on windows ≥1400px, 1200px on windows ≥1800px. Fixed-width and full-width modes are also available.
  • Typora metrics: 16px body text, 1.6 line height, 30px side padding, Typora heading scale and rule lines.
  • Typora code blocks: 14.4px / 23.04px code line boxes, #f8f8f8 surface, 1px border, 8/6 padding, automatic wrapping, and the Typora cm-s-inner palette.
  • Dark mode: follows theme-dark automatically with a Typora night-inspired surface, text, table, code, and callout palette.
  • Semantic callouts: note / warning / danger keep Obsidian's --callout-color on the left border and icon.
  • Optional qs-home dashboard: a reading-view-only homepage layout driven by cssclasses: qs-home — hero title, subtitle, link grid, footer and a bottom callout. Live Preview keeps the normal editor.
  • Optional paragraph indent: opt-in 2em first-line indent for prose paragraphs without affecting headings, quotes, lists, callouts, tables, code, or images.
  • Native PDF export: exports cleanly styled documents through Obsidian's native PDF export (.print > .markdown-preview-view).
  • [TOC] & TOC Reader compatible: clean list styling without bullet collisions, tabular numbers, and hover highlights.
  • Subtle hover scrollbars & tabular numbers: tables and code blocks use quiet 6px scrollbars that only appear on hover, with tabular numbers for aligned data.
  • Optional accessibility: an opt-in high-contrast toggle for links, quotes, and metadata.
  • Code-font switch: use Typora's Courier stack or follow your Obsidian monospace font.
  • No note changes: links, embeds, block IDs, properties, and source text stay untouched.

Install

Community plugins

Once the plugin appears in the Obsidian community directory:

  1. Settings → Community plugins → Browse.
  2. Search for 青山 or Typora.
  3. Install and enable 青山 · Typora 正文排版.

Manual

  1. Download main.js, manifest.json, and styles.css from the latest GitHub release.

  2. Put them in:

    <vault>/.obsidian/plugins/qing-shan-typora/
    
  3. Reload Obsidian, then enable the plugin in Settings → Community plugins.

Settings

Setting Default Notes
Enable typography On Toggle the whole plugin.
Reading width Typora auto 860 / 1024 / 1200 by window; fixed and full modes available.
Unified shell On Light: #fafafa sidebar / #ffffff paper. Dark: #2f3439 / #363b40.
Paragraph indent Off 2em first-line indent for prose paragraphs only.
Hide inline title On Hides Obsidian's inline filename; write an H1 in the note instead.
Code font Typora Lucida Console, Consolas, Courier; or follow Obsidian.
High contrast Off AA contrast for links, quotes, and metadata; deviates from Typora colors.
Font size 16px 14–22px.
Max content width 800px 480–1200px, used by fixed-width mode.
Line height 1.6 1.4–2.2.
Reset — Restore all defaults and write them to disk.

The settings UI is in Chinese; the plugin itself has no language-dependent behavior.

Homepage layout (qs-home)

Add qs-home to a note's cssclasses to opt into the dashboard layout:

---
cssclasses:
  - qs-home
---

Conventions:

  • The first H1 is the brand title and gets the 58px Songti hero style (42px in narrow panes) plus the mountain mark.
  • The blockquote immediately after the H1 is the subtitle; later blockquotes keep the normal quote style.
  • Each H2 is followed by a flat ul of links (- [[path|label]] — description); the list becomes a responsive 2–3 column card grid.
  • The last paragraph containing only *italic* is the footer; a bottom callout is styled as a small usage note.
  • The layout is reading-view only. Live Preview keeps the normal editor typography, so the dashboard never interferes with editing. This is intentional, not a missing live-preview style.
  • The styles only target the reading view's .el-* sections and exclude embedded notes and callout content.

Compatibility

  • Obsidian 1.5.0+, desktop only.
  • Applies to Reading view and Live Preview; Source mode is left untouched.
  • Works with light and dark themes. Minimal is recommended but not required.
  • No build step is required to use the release files; the paragraph-indent decoration uses Obsidian's bundled CodeMirror 6 packages.

Privacy

The plugin does not read, search, rewrite, or scan notes, and it makes no network requests. It only:

  • reads and writes its own settings through loadData / saveData;
  • adds its own classes and CSS variables to the window body;
  • removes those classes and variables when disabled or unloaded.

No note content, file names, or vault metadata are collected.

Development

  • main.js is plain CommonJS and only requires obsidian.
  • styles.css contains the entire visual layer.
  • versions.json maps releases to the minimum Obsidian version.

中文说明

把 main.js、manifest.json、styles.css 放到 <库>/.obsidian/plugins/qing-shan-typora/,重载 Obsidian 后在第三方插件中启用。默认使用 Typora 的 860 / 1024 / 1200 三档宽度、1.6 行距、隐藏顶部文件名和 Typora 代码配色;深色模式自动跟随,callout 恢复类型色,段落首行缩进、代码字体与对比度可在设置中切换。全面适配原生 PDF 导出、TOC Reader 目录与宽表格悬浮细滚动条。插件不读取笔记内容,也不请求网络。

License

MIT