Quartz

常用 npm 命令

# 定位到 quartz目录
cd quartz
 
# Build成网页,并在 http://localhost:8080/ 预览
npx quartz build --serve
 
# 同步到 GitHub,并发布成 Github Pages (https://quartz.jzhao.xyz/hosting)
npx quartz sync

配置

具体配置可以参考下文的Quartz配置,这里仅列出一些可能会用到的配置项

  • pageTitle: title of the site. This is also used when generating the RSS Feed for your site.
  • locale: used for i18n and date formatting
  • baseUrl: this is used for sitemaps and RSS feeds that require an absolute URL to know where the canonical ‘home’ of your site lives. This is normally the deployed URL of your site (e.g. quartz.jzhao.xyz for this site). Do not include the protocol (i.e. https://) or any leading or trailing slashes.
    • This should also include the subpath if you are hosting on GitHub pages without a custom domain. For example, if my repository is jackyzha0/quartz, GitHub pages would deploy to https://jackyzha0.github.io/quartz and the baseUrl would be jackyzha0.github.io/quartz.
    • Note that Quartz 4 will avoid using this as much as possible and use relative URLs whenever it can to make sure your site works no matter where you end up actually deploying it.
  • Fonts

Obsidian 语法

Quartz 支持 GitHub Flavored Markdown 语法和 Obsidian Flavored Markdown 语法,同时也像 Docsuaurus 一样,支持在文章开头添加属性,用于表示作者、时间、标签等等。

文章属性

在Quartz中,支持的文章属性有以下内容

---
title: 这是文章的标题
permalink: 文章的URL链接
aliases: 文章别名
draft: false/true,是否为草稿(若为true,将不会被发布)
date: YYYY-MM-DD,文章的发布日期
description: 文章的简介,用于 Preview 的
---

支持的扩展 Markdown 语法

双链笔记

  • 通过双括号 [[]] 可以链接笔记
  • 链接到(笔记中的)标题/块:[[笔记名称]], [[笔记名称#标题|标题]], [[笔记名称#^块id|^块ID]]
  • 别名链接:[[笔记名称|显示别名]]

标签(Tags)

- `[[#标签|标签]]`
- `[[#项目子标签|项目/子标签]]`

Callouts(提示框)

Obsidian 支持的提示框有很多类型: noteinfotipsuccess questionwarningfailuredanger bugexamplequote

> [!NOTE] 这是一个提示
> 
> 你可以写很多内容

这是一个提示

你可以写很多内容

任务列表(Task List)

- [ ] 未完成任务
- [x] 已完成任务
- [/] 半完成任务
  • 未完成任务
  • 已完成任务
  • [/] 半完成任务

LaTeX 数学公式符号

 
$E = mc^2$
 
 
$$
\int_0^1 x^2 dx
$$

注释 & 转义字符

 
\*不会变成斜体\*
`\` 避免触发 Markdown 格式。

*不会变成斜体*

基础 Markdown 语法

富文本

*斜体*   _斜体_
**加粗**
~~删除线~~

斜体 斜体 加粗 删除线

调整图片大小

![[图片文件.png | 300]]

插件

Templator

模板插件,模板位置:99_RES_private/tempaltes/

Various Complements

自动补全插件,字典位置: 99_RES_private/VComplements/dict

参考链接