lnabc0395 downloadsA simple, elegant, and Chinese-friendly timeline rendering plugin.
一个简单、优雅、中文友好的 Obsidian 时间轴渲染插件。 A simple, elegant, Chinese-friendly timeline rendering plugin for Obsidian. 当前版本 (Current version): 1.4.8
1st Timeline 是一个 Obsidian 插件,可将简单的文本代码块渲染为精美的时间轴视图。支持多种日期格式(含中文日期优先支持),智能日期解析,优雅的视觉呈现——帮助您轻松创建时间线、项目进度视图或历史事件记录。
1st Timeline renders beautiful timeline views from simple text code blocks. It supports multiple date formats with first-class Chinese date support, intelligent parsing, and elegant visual presentation.
main.js、manifest.json、styles.css.obsidian/plugins/first-timeline/git clone https://github.com/lnabc03/1st-Timeline.git
cd 1st-Timeline
npm install
npm run build
然后将 main.js、manifest.json、styles.css 复制到 .obsidian/plugins/first-timeline/,重启并启用。
注意: 目标目录名必须与
manifest.json中的id字段一致(first-timeline)。
在 Obsidian 笔记中插入 timeline 代码块:
```timeline
2024-01-01 新年第一天(双空格分隔)
2024年3月8日:妇女节(中文冒号分隔)
2024-05-01: 劳动节(英文冒号分隔)
2025-01-28_12:04 精确时间格式
2025年1月29日早上 中文日期+时间词
2026-01-01
新的一年开始了!(多行文本)
- 支持完整的 Markdown 语法
# 标题
> 引用块
> [!NOTE] Callout
| A | B |
|---|---|
| C | D |
```
| 格式 | 分隔符 | 示例 |
|---|---|---|
| 双空格 | ␣␣ |
2024-01-01 事件内容 |
| 中文冒号 | : |
2024年3月8日:事件内容 |
| 英文冒号 | : |
2024-05-01:事件内容 |
| 仅日期(多行) | 换行 | 日期独占一行,后续行为事件内容 |
使用命令面板(Ctrl+P)执行 "笔记汇总 / Notes summary" 命令:
YYYY-MM-DD,YYYY-MM-DD)| 设置项 | 说明 | 默认值 | 范围 |
|---|---|---|---|
| 排序方向 | 事件排列顺序 | 升序 | 升序 / 降序 |
| 笔记日期属性 | frontmatter 字段名 | created |
任意字段名 |
| 时间轴颜色 | 时间轴线条和点的颜色 | #5588cc |
CSS 颜色值 |
| 颜色预设 | 一键切换主题色 | — | 蓝/绿/紫/红/橙 |
| 时间点大小 | 时间轴上点的大小 | 12px | 6–20px |
| 线条宽度 | 时间轴竖线宽度 | 2px | 1–5px |
| 事件间距 | 事件卡片之间的间距 | 20px | 10–40px |
| 悬停提示框 | 是否显示距今天数提示 | 开启 | 开关 |
| 悬停延迟 | 提示框出现前的等待时间 | 500ms | 0–1000ms |
| 当天事件高亮 | 当天事件特殊标记 | 开启 | 开关 |
| 自动折叠 | 事件过多时自动折叠 | 开启 | 开关 |
| 折叠阈值 | 触发折叠的事件数量 | 10 | 5–50 |
| 折叠时显示数量 | 折叠后显示的事件数 | 5 | 1–15 |
对齐 Obsidian 官方示例插件 最佳实践:
npm install # 安装依赖
npm run dev # 开发模式(watch)
npm run build # 生产构建(tsc + esbuild)
npm run lint # ESLint 代码检查
MIT License
lnabc03 | 弋鹓
A simple, elegant, Chinese-friendly timeline rendering plugin for Obsidian. 一个简单、优雅、中文友好的 Obsidian 时间轴渲染插件。 Current version: 1.4.8
1st Timeline renders beautiful timeline views from simple text code blocks. It supports multiple date formats with first-class Chinese date support, intelligent parsing, and elegant visual presentation — helping you create timelines, project progress views, or historical event records effortlessly.
1st Timeline 是一个 Obsidian 插件,可将简单的文本代码块渲染为精美的时间轴视图。
main.js, manifest.json, and styles.css.obsidian/plugins/first-timeline/ in your vaultgit clone https://github.com/lnabc03/1st-Timeline.git
cd 1st-Timeline
npm install
npm run build
Then copy main.js, manifest.json, and styles.css to .obsidian/plugins/first-timeline/, restart Obsidian, and enable.
Note: The target directory name must match the
idfield inmanifest.json(first-timeline).
Insert a timeline code block in any Obsidian note:
```timeline
2024-01-01 New Year's Day (two spaces)
2024-03-08: International Women's Day (colon)
2024年5月1日:Labor Day (Chinese date + colon)
2025-01-28_12:04 Precise time format
2025年1月29日早上 Chinese date with time-of-day word
2026-01-01
A new year begins! (multi-line text)
- Full Markdown syntax supported
# Headings
> Blockquotes
> [!NOTE] Callouts
| A | B |
|---|---|
| C | D |
```
| Format | Separator | Example |
|---|---|---|
| Two spaces | ␣␣ |
2024-01-01 Event content |
| Chinese colon | : |
2024年3月8日:Event content |
| English colon | : |
2024-05-01: Event content |
| Date only (multi-line) | Newline | Date on one line, content on following lines |
Use the command palette (Ctrl+P) and run the "Notes summary / 笔记汇总" command:
YYYY-MM-DD,YYYY-MM-DD)| Setting | Description | Default | Range |
|---|---|---|---|
| Sort direction | Event sort order | Ascending | Ascending / Descending |
| Date property | Frontmatter field name | created |
Any field name |
| Timeline color | Color of line and dots | #5588cc |
CSS color value |
| Color presets | One-click theme switching | — | Blue / Green / Purple / Red / Orange |
| Dot size | Size of timeline dots | 12px | 6–20px |
| Line width | Width of the timeline line | 2px | 1–5px |
| Event spacing | Spacing between event cards | 20px | 10–40px |
| Hover tooltip | Show days-until/since tooltip | On | Toggle |
| Hover delay | Delay before tooltip appears | 500ms | 0–1000ms |
| Highlight today | Special highlight for today's events | On | Toggle |
| Auto collapse | Auto-collapse when above threshold | On | Toggle |
| Collapse threshold | Events needed to trigger collapse | 10 | 5–50 |
| Show when collapsed | Events shown when collapsed | 5 | 1–15 |
Follows Obsidian's official sample plugin best practices:
npm install # Install dependencies
npm run dev # Development mode (watch)
npm run build # Production build (tsc + esbuild)
npm run lint # ESLint check
MIT License
lnabc03 | 弋鹓