diff --git a/README.md b/README.md index e4333d5..991d17c 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,21 @@ -## docsify +# docsify > 一个神奇的文档网站生成器。 ## 概述 -docsify 可以快速帮你生成文档网站。不同于 GitBook、Hexo 的地方是它不会生成静态的 `.html` 文件,所有转换工作都是在运行时。如果你想要开始使用它,只需要创建一个 `index.html` 就可以开始编写文档并直接[部署在 GitHub Pages](zh-cn/deploy.md)。 +docsify 可以快速帮你生成文档网站。 不同于 GitBook 的地方是它不会生成静态的 `.html` 文件。 相反,它能智能加载和解析 Markdown 文件,并将其显示为网站。 要开始使用它,只需创建一个 `index.html` 并将其[部署到 GitHub Pages](zh-cn/deploy.md)。 查看[快速开始](zh-cn/quickstart.md)了解详情。 ## 特性 -- 无需构建,写完文档直接发布 -- 容易使用并且轻量 (压缩后 ~21kB) +- 没有静态生成的 html 文件 +- 简单和轻量 - 智能的全文搜索 - 提供多套主题 - 丰富的 API - 支持 Emoji -- 兼容 IE11 -- 支持服务端渲染 SSR ([示例](https://github.com/docsifyjs/docsify-ssr-demo)) ## 示例 @@ -25,7 +23,7 @@ docsify 可以快速帮你生成文档网站。不同于 GitBook、Hexo 的地 ## 捐赠 -如果你觉得 docsify 对你有帮助,或者想对我微小的工作一点资瓷,欢迎给我[捐赠](https://github.com/QingWei-Li/donate)。 +如果你认为 docsify 对你有帮助,或者我的工作有价值,请考虑捐赠。 欢迎帮我[买杯咖啡](https://github.com/QingWei-Li/donate)。 :heart: ## 社区 diff --git a/_sidebar.md b/_sidebar.md index 0ddbd62..5540b35 100644 --- a/_sidebar.md +++ b/_sidebar.md @@ -1,28 +1,32 @@ -* 入门 - - * [快速开始](zh-cn/quickstart.md) - * [多页文档](zh-cn/more-pages.md) - * [定制导航栏](zh-cn/custom-navbar.md) - * [封面](zh-cn/cover.md) - -* 定制化 - - * [配置项](zh-cn/configuration.md) - * [主题](zh-cn/themes.md) - * [插件列表](zh-cn/plugins.md) - * [开发插件](zh-cn/write-a-plugin.md) - * [Markdown 配置](zh-cn/markdown.md) - * [代码高亮](zh-cn/language-highlight.md) - -* 指南 - - * [部署](zh-cn/deploy.md) - * [文档助手](zh-cn/helpers.md) - * [兼容 Vue](zh-cn/vue.md) - * [CDN](zh-cn/cdn.md) - * [离线模式(PWA)](zh-cn/pwa.md) - * [服务端渲染 (SSR)](zh-cn/ssr.md) - * [文件嵌入](zh-cn/embed-files.md) - -* [Awesome docsify](zh-cn/awesome.md) -* [Changelog](zh-cn/changelog.md) + + +- 入门 + + - [快速开始](zh-cn/quickstart.md) + - [添加页面](zh-cn/adding-pages.md) + - [封面](zh-cn/cover.md) + - [定制导航栏](zh-cn/custom-navbar.md) + +- 定制化 + + - [配置项](zh-cn/configuration.md) + - [主题](zh-cn/themes.md) + - [插件列表](zh-cn/plugins.md) + - [开发插件](zh-cn/write-a-plugin.md) + - [Markdown 配置](zh-cn/markdown.md) + - [代码高亮](zh-cn/language-highlight.md) + - [Emoji](zh-cn/emoji.md) + +- 指南 + + - [部署](zh-cn/deploy.md) + - [文档助手](zh-cn/helpers.md) + - [兼容 Vue](zh-cn/vue.md) + - [CDN](zh-cn/cdn.md) + - [离线模式(PWA)](zh-cn/pwa.md) + - [文件嵌入](zh-cn/embed-files.md) + - [UI Kit](zh-cn/ui-kit.md) + +- [Awesome docsify](zh-cn/awesome.md) + +- [Changelog](zh-cn/changelog.md) diff --git a/adding-pages.md b/adding-pages.md new file mode 100644 index 0000000..c3cd12d --- /dev/null +++ b/adding-pages.md @@ -0,0 +1,156 @@ +# 添加页面 + +如果你需要更多页面,你可以简单地在 docsify 目录中创建更多 markdown 文件。 如果创建了名为 `guide.md` 的文件,则可通过 `/#/guide` 访问该文件。 + +例如,目录结构如下: + +```text +. +└── docs + ├── README.md + ├── guide.md + └── zh-cn + ├── README.md + └── guide.md +``` + +匹配路由 + +```text +docs/README.md => http://domain.com +docs/guide.md => http://domain.com/#/guide +docs/zh-cn/README.md => http://domain.com/#/zh-cn/ +docs/zh-cn/guide.md => http://domain.com/#/zh-cn/guide +``` + +## 侧边栏 + +为了拥有侧边栏,你可以创建自己的侧边栏 `_sidebar.md`(有关示例,请参阅[本文档的侧边栏](https://github.com/docsifyjs/docsify/blob/main/docs/_sidebar.md)): + +首先,你需要设置为 `loadSidebar` 为 **true**。 详情请参见[配置段落](zh-cn/configuration#loadsidebar)。 + +```html + + + + +``` + +创建 `_sidebar.md`: + +```markdown + + +- [Home](/) +- [Page 1](page-1.md) +``` + +创建章节标题: + +```markdown + + +- Section Header 1 + + - [Home](/) + - [Page 1](page-1.md) + +- Section Header 2 + + - [Page 2](page-2.md) + - [Page 3](page-3.md) +``` + +需要在 `./docs` 目录创建 `.nojekyll` 命名的空文件,阻止 GitHub Pages 忽略命名是下划线开头的文件。 + +!> Docsify 只查找当前文件夹中的 `_sidebar.md`,并使用它,否则会返回到使用 `window.$docsify.loadSidebar` 配置。 + +示例文件结构: + +```text +└── docs/ + ├── _sidebar.md + ├── index.md + ├── getting-started.md + └── running-services.md +``` + +## 嵌套侧边栏 + +你可能希望侧边栏在导航后更新以反映当前目录。 这可以通过在每个文件夹中添加一个 `_sidebar.md` 文件来实现。 + +`_sidebar.md` 会从每一级目录加载。 如果当前目录中没有 `_sidebar.md`,则会返回上一级目录。 例如,如果当前路径是 `/guide/quick-start`,则将从 `/guide/_sidebar.md` 加载 `_sidebar.md`。 + +你可以指定 `alias` 以避免不必要的回退。 + +```html + +``` + +!> 你可以在一个子目录中创建一个 `README.md` 文件来作为路由的默认网页。 + +## 用侧边栏中选定的条目名称作为页面标题 + +页面的 `title` 标签是根据_选定的_侧边栏项目名称生成的。 为了更好地进行搜索引擎优化,你可以在文件名后指定一个字符串来自定义标题。 + +```markdown + + +- [Home](/) +- [Guide](guide.md 'The greatest guide in the world') +``` + +## 目录 + +创建 `_sidebar.md` 后,侧边栏内容将根据 markdown 文件中的标题自动生成。 + +自定义侧边栏还可以通过设置 `subMaxLevel` 自动生成目录,请比较 [subMaxLevel 配置](zh-cn/configuration#submaxlevel)。 + +```html + + + + +``` + +## 忽略副标题 + +当设置了 `subMaxLevel` 时,默认情况下每个标题都会自动添加到目录中。 如果你想忽略特定的标题,可以给它添加 `` 。 + +```markdown +# Getting Started + +## Header + +该标题不会出现在侧边栏目录中。 +``` + +要忽略特定页面上的所有标题,你可以在页面的第一个标题上使用 `` 。 + +```markdown +# Getting Started + +## Header + +该标题不会出现在侧边栏的目录中。 +``` + +在使用时,`` 和 `` 都不会在页面上呈现。 + +`{docsify-ignore}` 和 `{docsify-ignore-all}` 也可以做同样的事情。 diff --git a/cdn.md b/cdn.md index 53c6c9d..c57ff0d 100644 --- a/cdn.md +++ b/cdn.md @@ -1,59 +1,58 @@ # CDN -推荐使用 [jsDelivr](//cdn.jsdelivr.net),能及时获取到最新版。你也可以在[cdn.jsdelivr.net/npm/docsify/](cdn.jsdelivr.net/npm/docsify/)中浏览npm包的源代码。 +Docsify 的 [npm package](https://www.npmjs.com/package/docsify) 是随着每个版本自动发布到 CDN 中的。 内容可以在每个 CDN 上查看。 -## 获取最新版本 +Docsify 推荐 [jsDelivr](//cdn.jsdelivr.net) 为其首选的 CDN: -不指定特定版本号时将引入最新版。 +- https://cdn.jsdelivr.net/npm/docsify/ (国内外都支持) -```html - - +在没有 jsDelivr 的地方,也可能需要其他的 CDN: - - -``` +- https://cdnjs.com/libraries/docsify +- https://unpkg.com/browse/docsify/ +- https://www.bootcdn.cn/docsify/ (支持国内) -也可以使用 [压缩版文件](#compressed-file). +## 指定版本 -## 获取指定版本 +请注意以下 CDN URL 中的`@`版本锁定。 这样就可以指定最新的主版本、次版本、补丁或特定 [semver](https://semver.org) 版本号。 -如果担心频繁地版本更新又可能引入未知 Bug,我们也可以使用具体的版本。规则是 `//cdn.jsdelivr.net/npm/docsify@VERSION/` +- MAJOR 版本包括不兼容变更
+ `1.0.0` → `2.0.0` +- MINOR 版本包括兼容性的新功能
+ `1.0.0` → `1.1.0` +- PATCH版本包括兼容性的错误修复
+ `1.0.0` → `1.0.1` -```html - - +从文件名中移除`.min`,可获取未压缩的资源。 - - -``` +## 最新主要版本 -!> 指定 *VERSION* 为 `latest` 可以强制每次都请求最新版本。 +指定最新的主要版本允许您的网站在发布时接收所有非破坏性的增强("次级"更新)和错误修复("补丁"更新)。 对于那些倾向于零维护又可以随着新版本的发布更新其网站的风险最小化的人来说,这是一个好的选择。 -## 压缩版 +?> 发布新的主要版本时,你需要在你的 CDN URLs 中的 `@` 符号后手动更新主要版本号。 -CSS 的压缩文件位于 `/lib/themes/` 目录下,JS 的压缩文件是原有文件路径的基础上加 `.min` 后缀。 + ```html - - + + - - + + ``` -```html - - +## 获取指定版本 :id=specific-version - - -``` +指定一个准确的版本可以防止将来的任何更新影响你的网站。 对于那些愿意在发布新版本时手动更新资源的人来说,这是一个很好的选项。 -## 其他 CDN +?> 新版本发布后,你需要在你的 CDN URLs 中的 '@' 符号后手动更新版本号。 -- https://www.bootcdn.cn/docsify/ (支持国内) -- https://cdn.jsdelivr.net/npm/docsify/ (国内外都支持) -- https://cdnjs.com/libraries/docsify -- https://unpkg.com/browse/docsify/ + + +```html + + + + +``` diff --git a/configuration.md b/configuration.md index c0acf3e..9ca465a 100644 --- a/configuration.md +++ b/configuration.md @@ -1,6 +1,6 @@ -# 配置项 +# 配置项 :id=configuration -你可以配置在 `window.$docsify` 里。 +你可以通过将 `window.$docsify` 定义为一个对象来配置 Docsify: ```html ``` -## el +配置也可以定义为函数,在这种情况下,第一个参数是 Docsify `vm` 实例。 该函数应该返回一个配置对象。 这对于在 markdown 配置等地方引用 `vm` 非常有用: -- 类型:`String` -- 默认值:`#app` +```html + +``` -docsify 初始化的挂载元素,可以是一个 CSS 选择器,默认为 `#app` 如果不存在就直接绑定在 `body` 上。 +## alias + +- 类型:`Object` + +设置路由别名。 你可以自由管理路由规则。 支持 RegExp。 +请注意,顺序很重要! 如果一个路由可以被多个别名匹配,那么你首先声明的路由优先。 ```js window.$docsify = { - el: '#app', + alias: { + '/foo/(.*)': '/bar/$1', // supports regexp + '/zh-cn/changelog': '/changelog', + '/changelog': + 'https://raw.githubusercontent.com/docsifyjs/docsify/main/CHANGELOG', + + // You may need this if you use routerMode:'history'. + '/.*/_sidebar.md': '/_sidebar.md', // See #301 + }, }; ``` -## repo +> **注意** 如果将 [`routerMode`](#routermode) 更改为 `'history'`,可能 +> 需要为 `_sidebar.md` 和 `_navbar.md` 文件配置别名。 -- 类型:`String` -- 默认值: `null` +## auto2top -配置仓库地址或者 `username/repo` 的字符串,会在页面右上角渲染一个 [GitHub Corner](http://tholman.com/github-corners/) 挂件。 +- 类型:`Boolean` +- 默认:`false` + +更改路由时,滚动到屏幕顶部。 ```js window.$docsify = { - repo: 'docsifyjs/docsify', - // or - repo: 'https://github.com/docsifyjs/docsify/', + auto2top: true, }; ``` -## maxLevel +## autoHeader -- 类型:`Number` -- 默认值: `6` +- 类型:`Boolean` +- 默认:`false` -默认情况下会抓取文档中所有标题渲染成目录,可配置最大支持渲染的标题层级。 +同时设置 `loadSidebar` 和 `autoHeader` 后,可以根据 `_sidebar.md` 的内容自动为每个页面增加标题。 参见 [#78](https://github.com/docsifyjs/docsify/issues/78)。 ```js window.$docsify = { - maxLevel: 4, + loadSidebar: true, + autoHeader: true, }; ``` -## loadNavbar +## basePath -- 类型:`Boolean|String` -- 默认值: `false` +- 类型:`String` -加载自定义导航栏,参考[定制导航栏](zh-cn/custom-navbar.md) 了解用法。设置为 `true` 后会加载 `_navbar.md` 文件,也可以自定义加载的文件名。 +网站的基本路径。 你可以将其设置为另一个目录或另一个域名。 ```js window.$docsify = { - // 加载 _navbar.md - loadNavbar: true, + basePath: '/path/', - // 加载 nav.md - loadNavbar: 'nav.md', + // 直接渲染其他域名的文档 + basePath: 'https://docsify.js.org/', + + // 甚至直接渲染其他仓库 + basePath: + 'https://raw.githubusercontent.com/ryanmcdermott/clean-code-javascript/master/', }; ``` -## loadSidebar +## catchPluginErrors -- 类型:`Boolean|String` -- 默认值: `false` +- 类型:`Boolean` +- 默认:`true` -加载自定义侧边栏,参考[多页文档](zh-cn/more-pages.md)。设置为 `true` 后会加载 `_sidebar.md` 文件,也可以自定义加载的文件名。 +决定 Docsify 是否应自动处理未捕获的 _synchronous_ 插件错误。 这可以防止插件错误影响 docsify 正确呈现实时网站内容的能力。 + +## cornerExternalLinkTarget + +- 类型:`String` +- 默认:`'_blank'` + +右上角外部链接的打开方式。 默认为 `'_blank'` (在新窗口或者标签页中打开) ```js window.$docsify = { - // 加载 _sidebar.md - loadSidebar: true, - - // 加载 summary.md - loadSidebar: 'summary.md', + cornerExternalLinkTarget: '_self', // default: '_blank' }; ``` -## hideSidebar +## coverpage -- 类型 : `Boolean` -- 默认值: `true` +- 类型:`Boolean|String|String[]|Object` +- 默认:`false` -这个选项用来完全隐藏侧边栏,侧边栏的任何内容都不会被渲染。 +激活[封面功能](zh-cn/cover.md)。 如果为 true,它将从 `_coverpage.md` 中加载。 ```js window.$docsify = { - hideSidebar: true, + coverpage: true, + + // 自定义文件名 + coverpage: 'cover.md', + + // 多个封面页 + coverpage: ['/', '/zh-cn/'], + + // 多个封面页,并指定文件名 + coverpage: { + '/': 'cover.md', + '/zh-cn/': 'cover.md', + }, }; ``` -## subMaxLevel +## el -- 类型:`Number` -- 默认值: `0` +- 类型:`String` +- 默认:`'#app'` -自定义侧边栏后默认不会再生成目录,你也可以通过设置生成目录的最大层级开启这个功能。 +要在初始化时挂载的 DOM 元素。 它可以是一个 CSS 选择器字符串或实际的 [HTMLElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLletion)。 ```js window.$docsify = { - subMaxLevel: 2, + el: '#app', }; ``` -## auto2top +## executeScript - 类型:`Boolean` -- 默认值: `false` +- 默认:`null` -切换页面后是否自动跳转到页面顶部。 +执行页面上的脚本。 仅解析第一个脚本标签([demo](themes))。 如果检测到 Vue ,默认情况下是 `true` 。 ```js window.$docsify = { - auto2top: true, + executeScript: true, }; ``` -## homepage +```markdown +## This is test + + +``` + +注意,如果运行的是外部脚本,例如嵌入的 jsfidle demo,请务必包含 [external-script](zh-cn/plugins.md?id=external-script) 插件。 + +## ext - 类型:`String` -- 默认值: `README.md` +- 默认:`'.md'` -设置首页文件加载路径。适合不想将 `README.md` 作为入口文件渲染,或者是文档存放在其他位置的情况使用。 +请求文件扩展名。 ```js window.$docsify = { - // 入口文件改为 /home.md - homepage: 'home.md', - - // 文档和仓库根目录下的 README.md 内容一致 - homepage: - 'https://raw.githubusercontent.com/docsifyjs/docsify/master/README.md', + ext: '.md', }; ``` -## basePath +## externalLinkRel - 类型:`String` +- 默认:`'noopener'` -文档加载的根路径,可以是二级路径或者是其他域名的路径。 +默认为 `'noopener'` (no opener) 可以防止新打开的外部页面(当 [externalLinkTarget](#externallinktarget) 设为 `'_blank'` 时)能够控制我们的页面。 如果不是 `'_blank'`,则不会设置 `rel`。 查看[此帖](https://mathiasbynens.github.io/rel-noopener/)获取更多关于你可能想要使用此选项的信息。 ```js window.$docsify = { - basePath: '/path/', + externalLinkRel: '', // default: 'noopener' +}; +``` - // 直接渲染其他域名的文档 - basePath: 'https://docsify.js.org/', +## externalLinkTarget - // 甚至直接渲染其他仓库 - basePath: - 'https://raw.githubusercontent.com/ryanmcdermott/clean-code-javascript/master/', +- 类型:`String` +- 默认:`'_blank'` + +在 markdown 中打开外部链接的目标。 外部链接的打开方式。默认为 `'_blank'` (在新窗口或者标签页中打开) + +```js +window.$docsify = { + externalLinkTarget: '_self', // default: '_blank' }; ``` -## relativePath +## fallbackLanguages -- 类型: `Boolean` -- 默认值: `false` +- 类型:`Array` -如果该选项设为 **true** ,那么链接会使用相对路径。 +当页面请求时,如果给定的本地语言不存在,则回退到默认语言的语言列表。 -例如,像这样的目录结构: +示例: -```text -. -└── docs - ├── README.md - ├── guide.md - └── zh-cn - ├── README.md - ├── guide.md - └── config - └── example.md +- 尝试获取 `/de/overview` 页面。 如果该页面存在,就会显示出来。 +- 如果不存在则尝试 `/overview`(取决于默认语言),如果存在即显示。 如果该页面存在,就会显示出来。 +- 然后显示 404 页面。 + +```js +window.$docsify = { + fallbackLanguages: ['fr', 'de'], +}; ``` -如果 **启用** 了相对路径,当前链接是 `http://domain.com/zh-cn/README` ,对应的链接会解析为: +## formatUpdated -```text -guide.md => http://domain.com/zh-cn/guide -config/example.md => http://domain.com/zh-cn/config/example -../README.md => http://domain.com/README -/README.md => http://domain.com/README -``` +- 类型:`String|Function` + +我们可以通过 **{docsify-updated}** 变量显示文档更新日期。 并通过 `formatUpdated` 进行格式化。 +参见 https://github.com/lukeed/tinydate#patterns ```js window.$docsify = { - // 启用相对路径 - relativePath: true, + formatUpdated: '{MM}/{DD} {HH}:{mm}', - // 禁用相对路径(默认值) - relativePath: false, + formatUpdated(time) { + // ... + + return time; + }, }; ``` -## coverpage +## hideSidebar -- 类型:`Boolean|String` -- 默认值: `false` +- 类型:`Boolean` +- 默认:`true` -启用[封面页](zh-cn/cover.md)。开启后是加载 `_coverpage.md` 文件,也可以自定义文件名。 +该选项将完全隐藏侧边栏,不会在侧边显示任何内容。 ```js window.$docsify = { - coverpage: true, + hideSidebar: true, +}; +``` - // 自定义文件名 - coverpage: 'cover.md', +## homepage - // 多个封面页 - coverpage: ['/', '/zh-cn/'], +- 类型:`String` +- 默认:`'README.md'` - // 多个封面页,并指定文件名 - coverpage: { - '/': 'cover.md', - '/zh-cn/': 'cover.md', - }, +文档文件夹中的 `README.md` 将被视为网站的主页,但有时你可能需要将另一个文件作为主页。 + +```js +window.$docsify = { + // Change to /home.md + homepage: 'home.md', + + // Or use the readme in your repo + homepage: + 'https://raw.githubusercontent.com/docsifyjs/docsify/main/README.md', }; ``` -## logo +## keyBindings + +- 类型:`Boolean|Object` +- 默认:`Object` + - \\ 切换侧边栏菜单 + - / 焦点在[搜索](zh-cn/plugins#full-text-search)文本框处。 还支持 alt / ctrl + k。 -- 类型: `String` +将组合键绑定到自定义回调函数。 -在侧边栏中出现的网站图标,你可以使用`CSS`来更改大小 +键 `bindings` 定义为用 `+` 分隔的大小写不敏感的字符串值。 修改键值包括 `alt`、`ctrl`、`meta` 和 `shift`。 非修饰符键值应与键盘事件的 [key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) 或 [code](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code) 值相匹配。 + +`callback` 函数接收[按键事件](https://developer.mozilla.org/en-US/docs/Web/API/Element/keydown_event)作为参数。 + +!> 让网站访问者知道你的自定义按键绑定功能可用! 如果绑定与 DOM 元素相关联,可考虑插入一个 `` 元素作为视觉提示(如alt+a),或添加 [title](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/title) 和 [aria-keyshortcuts](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-keyshortcuts) 属性作为悬停/焦点提示。 ```js window.$docsify = { - logo: '/_media/icon.svg', + keyBindings: { + // Custom key binding + myCustomBinding: { + bindings: ['alt+a', 'shift+a'], + callback(event) { + alert('Hello, World!'); + }, + }, + }, }; ``` -## name +通过将绑定配置设置为 `false`,可以完全或单独禁用按键绑定。 -- 类型:`String` +```js +window.$docsify = { + // Disable all key bindings + keyBindings: false, +}; +``` -文档标题,会显示在侧边栏顶部。 +```js +window.$docsify = { + keyBindings: { + // Disable individual key bindings + focusSearch: false, + toggleSidebar: false, + }, +}; +``` + +## loadNavbar + +- 类型:`Boolean|String` +- 默认:`false` + +如果**true**,则从 Markdown 文件 `_navbar.md` 加载导航栏,否则从指定路径加载。 ```js window.$docsify = { - name: 'docsify', + // 加载 _navbar.md + loadNavbar: true, + + // 加载 nav.md + loadNavbar: 'nav.md', }; ``` -name 项也可以包含自定义 HTML 代码来方便地定制。 +## loadSidebar + +- 类型:`Boolean|String` +- 默认:`false` + +如果**true**,则从 Markdown 文件 `_sidebar.md` 加载侧边栏,否则从指定路径加载。 ```js window.$docsify = { - name: 'docsify', + // 加载 _sidebar.md + loadSidebar: true, + + // 加载 summary.md + loadSidebar: 'summary.md', }; ``` -## nameLink +## logo - 类型:`String` -- 默认值:`window.location.pathname` -点击文档标题后跳转的链接地址。 +在侧边栏显示的网站 Logo。 你可以使用 CSS 调整它的大小。 + +!> 只有同时设置了 `name`,Logo 才会可见。 请参阅 [name](#name) 配置。 ```js window.$docsify = { - nameLink: '/', - - // 按照路由切换 - nameLink: { - '/zh-cn/': '/zh-cn/', - '/': '/', - }, + logo: '/_media/icon.svg', }; ``` ## markdown -- 类型: `Object|Function` +- 类型:`Function` 参考 [Markdown 配置](zh-cn/markdown.md)。 @@ -291,218 +396,301 @@ window.$docsify = { markdown: { smartypants: true, renderer: { - link: function() { + link() { // ... }, }, }, // function - markdown: function(marked, renderer) { + markdown(marked, renderer) { // ... return marked; }, }; ``` -## themeColor +## maxLevel -- 类型:`String` +- 类型:`Number` +- 默认:`6` -替换主题色。利用 [CSS3 支持变量](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_variables)的特性,对于老的浏览器有 polyfill 处理。 +最大表格内容级别。 ```js window.$docsify = { - themeColor: '#3F51B5' + maxLevel: 4, }; ``` -## alias +## mergeNavbar -- 类型:`Object` +- 类型:`Boolean` +- 默认:`false` -定义路由别名,可以更自由的定义路由规则。 支持正则。 +在较小的屏幕上,导航栏将与侧边栏合并。 ```js window.$docsify = { - alias: { - '/foo/(.*)': '/bar/$1', // supports regexp - '/zh-cn/changelog': '/changelog', - '/changelog': - 'https://raw.githubusercontent.com/docsifyjs/docsify/master/CHANGELOG', - '/.*/_sidebar.md': '/_sidebar.md', // See #301 - }, + mergeNavbar: true, }; ``` -## autoHeader +## name -- 类型:`Boolean` +- 类型:`String` -同时设置 `loadSidebar` 和 `autoHeader` 后,可以根据 `_sidebar.md` 的内容自动为每个页面增加标题。[#78](https://github.com/docsifyjs/docsify/issues/78) +在侧边栏中显示的网站名称。 ```js window.$docsify = { - loadSidebar: true, - autoHeader: true, + name: 'docsify', }; ``` -## executeScript +名称字段也可包含自定义 HTML,以方便定制: + +```js +window.$docsify = { + name: '<0>docsify', +}; +``` + +## nameLink + +- 类型:`String` +- 默认: `'window.location.pathname'` + +网站 `name` 链接到的 URL。 + +```js +window.$docsify = { + nameLink: '/', + + // 按照路由切换 + nameLink: { + '/zh-cn/': '/zh-cn/', + '/': '/', + }, +}; +``` + +## nativeEmoji - 类型:`Boolean` +- 默认:`false` -执行文档里的 script 标签里的脚本,只执行第一个 script ([demo](zh-cn/themes.md))。 如果 Vue 存在,则自动开启。 +使用 GitHub 风格表情图像或原生表情符号字符来渲染表情符号。 ```js window.$docsify = { - executeScript: true, + nativeEmoji: true, }; ``` ```markdown -## This is test +:smile: +:partying_face: +:joy: +:+1: +:-1: +``` - +`false` 时为 GitHub 样式的图像: + + + smile + partying_face + joy + +1 + -1 + + +`false` 时为原生字符的图像: + + + 😄︎ + 🥳︎ + 😂︎ + 👍︎ + 👎︎ + + +要渲染短代码作为文本,用“:”HTML实体替换`:`字符。 + +```markdown +:100: ``` -注意如果执行的是一个外链脚本,比如 jsfiddle 的内嵌 demo,请确保引入 [external-script](plugins.md?id=外链脚本-external-script) 插件。 + -## noEmoji +:100: -- 类型: `Boolean` + + +## noCompileLinks -禁用 emoji 解析。 +- 类型:`Array` + +有时我们不希望 docsify 处理我们的链接。 参考 [#203](https://github.com/docsifyjs/docsify/issues/203)。 我们可以通过指定字符串数组来跳过某些链接的编译。 每个字符串都会被转换成正则表达式 (`RegExp`),链接的 _whole_ href 会与之匹配。 ```js window.$docsify = { - noEmoji: true, + noCompileLinks: ['/foo', '/bar/.*'], }; ``` -?> 如果该选项设为 `false` ,但是你不想解析一些特别的表情符,[参考这里](https://github.com/docsifyjs/docsify/issues/742#issuecomment-586313143) - -## mergeNavbar +## noEmoji -- 类型: `Boolean` +- 类型:`Boolean` +- 默认:`false` -小屏设备下合并导航栏到侧边栏。 +禁用表情符号解析,并将所有表情符号短代码显示为文本。 ```js window.$docsify = { - mergeNavbar: true, + noEmoji: true, }; ``` -## formatUpdated +```markdown +:100: +``` -- 类型: `String|Function` + -我们可以通过 **{docsify-updated}** 变量显示文档更新日期. 并且通过 `formatUpdated`配置日期格式。参考 [https://github.com/lukeed/tinydate#patterns](https://github.com/lukeed/tinydate#patterns) +:100: -```js -window.$docsify = { - formatUpdated: '{MM}/{DD} {HH}:{mm}', + - formatUpdated: function(time) { - // ... +要禁用单个短代码的表情符号解析功能,请将 `:` 字符替换为 `:` HTML 实体。 - return time; - }, -}; +```markdown +:100: + +:100: ``` -## externalLinkTarget + -- 类型: `String` -- 默认: `_blank` +:100: -外部链接的打开方式。默认为 `_blank` (在新窗口或者标签页中打开) +:100: -```js -window.$docsify = { - externalLinkTarget: '_self', // default: '_blank' -}; -``` + -## cornerExternalLinkTarget +## notFoundPage -- 类型:`String` -- 默认值:`_blank` +- 类型:`Boolean|String|Object` +- 默认:`false` -右上角链接的打开方式。默认为 `_blank` (在新窗口或者标签页中打开) +显示默认 "404 - Not Found" 消息: ```js window.$docsify = { - cornerExternalLinkTarget: '_self', // default: '_blank' + notFoundPage: false, }; ``` -## externalLinkRel +在找不到指定页面时加载 `_404.md`: -- 类型: `String` -- 默认值: `noopener` +```js +window.$docsify = { + notFoundPage: true, +}; +``` -默认为 `noopener` (no opener) 可以防止新打开的外部页面(当 [externalLinkTarget](#externallinktarget) 设为 `_blank` 时)能够控制我们的页面,没有设为 `_blank` 的话就不需要设置这个选项了。 +加载自定义404页面: ```js window.$docsify = { - externalLinkRel: '', // default: 'noopener' + notFoundPage: 'my404.md', }; ``` -## routerMode - -- 类型: `String` -- 默认: `hash` +加载正确的本地化过的404页面: ```js window.$docsify = { - routerMode: 'history', // default: 'hash' + notFoundPage: { + '/': '_404.md', + '/de': 'de/_404.md', + }, }; ``` -## crossOriginLinks +> 注意:配置过 `fallbackLanguages` 选项的页面与 `notFoundPage` 选项冲突。 -- type: `Array` +## onlyCover -当设置了`routerMode:'history'`时,你可能会面临跨域的问题,参见 [#1379](https://github.com/docsifyjs/docsify/issues/1379) 。在 Markdown 内容中,有一个简单的方法可以解决,参见[helpers](zh-cn/helpers.md) 中的跨域链接。 +- 类型:`Boolean` +- 默认:`false` + +只在访问主页时加载封面。 ```js window.$docsify = { - crossOriginLinks: ['https://example.com/cross-origin-link'], + onlyCover: false, }; ``` -## noCompileLinks +## relativePath -- 类型: `Array` +- 类型:`Boolean` +- 默认:`false` -有时我们不希望 docsify 处理我们的链接。 参考 [#203](https://github.com/docsifyjs/docsify/issues/203) +如果该选项设为 **true** ,那么链接会使用相对路径。 + +例如,目录结构如下: + +```text +. +└── docs + ├── README.md + ├── guide.md + └── zh-cn + ├── README.md + ├── guide.md + └── config + └── example.md +``` + +如果**启用**了相对路径,当前链接是 `http://domain.com/zh-cn/README` ,对应的链接会解析为: + +```text +guide.md => http://domain.com/zh-cn/guide +config/example.md => http://domain.com/zh-cn/config/example +../README.md => http://domain.com/README +/README.md => http://domain.com/README +``` ```js window.$docsify = { - noCompileLinks: ['/foo', '/bar/.*'], + // 启用相对路径 + relativePath: true, + + // 禁用相对路径(默认值) + relativePath: false, }; ``` -## onlyCover +## repo -- 类型: `Boolean` +- 类型:`String` -只在访问主页时加载封面。 +配置仓库地址或者 `username/repo` 的字符串,会在页面右上角渲染一个 [GitHub Corner](http://tholman.com/github-corners/) 挂件。 ```js window.$docsify = { - onlyCover: false, + repo: 'docsifyjs/docsify', + // or + repo: 'https://github.com/docsifyjs/docsify/', }; ``` ## requestHeaders -- 类型: `Object` +- 类型:`Object` 设置请求资源的请求头。 @@ -524,96 +712,250 @@ window.$docsify = { }; ``` -## ext +## routerMode -- 类型: `String` +配置网站路径将使用的 URL 格式。 -资源的文件扩展名。 +- 类型:`String` +- 默认:`'hash'` ```js window.$docsify = { - ext: '.md', + routerMode: 'history', // default: 'hash' }; ``` -## fallbackLanguages +对于静态部署的站点(如 在 GitHub 页面上)基于哈希的路由设置更简单。 对于可以重写 URL 的网站,基于历史记录的格式 +更好(特别是对于搜索引擎优化而言,基于哈希值的路由对搜索引擎并不 +那么友好)。 + +基于哈希值的路由选择意味着所有 URL 路径都将在 +地址栏中以 `/#/` 作为前缀。 这是一种技巧,它允许网站加载 `/index.html`,然后 +使用 `#` 后面的路径来决定加载哪些 markdown 文件。 例如, +一个完整的基于哈希值的 URL 可以如下所示: +`https://example.com/#/path/to/page`。 浏览器将实际加载 +`https://example.com`(假设你的静态服务器默认提供 +`index.html`,大多数服务器都是这样做的),然后 Docsify JavaScript 代码将 +查看 `/#/...`,并确定要加载和渲染的标记符文件。 +此外,点击链接时,Docsify 路由器会动态更改哈希值之后的 +内容。 无论如何,`location.pathname` 的值仍将是 +`/`。 当在浏览器中访问这样的 URL 时,哈希路径的部分_不会_被发送到服务器。 + +另一方面,基于历史的路由意味着 Docsify JavaScript 将使用 +[History API](https://developer.mozilla.org/en-US/docs/Web/API/History_API) +来动态更改 URL,而无需使用 `#`。 这意味着,搜索引擎将把所有网址 +视为"真实"网址,在浏览器中访问网址时,完整路径将被发送到 +服务器。 例如,URL 可能看起来像 +`https://example.com/path/to/page`。 浏览器将尝试直接从服务器加载完整的 URL +,而不仅仅是 `https://example.com`。 这样做的好处是这些类型的 URL 对搜索引擎更友好,可以被索引(耶!)。 但缺点是,你的服务器或 +存放网站文件的地方必须能够处理这些 URL。 各种静态 +网站托管服务允许配置"重写规则",这样就可以配置 +服务器,使其无论访问 +的路径是什么,都始终发回 `/index.html`。 `location.pathname `的值将显示 `/path/to/page`,因为 +实际上已经发送到服务器。 + +简要说明:从 `hash` 路由开始(默认)。 如果你有冒险精神,可以学习 +如何配置服务器,然后切换到 `history` 模式,以获得更好的体验 +,URL 中不含 `#`,并进行搜索引擎优化。 + +> **注意** 如果使用 `routerMode: 'history'`,可能需要添加 +> [`alias`](#alias),以便无论访问哪个路径,都能 +> 加载 `_sidebar.md` 和 `_navbar.md` 文件。 +> +> ```js +> window.$docsify = { +> routerMode: 'history', +> alias: { +> '/.*/_sidebar.md': '/_sidebar.md', +> '/.*/_navbar.md': '/_navbar.md', +> }, +> }; +> ``` + +## routes + +- 类型:`Object` -- 类型: `Array` +定义能动态提供内容的 “虚拟” 路由。 路由是预期路径与字符串或函数之间的映射。 如果映射值是字符串,它将被视为 markdown 并进行相应的解析。 如果是函数,则应返回 markdown 内容。 -一个语言列表。在浏览这个列表中的语言的翻译文档时都会在请求到一个对应语言的翻译文档,不存在时显示默认语言的同名文档 +路由函数接收最多三个参数: -Example: +1. `route` - 请求的路由路径(例如`/bar/baz`) +2. `matched` - 路由匹配的 [`RegExpMatchArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match)(例如,对于 `/bar/(.+)`,你会得到 `['/bar/baz', 'baz']`) +3. `next` - 这是一个回调,当路由函数为异步时可以调用 -- 尝试访问`/de/overview`,如果存在则显示 -- 如果不存在则尝试`/overview`(取决于默认语言),如果存在即显示 -- 如果也不存在,显示404页面 +请注意,顺序很重要! 路由的匹配顺序与你声明路由的顺序相同,这意味着在路由重叠的情况下,你可能希望先列出更具体的路由。 ```js window.$docsify = { - fallbackLanguages: ['fr', 'de'], + routes: { + // Basic match w/ return string + '/foo': '# Custom Markdown', + + // RegEx match w/ synchronous function + '/bar/(.*)'(route, matched) { + return '# Custom Markdown'; + }, + + // RegEx match w/ asynchronous function + '/baz/(.*)'(route, matched, next) { + fetch('/api/users?id=12345') + .then(response => { + next('# Custom Markdown'); + }) + .catch(err => { + // Handle error... + }); + }, + }, }; ``` -## notFoundPage +除字符串外,路由函数还可以返回一个假值(`null` \ `undefined`),以表示忽略当前请求: -- 类型: `Boolean` | `String` | `Object` +```js +window.$docsify = { + routes: { + // accepts everything other than dogs (synchronous) + '/pets/(.+)'(route, matched) { + if (matched[0] === 'dogs') { + return null; + } else { + return 'I like all pets but dogs'; + } + } + + // accepts everything other than cats (asynchronous) + '/pets/(.*)'(route, matched, next) { + if (matched[0] === 'cats') { + next(); + } else { + // Async task(s)... + next('I like all pets but cats'); + } + } + } +} +``` -在找不到指定页面时加载`_404.md`: +最后,如果某个特定路径有真正的 markdown 文件(因此路由不应匹配该文件),可以通过返回一个明确的 `false` 值将其排除在外: ```js window.$docsify = { - notFoundPage: true, + routes: { + // if you look up /pets/cats, docsify will skip all routes and look for "pets/cats.md" + '/pets/cats'(route, matched) { + return false; + } + + // but any other pet should generate dynamic content right here + '/pets/(.+)'(route, matched) { + const pet = matched[0]; + return `your pet is ${pet} (but not a cat)`; + } + } +} +``` + +## skipLink + +- 类型:`Boolean|String|Object` +- 默认:`'Skip to main content'` + +决定是否/如何显示网站的 [skip navigation link](https://webaim.org/techniques/skipnav/)。 + +```js +// Render skip link for all routes (default) +window.$docsify = { + skipLink: 'Skip to main content', }; ``` -加载自定义404页面: +```js +// Render localized skip links based on route paths +window.$docsify = { + skipLink: { + '/es/': 'Saltar al contenido principal', + '/de-de/': 'Ga naar de hoofdinhoud', + '/ru-ru/': 'Перейти к основному содержанию', + '/zh-cn/': '跳到主要内容', + }, +}; +``` ```js +// Do not render skip link window.$docsify = { - notFoundPage: 'my404.md', + skipLink: false, }; ``` -加载正确的本地化过的404页面: +## subMaxLevel + +- 类型:`Number` +- 默认:`0` + +在自定义侧边栏中添加目录 (TOC)。 ```js window.$docsify = { - notFoundPage: { - '/': '_404.md', - '/de': 'de/_404.md', - }, + subMaxLevel: 2, +}; +``` + +如果你在侧边栏中设置了主页链接,并希望它在访问根网址时显示为活动状态,请确保相应更新侧边栏: + +```markdown +- Sidebar + - [Home](/) + - [Another page](another.md) +``` + +详见[#1131](https://github.com/docsifyjs/docsify/issues/1131)。 + +## themeColor ⚠️ + +!> 自 v5 起已弃用。 使用 `--theme-color` [主题属性](zh-cn/themes#theme-properties) [自定义](zh-cn/themes#customization) 主题颜色。 + +- 类型:`String` + +自定义主题颜色。 + +```js +window.$docsify = { + themeColor: '#3F51B5', }; ``` -> 注意: 配置过`fallbackLanguages`这个选项的页面与这个选项`notFoundPage`冲突。 +## topMargin ⚠️ -## topMargin +!> 自 v5 起已弃用。 在使用粘性导航栏时,使用 `--scroll-padding-top` [主题属性](zh-cn/themes#theme-properties) 指定滚动边距。 -- 类型: `Number` -- 默认值: `0` +- 类型:`Number|String` +- 默认:`0` -让你的内容页在滚动到指定的锚点时,距离页面顶部有一定空间。当你使用 `固定页头` 布局时这个选项很有用,可以让你的锚点对齐标题栏。 +在视口顶部添加滚动填充。 当你添加了一个粘性或"固定"元素,并希望自动滚动与元素底部对齐时,该功能非常有用。 ```js window.$docsify = { - topMargin: 90, // default: 0 + topMargin: 90, // 90, '90px', '2rem', etc. }; ``` ## vueComponents -- type: `Object` +- 类型:`Object` -创建并注册全局 [Vue组件](https://vuejs.org/v2/guide/components.html) 。组件是以组件名称为键,以包含 Vue 选项的对象为值来指定的。组件`data`对每个实例都是唯一的,并且在用户浏览网站时不会持久。 +创建并注册全局 [Vue](https://vuejs.org/guide/essentials/component-basics.html)。 指定组件时,以组件名称为键,以包含 Vue 选项的对象为值。 组件 `data` 在每个实例中都是唯一的,不会在用户导航站点时持续存在。 ```js window.$docsify = { vueComponents: { 'button-counter': { template: ` - + `, data() { return { @@ -635,9 +977,9 @@ window.$docsify = { ## vueGlobalOptions -- type: `Object` +- 类型:`Object` -指定 [Vue选项](https://vuejs.org/v2/api/#Options-Data) ,用于未明确使用[vueMounts](#mounting-dom-elements)、[vueComponents](#components)或[markdown脚本](#markdown-script)挂载的 Vue 内容。对全局`data`的更改将持续存在,并在任何使用全局引用的地方得到反映。 +指定全局 Vue 选项,以便与未通过 [vueMounts](#mounting-dom-elements)、[vueComponents](#components) 或 [markdown script](#markdown-script) 明确加载的 Vue 内容一起使用。 对全局 `data` 的更改将持续存在,并在使用全局引用的任何地方得到反映。 ```js window.$docsify = { @@ -652,11 +994,11 @@ window.$docsify = { ``` ```markdown -

- +<0> + <1>- {{ count }} - -

+ <2>+ + ``` @@ -669,9 +1011,9 @@ window.$docsify = { ## vueMounts -- type: `Object` +- 类型:`Object` -指定要挂载为 [Vue实例](https://vuejs.org/v2/guide/instance.html) 的 DOM 元素及其相关选项。挂载元素使用 [CSS选择器](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors) 作为键,并使用包含 Vue 选项的对象作为其值。每次加载新页面时,Docsify 将挂载主内容区域中第一个匹配的元素。挂载元素`data`对每个实例来说都是唯一的,并且不会在用户浏览网站时持久存在。 +指定要挂载为 Vue 实例的 DOM 元素及其相关选项。 每次加载新页面时,Docsify 都会在主内容区域挂载第一个匹配元素。 挂载元素 `data` 是每个实例的唯一特性,不会在用户导航站点时持续存在。 ```js window.$docsify = { diff --git a/cover.md b/cover.md index cf4927a..fa35847 100644 --- a/cover.md +++ b/cover.md @@ -1,22 +1,15 @@ # 封面 -通过设置 `coverpage` 参数,可以开启渲染封面的功能。具体用法见[配置项#coverpage](configuration.md#coverpage)。 +通过设置 `coverpage` 为 **true** 来开启渲染封面功能。 参见 [coverpage configuration](zh-cn/configuration#coverpage)。 ## 基本用法 -封面的生成同样是从 markdown 文件渲染来的。开启渲染封面功能后在文档根目录创建 `_coverpage.md` 文件。渲染效果如本文档。 +设置 `coverpage` 为 **true**, 并创建 `_coverpage.md` : -_index.html_ - -```html - - - - +```js +window.$docsify = { + coverpage: true, +}; ``` ```markdown @@ -24,44 +17,51 @@ _index.html_ ![logo](_media/icon.svg) -# docsify 3.5 +# docsify -> 一个神奇的文档网站生成器。 +> A magical documentation site generator -- 简单、轻便 (压缩后 ~21kB) -- 无需生成 html 文件 -- 众多主题 +- Simple and lightweight +- No statically built HTML files +- Multiple themes [GitHub](https://github.com/docsifyjs/docsify/) [Get Started](#docsify) ``` -## 自定义背景 +## 定制化 -目前的背景是随机生成的渐变色,我们自定义背景色或者背景图。在文档末尾用添加图片的 Markdown 语法设置背景。 +封面页可使用[主题属性](zh-cn/theme#theme-properties)进行自定义: -`_coverpage.md` + -```markdown - +```css +:root { + --cover-bg : url('path/to/image.png'); + --cover-bg-overlay : rgba(0, 0, 0, 0.5); + --cover-color : #fff; + --cover-title-color: var(--theme-color); + --cover-title-font : 600 var(--font-size-xxxl) var(--font-family); +} +``` -# docsify 3.5 +或者,可以在封面页面 markdown 中指定背景颜色或图像。 -[GitHub](https://github.com/docsifyjs/docsify/) -[Get Started](#quick-start) - - +```markdown + -![](_media/bg.png) +![color](#f0f0f0) +``` - +```markdown + -![color](#f0f0f0) +![](_media/bg.png) ``` ## 封面作为首页 -通常封面和首页是同时出现的,当然你也是当封面独立出来通过设置[onlyCover 选项](zh-cn/configuration.md#onlycover)。 +通常,封面页和主页同时出现。 当然,你也可以用[`onlyCover`](zh-cn/configuration#onlycover)选项分离封面。 ## 多个封面 @@ -81,11 +81,11 @@ _index.html_ └── _coverpage.md ``` -那么你可以这么配置 +现在,你可以设置 ```js window.$docsify = { - coverpage: ['/', '/zh-cn/'] + coverpage: ['/', '/zh-cn/'], }; ``` @@ -95,7 +95,7 @@ window.$docsify = { window.$docsify = { coverpage: { '/': 'cover.md', - '/zh-cn/': 'cover.md' - } + '/zh-cn/': 'cover.md', + }, }; ``` diff --git a/custom-navbar.md b/custom-navbar.md index b5438f2..1b6628b 100644 --- a/custom-navbar.md +++ b/custom-navbar.md @@ -1,6 +1,7 @@ # 自定义导航栏 ## HTML + 如果你需要定制导航栏,可以用 HTML 创建一个导航栏。 !> 注意:文档的链接都要以 `#/` 开头。 @@ -11,71 +12,79 @@
``` -## 配置文件 - -那我们可以通过 Markdown 文件来配置导航。首先配置 `loadNavbar`,默认加载的文件为 `_navbar.md`。具体配置规则见[配置项#loadNavbar](configuration.md#loadnavbar)。 +## Markdown +或者,你也可以将 `loadNavbar` 设置为 **true**,并创建 `_navbar.md`,从而创建基于 markdown 的自定义导航文件。比较 [loadNavbar configuration](zh-cn/configuration#loadnavbar)。 ```html - + ``` ```markdown -* [En](/) -* [简体中文](/zh-cn/) +- [En](/) +- [简体中文](/zh-cn/) +``` + +要创建下拉菜单: + +```markdown + + +- Translations + + - [En](/) + - [简体中文](/zh-cn/) ``` !> 你需要在 `./docs` 目录下创建一个 `.nojekyll` 文件,以防止 GitHub Pages 忽略下划线开头的文件。 -`_navbar.md` 加载逻辑和 `sidebar` 文件一致,从每层目录下获取。例如当前路由为 `/zh-cn/custom-navbar` 那么是从 `/zh-cn/_navbar.md` 获取导航栏。 +`_navbar.md` 会从每一级目录加载。 如果当前目录中没有 `_navbar.md`,则会返回上一级目录。 例如,如果当前路径是 `/guide/quick-start`,则将从 `/guide/_navbar.md` 加载 `_navbar.md`。 ## 嵌套 -如果导航内容过多,可以写成嵌套的列表,会被渲染成下拉列表的形式。 - +你可以通过缩进在某个父级下的项目来创建子列表。 ```markdown - -* 入门 +- 入门 - * [快速开始](zh-cn/quickstart.md) - * [多页文档](zh-cn/more-pages.md) - * [定制导航栏](zh-cn/custom-navbar.md) - * [封面](zh-cn/cover.md) + - [快速开始](zh-cn/quickstart.md) + - [多页文档](zh-cn/more-pages.md) + - [定制导航栏](zh-cn/custom-navbar.md) + - [封面](zh-cn/cover.md) -* 配置 - * [配置项](zh-cn/configuration.md) - * [主题](zh-cn/themes.md) - * [使用插件](zh-cn/plugins.md) - * [Markdown 配置](zh-cn/markdown.md) - * [代码高亮](zh-cn/language-highlight.md) +- 配置 + - [配置项](zh-cn/configuration.md) + - [主题](zh-cn/themes.md) + - [使用插件](zh-cn/plugins.md) + - [Markdown 配置](zh-cn/markdown.md) + - [代码高亮](zh-cn/language-highlight.md) ``` 效果图 -![嵌套导航栏](../_images/zh-cn/nested-navbar.png '嵌套导航栏') +![嵌套导航栏](../_images/zh-cn/nested-navbar.png "嵌套导航栏") ## 整合自定义导航栏与 emoji 插件 -如果你使用 [emoji 插件](plugins#emoji): +如果你使用 [emoji 插件](zh-cn/plugins#emoji): ```html @@ -83,10 +92,10 @@ - - + + ``` 例如,你可以在自定义导航栏 Markdown 文件中使用旗帜表情: @@ -94,6 +103,6 @@ ```markdown -* [:us:, :uk:](/) -* [:cn:](/zh-cn/) +- [:us:, :uk:](/) +- [:cn:](/zh-cn/) ``` diff --git a/deploy.md b/deploy.md index 76aefa0..88c9f96 100644 --- a/deploy.md +++ b/deploy.md @@ -1,20 +1,21 @@ # 部署 -和 GitBook 生成的文档一样,我们可以直接把文档网站部署到 GitHub Pages 或者 VPS 上。 +与 [GitBook](https://www.gitbook.com) 类似,你可以将文件部署到 GitHub Pages、GitLab Pages或 VPS 上。 ## GitHub Pages -GitHub Pages 支持从三个地方读取文件 +GitHub Pages 支持从三个地方读取文件: - `docs/` 目录 - master 分支 - gh-pages 分支 -我们推荐直接将文档放在 `docs/` 目录下,在设置页面开启 **GitHub Pages** 功能并选择 `master branch /docs folder` 选项。 +建议将文件保存到仓库 `main` 分支的 `./docs` 子文件夹中。 在设置页面开启 **GitHub Pages** 功能并选择 `main branch /docs folder` 选项。 -![github pages](../_images/deploy-github-pages.png) +![GitHub Pages](../_images/deploy-github-pages.png) -!> 可以将文档放在根目录下,然后选择 **master 分支** 作为文档目录。你需要在部署位置下放一个 `.nojekyll` 文件(比如 `/docs` 目录或者 gh-pages 分支) +!> 你也可以在根目录中保存文件并选择 `main branch` 。 +你需要在部署位置下放一个 `.nojekyll` 文件(比如 `/docs` 目录或者 gh-pages 分支) ## GitLab Pages @@ -36,19 +37,15 @@ pages: - master ``` -!> 你可以用 `- cp -r docs/. public` 替换脚本, 如果 `./docs` 是你的 docsify 子文件夹。 - -## Gitee Pages - -在对应的 Gitee 仓库服务中选择 `Gitee Pages`,选择您要部署的分支,填写您要部署的分支上的目录,例如`docs`,填写完成之后点击启动即可。 +!> 你可以用 `- cp -r docs/. public` 替换脚本,如果 `./docs` 是你的 docsify 子文件夹。 ## Firebase 主机 -!> 你需要先使用谷歌账号登陆 [Firebase 控制台](https://console.firebase.google.com) ,然后使用 `npm i -g firebase-tools` 命令安装 Firebase CLI 。 +!> 你需要先使用谷歌账号登录 [Firebase 控制台](https://console.firebase.google.com),然后使用 `npm i -g firebase-tools` 命令安装 Firebase CLI 。 -使用命令行浏览到你的 Firebase 项目目录,大致是 `~/Projects/Docs` 等等。在这里执行 `firebase init` 命令,从菜单中选择 `Hosting` (使用 **空格键** 选择, **方向键** 切换选项, **回车键** 确认。遵照安装说明。 +使用终端,确定并导航到你的 Firebase 项目目录。 这可能是 `~/Projects/Docs`,等等。 在这里执行 `firebase init` 命令,从菜单中选择 `Hosting`(使用**空格键**选择,**方向键**切换选项,**回车键**确认)。 遵照安装说明。 -然后你会有个 `firebase.json` 文件,内容大致如下(我把部署目录从 `public` 改为 `site` 了): +你的 `firebase.json` 文件应该与此相似(我将部署目录从 `public` 改为了 `site`): ```json { @@ -63,9 +60,7 @@ pages: ## VPS -和部署所有静态网站一样,只需将服务器的访问根目录设定为 `index.html` 文件。 - -例如 nginx 的配置 +使用以下 nginx 配置。 ```nginx server { @@ -81,16 +76,20 @@ server { ## Netlify -1. 登陆你的[Netlify](https://www.netlify.com/)账号 -2. 在[dashboard](https://app.netlify.com/)页上点击 **New site from Git** -3. 选择那个你用来存储文档的git仓库,将 **Build Command** 留空, 将 **Publish directory** 区域填入你的`index.html`所在的目录,例如:填入`docs`(如果你的`index.html`的相对路径是`docs/index.html`的话) +1. 登录你的[Netlify](https://www.netlify.com/)账号。 +2. 在 [dashboard](https://app.netlify.com/) 页面,单击 **Add New Site**。 +3. 选择 GitHub。 +4. 选择存放文档的存储库,在**Base Directory**中添加存放文件的子文件夹。 例如,应为 `docs`。 +5. 在**Build Command**区域留空。 +6. 在**Publish directory**区域,如果你在**Base Directory**中添加了 `docs`,你会看到 Publish directory 中填充了 `docs/` +7. Netlify 很聪明,会在 `docs/` 文件夹中查找 `index.html` 文件。 ### HTML5 路由 -当使用HTML5路由时,你需要设置一条将所有请求重定向到你的`index.html`的重定向规则。当你使用Netlify时这相当简单,在你的**Publish Directory**下创建一个`_redirects`文件,写进以下内容就可以了 :tada: +当使用 HTML5 路由时,你需要设置一条将所有请求重定向到你的 `index.html` 的重定向规则。 当你使用Netlify时这相当简单。 只需在 docs 目录中创建一个名为 `_redirects` 的文件,并将此代码段添加到文件中,就可以了: ```sh -/* /index.html 200 +/* /index.html 200 ``` ## Vercel @@ -101,21 +100,21 @@ server { ## AWS Amplify -1. 在 Docsify 项目的 `index.html` 中设置 routerMode 为 *history* 模式: +1. 在 Docsify 项目的 `index.html` 中设置 routerMode 为 _history_ 模式。 ```html ``` 2. 登录到你的 [AWS 控制台](https://aws.amazon.com)。 3. 到 [AWS Amplify 仪表盘](https://aws.amazon.com/amplify)。 -4. 选择 **Deploy** 路线来设置你的项目。 -5. 若有提示,如果你希望在项目根目录下保存你的文档,保持构建设置为空;如果你想保存文档到其它目录,修改`amplify.yml`: +4. 选择 **Deploy** 路径来设置你的项目。 +5. 若有提示,如果你希望在项目根目录下保存你的文档,保持构建设置为空。 如果你从不同目录提供文档,请自定义你的 amplify.yml ```yml version: 0.1 @@ -132,53 +131,85 @@ frontend: paths: [] ``` -6. 依次添加如下跳转规则。注意第二条的 PNG 是图片格式,如果你要使用其它图片格式,可以相应修改。 +6. 在其显示的顺序中添加以下重定向规则。 请注意,第二项记录是一个 PNG 图像,您可以在其中使用任何图像格式来更改它。 + +| Source address | Target address | Type | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------- | +| /<\*>.md | /<\*>.md | 200 (Rewrite) | +| /<\*>.png | /<\*>.png | 200 (Rewrite) | +| /<\*> | /index.html | 200 (Rewrite) | -| Source address | Target address | Type | -|----------------|----------------|---------------| -| /<*>.md | /<*>.md | 200 (Rewrite) | -| /<*>.png | /<*>.png | 200 (Rewrite) | -| /<*> | /index.html | 200 (Rewrite) | +## Stormkit + +1. 登录到你的 [Stormkit](https://www.stormkit.io) 帐户。 +2. 使用用户界面,从支持 Git 提供商中(GitHub 、GitLab或 Bitbucket) 导入你的文档项目。 +3. 前往 Stormkit 中的项目生产环境或在需要时创建一个新环境。 +4. 在你的 Stormkit 配置中验证构建命令。 默认情况下,Stormkit CI 将运行 `npm run build` 但你可以在此页面上指定一个自定义构建命令。 +5. 将输出文件夹设置为 `docs` +6. 点击“立即部署”按钮来部署你的站点。 + +在 [Stormkit Documentation](https://stormkit.io/docs) 中阅读更多内容。 ## Docker - 创建 docsify 的文件 -你需要准备好初始文件,而不是在容器中制作。 -请参阅 [快速开始](https://docsify.js.org/#/zh-cn/quickstart) 部分,了解如何手动或使用 [docsify-cli](https://github.com/docsifyjs/docsify-cli) 创建这些文件。 + 你需要准备初始文件,而不是将其设在容器内。 + 请参阅 [快速开始](zh-cn/quickstart) 部分,了解如何手动或使用 [docsify-cli](https://github.com/docsifyjs/docsify-cli) 创建这些文件。 -```sh -index.html -README.md -``` + ```sh + index.html + README.md + ``` - 创建 Dockerfile -```Dockerfile -FROM node:latest -LABEL description="A demo Dockerfile for build Docsify." -WORKDIR /docs -RUN npm install -g docsify-cli@latest -EXPOSE 3000/tcp -ENTRYPOINT docsify serve . -``` + ```Dockerfile + FROM node:latest + LABEL description="A demo Dockerfile for build Docsify." + WORKDIR /docs + RUN npm install -g docsify-cli@latest + EXPOSE 3000/tcp + ENTRYPOINT docsify serve . -创建成功后当前的目录结构应该是这样的: + ``` -```sh -index.html -README.md -Dockerfile -``` + 创建成功后当前的目录结构应该是这样的: + + ```sh + index.html + README.md + Dockerfile + ``` - 构建 docker 镜像 -```sh -docker build -f Dockerfile -t docsify/demo . -``` + ```sh + docker build -f Dockerfile -t docsify/demo . + ``` - 运行 docker 镜像 -```sh -docker run -itp 3000:3000 --name=docsify -v $(pwd):/docs docsify/demo -``` + ```sh + docker run -itp 3000:3000 --name=docsify -v $(pwd):/docs docsify/demo + ``` + +## Kinsta 静态网站托管 + +你可以将 **Docsify** 作为静态网站部署到 [Kinsta](https://kinsta.com/static-site-hosting/) 上。 + +1. 登录或创建账户以查看你的 [MyKinsta](https://my.kinsta.com/) 面板。 + +2. 通过 Git 提供商授权 Kinsta。 + +3. 从左侧边栏选择**Static Sites**,然后按**Add sites**。 + +4. 选择要部署的版本库和分支。 + +5. 在构建设置过程中,Kinsta 会自动尝试填写**Build command**、**Node version** 和 **Publish directory**。 如果不会,请填写以下内容: + + - Build command:留空 + - Node version:保留默认选择或特定版本(如 `18.16.0`) + - Publish directory:`docs` + +6. 点击**Create site**。 diff --git a/embed-files.md b/embed-files.md index 11269a7..2f9c5f1 100644 --- a/embed-files.md +++ b/embed-files.md @@ -1,69 +1,97 @@ # 文件嵌入 -docsify 4.6 开始支持嵌入任何类型的文件到文档里。你可以将文件当成 `iframe`、`video`、`audio` 或者 `code block`,如果是 Markdown 文件,甚至可以直接插入到当前文档里。 +从 Docsify 4.6 起可以嵌入任何类型的文件。 -这是一个嵌入 Markdown 文件的例子。 +你可以嵌入这些文件作为视频、音频、iframes 或代码块,甚至 Markdown 文件也可以直接嵌入文档。 + +这是一个嵌入 Markdown 文件的例子。 你只需要这样做: ```markdown [filename](../_media/example.md ':include') ``` -`example.md` 文件的内容将会直接显示在这里 +`example.md` 文件的内容将会直接显示在这里: -[filename](../_media/example.md ':include') +[filename](../_media/example.md ":include") + +你可以查看 [example.md](../_media/example.md ":ignore") 原始内容对比效果。 -你可以查看 [example.md](../_media/example.md ':ignore') 原始内容对比效果。 +通常情况下,这样的语法将会被当作链接处理。但是在 docsify 里,如果你添加一个 `:include` 选项,它就会被当作文件嵌入。 你可以随意使用单引号或双引号。 -通常情况下,这样的语法将会被当作链接处理。但是在 docsify 里,如果你添加一个 `:include` 选项,它就会被当作文件嵌入。 +外部链接也可以使用 - 只是替换目标。 如果你想要使用 gist URL,请查看[嵌入 gist](#embed-a-gist) 部分。 -## 嵌入的类型 +## 嵌入文件类型 -当前,嵌入的类型是通过文件后缀自动识别的,这是目前支持的类型: +目前,文件扩展名自动识别并以不同方式嵌入。 -* **iframe** `.html`, `.htm` -* **markdown** `.markdown`, `.md` -* **audio** `.mp3` -* **video** `.mp4`, `.ogg` -* **code** other file extension +支持这些类型: + +- **iframe** `.html`、`.htm` +- **markdown** `.markdown`、`.md` +- **audio** `.mp3` +- **video** `.mp4`、`.ogg` +- **code** 其它文件扩展 + +当然,你也可以强制指定类型。 例如,通过设置 `:type=code`,可将 Markdown 文件嵌入为代码块。 -当然,你也可以强制设置嵌入类型。例如你想将 Markdown 文件当作一个 `code block` 嵌入。 ```markdown [filename](../_media/example.md ':include :type=code') ``` 你会看到: -[filename](../_media/example.md ':include :type=code') +[filename](../_media/example.md ":include :type=code") + +## Markdown 与 YAML 元数据结合 + +Front Matter 通常在 Jekyl 等博客系统中使用,用于定义文档的元数据。 [front-matter.js](https://www.npmjs.com/package/front-matter) 包便于从文档中提取元数据(front matter)。 + +当使用 Markdown 时,YAML 元数据将从渲染的内容中删除。 在这种情况下不能使用属性。 + +```markdown +[filename](../_media/example-with-yaml.md ':include') +``` + +你将只获得内容 + +[filename](../_media/example-with-yaml.md ":include") ## 嵌入代码片段 -有时候你并不想嵌入整个文件,可能你只想要其中的几行代码,但你还要在 CI 系统中编译和测试该文件。 + +有时你不想嵌入整个文件。 也许是因为你只需要几行,但你想在 CI 中编译和测试该文件。 ```markdown [filename](../_media/example.js ':include :type=code :fragment=demo') ``` 在你的代码文件中,你需要用斜线 `/// [demo]` 包裹该片段(片段的前后都要有)。 -你也可以使用 `### [demo]` 来包裹。 +或者你也可以使用 `### [demo]`。 示例: -[filename](../_media/example.js ':include :type=code :fragment=demo') +[filename](../_media/example.js ":include :type=code :fragment=demo") ## 标签属性 如果你嵌入文件是一个 `iframe`、`audio` 或者 `video`,你可以给这些标签设置属性。 +?> 注意,对于 `audio` 和 `video` 类型,默认情况下,对应添加 `controlls` 属性。 当你想要添加更多属性时,需要手动添加 `controls` 属性。 + +```md +[filename](../_media/example.mp4 ':include :type=video controls width=100%') +``` + ```markdown [cinwell website](https://cinwell.com ':include :type=iframe width=100% height=400px') ``` -[cinwell website](https://cinwell.com ':include :type=iframe width=100% height=400px') +[cinwell website](https://cinwell.com ":include :type=iframe width=100% height=400px") -看见没?你只需要直接写属性就好了,每个标签有哪些属性建议你查看 [MDN 文档](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe)。 +你看到它了吗? 你只需要直接写入属性。 每个标签有哪些属性建议你查看 [MDN 文档](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe)。 ## 代码块高亮 -如果是嵌入一个代码块,你可以设置高亮的语言,或者让它自动识别。这里是手动设置高亮语言 +嵌入任何类型的源代码文件,你可以指定高亮语言或自动标识。 ```markdown [](../_media/example.html ':include :type=code text') @@ -71,31 +99,31 @@ docsify 4.6 开始支持嵌入任何类型的文件到文档里。你可以将 ⬇️ -[](../_media/example.html ':include :type=code text') +[](../_media/example.html ":include :type=code text") -?> 如何高亮代码?你可以查看[这份文档](zh-cn/language-highlight.md)。 +?> 如何设置高亮? 你可以查看[此处](zh-cn/language-highlight.md)。 -## 嵌入Gist +## 嵌入 Gist 你可以将 Gist 作为 Markdown 内容或代码块嵌入。这是基于[嵌入文件](#embed-files)部分开头的方法,不过是嵌入一个原始的 Gist URL。 -?> 这里**不需要**插件或修改配置来使其工作。事实上,即使你使用插件或修改配置来允许加载外部脚本,从 Gist 复制的 "Embed" `script`标签也无法加载。 +?> **无需**更改插件或应用程序配置即可运行。 事实上,即使你使用插件或修改配置来允许加载外部脚本,从 Gist 复制的 Embed `script` 标签也_无法_加载。 -### 确定Gist的元数据 +### 确定 Gist 的元数据 -从查看`gist.github.com`上的 Gist 开始。在本指南中,我们使用这个 Gist: +从查看 `gist.github.com` 上的 Gist 开始。 为了本指南的目的,我们使用这个 Gist: - https://gist.github.com/anikethsaha/f88893bb563bb7229d6e575db53a8c15 -从 Gist 中找出以下内容: +从 gist 中识别以下项目: -| 字段 | 示例 | 说明 | -| ------------ | ---------------------------------- | ------------------------------------------------------------------- | -| **Username** | `anikethsaha` | Gist 的作者 | -| **Gist ID** | `c2bece08f27c4277001f123898d16a7c` | Gist 的标识符。该标识在 Gist 的有效期内是固定的 | -| **Filename** | `content.md` | 在 Gist 中选择一个文件名。即使是单文件的 Gist,也需要这样做才能嵌入 | +| 字段 | 示例 | 说明 | +| ----------- | ---------------------------------- | ---------------------------------------------- | +| **用户名** | `anikethsaha` | Gist 的所有者。 | +| **Gist ID** | `c2bece08f27c4277001f123898d16a7c` | Gist 的标识符。 这在 gist 的生命周期内是固定的。 | +| **文件名** | `content.md` | 在 gist 中选择一个文件的名称。 即使是在单个文件的 gist 中也需要这样做才能嵌入。 | -你将需要这些来为目标文件建立 _raw gist URL_ 。它的格式如下: +你将需要这些来为目标文件建立 _raw gist URL_。 你会看到: - `https://gist.githubusercontent.com/USERNAME/GIST_ID/raw/FILENAME` @@ -104,13 +132,13 @@ docsify 4.6 开始支持嵌入任何类型的文件到文档里。你可以将 - https://gist.githubusercontent.com/anikethsaha/f88893bb563bb7229d6e575db53a8c15/raw/content.md - https://gist.githubusercontent.com/anikethsaha/f88893bb563bb7229d6e575db53a8c15/raw/script.js -?> 另外你也可以直接点击 Gist 文件上的 _Raw_ 按钮来获取原始 URL。但是如果你使用这种方法,请确保**删除**`raw/`和文件名之间的修订号,这样 URL 就会与上面的模式一致。否则当更新 Gist 时,你嵌入的 Gist 将**不会**显示最新的内容。 +?> 或者,你可以直接点击 Gist 文件上的 _Raw_ 按钮获取原始 URL。 但如果你使用这种方法, 请务必**移除** `raw/` 和文件名之间的版本号,以便 URL 与上面的模式相匹配。 否则,当 Gist 更新时,你的嵌入式 Gist 将**不会**显示最新内容。 继续下面的一个部分,将 Gist 嵌入到 Docsify 页面上。 ### 渲染 Gist 中的 Markdown 内容 -这是一个很好的方法,可以将内容**无缝**地嵌入到你的文档中,而不需要将别人发送到外部链接。这种方法很适合在多个仓库的文档网站上重复使用一个 Gist,比如安装说明。这种方法同样适用于您的账户或其他用户拥有的 Gist。 +这是将内容**无缝**嵌入到你的文档中的好方法,而不需要将别人引到外部链接。 这种方法非常适合在多个版本库的文档站点上重复使用安装说明要点。 这个方法与你的帐户或其他用户拥有的 Gist 同样有效。 格式: @@ -126,13 +154,13 @@ docsify 4.6 开始支持嵌入任何类型的文件到文档里。你可以将 你会看到: -[gist: content.md](https://gist.githubusercontent.com/anikethsaha/f88893bb563bb7229d6e575db53a8c15/raw/content.md ':include') +[gist: content.md](https://gist.githubusercontent.com/anikethsaha/f88893bb563bb7229d6e575db53a8c15/raw/content.md ":include") -`LABEL`可以是任何你想要的文本。如果链接被破坏,它可以作为一个 _fallback_ 信息。所以在这里重复文件名是很有用的,万一你需要修复一个破坏的链接。它还可以使嵌入的元素一目了然。 +`LABEL` 可以是你想要的任何文本。 如果链接被破坏,它可以作为一个 _fallback_ 信息。所以在这里重复文件名是很有用的,万一你需要修复一个破坏的链接。 它还可以使嵌入的元素一目了然。 ### 渲染 Gist 中的代码块 -格式与上一节相同,但是在alt文本中添加了`:type=code`。与[嵌入的类型](#embedded-file-type)部分一样,语法高亮将从扩展名(如`.js`或`.py`)中**推断**,所以你可以将`type`设置为`code`。 +格式与上一节相同,但在 alt 文本中添加了 `:type=code`。 与[嵌入文件类型](#embedded-file-type)部分一样,语法高亮将从扩展名(如 `.js` 或 `.py`)中**推断**,所以你可以将 `type` 设置为 `code`。 格式: @@ -148,4 +176,4 @@ docsify 4.6 开始支持嵌入任何类型的文件到文档里。你可以将 你会看到: -[gist: script.js](https://gist.githubusercontent.com/anikethsaha/f88893bb563bb7229d6e575db53a8c15/raw/script.js ':include :type=code') +[gist: script.js](https://gist.githubusercontent.com/anikethsaha/f88893bb563bb7229d6e575db53a8c15/raw/script.js ":include :type=code") diff --git a/emoji.md b/emoji.md new file mode 100644 index 0000000..0d98553 --- /dev/null +++ b/emoji.md @@ -0,0 +1,3883 @@ +# Emoji + +下面是一个完整的表情短代码列表。 Docsify 可以使用 [`nativeEmoji`](zh-cn/configuration#nativeemoji) 配置选项使用 GitHub 风格表情图像或原生表情符号字符来渲染表情符号。 + +
+ + + +:100: `:100:` + +:1234: `:1234:` + +:+1: `:+1:` + +:-1: `:-1:` + +:1st_place_medal: `:1st_place_medal:` + +:2nd_place_medal: `:2nd_place_medal:` + +:3rd_place_medal: `:3rd_place_medal:` + +:8ball: `:8ball:` + +:a: `:a:` + +:ab: `:ab:` + +:abacus: `:abacus:` + +:abc: `:abc:` + +:abcd: `:abcd:` + +:accept: `:accept:` + +:accessibility: `:accessibility:` + +:accordion: `:accordion:` + +:adhesive_bandage: `:adhesive_bandage:` + +:adult: `:adult:` + +:aerial_tramway: `:aerial_tramway:` + +:afghanistan: `:afghanistan:` + +:airplane: `:airplane:` + +:aland_islands: `:aland_islands:` + +:alarm_clock: `:alarm_clock:` + +:albania: `:albania:` + +:alembic: `:alembic:` + +:algeria: `:algeria:` + +:alien: `:alien:` + +:ambulance: `:ambulance:` + +:american_samoa: `:american_samoa:` + +:amphora: `:amphora:` + +:anatomical_heart: `:anatomical_heart:` + +:anchor: `:anchor:` + +:andorra: `:andorra:` + +:angel: `:angel:` + +:anger: `:anger:` + +:angola: `:angola:` + +:angry: `:angry:` + +:anguilla: `:anguilla:` + +:anguished: `:anguished:` + +:ant: `:ant:` + +:antarctica: `:antarctica:` + +:antigua_barbuda: `:antigua_barbuda:` + +:apple: `:apple:` + +:aquarius: `:aquarius:` + +:argentina: `:argentina:` + +:aries: `:aries:` + +:armenia: `:armenia:` + +:arrow_backward: `:arrow_backward:` + +:arrow_double_down: `:arrow_double_down:` + +:arrow_double_up: `:arrow_double_up:` + +:arrow_down: `:arrow_down:` + +:arrow_down_small: `:arrow_down_small:` + +:arrow_forward: `:arrow_forward:` + +:arrow_heading_down: `:arrow_heading_down:` + +:arrow_heading_up: `:arrow_heading_up:` + +:arrow_left: `:arrow_left:` + +:arrow_lower_left: `:arrow_lower_left:` + +:arrow_lower_right: `:arrow_lower_right:` + +:arrow_right: `:arrow_right:` + +:arrow_right_hook: `:arrow_right_hook:` + +:arrow_up: `:arrow_up:` + +:arrow_up_down: `:arrow_up_down:` + +:arrow_up_small: `:arrow_up_small:` + +:arrow_upper_left: `:arrow_upper_left:` + +:arrow_upper_right: `:arrow_upper_right:` + +:arrows_clockwise: `:arrows_clockwise:` + +:arrows_counterclockwise: `:arrows_counterclockwise:` + +:art: `:art:` + +:articulated_lorry: `:articulated_lorry:` + +:artificial_satellite: `:artificial_satellite:` + +:artist: `:artist:` + +:aruba: `:aruba:` + +:ascension_island: `:ascension_island:` + +:asterisk: `:asterisk:` + +:astonished: `:astonished:` + +:astronaut: `:astronaut:` + +:athletic_shoe: `:athletic_shoe:` + +:atm: `:atm:` + +:atom: `:atom:` + +:atom_symbol: `:atom_symbol:` + +:australia: `:australia:` + +:austria: `:austria:` + +:auto_rickshaw: `:auto_rickshaw:` + +:avocado: `:avocado:` + +:axe: `:axe:` + +:azerbaijan: `:azerbaijan:` + +:b: `:b:` + +:baby: `:baby:` + +:baby_bottle: `:baby_bottle:` + +:baby_chick: `:baby_chick:` + +:baby_symbol: `:baby_symbol:` + +:back: `:back:` + +:bacon: `:bacon:` + +:badger: `:badger:` + +:badminton: `:badminton:` + +:bagel: `:bagel:` + +:baggage_claim: `:baggage_claim:` + +:baguette_bread: `:baguette_bread:` + +:bahamas: `:bahamas:` + +:bahrain: `:bahrain:` + +:balance_scale: `:balance_scale:` + +:bald_man: `:bald_man:` + +:bald_woman: `:bald_woman:` + +:ballet_shoes: `:ballet_shoes:` + +:balloon: `:balloon:` + +:ballot_box: `:ballot_box:` + +:ballot_box_with_check: `:ballot_box_with_check:` + +:bamboo: `:bamboo:` + +:banana: `:banana:` + +:bangbang: `:bangbang:` + +:bangladesh: `:bangladesh:` + +:banjo: `:banjo:` + +:bank: `:bank:` + +:bar_chart: `:bar_chart:` + +:barbados: `:barbados:` + +:barber: `:barber:` + +:baseball: `:baseball:` + +:basecamp: `:basecamp:` + +:basecampy: `:basecampy:` + +:basket: `:basket:` + +:basketball: `:basketball:` + +:basketball_man: `:basketball_man:` + +:basketball_woman: `:basketball_woman:` + +:bat: `:bat:` + +:bath: `:bath:` + +:bathtub: `:bathtub:` + +:battery: `:battery:` + +:beach_umbrella: `:beach_umbrella:` + +:beans: `:beans:` + +:bear: `:bear:` + +:bearded_person: `:bearded_person:` + +:beaver: `:beaver:` + +:bed: `:bed:` + +:bee: `:bee:` + +:beer: `:beer:` + +:beers: `:beers:` + +:beetle: `:beetle:` + +:beginner: `:beginner:` + +:belarus: `:belarus:` + +:belgium: `:belgium:` + +:belize: `:belize:` + +:bell: `:bell:` + +:bell_pepper: `:bell_pepper:` + +:bellhop_bell: `:bellhop_bell:` + +:benin: `:benin:` + +:bento: `:bento:` + +:bermuda: `:bermuda:` + +:beverage_box: `:beverage_box:` + +:bhutan: `:bhutan:` + +:bicyclist: `:bicyclist:` + +:bike: `:bike:` + +:biking_man: `:biking_man:` + +:biking_woman: `:biking_woman:` + +:bikini: `:bikini:` + +:billed_cap: `:billed_cap:` + +:biohazard: `:biohazard:` + +:bird: `:bird:` + +:birthday: `:birthday:` + +:bison: `:bison:` + +:biting_lip: `:biting_lip:` + +:black_bird: `:black_bird:` + +:black_cat: `:black_cat:` + +:black_circle: `:black_circle:` + +:black_flag: `:black_flag:` + +:black_heart: `:black_heart:` + +:black_joker: `:black_joker:` + +:black_large_square: `:black_large_square:` + +:black_medium_small_square: `:black_medium_small_square:` + +:black_medium_square: `:black_medium_square:` + +:black_nib: `:black_nib:` + +:black_small_square: `:black_small_square:` + +:black_square_button: `:black_square_button:` + +:blond_haired_man: `:blond_haired_man:` + +:blond_haired_person: `:blond_haired_person:` + +:blond_haired_woman: `:blond_haired_woman:` + +:blonde_woman: `:blonde_woman:` + +:blossom: `:blossom:` + +:blowfish: `:blowfish:` + +:blue_book: `:blue_book:` + +:blue_car: `:blue_car:` + +:blue_heart: `:blue_heart:` + +:blue_square: `:blue_square:` + +:blueberries: `:blueberries:` + +:blush: `:blush:` + +:boar: `:boar:` + +:boat: `:boat:` + +:bolivia: `:bolivia:` + +:bomb: `:bomb:` + +:bone: `:bone:` + +:book: `:book:` + +:bookmark: `:bookmark:` + +:bookmark_tabs: `:bookmark_tabs:` + +:books: `:books:` + +:boom: `:boom:` + +:boomerang: `:boomerang:` + +:boot: `:boot:` + +:bosnia_herzegovina: `:bosnia_herzegovina:` + +:botswana: `:botswana:` + +:bouncing_ball_man: `:bouncing_ball_man:` + +:bouncing_ball_person: `:bouncing_ball_person:` + +:bouncing_ball_woman: `:bouncing_ball_woman:` + +:bouquet: `:bouquet:` + +:bouvet_island: `:bouvet_island:` + +:bow: `:bow:` + +:bow_and_arrow: `:bow_and_arrow:` + +:bowing_man: `:bowing_man:` + +:bowing_woman: `:bowing_woman:` + +:bowl_with_spoon: `:bowl_with_spoon:` + +:bowling: `:bowling:` + +:bowtie: `:bowtie:` + +:boxing_glove: `:boxing_glove:` + +:boy: `:boy:` + +:brain: `:brain:` + +:brazil: `:brazil:` + +:bread: `:bread:` + +:breast_feeding: `:breast_feeding:` + +:bricks: `:bricks:` + +:bride_with_veil: `:bride_with_veil:` + +:bridge_at_night: `:bridge_at_night:` + +:briefcase: `:briefcase:` + +:british_indian_ocean_territory: `:british_indian_ocean_territory:` + +:british_virgin_islands: `:british_virgin_islands:` + +:broccoli: `:broccoli:` + +:broken_heart: `:broken_heart:` + +:broom: `:broom:` + +:brown_circle: `:brown_circle:` + +:brown_heart: `:brown_heart:` + +:brown_square: `:brown_square:` + +:brunei: `:brunei:` + +:bubble_tea: `:bubble_tea:` + +:bubbles: `:bubbles:` + +:bucket: `:bucket:` + +:bug: `:bug:` + +:building_construction: `:building_construction:` + +:bulb: `:bulb:` + +:bulgaria: `:bulgaria:` + +:bullettrain_front: `:bullettrain_front:` + +:bullettrain_side: `:bullettrain_side:` + +:burkina_faso: `:burkina_faso:` + +:burrito: `:burrito:` + +:burundi: `:burundi:` + +:bus: `:bus:` + +:business_suit_levitating: `:business_suit_levitating:` + +:busstop: `:busstop:` + +:bust_in_silhouette: `:bust_in_silhouette:` + +:busts_in_silhouette: `:busts_in_silhouette:` + +:butter: `:butter:` + +:butterfly: `:butterfly:` + +:cactus: `:cactus:` + +:cake: `:cake:` + +:calendar: `:calendar:` + +:call_me_hand: `:call_me_hand:` + +:calling: `:calling:` + +:cambodia: `:cambodia:` + +:camel: `:camel:` + +:camera: `:camera:` + +:camera_flash: `:camera_flash:` + +:cameroon: `:cameroon:` + +:camping: `:camping:` + +:canada: `:canada:` + +:canary_islands: `:canary_islands:` + +:cancer: `:cancer:` + +:candle: `:candle:` + +:candy: `:candy:` + +:canned_food: `:canned_food:` + +:canoe: `:canoe:` + +:cape_verde: `:cape_verde:` + +:capital_abcd: `:capital_abcd:` + +:capricorn: `:capricorn:` + +:car: `:car:` + +:card_file_box: `:card_file_box:` + +:card_index: `:card_index:` + +:card_index_dividers: `:card_index_dividers:` + +:caribbean_netherlands: `:caribbean_netherlands:` + +:carousel_horse: `:carousel_horse:` + +:carpentry_saw: `:carpentry_saw:` + +:carrot: `:carrot:` + +:cartwheeling: `:cartwheeling:` + +:cat: `:cat:` + +:cat2: `:cat2:` + +:cayman_islands: `:cayman_islands:` + +:cd: `:cd:` + +:central_african_republic: `:central_african_republic:` + +:ceuta_melilla: `:ceuta_melilla:` + +:chad: `:chad:` + +:chains: `:chains:` + +:chair: `:chair:` + +:champagne: `:champagne:` + +:chart: `:chart:` + +:chart_with_downwards_trend: `:chart_with_downwards_trend:` + +:chart_with_upwards_trend: `:chart_with_upwards_trend:` + +:checkered_flag: `:checkered_flag:` + +:cheese: `:cheese:` + +:cherries: `:cherries:` + +:cherry_blossom: `:cherry_blossom:` + +:chess_pawn: `:chess_pawn:` + +:chestnut: `:chestnut:` + +:chicken: `:chicken:` + +:child: `:child:` + +:children_crossing: `:children_crossing:` + +:chile: `:chile:` + +:chipmunk: `:chipmunk:` + +:chocolate_bar: `:chocolate_bar:` + +:chopsticks: `:chopsticks:` + +:christmas_island: `:christmas_island:` + +:christmas_tree: `:christmas_tree:` + +:church: `:church:` + +:cinema: `:cinema:` + +:circus_tent: `:circus_tent:` + +:city_sunrise: `:city_sunrise:` + +:city_sunset: `:city_sunset:` + +:cityscape: `:cityscape:` + +:cl: `:cl:` + +:clamp: `:clamp:` + +:clap: `:clap:` + +:clapper: `:clapper:` + +:classical_building: `:classical_building:` + +:climbing: `:climbing:` + +:climbing_man: `:climbing_man:` + +:climbing_woman: `:climbing_woman:` + +:clinking_glasses: `:clinking_glasses:` + +:clipboard: `:clipboard:` + +:clipperton_island: `:clipperton_island:` + +:clock1: `:clock1:` + +:clock10: `:clock10:` + +:clock1030: `:clock1030:` + +:clock11: `:clock11:` + +:clock1130: `:clock1130:` + +:clock12: `:clock12:` + +:clock1230: `:clock1230:` + +:clock130: `:clock130:` + +:clock2: `:clock2:` + +:clock230: `:clock230:` + +:clock3: `:clock3:` + +:clock330: `:clock330:` + +:clock4: `:clock4:` + +:clock430: `:clock430:` + +:clock5: `:clock5:` + +:clock530: `:clock530:` + +:clock6: `:clock6:` + +:clock630: `:clock630:` + +:clock7: `:clock7:` + +:clock730: `:clock730:` + +:clock8: `:clock8:` + +:clock830: `:clock830:` + +:clock9: `:clock9:` + +:clock930: `:clock930:` + +:closed_book: `:closed_book:` + +:closed_lock_with_key: `:closed_lock_with_key:` + +:closed_umbrella: `:closed_umbrella:` + +:cloud: `:cloud:` + +:cloud_with_lightning: `:cloud_with_lightning:` + +:cloud_with_lightning_and_rain: `:cloud_with_lightning_and_rain:` + +:cloud_with_rain: `:cloud_with_rain:` + +:cloud_with_snow: `:cloud_with_snow:` + +:clown_face: `:clown_face:` + +:clubs: `:clubs:` + +:cn: `:cn:` + +:coat: `:coat:` + +:cockroach: `:cockroach:` + +:cocktail: `:cocktail:` + +:coconut: `:coconut:` + +:cocos_islands: `:cocos_islands:` + +:coffee: `:coffee:` + +:coffin: `:coffin:` + +:coin: `:coin:` + +:cold_face: `:cold_face:` + +:cold_sweat: `:cold_sweat:` + +:collision: `:collision:` + +:colombia: `:colombia:` + +:comet: `:comet:` + +:comoros: `:comoros:` + +:compass: `:compass:` + +:computer: `:computer:` + +:computer_mouse: `:computer_mouse:` + +:confetti_ball: `:confetti_ball:` + +:confounded: `:confounded:` + +:confused: `:confused:` + +:congo_brazzaville: `:congo_brazzaville:` + +:congo_kinshasa: `:congo_kinshasa:` + +:congratulations: `:congratulations:` + +:construction: `:construction:` + +:construction_worker: `:construction_worker:` + +:construction_worker_man: `:construction_worker_man:` + +:construction_worker_woman: `:construction_worker_woman:` + +:control_knobs: `:control_knobs:` + +:convenience_store: `:convenience_store:` + +:cook: `:cook:` + +:cook_islands: `:cook_islands:` + +:cookie: `:cookie:` + +:cool: `:cool:` + +:cop: `:cop:` + +:copilot: `:copilot:` + +:copyright: `:copyright:` + +:coral: `:coral:` + +:corn: `:corn:` + +:costa_rica: `:costa_rica:` + +:cote_divoire: `:cote_divoire:` + +:couch_and_lamp: `:couch_and_lamp:` + +:couple: `:couple:` + +:couple_with_heart: `:couple_with_heart:` + +:couple_with_heart_man_man: `:couple_with_heart_man_man:` + +:couple_with_heart_woman_man: `:couple_with_heart_woman_man:` + +:couple_with_heart_woman_woman: `:couple_with_heart_woman_woman:` + +:couplekiss: `:couplekiss:` + +:couplekiss_man_man: `:couplekiss_man_man:` + +:couplekiss_man_woman: `:couplekiss_man_woman:` + +:couplekiss_woman_woman: `:couplekiss_woman_woman:` + +:cow: `:cow:` + +:cow2: `:cow2:` + +:cowboy_hat_face: `:cowboy_hat_face:` + +:crab: `:crab:` + +:crayon: `:crayon:` + +:credit_card: `:credit_card:` + +:crescent_moon: `:crescent_moon:` + +:cricket: `:cricket:` + +:cricket_game: `:cricket_game:` + +:croatia: `:croatia:` + +:crocodile: `:crocodile:` + +:croissant: `:croissant:` + +:crossed_fingers: `:crossed_fingers:` + +:crossed_flags: `:crossed_flags:` + +:crossed_swords: `:crossed_swords:` + +:crown: `:crown:` + +:crutch: `:crutch:` + +:cry: `:cry:` + +:crying_cat_face: `:crying_cat_face:` + +:crystal_ball: `:crystal_ball:` + +:cuba: `:cuba:` + +:cucumber: `:cucumber:` + +:cup_with_straw: `:cup_with_straw:` + +:cupcake: `:cupcake:` + +:cupid: `:cupid:` + +:curacao: `:curacao:` + +:curling_stone: `:curling_stone:` + +:curly_haired_man: `:curly_haired_man:` + +:curly_haired_woman: `:curly_haired_woman:` + +:curly_loop: `:curly_loop:` + +:currency_exchange: `:currency_exchange:` + +:curry: `:curry:` + +:cursing_face: `:cursing_face:` + +:custard: `:custard:` + +:customs: `:customs:` + +:cut_of_meat: `:cut_of_meat:` + +:cyclone: `:cyclone:` + +:cyprus: `:cyprus:` + +:czech_republic: `:czech_republic:` + +:dagger: `:dagger:` + +:dancer: `:dancer:` + +:dancers: `:dancers:` + +:dancing_men: `:dancing_men:` + +:dancing_women: `:dancing_women:` + +:dango: `:dango:` + +:dark_sunglasses: `:dark_sunglasses:` + +:dart: `:dart:` + +:dash: `:dash:` + +:date: `:date:` + +:de: `:de:` + +:deaf_man: `:deaf_man:` + +:deaf_person: `:deaf_person:` + +:deaf_woman: `:deaf_woman:` + +:deciduous_tree: `:deciduous_tree:` + +:deer: `:deer:` + +:denmark: `:denmark:` + +:department_store: `:department_store:` + +:dependabot: `:dependabot:` + +:derelict_house: `:derelict_house:` + +:desert: `:desert:` + +:desert_island: `:desert_island:` + +:desktop_computer: `:desktop_computer:` + +:detective: `:detective:` + +:diamond_shape_with_a_dot_inside: `:diamond_shape_with_a_dot_inside:` + +:diamonds: `:diamonds:` + +:diego_garcia: `:diego_garcia:` + +:disappointed: `:disappointed:` + +:disappointed_relieved: `:disappointed_relieved:` + +:disguised_face: `:disguised_face:` + +:diving_mask: `:diving_mask:` + +:diya_lamp: `:diya_lamp:` + +:dizzy: `:dizzy:` + +:dizzy_face: `:dizzy_face:` + +:djibouti: `:djibouti:` + +:dna: `:dna:` + +:do_not_litter: `:do_not_litter:` + +:dodo: `:dodo:` + +:dog: `:dog:` + +:dog2: `:dog2:` + +:dollar: `:dollar:` + +:dolls: `:dolls:` + +:dolphin: `:dolphin:` + +:dominica: `:dominica:` + +:dominican_republic: `:dominican_republic:` + +:donkey: `:donkey:` + +:door: `:door:` + +:dotted_line_face: `:dotted_line_face:` + +:doughnut: `:doughnut:` + +:dove: `:dove:` + +:dragon: `:dragon:` + +:dragon_face: `:dragon_face:` + +:dress: `:dress:` + +:dromedary_camel: `:dromedary_camel:` + +:drooling_face: `:drooling_face:` + +:drop_of_blood: `:drop_of_blood:` + +:droplet: `:droplet:` + +:drum: `:drum:` + +:duck: `:duck:` + +:dumpling: `:dumpling:` + +:dvd: `:dvd:` + +:e-mail: `:e-mail:` + +:eagle: `:eagle:` + +:ear: `:ear:` + +:ear_of_rice: `:ear_of_rice:` + +:ear_with_hearing_aid: `:ear_with_hearing_aid:` + +:earth_africa: `:earth_africa:` + +:earth_americas: `:earth_americas:` + +:earth_asia: `:earth_asia:` + +:ecuador: `:ecuador:` + +:egg: `:egg:` + +:eggplant: `:eggplant:` + +:egypt: `:egypt:` + +:eight: `:eight:` + +:eight_pointed_black_star: `:eight_pointed_black_star:` + +:eight_spoked_asterisk: `:eight_spoked_asterisk:` + +:eject_button: `:eject_button:` + +:el_salvador: `:el_salvador:` + +:electric_plug: `:electric_plug:` + +:electron: `:electron:` + +:elephant: `:elephant:` + +:elevator: `:elevator:` + +:elf: `:elf:` + +:elf_man: `:elf_man:` + +:elf_woman: `:elf_woman:` + +:email: `:email:` + +:empty_nest: `:empty_nest:` + +:end: `:end:` + +:england: `:england:` + +:envelope: `:envelope:` + +:envelope_with_arrow: `:envelope_with_arrow:` + +:equatorial_guinea: `:equatorial_guinea:` + +:eritrea: `:eritrea:` + +:es: `:es:` + +:estonia: `:estonia:` + +:ethiopia: `:ethiopia:` + +:eu: `:eu:` + +:euro: `:euro:` + +:european_castle: `:european_castle:` + +:european_post_office: `:european_post_office:` + +:european_union: `:european_union:` + +:evergreen_tree: `:evergreen_tree:` + +:exclamation: `:exclamation:` + +:exploding_head: `:exploding_head:` + +:expressionless: `:expressionless:` + +:eye: `:eye:` + +:eye_speech_bubble: `:eye_speech_bubble:` + +:eyeglasses: `:eyeglasses:` + +:eyes: `:eyes:` + +:face_exhaling: `:face_exhaling:` + +:face_holding_back_tears: `:face_holding_back_tears:` + +:face_in_clouds: `:face_in_clouds:` + +:face_with_diagonal_mouth: `:face_with_diagonal_mouth:` + +:face_with_head_bandage: `:face_with_head_bandage:` + +:face_with_open_eyes_and_hand_over_mouth: `:face_with_open_eyes_and_hand_over_mouth:` + +:face_with_peeking_eye: `:face_with_peeking_eye:` + +:face_with_spiral_eyes: `:face_with_spiral_eyes:` + +:face_with_thermometer: `:face_with_thermometer:` + +:facepalm: `:facepalm:` + +:facepunch: `:facepunch:` + +:factory: `:factory:` + +:factory_worker: `:factory_worker:` + +:fairy: `:fairy:` + +:fairy_man: `:fairy_man:` + +:fairy_woman: `:fairy_woman:` + +:falafel: `:falafel:` + +:falkland_islands: `:falkland_islands:` + +:fallen_leaf: `:fallen_leaf:` + +:family: `:family:` + +:family_man_boy: `:family_man_boy:` + +:family_man_boy_boy: `:family_man_boy_boy:` + +:family_man_girl: `:family_man_girl:` + +:family_man_girl_boy: `:family_man_girl_boy:` + +:family_man_girl_girl: `:family_man_girl_girl:` + +:family_man_man_boy: `:family_man_man_boy:` + +:family_man_man_boy_boy: `:family_man_man_boy_boy:` + +:family_man_man_girl: `:family_man_man_girl:` + +:family_man_man_girl_boy: `:family_man_man_girl_boy:` + +:family_man_man_girl_girl: `:family_man_man_girl_girl:` + +:family_man_woman_boy: `:family_man_woman_boy:` + +:family_man_woman_boy_boy: `:family_man_woman_boy_boy:` + +:family_man_woman_girl: `:family_man_woman_girl:` + +:family_man_woman_girl_boy: `:family_man_woman_girl_boy:` + +:family_man_woman_girl_girl: `:family_man_woman_girl_girl:` + +:family_woman_boy: `:family_woman_boy:` + +:family_woman_boy_boy: `:family_woman_boy_boy:` + +:family_woman_girl: `:family_woman_girl:` + +:family_woman_girl_boy: `:family_woman_girl_boy:` + +:family_woman_girl_girl: `:family_woman_girl_girl:` + +:family_woman_woman_boy: `:family_woman_woman_boy:` + +:family_woman_woman_boy_boy: `:family_woman_woman_boy_boy:` + +:family_woman_woman_girl: `:family_woman_woman_girl:` + +:family_woman_woman_girl_boy: `:family_woman_woman_girl_boy:` + +:family_woman_woman_girl_girl: `:family_woman_woman_girl_girl:` + +:farmer: `:farmer:` + +:faroe_islands: `:faroe_islands:` + +:fast_forward: `:fast_forward:` + +:fax: `:fax:` + +:fearful: `:fearful:` + +:feather: `:feather:` + +:feelsgood: `:feelsgood:` + +:feet: `:feet:` + +:female_detective: `:female_detective:` + +:female_sign: `:female_sign:` + +:ferris_wheel: `:ferris_wheel:` + +:ferry: `:ferry:` + +:field_hockey: `:field_hockey:` + +:fiji: `:fiji:` + +:file_cabinet: `:file_cabinet:` + +:file_folder: `:file_folder:` + +:film_projector: `:film_projector:` + +:film_strip: `:film_strip:` + +:finland: `:finland:` + +:finnadie: `:finnadie:` + +:fire: `:fire:` + +:fire_engine: `:fire_engine:` + +:fire_extinguisher: `:fire_extinguisher:` + +:firecracker: `:firecracker:` + +:firefighter: `:firefighter:` + +:fireworks: `:fireworks:` + +:first_quarter_moon: `:first_quarter_moon:` + +:first_quarter_moon_with_face: `:first_quarter_moon_with_face:` + +:fish: `:fish:` + +:fish_cake: `:fish_cake:` + +:fishing_pole_and_fish: `:fishing_pole_and_fish:` + +:fishsticks: `:fishsticks:` + +:fist: `:fist:` + +:fist_left: `:fist_left:` + +:fist_oncoming: `:fist_oncoming:` + +:fist_raised: `:fist_raised:` + +:fist_right: `:fist_right:` + +:five: `:five:` + +:flags: `:flags:` + +:flamingo: `:flamingo:` + +:flashlight: `:flashlight:` + +:flat_shoe: `:flat_shoe:` + +:flatbread: `:flatbread:` + +:fleur_de_lis: `:fleur_de_lis:` + +:flight_arrival: `:flight_arrival:` + +:flight_departure: `:flight_departure:` + +:flipper: `:flipper:` + +:floppy_disk: `:floppy_disk:` + +:flower_playing_cards: `:flower_playing_cards:` + +:flushed: `:flushed:` + +:flute: `:flute:` + +:fly: `:fly:` + +:flying_disc: `:flying_disc:` + +:flying_saucer: `:flying_saucer:` + +:fog: `:fog:` + +:foggy: `:foggy:` + +:folding_hand_fan: `:folding_hand_fan:` + +:fondue: `:fondue:` + +:foot: `:foot:` + +:football: `:football:` + +:footprints: `:footprints:` + +:fork_and_knife: `:fork_and_knife:` + +:fortune_cookie: `:fortune_cookie:` + +:fountain: `:fountain:` + +:fountain_pen: `:fountain_pen:` + +:four: `:four:` + +:four_leaf_clover: `:four_leaf_clover:` + +:fox_face: `:fox_face:` + +:fr: `:fr:` + +:framed_picture: `:framed_picture:` + +:free: `:free:` + +:french_guiana: `:french_guiana:` + +:french_polynesia: `:french_polynesia:` + +:french_southern_territories: `:french_southern_territories:` + +:fried_egg: `:fried_egg:` + +:fried_shrimp: `:fried_shrimp:` + +:fries: `:fries:` + +:frog: `:frog:` + +:frowning: `:frowning:` + +:frowning_face: `:frowning_face:` + +:frowning_man: `:frowning_man:` + +:frowning_person: `:frowning_person:` + +:frowning_woman: `:frowning_woman:` + +:fu: `:fu:` + +:fuelpump: `:fuelpump:` + +:full_moon: `:full_moon:` + +:full_moon_with_face: `:full_moon_with_face:` + +:funeral_urn: `:funeral_urn:` + +:gabon: `:gabon:` + +:gambia: `:gambia:` + +:game_die: `:game_die:` + +:garlic: `:garlic:` + +:gb: `:gb:` + +:gear: `:gear:` + +:gem: `:gem:` + +:gemini: `:gemini:` + +:genie: `:genie:` + +:genie_man: `:genie_man:` + +:genie_woman: `:genie_woman:` + +:georgia: `:georgia:` + +:ghana: `:ghana:` + +:ghost: `:ghost:` + +:gibraltar: `:gibraltar:` + +:gift: `:gift:` + +:gift_heart: `:gift_heart:` + +:ginger_root: `:ginger_root:` + +:giraffe: `:giraffe:` + +:girl: `:girl:` + +:globe_with_meridians: `:globe_with_meridians:` + +:gloves: `:gloves:` + +:goal_net: `:goal_net:` + +:goat: `:goat:` + +:goberserk: `:goberserk:` + +:godmode: `:godmode:` + +:goggles: `:goggles:` + +:golf: `:golf:` + +:golfing: `:golfing:` + +:golfing_man: `:golfing_man:` + +:golfing_woman: `:golfing_woman:` + +:goose: `:goose:` + +:gorilla: `:gorilla:` + +:grapes: `:grapes:` + +:greece: `:greece:` + +:green_apple: `:green_apple:` + +:green_book: `:green_book:` + +:green_circle: `:green_circle:` + +:green_heart: `:green_heart:` + +:green_salad: `:green_salad:` + +:green_square: `:green_square:` + +:greenland: `:greenland:` + +:grenada: `:grenada:` + +:grey_exclamation: `:grey_exclamation:` + +:grey_heart: `:grey_heart:` + +:grey_question: `:grey_question:` + +:grimacing: `:grimacing:` + +:grin: `:grin:` + +:grinning: `:grinning:` + +:guadeloupe: `:guadeloupe:` + +:guam: `:guam:` + +:guard: `:guard:` + +:guardsman: `:guardsman:` + +:guardswoman: `:guardswoman:` + +:guatemala: `:guatemala:` + +:guernsey: `:guernsey:` + +:guide_dog: `:guide_dog:` + +:guinea: `:guinea:` + +:guinea_bissau: `:guinea_bissau:` + +:guitar: `:guitar:` + +:gun: `:gun:` + +:guyana: `:guyana:` + +:hair_pick: `:hair_pick:` + +:haircut: `:haircut:` + +:haircut_man: `:haircut_man:` + +:haircut_woman: `:haircut_woman:` + +:haiti: `:haiti:` + +:hamburger: `:hamburger:` + +:hammer: `:hammer:` + +:hammer_and_pick: `:hammer_and_pick:` + +:hammer_and_wrench: `:hammer_and_wrench:` + +:hamsa: `:hamsa:` + +:hamster: `:hamster:` + +:hand: `:hand:` + +:hand_over_mouth: `:hand_over_mouth:` + +:hand_with_index_finger_and_thumb_crossed: `:hand_with_index_finger_and_thumb_crossed:` + +:handbag: `:handbag:` + +:handball_person: `:handball_person:` + +:handshake: `:handshake:` + +:hankey: `:hankey:` + +:hash: `:hash:` + +:hatched_chick: `:hatched_chick:` + +:hatching_chick: `:hatching_chick:` + +:headphones: `:headphones:` + +:headstone: `:headstone:` + +:health_worker: `:health_worker:` + +:hear_no_evil: `:hear_no_evil:` + +:heard_mcdonald_islands: `:heard_mcdonald_islands:` + +:heart: `:heart:` + +:heart_decoration: `:heart_decoration:` + +:heart_eyes: `:heart_eyes:` + +:heart_eyes_cat: `:heart_eyes_cat:` + +:heart_hands: `:heart_hands:` + +:heart_on_fire: `:heart_on_fire:` + +:heartbeat: `:heartbeat:` + +:heartpulse: `:heartpulse:` + +:hearts: `:hearts:` + +:heavy_check_mark: `:heavy_check_mark:` + +:heavy_division_sign: `:heavy_division_sign:` + +:heavy_dollar_sign: `:heavy_dollar_sign:` + +:heavy_equals_sign: `:heavy_equals_sign:` + +:heavy_exclamation_mark: `:heavy_exclamation_mark:` + +:heavy_heart_exclamation: `:heavy_heart_exclamation:` + +:heavy_minus_sign: `:heavy_minus_sign:` + +:heavy_multiplication_x: `:heavy_multiplication_x:` + +:heavy_plus_sign: `:heavy_plus_sign:` + +:hedgehog: `:hedgehog:` + +:helicopter: `:helicopter:` + +:herb: `:herb:` + +:hibiscus: `:hibiscus:` + +:high_brightness: `:high_brightness:` + +:high_heel: `:high_heel:` + +:hiking_boot: `:hiking_boot:` + +:hindu_temple: `:hindu_temple:` + +:hippopotamus: `:hippopotamus:` + +:hocho: `:hocho:` + +:hole: `:hole:` + +:honduras: `:honduras:` + +:honey_pot: `:honey_pot:` + +:honeybee: `:honeybee:` + +:hong_kong: `:hong_kong:` + +:hook: `:hook:` + +:horse: `:horse:` + +:horse_racing: `:horse_racing:` + +:hospital: `:hospital:` + +:hot_face: `:hot_face:` + +:hot_pepper: `:hot_pepper:` + +:hotdog: `:hotdog:` + +:hotel: `:hotel:` + +:hotsprings: `:hotsprings:` + +:hourglass: `:hourglass:` + +:hourglass_flowing_sand: `:hourglass_flowing_sand:` + +:house: `:house:` + +:house_with_garden: `:house_with_garden:` + +:houses: `:houses:` + +:hugs: `:hugs:` + +:hungary: `:hungary:` + +:hurtrealbad: `:hurtrealbad:` + +:hushed: `:hushed:` + +:hut: `:hut:` + +:hyacinth: `:hyacinth:` + +:ice_cream: `:ice_cream:` + +:ice_cube: `:ice_cube:` + +:ice_hockey: `:ice_hockey:` + +:ice_skate: `:ice_skate:` + +:icecream: `:icecream:` + +:iceland: `:iceland:` + +:id: `:id:` + +:identification_card: `:identification_card:` + +:ideograph_advantage: `:ideograph_advantage:` + +:imp: `:imp:` + +:inbox_tray: `:inbox_tray:` + +:incoming_envelope: `:incoming_envelope:` + +:index_pointing_at_the_viewer: `:index_pointing_at_the_viewer:` + +:india: `:india:` + +:indonesia: `:indonesia:` + +:infinity: `:infinity:` + +:information_desk_person: `:information_desk_person:` + +:information_source: `:information_source:` + +:innocent: `:innocent:` + +:interrobang: `:interrobang:` + +:iphone: `:iphone:` + +:iran: `:iran:` + +:iraq: `:iraq:` + +:ireland: `:ireland:` + +:isle_of_man: `:isle_of_man:` + +:israel: `:israel:` + +:it: `:it:` + +:izakaya_lantern: `:izakaya_lantern:` + +:jack_o_lantern: `:jack_o_lantern:` + +:jamaica: `:jamaica:` + +:japan: `:japan:` + +:japanese_castle: `:japanese_castle:` + +:japanese_goblin: `:japanese_goblin:` + +:japanese_ogre: `:japanese_ogre:` + +:jar: `:jar:` + +:jeans: `:jeans:` + +:jellyfish: `:jellyfish:` + +:jersey: `:jersey:` + +:jigsaw: `:jigsaw:` + +:jordan: `:jordan:` + +:joy: `:joy:` + +:joy_cat: `:joy_cat:` + +:joystick: `:joystick:` + +:jp: `:jp:` + +:judge: `:judge:` + +:juggling_person: `:juggling_person:` + +:kaaba: `:kaaba:` + +:kangaroo: `:kangaroo:` + +:kazakhstan: `:kazakhstan:` + +:kenya: `:kenya:` + +:key: `:key:` + +:keyboard: `:keyboard:` + +:keycap_ten: `:keycap_ten:` + +:khanda: `:khanda:` + +:kick_scooter: `:kick_scooter:` + +:kimono: `:kimono:` + +:kiribati: `:kiribati:` + +:kiss: `:kiss:` + +:kissing: `:kissing:` + +:kissing_cat: `:kissing_cat:` + +:kissing_closed_eyes: `:kissing_closed_eyes:` + +:kissing_heart: `:kissing_heart:` + +:kissing_smiling_eyes: `:kissing_smiling_eyes:` + +:kite: `:kite:` + +:kiwi_fruit: `:kiwi_fruit:` + +:kneeling_man: `:kneeling_man:` + +:kneeling_person: `:kneeling_person:` + +:kneeling_woman: `:kneeling_woman:` + +:knife: `:knife:` + +:knot: `:knot:` + +:koala: `:koala:` + +:koko: `:koko:` + +:kosovo: `:kosovo:` + +:kr: `:kr:` + +:kuwait: `:kuwait:` + +:kyrgyzstan: `:kyrgyzstan:` + +:lab_coat: `:lab_coat:` + +:label: `:label:` + +:lacrosse: `:lacrosse:` + +:ladder: `:ladder:` + +:lady_beetle: `:lady_beetle:` + +:lantern: `:lantern:` + +:laos: `:laos:` + +:large_blue_circle: `:large_blue_circle:` + +:large_blue_diamond: `:large_blue_diamond:` + +:large_orange_diamond: `:large_orange_diamond:` + +:last_quarter_moon: `:last_quarter_moon:` + +:last_quarter_moon_with_face: `:last_quarter_moon_with_face:` + +:latin_cross: `:latin_cross:` + +:latvia: `:latvia:` + +:laughing: `:laughing:` + +:leafy_green: `:leafy_green:` + +:leaves: `:leaves:` + +:lebanon: `:lebanon:` + +:ledger: `:ledger:` + +:left_luggage: `:left_luggage:` + +:left_right_arrow: `:left_right_arrow:` + +:left_speech_bubble: `:left_speech_bubble:` + +:leftwards_arrow_with_hook: `:leftwards_arrow_with_hook:` + +:leftwards_hand: `:leftwards_hand:` + +:leftwards_pushing_hand: `:leftwards_pushing_hand:` + +:leg: `:leg:` + +:lemon: `:lemon:` + +:leo: `:leo:` + +:leopard: `:leopard:` + +:lesotho: `:lesotho:` + +:level_slider: `:level_slider:` + +:liberia: `:liberia:` + +:libra: `:libra:` + +:libya: `:libya:` + +:liechtenstein: `:liechtenstein:` + +:light_blue_heart: `:light_blue_heart:` + +:light_rail: `:light_rail:` + +:link: `:link:` + +:lion: `:lion:` + +:lips: `:lips:` + +:lipstick: `:lipstick:` + +:lithuania: `:lithuania:` + +:lizard: `:lizard:` + +:llama: `:llama:` + +:lobster: `:lobster:` + +:lock: `:lock:` + +:lock_with_ink_pen: `:lock_with_ink_pen:` + +:lollipop: `:lollipop:` + +:long_drum: `:long_drum:` + +:loop: `:loop:` + +:lotion_bottle: `:lotion_bottle:` + +:lotus: `:lotus:` + +:lotus_position: `:lotus_position:` + +:lotus_position_man: `:lotus_position_man:` + +:lotus_position_woman: `:lotus_position_woman:` + +:loud_sound: `:loud_sound:` + +:loudspeaker: `:loudspeaker:` + +:love_hotel: `:love_hotel:` + +:love_letter: `:love_letter:` + +:love_you_gesture: `:love_you_gesture:` + +:low_battery: `:low_battery:` + +:low_brightness: `:low_brightness:` + +:luggage: `:luggage:` + +:lungs: `:lungs:` + +:luxembourg: `:luxembourg:` + +:lying_face: `:lying_face:` + +:m: `:m:` + +:macau: `:macau:` + +:macedonia: `:macedonia:` + +:madagascar: `:madagascar:` + +:mag: `:mag:` + +:mag_right: `:mag_right:` + +:mage: `:mage:` + +:mage_man: `:mage_man:` + +:mage_woman: `:mage_woman:` + +:magic_wand: `:magic_wand:` + +:magnet: `:magnet:` + +:mahjong: `:mahjong:` + +:mailbox: `:mailbox:` + +:mailbox_closed: `:mailbox_closed:` + +:mailbox_with_mail: `:mailbox_with_mail:` + +:mailbox_with_no_mail: `:mailbox_with_no_mail:` + +:malawi: `:malawi:` + +:malaysia: `:malaysia:` + +:maldives: `:maldives:` + +:male_detective: `:male_detective:` + +:male_sign: `:male_sign:` + +:mali: `:mali:` + +:malta: `:malta:` + +:mammoth: `:mammoth:` + +:man: `:man:` + +:man_artist: `:man_artist:` + +:man_astronaut: `:man_astronaut:` + +:man_beard: `:man_beard:` + +:man_cartwheeling: `:man_cartwheeling:` + +:man_cook: `:man_cook:` + +:man_dancing: `:man_dancing:` + +:man_facepalming: `:man_facepalming:` + +:man_factory_worker: `:man_factory_worker:` + +:man_farmer: `:man_farmer:` + +:man_feeding_baby: `:man_feeding_baby:` + +:man_firefighter: `:man_firefighter:` + +:man_health_worker: `:man_health_worker:` + +:man_in_manual_wheelchair: `:man_in_manual_wheelchair:` + +:man_in_motorized_wheelchair: `:man_in_motorized_wheelchair:` + +:man_in_tuxedo: `:man_in_tuxedo:` + +:man_judge: `:man_judge:` + +:man_juggling: `:man_juggling:` + +:man_mechanic: `:man_mechanic:` + +:man_office_worker: `:man_office_worker:` + +:man_pilot: `:man_pilot:` + +:man_playing_handball: `:man_playing_handball:` + +:man_playing_water_polo: `:man_playing_water_polo:` + +:man_scientist: `:man_scientist:` + +:man_shrugging: `:man_shrugging:` + +:man_singer: `:man_singer:` + +:man_student: `:man_student:` + +:man_teacher: `:man_teacher:` + +:man_technologist: `:man_technologist:` + +:man_with_gua_pi_mao: `:man_with_gua_pi_mao:` + +:man_with_probing_cane: `:man_with_probing_cane:` + +:man_with_turban: `:man_with_turban:` + +:man_with_veil: `:man_with_veil:` + +:mandarin: `:mandarin:` + +:mango: `:mango:` + +:mans_shoe: `:mans_shoe:` + +:mantelpiece_clock: `:mantelpiece_clock:` + +:manual_wheelchair: `:manual_wheelchair:` + +:maple_leaf: `:maple_leaf:` + +:maracas: `:maracas:` + +:marshall_islands: `:marshall_islands:` + +:martial_arts_uniform: `:martial_arts_uniform:` + +:martinique: `:martinique:` + +:mask: `:mask:` + +:massage: `:massage:` + +:massage_man: `:massage_man:` + +:massage_woman: `:massage_woman:` + +:mate: `:mate:` + +:mauritania: `:mauritania:` + +:mauritius: `:mauritius:` + +:mayotte: `:mayotte:` + +:meat_on_bone: `:meat_on_bone:` + +:mechanic: `:mechanic:` + +:mechanical_arm: `:mechanical_arm:` + +:mechanical_leg: `:mechanical_leg:` + +:medal_military: `:medal_military:` + +:medal_sports: `:medal_sports:` + +:medical_symbol: `:medical_symbol:` + +:mega: `:mega:` + +:melon: `:melon:` + +:melting_face: `:melting_face:` + +:memo: `:memo:` + +:men_wrestling: `:men_wrestling:` + +:mending_heart: `:mending_heart:` + +:menorah: `:menorah:` + +:mens: `:mens:` + +:mermaid: `:mermaid:` + +:merman: `:merman:` + +:merperson: `:merperson:` + +:metal: `:metal:` + +:metro: `:metro:` + +:mexico: `:mexico:` + +:microbe: `:microbe:` + +:micronesia: `:micronesia:` + +:microphone: `:microphone:` + +:microscope: `:microscope:` + +:middle_finger: `:middle_finger:` + +:military_helmet: `:military_helmet:` + +:milk_glass: `:milk_glass:` + +:milky_way: `:milky_way:` + +:minibus: `:minibus:` + +:minidisc: `:minidisc:` + +:mirror: `:mirror:` + +:mirror_ball: `:mirror_ball:` + +:mobile_phone_off: `:mobile_phone_off:` + +:moldova: `:moldova:` + +:monaco: `:monaco:` + +:money_mouth_face: `:money_mouth_face:` + +:money_with_wings: `:money_with_wings:` + +:moneybag: `:moneybag:` + +:mongolia: `:mongolia:` + +:monkey: `:monkey:` + +:monkey_face: `:monkey_face:` + +:monocle_face: `:monocle_face:` + +:monorail: `:monorail:` + +:montenegro: `:montenegro:` + +:montserrat: `:montserrat:` + +:moon: `:moon:` + +:moon_cake: `:moon_cake:` + +:moose: `:moose:` + +:morocco: `:morocco:` + +:mortar_board: `:mortar_board:` + +:mosque: `:mosque:` + +:mosquito: `:mosquito:` + +:motor_boat: `:motor_boat:` + +:motor_scooter: `:motor_scooter:` + +:motorcycle: `:motorcycle:` + +:motorized_wheelchair: `:motorized_wheelchair:` + +:motorway: `:motorway:` + +:mount_fuji: `:mount_fuji:` + +:mountain: `:mountain:` + +:mountain_bicyclist: `:mountain_bicyclist:` + +:mountain_biking_man: `:mountain_biking_man:` + +:mountain_biking_woman: `:mountain_biking_woman:` + +:mountain_cableway: `:mountain_cableway:` + +:mountain_railway: `:mountain_railway:` + +:mountain_snow: `:mountain_snow:` + +:mouse: `:mouse:` + +:mouse2: `:mouse2:` + +:mouse_trap: `:mouse_trap:` + +:movie_camera: `:movie_camera:` + +:moyai: `:moyai:` + +:mozambique: `:mozambique:` + +:mrs_claus: `:mrs_claus:` + +:muscle: `:muscle:` + +:mushroom: `:mushroom:` + +:musical_keyboard: `:musical_keyboard:` + +:musical_note: `:musical_note:` + +:musical_score: `:musical_score:` + +:mute: `:mute:` + +:mx_claus: `:mx_claus:` + +:myanmar: `:myanmar:` + +:nail_care: `:nail_care:` + +:name_badge: `:name_badge:` + +:namibia: `:namibia:` + +:national_park: `:national_park:` + +:nauru: `:nauru:` + +:nauseated_face: `:nauseated_face:` + +:nazar_amulet: `:nazar_amulet:` + +:neckbeard: `:neckbeard:` + +:necktie: `:necktie:` + +:negative_squared_cross_mark: `:negative_squared_cross_mark:` + +:nepal: `:nepal:` + +:nerd_face: `:nerd_face:` + +:nest_with_eggs: `:nest_with_eggs:` + +:nesting_dolls: `:nesting_dolls:` + +:netherlands: `:netherlands:` + +:neutral_face: `:neutral_face:` + +:new: `:new:` + +:new_caledonia: `:new_caledonia:` + +:new_moon: `:new_moon:` + +:new_moon_with_face: `:new_moon_with_face:` + +:new_zealand: `:new_zealand:` + +:newspaper: `:newspaper:` + +:newspaper_roll: `:newspaper_roll:` + +:next_track_button: `:next_track_button:` + +:ng: `:ng:` + +:ng_man: `:ng_man:` + +:ng_woman: `:ng_woman:` + +:nicaragua: `:nicaragua:` + +:niger: `:niger:` + +:nigeria: `:nigeria:` + +:night_with_stars: `:night_with_stars:` + +:nine: `:nine:` + +:ninja: `:ninja:` + +:niue: `:niue:` + +:no_bell: `:no_bell:` + +:no_bicycles: `:no_bicycles:` + +:no_entry: `:no_entry:` + +:no_entry_sign: `:no_entry_sign:` + +:no_good: `:no_good:` + +:no_good_man: `:no_good_man:` + +:no_good_woman: `:no_good_woman:` + +:no_mobile_phones: `:no_mobile_phones:` + +:no_mouth: `:no_mouth:` + +:no_pedestrians: `:no_pedestrians:` + +:no_smoking: `:no_smoking:` + +:non-potable_water: `:non-potable_water:` + +:norfolk_island: `:norfolk_island:` + +:north_korea: `:north_korea:` + +:northern_mariana_islands: `:northern_mariana_islands:` + +:norway: `:norway:` + +:nose: `:nose:` + +:notebook: `:notebook:` + +:notebook_with_decorative_cover: `:notebook_with_decorative_cover:` + +:notes: `:notes:` + +:nut_and_bolt: `:nut_and_bolt:` + +:o: `:o:` + +:o2: `:o2:` + +:ocean: `:ocean:` + +:octocat: `:octocat:` + +:octopus: `:octopus:` + +:oden: `:oden:` + +:office: `:office:` + +:office_worker: `:office_worker:` + +:oil_drum: `:oil_drum:` + +:ok: `:ok:` + +:ok_hand: `:ok_hand:` + +:ok_man: `:ok_man:` + +:ok_person: `:ok_person:` + +:ok_woman: `:ok_woman:` + +:old_key: `:old_key:` + +:older_adult: `:older_adult:` + +:older_man: `:older_man:` + +:older_woman: `:older_woman:` + +:olive: `:olive:` + +:om: `:om:` + +:oman: `:oman:` + +:on: `:on:` + +:oncoming_automobile: `:oncoming_automobile:` + +:oncoming_bus: `:oncoming_bus:` + +:oncoming_police_car: `:oncoming_police_car:` + +:oncoming_taxi: `:oncoming_taxi:` + +:one: `:one:` + +:one_piece_swimsuit: `:one_piece_swimsuit:` + +:onion: `:onion:` + +:open_book: `:open_book:` + +:open_file_folder: `:open_file_folder:` + +:open_hands: `:open_hands:` + +:open_mouth: `:open_mouth:` + +:open_umbrella: `:open_umbrella:` + +:ophiuchus: `:ophiuchus:` + +:orange: `:orange:` + +:orange_book: `:orange_book:` + +:orange_circle: `:orange_circle:` + +:orange_heart: `:orange_heart:` + +:orange_square: `:orange_square:` + +:orangutan: `:orangutan:` + +:orthodox_cross: `:orthodox_cross:` + +:otter: `:otter:` + +:outbox_tray: `:outbox_tray:` + +:owl: `:owl:` + +:ox: `:ox:` + +:oyster: `:oyster:` + +:package: `:package:` + +:page_facing_up: `:page_facing_up:` + +:page_with_curl: `:page_with_curl:` + +:pager: `:pager:` + +:paintbrush: `:paintbrush:` + +:pakistan: `:pakistan:` + +:palau: `:palau:` + +:palestinian_territories: `:palestinian_territories:` + +:palm_down_hand: `:palm_down_hand:` + +:palm_tree: `:palm_tree:` + +:palm_up_hand: `:palm_up_hand:` + +:palms_up_together: `:palms_up_together:` + +:panama: `:panama:` + +:pancakes: `:pancakes:` + +:panda_face: `:panda_face:` + +:paperclip: `:paperclip:` + +:paperclips: `:paperclips:` + +:papua_new_guinea: `:papua_new_guinea:` + +:parachute: `:parachute:` + +:paraguay: `:paraguay:` + +:parasol_on_ground: `:parasol_on_ground:` + +:parking: `:parking:` + +:parrot: `:parrot:` + +:part_alternation_mark: `:part_alternation_mark:` + +:partly_sunny: `:partly_sunny:` + +:partying_face: `:partying_face:` + +:passenger_ship: `:passenger_ship:` + +:passport_control: `:passport_control:` + +:pause_button: `:pause_button:` + +:paw_prints: `:paw_prints:` + +:pea_pod: `:pea_pod:` + +:peace_symbol: `:peace_symbol:` + +:peach: `:peach:` + +:peacock: `:peacock:` + +:peanuts: `:peanuts:` + +:pear: `:pear:` + +:pen: `:pen:` + +:pencil: `:pencil:` + +:pencil2: `:pencil2:` + +:penguin: `:penguin:` + +:pensive: `:pensive:` + +:people_holding_hands: `:people_holding_hands:` + +:people_hugging: `:people_hugging:` + +:performing_arts: `:performing_arts:` + +:persevere: `:persevere:` + +:person_bald: `:person_bald:` + +:person_curly_hair: `:person_curly_hair:` + +:person_feeding_baby: `:person_feeding_baby:` + +:person_fencing: `:person_fencing:` + +:person_in_manual_wheelchair: `:person_in_manual_wheelchair:` + +:person_in_motorized_wheelchair: `:person_in_motorized_wheelchair:` + +:person_in_tuxedo: `:person_in_tuxedo:` + +:person_red_hair: `:person_red_hair:` + +:person_white_hair: `:person_white_hair:` + +:person_with_crown: `:person_with_crown:` + +:person_with_probing_cane: `:person_with_probing_cane:` + +:person_with_turban: `:person_with_turban:` + +:person_with_veil: `:person_with_veil:` + +:peru: `:peru:` + +:petri_dish: `:petri_dish:` + +:philippines: `:philippines:` + +:phone: `:phone:` + +:pick: `:pick:` + +:pickup_truck: `:pickup_truck:` + +:pie: `:pie:` + +:pig: `:pig:` + +:pig2: `:pig2:` + +:pig_nose: `:pig_nose:` + +:pill: `:pill:` + +:pilot: `:pilot:` + +:pinata: `:pinata:` + +:pinched_fingers: `:pinched_fingers:` + +:pinching_hand: `:pinching_hand:` + +:pineapple: `:pineapple:` + +:ping_pong: `:ping_pong:` + +:pink_heart: `:pink_heart:` + +:pirate_flag: `:pirate_flag:` + +:pisces: `:pisces:` + +:pitcairn_islands: `:pitcairn_islands:` + +:pizza: `:pizza:` + +:placard: `:placard:` + +:place_of_worship: `:place_of_worship:` + +:plate_with_cutlery: `:plate_with_cutlery:` + +:play_or_pause_button: `:play_or_pause_button:` + +:playground_slide: `:playground_slide:` + +:pleading_face: `:pleading_face:` + +:plunger: `:plunger:` + +:point_down: `:point_down:` + +:point_left: `:point_left:` + +:point_right: `:point_right:` + +:point_up: `:point_up:` + +:point_up_2: `:point_up_2:` + +:poland: `:poland:` + +:polar_bear: `:polar_bear:` + +:police_car: `:police_car:` + +:police_officer: `:police_officer:` + +:policeman: `:policeman:` + +:policewoman: `:policewoman:` + +:poodle: `:poodle:` + +:poop: `:poop:` + +:popcorn: `:popcorn:` + +:portugal: `:portugal:` + +:post_office: `:post_office:` + +:postal_horn: `:postal_horn:` + +:postbox: `:postbox:` + +:potable_water: `:potable_water:` + +:potato: `:potato:` + +:potted_plant: `:potted_plant:` + +:pouch: `:pouch:` + +:poultry_leg: `:poultry_leg:` + +:pound: `:pound:` + +:pouring_liquid: `:pouring_liquid:` + +:pout: `:pout:` + +:pouting_cat: `:pouting_cat:` + +:pouting_face: `:pouting_face:` + +:pouting_man: `:pouting_man:` + +:pouting_woman: `:pouting_woman:` + +:pray: `:pray:` + +:prayer_beads: `:prayer_beads:` + +:pregnant_man: `:pregnant_man:` + +:pregnant_person: `:pregnant_person:` + +:pregnant_woman: `:pregnant_woman:` + +:pretzel: `:pretzel:` + +:previous_track_button: `:previous_track_button:` + +:prince: `:prince:` + +:princess: `:princess:` + +:printer: `:printer:` + +:probing_cane: `:probing_cane:` + +:puerto_rico: `:puerto_rico:` + +:punch: `:punch:` + +:purple_circle: `:purple_circle:` + +:purple_heart: `:purple_heart:` + +:purple_square: `:purple_square:` + +:purse: `:purse:` + +:pushpin: `:pushpin:` + +:put_litter_in_its_place: `:put_litter_in_its_place:` + +:qatar: `:qatar:` + +:question: `:question:` + +:rabbit: `:rabbit:` + +:rabbit2: `:rabbit2:` + +:raccoon: `:raccoon:` + +:racehorse: `:racehorse:` + +:racing_car: `:racing_car:` + +:radio: `:radio:` + +:radio_button: `:radio_button:` + +:radioactive: `:radioactive:` + +:rage: `:rage:` + +:rage1: `:rage1:` + +:rage2: `:rage2:` + +:rage3: `:rage3:` + +:rage4: `:rage4:` + +:railway_car: `:railway_car:` + +:railway_track: `:railway_track:` + +:rainbow: `:rainbow:` + +:rainbow_flag: `:rainbow_flag:` + +:raised_back_of_hand: `:raised_back_of_hand:` + +:raised_eyebrow: `:raised_eyebrow:` + +:raised_hand: `:raised_hand:` + +:raised_hand_with_fingers_splayed: `:raised_hand_with_fingers_splayed:` + +:raised_hands: `:raised_hands:` + +:raising_hand: `:raising_hand:` + +:raising_hand_man: `:raising_hand_man:` + +:raising_hand_woman: `:raising_hand_woman:` + +:ram: `:ram:` + +:ramen: `:ramen:` + +:rat: `:rat:` + +:razor: `:razor:` + +:receipt: `:receipt:` + +:record_button: `:record_button:` + +:recycle: `:recycle:` + +:red_car: `:red_car:` + +:red_circle: `:red_circle:` + +:red_envelope: `:red_envelope:` + +:red_haired_man: `:red_haired_man:` + +:red_haired_woman: `:red_haired_woman:` + +:red_square: `:red_square:` + +:registered: `:registered:` + +:relaxed: `:relaxed:` + +:relieved: `:relieved:` + +:reminder_ribbon: `:reminder_ribbon:` + +:repeat: `:repeat:` + +:repeat_one: `:repeat_one:` + +:rescue_worker_helmet: `:rescue_worker_helmet:` + +:restroom: `:restroom:` + +:reunion: `:reunion:` + +:revolving_hearts: `:revolving_hearts:` + +:rewind: `:rewind:` + +:rhinoceros: `:rhinoceros:` + +:ribbon: `:ribbon:` + +:rice: `:rice:` + +:rice_ball: `:rice_ball:` + +:rice_cracker: `:rice_cracker:` + +:rice_scene: `:rice_scene:` + +:right_anger_bubble: `:right_anger_bubble:` + +:rightwards_hand: `:rightwards_hand:` + +:rightwards_pushing_hand: `:rightwards_pushing_hand:` + +:ring: `:ring:` + +:ring_buoy: `:ring_buoy:` + +:ringed_planet: `:ringed_planet:` + +:robot: `:robot:` + +:rock: `:rock:` + +:rocket: `:rocket:` + +:rofl: `:rofl:` + +:roll_eyes: `:roll_eyes:` + +:roll_of_paper: `:roll_of_paper:` + +:roller_coaster: `:roller_coaster:` + +:roller_skate: `:roller_skate:` + +:romania: `:romania:` + +:rooster: `:rooster:` + +:rose: `:rose:` + +:rosette: `:rosette:` + +:rotating_light: `:rotating_light:` + +:round_pushpin: `:round_pushpin:` + +:rowboat: `:rowboat:` + +:rowing_man: `:rowing_man:` + +:rowing_woman: `:rowing_woman:` + +:ru: `:ru:` + +:rugby_football: `:rugby_football:` + +:runner: `:runner:` + +:running: `:running:` + +:running_man: `:running_man:` + +:running_shirt_with_sash: `:running_shirt_with_sash:` + +:running_woman: `:running_woman:` + +:rwanda: `:rwanda:` + +:sa: `:sa:` + +:safety_pin: `:safety_pin:` + +:safety_vest: `:safety_vest:` + +:sagittarius: `:sagittarius:` + +:sailboat: `:sailboat:` + +:sake: `:sake:` + +:salt: `:salt:` + +:saluting_face: `:saluting_face:` + +:samoa: `:samoa:` + +:san_marino: `:san_marino:` + +:sandal: `:sandal:` + +:sandwich: `:sandwich:` + +:santa: `:santa:` + +:sao_tome_principe: `:sao_tome_principe:` + +:sari: `:sari:` + +:sassy_man: `:sassy_man:` + +:sassy_woman: `:sassy_woman:` + +:satellite: `:satellite:` + +:satisfied: `:satisfied:` + +:saudi_arabia: `:saudi_arabia:` + +:sauna_man: `:sauna_man:` + +:sauna_person: `:sauna_person:` + +:sauna_woman: `:sauna_woman:` + +:sauropod: `:sauropod:` + +:saxophone: `:saxophone:` + +:scarf: `:scarf:` + +:school: `:school:` + +:school_satchel: `:school_satchel:` + +:scientist: `:scientist:` + +:scissors: `:scissors:` + +:scorpion: `:scorpion:` + +:scorpius: `:scorpius:` + +:scotland: `:scotland:` + +:scream: `:scream:` + +:scream_cat: `:scream_cat:` + +:screwdriver: `:screwdriver:` + +:scroll: `:scroll:` + +:seal: `:seal:` + +:seat: `:seat:` + +:secret: `:secret:` + +:see_no_evil: `:see_no_evil:` + +:seedling: `:seedling:` + +:selfie: `:selfie:` + +:senegal: `:senegal:` + +:serbia: `:serbia:` + +:service_dog: `:service_dog:` + +:seven: `:seven:` + +:sewing_needle: `:sewing_needle:` + +:seychelles: `:seychelles:` + +:shaking_face: `:shaking_face:` + +:shallow_pan_of_food: `:shallow_pan_of_food:` + +:shamrock: `:shamrock:` + +:shark: `:shark:` + +:shaved_ice: `:shaved_ice:` + +:sheep: `:sheep:` + +:shell: `:shell:` + +:shield: `:shield:` + +:shinto_shrine: `:shinto_shrine:` + +:ship: `:ship:` + +:shipit: `:shipit:` + +:shirt: `:shirt:` + +:shit: `:shit:` + +:shoe: `:shoe:` + +:shopping: `:shopping:` + +:shopping_cart: `:shopping_cart:` + +:shorts: `:shorts:` + +:shower: `:shower:` + +:shrimp: `:shrimp:` + +:shrug: `:shrug:` + +:shushing_face: `:shushing_face:` + +:sierra_leone: `:sierra_leone:` + +:signal_strength: `:signal_strength:` + +:singapore: `:singapore:` + +:singer: `:singer:` + +:sint_maarten: `:sint_maarten:` + +:six: `:six:` + +:six_pointed_star: `:six_pointed_star:` + +:skateboard: `:skateboard:` + +:ski: `:ski:` + +:skier: `:skier:` + +:skull: `:skull:` + +:skull_and_crossbones: `:skull_and_crossbones:` + +:skunk: `:skunk:` + +:sled: `:sled:` + +:sleeping: `:sleeping:` + +:sleeping_bed: `:sleeping_bed:` + +:sleepy: `:sleepy:` + +:slightly_frowning_face: `:slightly_frowning_face:` + +:slightly_smiling_face: `:slightly_smiling_face:` + +:slot_machine: `:slot_machine:` + +:sloth: `:sloth:` + +:slovakia: `:slovakia:` + +:slovenia: `:slovenia:` + +:small_airplane: `:small_airplane:` + +:small_blue_diamond: `:small_blue_diamond:` + +:small_orange_diamond: `:small_orange_diamond:` + +:small_red_triangle: `:small_red_triangle:` + +:small_red_triangle_down: `:small_red_triangle_down:` + +:smile: `:smile:` + +:smile_cat: `:smile_cat:` + +:smiley: `:smiley:` + +:smiley_cat: `:smiley_cat:` + +:smiling_face_with_tear: `:smiling_face_with_tear:` + +:smiling_face_with_three_hearts: `:smiling_face_with_three_hearts:` + +:smiling_imp: `:smiling_imp:` + +:smirk: `:smirk:` + +:smirk_cat: `:smirk_cat:` + +:smoking: `:smoking:` + +:snail: `:snail:` + +:snake: `:snake:` + +:sneezing_face: `:sneezing_face:` + +:snowboarder: `:snowboarder:` + +:snowflake: `:snowflake:` + +:snowman: `:snowman:` + +:snowman_with_snow: `:snowman_with_snow:` + +:soap: `:soap:` + +:sob: `:sob:` + +:soccer: `:soccer:` + +:socks: `:socks:` + +:softball: `:softball:` + +:solomon_islands: `:solomon_islands:` + +:somalia: `:somalia:` + +:soon: `:soon:` + +:sos: `:sos:` + +:sound: `:sound:` + +:south_africa: `:south_africa:` + +:south_georgia_south_sandwich_islands: `:south_georgia_south_sandwich_islands:` + +:south_sudan: `:south_sudan:` + +:space_invader: `:space_invader:` + +:spades: `:spades:` + +:spaghetti: `:spaghetti:` + +:sparkle: `:sparkle:` + +:sparkler: `:sparkler:` + +:sparkles: `:sparkles:` + +:sparkling_heart: `:sparkling_heart:` + +:speak_no_evil: `:speak_no_evil:` + +:speaker: `:speaker:` + +:speaking_head: `:speaking_head:` + +:speech_balloon: `:speech_balloon:` + +:speedboat: `:speedboat:` + +:spider: `:spider:` + +:spider_web: `:spider_web:` + +:spiral_calendar: `:spiral_calendar:` + +:spiral_notepad: `:spiral_notepad:` + +:sponge: `:sponge:` + +:spoon: `:spoon:` + +:squid: `:squid:` + +:sri_lanka: `:sri_lanka:` + +:st_barthelemy: `:st_barthelemy:` + +:st_helena: `:st_helena:` + +:st_kitts_nevis: `:st_kitts_nevis:` + +:st_lucia: `:st_lucia:` + +:st_martin: `:st_martin:` + +:st_pierre_miquelon: `:st_pierre_miquelon:` + +:st_vincent_grenadines: `:st_vincent_grenadines:` + +:stadium: `:stadium:` + +:standing_man: `:standing_man:` + +:standing_person: `:standing_person:` + +:standing_woman: `:standing_woman:` + +:star: `:star:` + +:star2: `:star2:` + +:star_and_crescent: `:star_and_crescent:` + +:star_of_david: `:star_of_david:` + +:star_struck: `:star_struck:` + +:stars: `:stars:` + +:station: `:station:` + +:statue_of_liberty: `:statue_of_liberty:` + +:steam_locomotive: `:steam_locomotive:` + +:stethoscope: `:stethoscope:` + +:stew: `:stew:` + +:stop_button: `:stop_button:` + +:stop_sign: `:stop_sign:` + +:stopwatch: `:stopwatch:` + +:straight_ruler: `:straight_ruler:` + +:strawberry: `:strawberry:` + +:stuck_out_tongue: `:stuck_out_tongue:` + +:stuck_out_tongue_closed_eyes: `:stuck_out_tongue_closed_eyes:` + +:stuck_out_tongue_winking_eye: `:stuck_out_tongue_winking_eye:` + +:student: `:student:` + +:studio_microphone: `:studio_microphone:` + +:stuffed_flatbread: `:stuffed_flatbread:` + +:sudan: `:sudan:` + +:sun_behind_large_cloud: `:sun_behind_large_cloud:` + +:sun_behind_rain_cloud: `:sun_behind_rain_cloud:` + +:sun_behind_small_cloud: `:sun_behind_small_cloud:` + +:sun_with_face: `:sun_with_face:` + +:sunflower: `:sunflower:` + +:sunglasses: `:sunglasses:` + +:sunny: `:sunny:` + +:sunrise: `:sunrise:` + +:sunrise_over_mountains: `:sunrise_over_mountains:` + +:superhero: `:superhero:` + +:superhero_man: `:superhero_man:` + +:superhero_woman: `:superhero_woman:` + +:supervillain: `:supervillain:` + +:supervillain_man: `:supervillain_man:` + +:supervillain_woman: `:supervillain_woman:` + +:surfer: `:surfer:` + +:surfing_man: `:surfing_man:` + +:surfing_woman: `:surfing_woman:` + +:suriname: `:suriname:` + +:sushi: `:sushi:` + +:suspect: `:suspect:` + +:suspension_railway: `:suspension_railway:` + +:svalbard_jan_mayen: `:svalbard_jan_mayen:` + +:swan: `:swan:` + +:swaziland: `:swaziland:` + +:sweat: `:sweat:` + +:sweat_drops: `:sweat_drops:` + +:sweat_smile: `:sweat_smile:` + +:sweden: `:sweden:` + +:sweet_potato: `:sweet_potato:` + +:swim_brief: `:swim_brief:` + +:swimmer: `:swimmer:` + +:swimming_man: `:swimming_man:` + +:swimming_woman: `:swimming_woman:` + +:switzerland: `:switzerland:` + +:symbols: `:symbols:` + +:synagogue: `:synagogue:` + +:syria: `:syria:` + +:syringe: `:syringe:` + +:t-rex: `:t-rex:` + +:taco: `:taco:` + +:tada: `:tada:` + +:taiwan: `:taiwan:` + +:tajikistan: `:tajikistan:` + +:takeout_box: `:takeout_box:` + +:tamale: `:tamale:` + +:tanabata_tree: `:tanabata_tree:` + +:tangerine: `:tangerine:` + +:tanzania: `:tanzania:` + +:taurus: `:taurus:` + +:taxi: `:taxi:` + +:tea: `:tea:` + +:teacher: `:teacher:` + +:teapot: `:teapot:` + +:technologist: `:technologist:` + +:teddy_bear: `:teddy_bear:` + +:telephone: `:telephone:` + +:telephone_receiver: `:telephone_receiver:` + +:telescope: `:telescope:` + +:tennis: `:tennis:` + +:tent: `:tent:` + +:test_tube: `:test_tube:` + +:thailand: `:thailand:` + +:thermometer: `:thermometer:` + +:thinking: `:thinking:` + +:thong_sandal: `:thong_sandal:` + +:thought_balloon: `:thought_balloon:` + +:thread: `:thread:` + +:three: `:three:` + +:thumbsdown: `:thumbsdown:` + +:thumbsup: `:thumbsup:` + +:ticket: `:ticket:` + +:tickets: `:tickets:` + +:tiger: `:tiger:` + +:tiger2: `:tiger2:` + +:timer_clock: `:timer_clock:` + +:timor_leste: `:timor_leste:` + +:tipping_hand_man: `:tipping_hand_man:` + +:tipping_hand_person: `:tipping_hand_person:` + +:tipping_hand_woman: `:tipping_hand_woman:` + +:tired_face: `:tired_face:` + +:tm: `:tm:` + +:togo: `:togo:` + +:toilet: `:toilet:` + +:tokelau: `:tokelau:` + +:tokyo_tower: `:tokyo_tower:` + +:tomato: `:tomato:` + +:tonga: `:tonga:` + +:tongue: `:tongue:` + +:toolbox: `:toolbox:` + +:tooth: `:tooth:` + +:toothbrush: `:toothbrush:` + +:top: `:top:` + +:tophat: `:tophat:` + +:tornado: `:tornado:` + +:tr: `:tr:` + +:trackball: `:trackball:` + +:tractor: `:tractor:` + +:traffic_light: `:traffic_light:` + +:train: `:train:` + +:train2: `:train2:` + +:tram: `:tram:` + +:transgender_flag: `:transgender_flag:` + +:transgender_symbol: `:transgender_symbol:` + +:triangular_flag_on_post: `:triangular_flag_on_post:` + +:triangular_ruler: `:triangular_ruler:` + +:trident: `:trident:` + +:trinidad_tobago: `:trinidad_tobago:` + +:tristan_da_cunha: `:tristan_da_cunha:` + +:triumph: `:triumph:` + +:troll: `:troll:` + +:trolleybus: `:trolleybus:` + +:trollface: `:trollface:` + +:trophy: `:trophy:` + +:tropical_drink: `:tropical_drink:` + +:tropical_fish: `:tropical_fish:` + +:truck: `:truck:` + +:trumpet: `:trumpet:` + +:tshirt: `:tshirt:` + +:tulip: `:tulip:` + +:tumbler_glass: `:tumbler_glass:` + +:tunisia: `:tunisia:` + +:turkey: `:turkey:` + +:turkmenistan: `:turkmenistan:` + +:turks_caicos_islands: `:turks_caicos_islands:` + +:turtle: `:turtle:` + +:tuvalu: `:tuvalu:` + +:tv: `:tv:` + +:twisted_rightwards_arrows: `:twisted_rightwards_arrows:` + +:two: `:two:` + +:two_hearts: `:two_hearts:` + +:two_men_holding_hands: `:two_men_holding_hands:` + +:two_women_holding_hands: `:two_women_holding_hands:` + +:u5272: `:u5272:` + +:u5408: `:u5408:` + +:u55b6: `:u55b6:` + +:u6307: `:u6307:` + +:u6708: `:u6708:` + +:u6709: `:u6709:` + +:u6e80: `:u6e80:` + +:u7121: `:u7121:` + +:u7533: `:u7533:` + +:u7981: `:u7981:` + +:u7a7a: `:u7a7a:` + +:uganda: `:uganda:` + +:uk: `:uk:` + +:ukraine: `:ukraine:` + +:umbrella: `:umbrella:` + +:unamused: `:unamused:` + +:underage: `:underage:` + +:unicorn: `:unicorn:` + +:united_arab_emirates: `:united_arab_emirates:` + +:united_nations: `:united_nations:` + +:unlock: `:unlock:` + +:up: `:up:` + +:upside_down_face: `:upside_down_face:` + +:uruguay: `:uruguay:` + +:us: `:us:` + +:us_outlying_islands: `:us_outlying_islands:` + +:us_virgin_islands: `:us_virgin_islands:` + +:uzbekistan: `:uzbekistan:` + +:v: `:v:` + +:vampire: `:vampire:` + +:vampire_man: `:vampire_man:` + +:vampire_woman: `:vampire_woman:` + +:vanuatu: `:vanuatu:` + +:vatican_city: `:vatican_city:` + +:venezuela: `:venezuela:` + +:vertical_traffic_light: `:vertical_traffic_light:` + +:vhs: `:vhs:` + +:vibration_mode: `:vibration_mode:` + +:video_camera: `:video_camera:` + +:video_game: `:video_game:` + +:vietnam: `:vietnam:` + +:violin: `:violin:` + +:virgo: `:virgo:` + +:volcano: `:volcano:` + +:volleyball: `:volleyball:` + +:vomiting_face: `:vomiting_face:` + +:vs: `:vs:` + +:vulcan_salute: `:vulcan_salute:` + +:waffle: `:waffle:` + +:wales: `:wales:` + +:walking: `:walking:` + +:walking_man: `:walking_man:` + +:walking_woman: `:walking_woman:` + +:wallis_futuna: `:wallis_futuna:` + +:waning_crescent_moon: `:waning_crescent_moon:` + +:waning_gibbous_moon: `:waning_gibbous_moon:` + +:warning: `:warning:` + +:wastebasket: `:wastebasket:` + +:watch: `:watch:` + +:water_buffalo: `:water_buffalo:` + +:water_polo: `:water_polo:` + +:watermelon: `:watermelon:` + +:wave: `:wave:` + +:wavy_dash: `:wavy_dash:` + +:waxing_crescent_moon: `:waxing_crescent_moon:` + +:waxing_gibbous_moon: `:waxing_gibbous_moon:` + +:wc: `:wc:` + +:weary: `:weary:` + +:wedding: `:wedding:` + +:weight_lifting: `:weight_lifting:` + +:weight_lifting_man: `:weight_lifting_man:` + +:weight_lifting_woman: `:weight_lifting_woman:` + +:western_sahara: `:western_sahara:` + +:whale: `:whale:` + +:whale2: `:whale2:` + +:wheel: `:wheel:` + +:wheel_of_dharma: `:wheel_of_dharma:` + +:wheelchair: `:wheelchair:` + +:white_check_mark: `:white_check_mark:` + +:white_circle: `:white_circle:` + +:white_flag: `:white_flag:` + +:white_flower: `:white_flower:` + +:white_haired_man: `:white_haired_man:` + +:white_haired_woman: `:white_haired_woman:` + +:white_heart: `:white_heart:` + +:white_large_square: `:white_large_square:` + +:white_medium_small_square: `:white_medium_small_square:` + +:white_medium_square: `:white_medium_square:` + +:white_small_square: `:white_small_square:` + +:white_square_button: `:white_square_button:` + +:wilted_flower: `:wilted_flower:` + +:wind_chime: `:wind_chime:` + +:wind_face: `:wind_face:` + +:window: `:window:` + +:wine_glass: `:wine_glass:` + +:wing: `:wing:` + +:wink: `:wink:` + +:wireless: `:wireless:` + +:wolf: `:wolf:` + +:woman: `:woman:` + +:woman_artist: `:woman_artist:` + +:woman_astronaut: `:woman_astronaut:` + +:woman_beard: `:woman_beard:` + +:woman_cartwheeling: `:woman_cartwheeling:` + +:woman_cook: `:woman_cook:` + +:woman_dancing: `:woman_dancing:` + +:woman_facepalming: `:woman_facepalming:` + +:woman_factory_worker: `:woman_factory_worker:` + +:woman_farmer: `:woman_farmer:` + +:woman_feeding_baby: `:woman_feeding_baby:` + +:woman_firefighter: `:woman_firefighter:` + +:woman_health_worker: `:woman_health_worker:` + +:woman_in_manual_wheelchair: `:woman_in_manual_wheelchair:` + +:woman_in_motorized_wheelchair: `:woman_in_motorized_wheelchair:` + +:woman_in_tuxedo: `:woman_in_tuxedo:` + +:woman_judge: `:woman_judge:` + +:woman_juggling: `:woman_juggling:` + +:woman_mechanic: `:woman_mechanic:` + +:woman_office_worker: `:woman_office_worker:` + +:woman_pilot: `:woman_pilot:` + +:woman_playing_handball: `:woman_playing_handball:` + +:woman_playing_water_polo: `:woman_playing_water_polo:` + +:woman_scientist: `:woman_scientist:` + +:woman_shrugging: `:woman_shrugging:` + +:woman_singer: `:woman_singer:` + +:woman_student: `:woman_student:` + +:woman_teacher: `:woman_teacher:` + +:woman_technologist: `:woman_technologist:` + +:woman_with_headscarf: `:woman_with_headscarf:` + +:woman_with_probing_cane: `:woman_with_probing_cane:` + +:woman_with_turban: `:woman_with_turban:` + +:woman_with_veil: `:woman_with_veil:` + +:womans_clothes: `:womans_clothes:` + +:womans_hat: `:womans_hat:` + +:women_wrestling: `:women_wrestling:` + +:womens: `:womens:` + +:wood: `:wood:` + +:woozy_face: `:woozy_face:` + +:world_map: `:world_map:` + +:worm: `:worm:` + +:worried: `:worried:` + +:wrench: `:wrench:` + +:wrestling: `:wrestling:` + +:writing_hand: `:writing_hand:` + +:x: `:x:` + +:x_ray: `:x_ray:` + +:yarn: `:yarn:` + +:yawning_face: `:yawning_face:` + +:yellow_circle: `:yellow_circle:` + +:yellow_heart: `:yellow_heart:` + +:yellow_square: `:yellow_square:` + +:yemen: `:yemen:` + +:yen: `:yen:` + +:yin_yang: `:yin_yang:` + +:yo_yo: `:yo_yo:` + +:yum: `:yum:` + +:zambia: `:zambia:` + +:zany_face: `:zany_face:` + +:zap: `:zap:` + +:zebra: `:zebra:` + +:zero: `:zero:` + +:zimbabwe: `:zimbabwe:` + +:zipper_mouth_face: `:zipper_mouth_face:` + +:zombie: `:zombie:` + +:zombie_man: `:zombie_man:` + +:zombie_woman: `:zombie_woman:` + +:zzz: `:zzz:` + + + +
diff --git a/helpers.md b/helpers.md index 9865143..fbf53ae 100644 --- a/helpers.md +++ b/helpers.md @@ -2,27 +2,43 @@ docsify 扩展了一些 Markdown 语法,可以让文档更易读。 -## 强调内容 +> 注意:对于特殊的代码语法,最好将其放在代码的反斜线内,以避免与配置或表情符号发生冲突。 -适合显示重要的提示信息,语法为 `!> 内容`。 +## 标注 + +### 强调内容 + +重要内容如: ```markdown -!> 一段重要的内容,可以和其他 **Markdown** 语法混用。 +!> **Time** is money, my friend! ``` -!> 一段重要的内容,可以和其他 **Markdown** 语法混用。 +渲染为: + +!> **Time** is money, my friend! -## 普通提示 +### 提示 -普通的提示信息,比如写 TODO 或者参考内容等。 +一般提示如: ```markdown -?> _TODO_ 完善示例 +?> _TODO_ unit test ``` -?> _TODO_ 完善示例 +渲染为: + +?> _TODO_ unit test + +## 链接属性 + +### disabled -## 忽略编译链接 +```md +[link](/demo ':disabled') +``` + +### href 有时候我们会把其他一些相对路径放到链接上,你必须告诉 docsify 你不需要编译这个链接。 例如: @@ -30,7 +46,7 @@ docsify 扩展了一些 Markdown 语法,可以让文档更易读。 [link](/demo/) ``` -它将被编译为 `link` 并将加载 `/demo/README.md`. 可能你想跳转到 `/demo/index.html`。 +它将被编译为 `link` 并将加载 `/demo/README.md`。 可能你想跳转到 `/demo/index.html`。 现在你可以做到这一点 @@ -38,7 +54,7 @@ docsify 扩展了一些 Markdown 语法,可以让文档更易读。 [link](/demo/ ':ignore') ``` -即将会得到 `link` html 代码。不要担心,你仍然可以为链接设置标题。 +你会得到 `link` html 代码。 不要担心,你仍然可以为链接设置标题。 ```md [link](/demo/ ':ignore title') @@ -46,28 +62,14 @@ docsify 扩展了一些 Markdown 语法,可以让文档更易读。 link ``` -## 设置链接的 target 属性 +### target ```md [link](/demo ':target=_blank') [link](/demo2 ':target=_self') ``` -## 禁用链接 - -```md -[link](/demo ':disabled') -``` - -## 跨域链接 - -只有当你同时设置了 `routerMode: 'history'` 和 `externalLinkTarget: '_self'` 时,你需要为这些跨域链接添加这个配置。 - -```md -[example.com](https://example.com/ ':crossorgin') -``` - -## Github 任务列表 +## 任务清单 ```md - [ ] foo @@ -85,35 +87,35 @@ docsify 扩展了一些 Markdown 语法,可以让文档更易读。 - [ ] bim - [ ] lim -## 图片处理 +## 图片 -### 缩放 +### 类名 ```md -![logo](https://docsify.js.org/_media/icon.svg ':size=WIDTHxHEIGHT') -![logo](https://docsify.js.org/_media/icon.svg ':size=50x100') -![logo](https://docsify.js.org/_media/icon.svg ':size=100') +![logo](https://docsify.js.org/_media/icon.svg ':class=someCssClass') +``` - +### ID -![logo](https://docsify.js.org/_media/icon.svg ':size=10%') +```md +![logo](https://docsify.js.org/_media/icon.svg ':id=someCssId') ``` +### 大小 + +```md +![logo](https://docsify.js.org/_media/icon.svg ':size=WIDTHxHEIGHT') ![logo](https://docsify.js.org/_media/icon.svg ':size=50x100') ![logo](https://docsify.js.org/_media/icon.svg ':size=100') -![logo](https://docsify.js.org/_media/icon.svg ':size=10%') -### 设置图片的 Class + -```md -![logo](https://docsify.js.org/_media/icon.svg ':class=someCssClass') +![logo](https://docsify.js.org/_media/icon.svg ':size=10%') ``` -### 设置图片的 ID - -```md -![logo](https://docsify.js.org/_media/icon.svg ':id=someCssId') -``` +![logo](https://docsify.js.org/_media/icon.svg ":size=50x100") +![logo](https://docsify.js.org/_media/icon.svg ":size=100") +![logo](https://docsify.js.org/_media/icon.svg ":size=10%") ## 设置标题的 id 属性 @@ -121,10 +123,10 @@ docsify 扩展了一些 Markdown 语法,可以让文档更易读。 ### 你好,世界! :id=hello-world ``` -## html 标签中的 Markdown +## HTML 标签中的 Markdown -你需要在 html 和 Markdown 内容中插入空行。 -当你需要在 details 元素中渲染 Markdown 时很有用。 +你需要在 html 和 markdown 内容之间插入空格。 +这对于在 details 元素中呈现 markdown 内容非常有用。 ```markdown
@@ -158,7 +160,8 @@ Markdown 内容也可以被 html 标签包裹。
-- Abc -- Abc +- listitem +- listitem +- listitem
diff --git a/language-highlight.md b/language-highlight.md index d2171ca..0e41ca6 100644 --- a/language-highlight.md +++ b/language-highlight.md @@ -1,53 +1,141 @@ # 代码高亮 -**docsify**内置的代码高亮工具是 [Prism](https://github.com/PrismJS/prism)。Prism 默认支持的语言如下: +## Prism -* Markup - `markup`, `html`, `xml`, `svg`, `mathml`, `ssml`, `atom`, `rss` -* CSS - `css` -* C-like - `clike` -* JavaScript - `javascript`, `js` +Docsify 使用 [Prism](https://prismjs.com) 在代码块内进行语法高亮显示。 Prism 默认支持以下语言(也可提供额外的[语言支持](#language-support)): -[添加额外的语法支持](https://prismjs.com/#supported-languages)需要通过CDN添加相应的[语法文件](https://cdn.jsdelivr.net/npm/prismjs@1/components/) : +- Markup:HTML、XML、SVG、MathML、SSML、Atom、RSS +- CSS +- C-like +- JavaScript -```html - - -``` - -要使用语法高亮,需要在代码块第一行添加对应的[语言声明](https://prismjs.com/#supported-languages),示例如下: +要启用语法高亮,请使用反标(` ``` `)创建一个标记符代码块,并在第一行指定一个 [language](https://prismjs.com/#supported-languages)(例如`html`、`css`、`js`): -```` +````text ```html

This is a paragraph

Docsify ``` +```` -```bash -echo "hello" +````text +```css +p { + color: red; +} ``` +```` -```php -function getAdder(int $x): int -{ - return 123; +````text +```js +function add(a, b) { + return a + b; } ``` ```` -上面代码的渲染结果: +上面的 markdown 将被渲染为: ```html

This is a paragraph

Docsify ``` -```bash -echo "hello" +```css +p { + color: red; +} ``` -```php -function getAdder(int $x): int -{ - return 123; +```js +function add(a, b) { + return a + b; } ``` + +## 语言支持 :id=language-support + +通过加载 Prism [语法文件](https://cdn.jsdelivr.net/npm/prismjs@1/components/),可支持其他[语言](https://prismjs.com/#supported-languages): + +!> 必须在 Docsify 之后加载 Prism 语法文件。 + +```html + + + + + + + + + + + + + +``` + +## 主题支持 :id=theme-support + +Docsify 的官方[主题](zh-cn/themes)与 Prism 语法高亮主题兼容。 + +!> Prism 主题必须在 Docsify 主题之后加载。 + +```html + + +``` + +主题可在浅色和/或深色模式下使用 + +```html + + + + + +``` + +以下 Docsify [主题属性](zh-cn/themes#theme-properties) 默认覆盖 Prism 主题样式: + +```text +--border-radius +--font-family-mono +--font-size-mono +``` + +要使用 Prism 主题中指定的值,请将所需的主题属性设置为 `unset`: + + + +```html + +``` + +## 动态内容 + +可以使用 Prism 的 [`highlightElement()`](https://prismjs.com/docs/Prism.html#.highlightElement) 方法高亮显示动态生成的代码块: + +```js +const code = document.createElement('code'); +code.innerHTML = "console.log('Hello World!')"; +code.setAttribute('class', 'language-javascript'); +Prism.highlightElement(code); +``` diff --git a/markdown.md b/markdown.md index 2888cf2..9de5e16 100644 --- a/markdown.md +++ b/markdown.md @@ -1,57 +1,60 @@ # Markdown 配置 -内置的 Markdown 解析器是 [marked](https://github.com/markedjs/marked),可以修改它的配置。同时可以直接配置 `renderer`。 +**docsify** 使用 [marked](https://github.com/markedjs/marked) 作为其 Markdown 解析器。 你可以通过自定义 `renderer` 来定制如何将 Markdown 内容渲染为 HTML: ```js window.$docsify = { markdown: { smartypants: true, renderer: { - link: function() { + link() { // ... - } - } - } -} + }, + }, + }, +}; ``` -?> 完整配置参数参考 [marked 文档](https://github.com/markedjs/marked#options-1) +?> 完整配置参数参考 [marked 文档](https://marked.js.org/#/USING_ADVANCED.md) -当然也可以完全定制 Markdown 解析规则。 +你可以完全自定义解析规则。 ```js window.$docsify = { - markdown: function(marked, renderer) { + markdown(marked, renderer) { // ... - return marked - } -} + return marked; + }, +}; ``` - ## 支持 mermaid +!> 目前 docsify 不支持异步 mermaid 渲染(最新的 mermaid 版本是 `v9.3.0`)。 + ```js -// Import mermaid // -// +// -var num = 0; +let num = 0; mermaid.initialize({ startOnLoad: false }); window.$docsify = { markdown: { renderer: { - code: function(code, lang) { - if (lang === "mermaid") { - return ( - '
' + mermaid.render('mermaid-svg-' + num++, code) + "
" - ); + code({ text, lang }) { + if (lang === 'mermaid') { + return /* html */ ` +
${mermaid.render( + 'mermaid-svg-' + num++, + text, + )}
+ `; } return this.origin.code.apply(this, arguments); - } - } - } -} + }, + }, + }, +}; ``` diff --git a/more-pages.md b/more-pages.md index 06bf1d2..883ae1b 100644 --- a/more-pages.md +++ b/more-pages.md @@ -1,6 +1,6 @@ # 多页文档 -如果需要创建多个页面,或者需要多级路由的网站,在 docsify 里也能很容易的实现。例如创建一个 `guide.md` 文件,那么对应的路由就是 `/#/guide`。 +如果你需要多个页面,你可以在你的 docsify 目录中创建更多的 markdown 文件。 如果创建了名为 `guide.md` 的文件,则可通过 `/#/guide` 访问该文件。 假设你的目录结构如下: @@ -14,60 +14,71 @@ └── guide.md ``` -那么对应的访问页面将是 +对应的访问页面路由将是 ```text docs/README.md => http://domain.com -docs/guide.md => http://domain.com/guide -docs/zh-cn/README.md => http://domain.com/zh-cn/ -docs/zh-cn/guide.md => http://domain.com/zh-cn/guide +docs/guide.md => http://domain.com/#/guide +docs/zh-cn/README.md => http://domain.com/#/zh-cn/ +docs/zh-cn/guide.md => http://domain.com/#/zh-cn/guide ``` -## 定制侧边栏 +## 侧边栏 -为了获得侧边栏,您需要创建自己的_sidebar.md,你也可以自定义加载的文件名。默认情况下侧边栏会通过 Markdown 文件自动生成,效果如当前的文档的侧边栏。 +为了拥有侧边栏,你可以创建自己的 `_sidebar.md`(示例参见[本文档的侧边栏](https://github.com/docsifyjs/docs-zh/blob/main/_sidebar.md?plain=1)): -首先配置 `loadSidebar` 选项,具体配置规则见[配置项#loadSidebar](zh-cn/configuration#loadsidebar)。 +首先,需要将 `loadSidebar` 设置为 **true**。 详细信息请参阅[配置段落](zh-cn/configuration#loadsidebar)。 ```html - + ``` -接着创建 `_sidebar.md` 文件,内容如下 +创建 `_sidebar.md`: ```markdown -* [首页](zh-cn/) -* [指南](zh-cn/guide) +- [Home](/) +- [Guide](guide.md) ``` 需要在 `./docs` 目录创建 `.nojekyll` 命名的空文件,阻止 GitHub Pages 忽略命名是下划线开头的文件。 -## 嵌套的侧边栏 +!> Docsify 只查找当前文件夹中的 `_sidebar.md`,并使用它,否则会返回到使用 `window.$docsify.loadSidebar` 配置。 + +示例文件结构: + +```text +└── docs/ + ├── _sidebar.md + ├── index.md + ├── getting-started.md + └── running-services.md +``` -你可能想要浏览到一个目录时,只显示这个目录自己的侧边栏,这可以通过在每个文件夹中添加一个 `_sidebar.md` 文件来实现。 +## 嵌套侧边栏 +你可能想要浏览到一个目录时,只显示这个目录自己的侧边栏。 这可以通过在每个文件夹中添加一个 `_sidebar.md` 文件来实现。 -`_sidebar.md` 的加载逻辑是从每层目录下获取文件,如果当前目录不存在该文件则回退到上一级目录。例如当前路径为 `/zh-cn/more-pages` 则从 `/zh-cn/_sidebar.md` 获取文件,如果不存在则从 `/_sidebar.md` 获取。 +`_sidebar.md`会从每一级目录加载。 如果当前目录中没有 `_sidebar.md`,则会返回上一级目录。 例如如果当前路径是 `/guide/quick-start`,则 `_sidebar.md` 将从 `/guide/_sidebar.md` 加载。 -当然你也可以配置 `alias` 避免不必要的回退过程。 +你也可以配置 `alias` 避免不必要的回退过程。 ```html ``` @@ -75,17 +86,20 @@ docs/zh-cn/guide.md => http://domain.com/zh-cn/guide ## 用侧边栏中选定的条目名称作为页面标题 -一个页面的 `title` 标签是由侧边栏中选中条目的名称所生成的。为了更好的 SEO ,你可以在文件名后面指定页面标题。 +一个页面的 `title` 标签是由侧边栏中_选中_条目的名称所生成的。 为了更好的 SEO ,你可以在文件名后面指定页面标题。 ```markdown -* [Home](/) -* [Guide](guide.md "The greatest guide in the world") + +- [Home](/) +- [Guide](guide.md 'The greatest guide in the world') ``` -## 显示目录 +## 目录 -自定义侧边栏同时也可以开启目录功能。设置 `subMaxLevel` 配置项,具体介绍见 [配置项#subMaxLevel](zh-cn/configuration#submaxlevel)。 +创建 `_sidebar.md` 后,侧边栏内容就会根据 markdown 文件中的标题自动生成。 + +自定义侧边栏还可以通过设置 `subMaxLevel` 自动生成目录,参考 [subMaxLevel 配置](zh-cn/configuration#submaxlevel)。 ```html @@ -93,15 +107,15 @@ docs/zh-cn/guide.md => http://domain.com/zh-cn/guide - + ``` ## 忽略副标题 -当设置了 `subMaxLevel` 时,默认情况下每个标题都会自动添加到目录中。如果你想忽略特定的标题,可以给它添加 `` 。 +当设置了 `subMaxLevel` 时,默认情况下每个标题都会自动添加到目录中。 如果要忽略某个特定的标题,请添加 ``。 ```markdown # Getting Started @@ -122,3 +136,5 @@ docs/zh-cn/guide.md => http://domain.com/zh-cn/guide ``` 在使用时, `` 和 `` 都不会在页面上呈现。 + +{docsify-ignore} 和 {docsify-ignore-all} 也可以做同样的事情。 diff --git a/plugins.md b/plugins.md index 00b2e23..4c93c78 100644 --- a/plugins.md +++ b/plugins.md @@ -1,227 +1,235 @@ # 插件列表 -## 全文搜索 - Search +## 全文搜索 -全文搜索插件会根据当前页面上的超链接获取文档内容,在 `localStorage` 内建立文档索引。默认过期时间为一天,当然我们可以自己指定需要缓存的文件列表或者配置过期时间。 +默认情况下,当前页面上的超链接会被识别,内容会被保存到 `IndexedDB`。 你也可以指定文件的路径。 + + ```html - - + + ``` -当执行全文搜索时,该插件会忽略双音符(例如,"cafe" 也会匹配 "café")。像 IE11 这样的旧版浏览器需要使用以下 [String.normalize()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize) polyfill 来忽略双音符: - -```html - -``` +在进行全文搜索时,该插件会忽略变音标记(例如:"cafe" 也会匹配 "café")。 ## 谷歌统计 - Google Analytics -需要配置 track id 才能使用。 +> 从 2023 年 7 月 1 日起,谷歌的通用分析服务将不再处理标准属性中的新数据。 通过设置并切换到 Google Analytics 4 属性和 docsify 的 gtag.js 插件做好准备。 + +安装插件并配置 track id。 ```html - - + + ``` 也可以通过 `data-ga` 配置 id。 + + ```html - - + + ``` -## emoji +## Google Analytics 4 (GA4) -默认是提供 emoji 解析的,能将类似 `:100:` 解析成 :100:。但是它不是精准的,因为没有处理非 emoji 的字符串。如果你需要正确解析 emoji 字符串,你可以引入这个插件。 +安装插件并配置 track id。 ```html - + + + ``` -?> 如果你不想解析成表情符号,可以使用__colon__或`:`。如果你需要在标题中使用,我们建议使用`:`。例如,`:100:`。 +## emoji + +显示更多的表情符号短代码。 如果没有这个插件,Docsify 只能渲染数量有限的表情短代码。 + +!> 自 v4.13 起已弃用。 Docsify 不再需要此插件来提供完整的 emoji 支持。 + +```html + +``` ## 外链脚本 - External Script 如果文档里的 script 是内联脚本,可以直接执行;而如果是外链脚本(即 js 文件内容由 `src` 属性引入),则需要使用此插件。 ```html - + ``` ## 图片缩放 - Zoom image -Medium's 风格的图片缩放插件. 基于 [medium-zoom](https://github.com/francoischalifour/medium-zoom)。 +Medium's 风格的图片缩放插件。 基于 [medium-zoom](https://github.com/francoischalifour/medium-zoom)。 ```html - + ``` -忽略某张图片 +排除某张图片 ```markdown -![](image.png ":no-zoom") +![](image.png ':no-zoom') ``` -## 在 Github 上编辑 +## 在 GitHub 上编辑 -在每一页上添加 `Edit on github` 按钮. 由第三方库提供, 查看 [document](https://github.com/njleonzhang/docsify-edit-on-github) +在每一页上添加 `Edit on github` 按钮。 由[@njleonzhang](https://github.com/njleonzhang) 提供,查看[文档](https://github.com/njleonzhang/docsify-edit-on-github) ## 代码即时预览和 jsfiddle 集成 -通过这个插件,示例代码可以在页面上即时呈现,让读者可以立即看到预览。当读者展开演示框时,源码和说明就会显示在那里,如果点击`Try in Jsfiddle`按钮,`jsfiddle.net`就会打开这个例子的代码,让读者自己修改代码和测试。 +有了这个插件,示例代码就能立即呈现在页面上,这样读者就能立即看到预览效果。 +当读者展开演示框时,源代码和说明就会显示出来。 如果点击 `Try in Jsfiddle` 按钮,`jsfiddle.net` 就会打开这个例子的代码,让读者自己修改代码和测试。 -docsify同时支持[Vue](https://njleonzhang.github.io/docsify-demo-box-vue/)和[React](https://njleonzhang.github.io/docsify-demo-box-react/)版本的插件。 +[Vue](https://njleonzhang.github.io/docsify-demo-box-vue/) 和 [React](https://njleonzhang.github.io/docsify-demo-box-react/) 都支持。 ## 复制到剪贴板 -在所有的代码块上添加一个简单的`Click to copy`按钮来允许用户从你的文档中轻易地复制代码。由[@jperasmus](https://github.com/jperasmus)提供。 +在所有的代码块上添加一个简单的 `Click to copy` 按钮来允许用户从你的文档中轻易地复制代码。 由 [@jperasmus](https://github.com/jperasmus) 提供 ```html ``` -详情可参考 [README.md](https://github.com/jperasmus/docsify-copy-code/blob/master/README.md) 。 +详情可参考 [README](https://github.com/jperasmus/docsify-copy-code/blob/master/README.md)。 ## Disqus -Disqus评论系统支持。 https://disqus.com/ +Disqus 评论。 https://disqus.com/ ```html - + ``` ## Gitalk -[Gitalk](https://github.com/gitalk/gitalk),一个现代化的,基于Preact和Github Issue的评论系统。 +[Gitalk](https://github.com/gitalk/gitalk) 是一个基于 GitHub Issue 和 Preact 的现代评论组件。 ```html - + - + ``` ## Pagination -docsify的分页导航插件,由[@imyelo](https://github.com/imyelo)提供。 +docsify 的分页导航插件。 由 [@imyelo](https://github.com/imyelo) 提供 ```html - + ``` 从[这里](https://github.com/imyelo/docsify-pagination#readme)获取更多信息。 -## 字数统计 - -这是一款为docsify提供文字统计的插件. [@827652549](https://github.com/827652549)提供 - -它提供了统计中文汉字和英文单词的功能,并且排除了一些markdown语法的特殊字符例如*、-等 - -**Add JS** - -```html - -``` - -**Add settings** - -```js -window.$docsify = { - count:{ - countable:true, - fontsize:'0.9em', - color:'rgb(90,90,90)', - language:'chinese' - } -} -``` - -check [document](https://github.com/827652549/docsify-count) - ## Tabs -这个插件用来在 Markdown 中显示选项卡。 +用来在 markdown 中显示选项卡的插件。 - [文档和示例](https://jhildenbiddle.github.io/docsify-tabs) -开发:[@jhildenbiddle](https://github.com/jhildenbiddle/docsify-tabs). +由 [@jhildenbiddle](https://github.com/jhildenbiddle/docsify-tabs) 提供。 ## 更多插件 -参考 [awesome-docsify](awesome?id=plugins) +参考 [awesome-docsify](zh-cn/awesome?id=plugins) diff --git a/pwa.md b/pwa.md index ce0c83d..3f6271c 100644 --- a/pwa.md +++ b/pwa.md @@ -1,12 +1,14 @@ # 离线模式 -[Progressive Web Apps](https://developers.google.com/web/progressive-web-apps/)(PWA) 是一项融合 Web 和 Native 应用各项优点的解决方案。我们可以利用其支持离线功能的特点,让我们的网站可以在信号差或者离线状态下正常运行。 +[Progressive Web Apps](https://developers.google.com/web/progressive-web-apps/)(PWA) 是一项融合 Web 和 Native 应用各项优点的解决方案。 我们可以利用其支持离线功能的特点,让我们的网站可以在信号差或者**离线状态**下正常运行。 + 要使用它也非常容易。 ## 创建 serviceWorker + 这里已经整理好了一份代码,你只需要在网站根目录下创建一个 `sw.js` 文件,并粘贴下面的代码。 -*sw.js* +_sw.js_ ```js /* =========================================================== @@ -17,35 +19,35 @@ * Register service worker. * ========================================================== */ -const RUNTIME = 'docsify' +const RUNTIME = 'docsify'; const HOSTNAME_WHITELIST = [ self.location.hostname, 'fonts.gstatic.com', 'fonts.googleapis.com', - 'cdn.jsdelivr.net' -] + 'cdn.jsdelivr.net', +]; // The Util Function to hack URLs of intercepted requests -const getFixedUrl = (req) => { - var now = Date.now() - var url = new URL(req.url) +const getFixedUrl = req => { + const now = Date.now(); + const url = new URL(req.url); // 1. fixed http URL // Just keep syncing with location.protocol // fetch(httpURL) belongs to active mixed content. // And fetch(httpRequest) is not supported yet. - url.protocol = self.location.protocol + url.protocol = self.location.protocol; // 2. add query for caching-busting. - // Github Pages served with Cache-Control: max-age=600 + // GitHub Pages served with Cache-Control: max-age=600 // max-age on mutable content is error-prone, with SW life of bugs can even extend. // Until cache mode of Fetch API landed, we have to workaround cache-busting with query string. // Cache-Control-Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=453190 if (url.hostname === self.location.hostname) { - url.search += (url.search ? '&' : '?') + 'cache-bust=' + now + url.search += (url.search ? '&' : '?') + 'cache-bust=' + now; } - return url.href -} + return url.href; +}; /** * @Lifecycle Activate @@ -54,8 +56,8 @@ const getFixedUrl = (req) => { * waitUntil(): activating ====> activated */ self.addEventListener('activate', event => { - event.waitUntil(self.clients.claim()) -}) + event.waitUntil(self.clients.claim()); +}); /** * @Functional Fetch @@ -69,10 +71,10 @@ self.addEventListener('fetch', event => { // Stale-while-revalidate // similar to HTTP's stale-while-revalidate: https://www.mnot.net/blog/2007/12/12/stale // Upgrade from Jake's to Surma's: https://gist.github.com/surma/eb441223daaedf880801ad80006389f1 - const cached = caches.match(event.request) - const fixedUrl = getFixedUrl(event.request) - const fetched = fetch(fixedUrl, { cache: 'no-store' }) - const fetchedCopy = fetched.then(resp => resp.clone()) + const cached = caches.match(event.request); + const fixedUrl = getFixedUrl(event.request); + const fetched = fetch(fixedUrl, { cache: 'no-store' }); + const fetchedCopy = fetched.then(resp => resp.clone()); // Call respondWith() with whatever we get first. // If the fetch fails (e.g disconnected), wait for the cache. @@ -81,33 +83,40 @@ self.addEventListener('fetch', event => { event.respondWith( Promise.race([fetched.catch(_ => cached), cached]) .then(resp => resp || fetched) - .catch(_ => { /* eat any errors */ }) - ) + .catch(_ => { + /* eat any errors */ + }), + ); // Update the cache with the version we fetched (only for ok status) event.waitUntil( Promise.all([fetchedCopy, caches.open(RUNTIME)]) - .then(([response, cache]) => response.ok && cache.put(event.request, response)) - .catch(_ => { /* eat any errors */ }) - ) + .then( + ([response, cache]) => + response.ok && cache.put(event.request, response), + ) + .catch(_ => { + /* eat any errors */ + }), + ); } -}) +}); ``` ## 注册 -现在,到 `index.html` 里注册它。这个功能只能工作在一些现代浏览器上,所以我们需要加个判断。 +现在,到 `index.html` 里注册它。 它只适用于一些较新的浏览器,所以我们需要检查: -*index.html* +_index.html_ ```html ``` ## 体验一下 -发布你的网站,并开始享受离线模式的魔力吧!:ghost: 当然你现在看到的 docsify 的文档网站已经支持离线模式了,你可以关掉 Wi-Fi 体验一下。 +发布你的网站,并开始享受离线模式的魔力吧! diff --git a/quickstart.md b/quickstart.md index 4bdc537..fb1623b 100644 --- a/quickstart.md +++ b/quickstart.md @@ -14,19 +14,19 @@ npm i docsify-cli -g docsify init ./docs ``` -## 开始写文档 +## 写入内容 -初始化成功后,可以看到 `./docs` 目录下创建的几个文件 +在 `init` 完成后,你可以看到 `./docs` 子目录中的文件列表。 - `index.html` 入口文件 - `README.md` 会做为主页内容渲染 - `.nojekyll` 用于阻止 GitHub Pages 忽略掉下划线开头的文件 -直接编辑 `docs/README.md` 就能更新文档内容,当然也可以[添加更多页面](zh-cn/more-pages.md)。 +直接编辑 `docs/README.md` 就能更新文档内容,当然也可以[添加更多页面](zh-cn/adding-pages)。 ## 本地预览 -通过运行 `docsify serve` 启动一个本地服务器,可以方便地实时预览效果。默认访问地址 http://localhost:3000 。 +使用 `docsify serve` 运行本地服务器。 你可以在 `http://localhost:3000` 上预览你的网站。 ```bash docsify serve docs @@ -36,63 +36,119 @@ docsify serve docs ## 手动初始化 -如果不喜欢 npm 或者觉得安装工具太麻烦,我们可以直接手动创建一个 `index.html` 文件。 +下载或使用以下代码创建一个 `index.html` 模板: -*index.html* +
+ +下载模板 + + ```html - + - - - - - - - -
- - - + + + + + + + + +
+ + + + + + + + + + ``` +
+ +### 指定 docsify 版本 + +?> 注意:在下面两个例子中,当 docsify 发布新的主要版本时,需要手动更新 docsify URL(例如,`v5.x.x` => `v6.x.x`)。 定期检查 docsify 网站,以查看新的主要版本是否已发布。 + +在 URL 中指定一个主要版本 (`@5`),可使你的网站自动接收非破坏性增强(即 "minor" 更新)和错误修复(即 "patch" 更新)。 这是加载 docsify 资源的推荐方式。 + + + +```html + + + + + +``` + +如果你希望将 docsify 锁定到特定版本,请在 URL 中的 `@` 符号后指定完整版本。 这是最安全的方法,可确保无论 docsify 的未来版本如何更改,你的网站都将以相同的方式显示和运行。 + + + +```html + + + + + +``` + +### 手动预览你的网站 + 如果你的系统里安装了 Python 的话,也可以很容易地启动一个静态服务器去预览你的网站。 -```python2 +```python +# Python 2 cd docs && python -m SimpleHTTPServer 3000 ``` -```python3 +```python +# Python 3 cd docs && python -m http.server 3000 ``` ## Loading 提示 -初始化时会显示 `Loading...` 内容,你可以自定义提示信息。 - +如果你想要,你可以在 docsify 开始渲染文档之前显示一个加载提示信息: ```html - + -
加载中
+
Please wait...
``` -如果更改了 `el` 的配置,需要将该元素加上 `data-app` 属性。 +如果更改了 `el` 的配置,需要将该元素加上 `data-app` 属性: ```html - -
加载中
- - + + +
Please wait...
+ + ``` -对比 [el 设置](zh-cn/configuration.md#el)。 +对比 [el 设置](zh-cn/configuration#el)。 + + diff --git a/ssr.md b/ssr.md deleted file mode 100644 index 09cabdf..0000000 --- a/ssr.md +++ /dev/null @@ -1,140 +0,0 @@ -# 服务端渲染(SSR) - -先看例子 https://docsify.now.sh - -项目地址在 https://github.com/docsifyjs/docsify-ssr-demo - -![](https://dn-mhke0kuv.qbox.me/2bfef08c592706108055.png) - -文档依旧是部署在 GitHub Pages 上,Node 服务部署在 now.sh 里,渲染的内容是从 GitHub Pages 上同步过来的。所以静态部署文档的服务器和服务端渲染的 Node 服务器是分开的,也就是说你还是可以用之前的方式更新文档,并不需要每次都部署。 - -## 什么是 SSR? -- 更好的 SEO -- 更酷的感觉 - - -## 快速开始 - -如果你熟悉 `now` 的使用,接下来的介绍就很简单了。先创建一个新项目,并安装 `now` 和 `docsify-cli`。 - -```bash -npm i now docsify-cli -D -``` - -编辑 `package.json`。假设你的文档放在 `./docs` 子目录。 - -```json -{ - "name": "my-project", - "scripts": { - "start": "docsify start . -c ssr.config.js", - "deploy": "now -p" - }, - "files": [ - "docs" - ], - "docsify": { - "config": { - "basePath": "https://docsify.js.org/", - "loadSidebar": true, - "loadNavbar": true, - "coverpage": true, - "name": "docsify" - } - } -} -``` - -!> 其中 `basePath` 相当于 webpack 的 `publicPath` ,为文档所在的路径,可以填你的 docsify 文档网站。我们可以使用本地或者远程文件。 - -配置好了以后,我们可以在本地预览。 - -```bash -npm start - -# open http://localhost:4000 -``` - -发布! - -```bash -now -p -``` - -现在,你有一个支持服务端渲染的文档网站了。 - -## 定制模板 - -你可以提供一个整页模板,例如: - -```html - - - - - docsify - - - - - - - - - - - - - -``` - -模板可以包含占位符,会自动将渲染后的 html 和配置内容注入到页面上。 - - - `` - - `` - - -## 配置 - -配置可以单独写在配置文件内,然后通过 `--config config.js` 加载,或者写在 `package.json` 中。 - -渲染的基础模版也可以自定义,配置在 `template` 属性上。 - -```js -module.exports = { - template: './ssr.html', - maxAge: 60 * 60 * 1000, // lru-cache 设置 - config: { - // docsify 设置 - } -} -``` - - - - -## 更多玩法 - -你可以直接在你的 Node 服务器上执行 `docsify start` 。 - -`docsify start` 其实是依赖了 [`docsify-server-renderer`](https://npmarket.surge.sh/?name=docsify-server-renderer) 模块,如果你感兴趣,你完全可以用它自己实现一个 server,可以加入缓存等功能。 - -```js -var Renderer = require('docsify-server-renderer') -var readFileSync = require('fs').readFileSync - -// init -var renderer = new Renderer({ - template: readFileSync('./docs/index.template.html', 'utf-8'), - config: { - name: 'docsify', - repo: 'docsifyjs/docsify' - } -}) - -renderer.renderToString(url) - .then(html => {}) - .catch(err => {}) -``` - -当然文档文件和 server 也是可以部署在一起的,`basePath` 不是一个 URL 的话就会当做文件路径处理,也就是从服务器上加载资源。 diff --git a/themes.md b/themes.md index ab96889..cc1e57e 100644 --- a/themes.md +++ b/themes.md @@ -1,66 +1,444 @@ # 主题 -目前提供了一些主题,包括官方和社区制作的。模仿 [Vue](//vuejs.org) 和 [buble](//buble.surge.sh) 官网订制的主题样式,还有 [@liril-net](https://github.com/liril-net) 贡献的黑色风格的主题等。 +## 核心主题 :id=core-theme + +Docsify "核心" 主题包含呈现 Docsify 网站所需的所有样式和[主题属性](#theme-properties)。 该主题可单独用作简约主题,与[主题附加组件](#theme-add-ons) 结合使用,使用核心[类](#classes) 进行修改,也可作为[自定义](#customization) 的起点。 + + + +```html + + +``` + +## 主题附加组件 + +主题附加组件与[核心主题](#core-theme) 结合使用。 附加组件包含修改[主题属性](#theme-properties) 值和/或添加自定义样式声明的 CSS 规则。 它们通常(但不总是)可以与其他附加组件一起使用。 + +!> 主题附加组件必须在 [核心主题](#core-theme) 之后加载。 + + + +```html + + + + + +``` + +### 核心深色(附加组件) + +[核心主题](#core-theme)的深色模式样式。 只有在操作系统的暗模式激活时,才能通过指定 `media` 属性来应用样式。 + + +
+ + + + +```html + + +``` + + + +```html + + +``` + +### Vue 主题(附加组件) + +备受欢迎的 Docsify v4 主题。 + + + + + +```html + + +``` + +## 类 + +[核心主题](#core-theme) 提供了多个 CSS 类,用于自定义 Docsify 网站。 这些类应用于 `index.html` 页面中的 `` 元素。 + + + +```html + +``` + +### 加载中 + +在等待 Docsify 初始化时显示加载动画。 + + + +```html + +``` + + +
+
+ +### 侧边栏格线 + +在侧边栏的页面链接上显示展开/折叠图标。 + + +
+ + + + +```html + +``` + + + +```html + +``` + +要防止在特定页面链接上显示 chevrons,请添加 `no-chevron` 类,如下所示: + +```md +[My Page](page.md ':class=no-chevron') +``` + +**主题属性** + + + +```css +:root { + --sidebar-chevron-collapsed-color: var(--color-mono-3); + --sidebar-chevron-expanded-color : var(--theme-color); +} +``` + +### 侧边栏组 + +在侧边栏的链接组之间添加视觉区分。 + + +
+ + + ```html - - - - - + ``` -!> CSS 的压缩文件位于 `/lib/themes/` + ```html - + +``` + +### 侧边栏链接夹 + +将多行侧边栏链接限制为单行,后加省略号。 + + + + + +```html + +``` + +### 侧边栏切换 - - - - - +在侧边栏切换按钮中显示 "hamburger" 图标(三行),而不是默认的 "kebab" 图标。 + + +
+ + + + +```html + +``` + + + +```html + ``` -如果你有其他想法或者想开发别的主题,欢迎提 [PR](https://github.com/docsifyjs/docsify/pulls)。 +## 定制 + +Docsify 提供了 [主题属性](#theme-properties) 以简化对经常修改的样式的自定义。 + +1. 在 `index.html` 中的主题样式表后添加一个 ` + ``` + + 主题属性也可以在 markdown 中按页面设置。 + + ```markdown + # My Heading + + Hello, World! + + + ``` + +2. 在 `:root` 声明中设置自定义[主题属性](#theme-properties)。 + + + + ```css + :root { + --theme-color: red; + --font-size : 15px; + --line-height: 1.5; + } + ``` + + 自定义[主题属性](#theme-properties) 可有条件地应用于浅色和/或深色模式。 + + + + ```css + /* Light and dark mode */ + :root { + --theme-color: pink; + } -#### 点击切换主题 + /* Light mode only */ + @media (prefers-color-scheme: light) { + :root { + --color-bg : #eee; + --color-text: #444; + } + } + /* Dark mode only */ + @media screen and (prefers-color-scheme: dark) { + :root { + --color-bg : #222; + --color-text: #ddd; + } + } + ``` - +3. 可通过添加网络字体资源并根据需要修改 `--font-family` 属性来使用自定义字体: + - + ``` + +## 主题属性 :id=theme-properties + +以下属性在所有官方 Docsify 主题中都可用。 显示的是"核心"主题的默认值。 + +?> **主题和插件作者**:我们鼓励你利用这些自定义主题属性,并在你的项目中提供类似的自定义选项。 + +### Common + +以下是最常修改的主题属性。 [Advanced](#advanced) 主题属性也可以使用,但通常不需要修改。 + + + +**TBD** + + + +### Advanced + +高级主题属性也可供使用,但通常无需修改。 从 [common](#common) 主题属性导出的值,但也可根据需要明确设置。 + + + +**TBD** + + + +## 社区 + +有关其他社区主题,请参见 [Awesome Docsify](zh-cn/awesome)。 + // Toggle class + if (elm.matches('[data-class]')) { + document.body.classList.toggle(value, elm.checked); + } + // Toggle sheet + else { + const themeSheet = previewSheets.find( + sheet => sheet.getAttribute('data-sheet') === value, + ); + + themeSheet && (themeSheet.disabled = !elm.checked); + } + + if (!elm.checked || (!groupVal && !radioGroupName)) { + return; + } + // Group elements & values + const groupElms = toggleElms.filter(elm => + groupVal + ? groupVal === elm.getAttribute('data-group') + : radioGroupName === elm.name, + ); + const groupVals = groupElms.map(elm => elm.value); -## 其他主题 + if (groupElms.length <= 1) { + return; + } -- [docsify-themeable](https://jhildenbiddle.github.io/docsify-themeable/#/) 一个用于docsify的,简单到令人愉悦的主题系统. + if (groupVal) { + // Uncheck other group elements + groupElms.forEach(groupElm => { + if (groupElm !== elm) { + groupElm.checked = false; + } + }); + } + + // Remove group classes + if (elm.matches('[data-class]')) { + groupVals.forEach(className => { + if (className !== value) { + document.body.classList.remove(className); + } + }); + } + // Disable group sheets + else { + const otherSheets = groupVals + .map(val => + previewSheets.find(sheet => sheet.getAttribute('data-sheet') === val), + ) + .filter(sheet => sheet && sheet.getAttribute('data-sheet') !== value); + const disableSheets = otherSheets.length ? otherSheets : previewSheets; + + disableSheets.forEach(sheet => sheet.disabled = true); + } + } + + // Toggle active elms + toggleElms.forEach(elm => { + const value = elm.value; + + // Class toggle + if (elm.matches('[data-class]')) { + elm.checked = document.body.classList.contains(value); + } + // Sheet toggle + else { + const previewSheet = previewSheets.find( + sheet => sheet.getAttribute('data-sheet') === value, + ); + + elm.checked = previewSheet && !previewSheet.disabled; + } + }); + + toggleElms.forEach(elm => elm.addEventListener('change', handleChange)); + })(); + diff --git a/ui-kit.md b/ui-kit.md new file mode 100644 index 0000000..4d92ca1 --- /dev/null +++ b/ui-kit.md @@ -0,0 +1,512 @@ + + +# UI Kit + +
+ 查看本页面的 markdown 源代码 +
+ +[ui-kit.md](zh-cn/ui-kit.md ":include :type=code") + +
+
+ +## 块引用 :id=blockquotes + +> Cras aliquet nulla quis metus tincidunt, sed placerat enim cursus. Etiam +> turpis nisl, posuere eu condimentum ut, interdum a risus. Sed non luctus mi. +> Quisque malesuada risus sit amet tortor aliquet, a posuere ex iaculis. Vivamus +> ultrices enim dui, eleifend porttitor elit aliquet sed. +> +> _- 引用来源_ + +#### 嵌套 :id=nested + + + +> 第 1 级 +> +> > 第 2 级 +> > +> > > 第 3 级 + +## 按钮 :id=buttons + +#### 默认按钮 :id=default + + + +#### 基础按钮 :id=basic + + 链接按钮 + +#### 主按钮 :id=primary + + 链接按钮 + +#### 次要按钮 :id=secondary + + 链接按钮 + +## 标注 :id=callouts + +!> **Important** 使用`内联代码`和额外的占位符文本用于 +强制包装内容和换行。 + +?> **Tip** 使用`内联代码`和额外的占位符文本用于 +强制包装内容和换行。 + +## 代码 :id=code + +这是 `内联代码` + +```javascript +const add = (num1, num2) => num1 + num2; +const total = add(1, 2); + +console.log(total); // 3 +``` + +```html + +

Hello

+ +``` + +## 颜色 :id=colors + +#### 主题 :id=theme + +
+
+
+ +
1
+
+
+
+ +
2
+
+
+
+ +
3
+
+
+
+ +
4
+
+
+
+ +
主题颜色
+
+
+
+ +
5
+
+
+
+ +
6
+
+
+
+ +
7
+
+
+
+ +
8
+
+
+ +#### 单色 :id=monochromatic + +
+
+
+ +
Min
+
+
+
+ +
1
+
+
+
+ +
2
+
+
+
+ +
3
+
+
+
+ +
4
+
+
+
+ +
5
+
+
+
+ +
6
+
+
+
+ +
7
+
+
+
+ +
8
+
+
+
+ +
9
+
+
+
+ +
Max
+
+
+ +## 详细信息 :id=details + +
+ 详细信息(点击打开) + +Suscipit nemo aut ex suscipit voluptatem laboriosam odio velit. Ipsum eveniet labore sequi non optio vel. Ut culpa ad accusantium est aut harum ipsam voluptatum. Velit eum incidunt non sint. Et molestiae veniam natus autem vel assumenda ut numquam esse. Non nisi id qui vero corrupti quos et. + +
+ +
+ 详细信息(默认打开) + +Suscipit nemo aut ex suscipit voluptatem laboriosam odio velit. Ipsum eveniet labore sequi non optio vel. Ut culpa ad accusantium est aut harum ipsam voluptatum. Velit eum incidunt non sint. Et molestiae veniam natus autem vel assumenda ut numquam esse. Non nisi id qui vero corrupti quos et. + +
+ +## 表格要素 :id=form-elements + +### Fieldset + +
+
+ Legend +

+ +

+
+
+ +### Input + +#### Checkbox + +
+
+
+ +
+ +#### Datalist + +
+ +
+ +#### Radio + +
+
+
+ +
+ +#### Text + +
+ +
+ +#### Toggles + +
+Checkbox (multi-select) + +

+ +Radio (single-select) + +

+ +
+ +### Select + +
+ +
+ +### Textarea + + + +## Headings + +# Heading 1 {docsify-ignore} + +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse luctus nulla eu ex varius, a varius elit tincidunt. Aenean arcu magna, gravida id purus a, interdum convallis turpis. Aenean id ipsum eu tortor sollicitudin scelerisque in quis elit. + +## Heading 2 {docsify-ignore} + +Vestibulum lobortis laoreet nunc vel vulputate. In et augue non lectus pellentesque molestie et ac justo. Sed sed turpis ut diam gravida sagittis nec at neque. Vivamus id tellus est. Nam ac dignissim mi. Vestibulum nec sem convallis, condimentum augue at, commodo diam. + +### Heading 3 {docsify-ignore} + +Suspendisse sit amet tincidunt nibh, ac interdum velit. Ut orci diam, dignissim at enim sit amet, placerat rutrum magna. Mauris consectetur nibh eget sem feugiat, sit amet congue quam laoreet. Curabitur sed massa metus. + +#### Heading 4 {docsify-ignore} + +Donec odio orci, facilisis ac vehicula in, vestibulum ut urna. Ut bibendum ullamcorper risus, ac euismod leo maximus sed. In pulvinar sagittis rutrum. Morbi quis cursus diam. Cras ac laoreet nulla, rhoncus sodales dui. + +##### Heading 5 {docsify-ignore} + +Commodo sit veniam nulla cillum labore ullamco aliquip quis. Consequat nulla fugiat consequat ex duis proident. Adipisicing excepteur tempor exercitation ad. Consectetur voluptate Lorem sint elit exercitation ullamco dolor. + +###### Heading 6 {docsify-ignore} + +Ipsum ea amet dolore mollit incididunt fugiat nulla laboris est sint voluptate. Ex culpa id amet ipsum amet pariaturipsum officia sit laborum irure ullamco deserunt. Consequat qui tempor occaecat nostrud proident. + +## Horizontal Rule + +Text before rule. + +--- + +Text after rule. + +## IFrame + +[Example](../_media/example.html ":include height=200px") + +## Images + +#### Inline-style + +![Docsify Logo](../_media/icon.svg "This is the Docsify logo!") + +#### Reference-style + +![Docsify Logo][logo] + +[logo]: ../_media/icon.svg "This is the Docsify logo!" + +#### Light / Dark Theme + + + + + BinaryTree + + +## Keyboard + +#### Default + + + +CtrlAltDel + +⌃ Control⌥ Alt⌫ Delete + +#### Alternate + + + +CtrlAltDel + +⌃ Control⌥ Alt⌫ Delete + +#### Entities + +
+
Arrow Up
+
Arrow Down
+
Arrow Left
+
Arrow Right
+
Caps Lock
+
Command
+
Control
+
Delete
+
Delete (Forward)
+
End
+
Enter
+
Escape
+
Home
+
Page Up
+
Page Down
+
Option, Alt
+
Return
+
Shift
+
Space
+
Tab
+
Tab + Shift
+
+ +## 链接 :id=links + +[内联链接](https://google.com) + +[带标题的内联链接](https://google.com "Google") + +[参考链接名称][link1] + +[引用链接编号][1] + +[Reference link by self] + +[link1]: https://google.com +[1]: https://google.com +[Reference link by self]: https://google.com + +## 列表 :id=lists + +### 有序列表 :id=ordered-list + +1. Ordered +2. Ordered + 1. Nested + 2. Nested (Wrapping): Similique tempora et. Voluptatem consequuntur ut. Rerum minus et sed beatae. Consequatur ut nemo laboriosam quo architecto quia qui. Corrupti aut omnis velit. +3. Ordered (Wrapping): Error minima modi rem sequi facere voluptatem. Est nihil veritatis doloribus et corporis ipsam. Pariatur eos ipsam qui odit labore est voluptatem enim. Veritatis est qui ut pariatur inventore. + +### 无序列表 :id=unordered-list + +- Unordered +- Unordered + - Nested + - Nested (Wrapping): Quia consectetur sint vel ut excepturi ipsa voluptatum suscipit hic. Ipsa error qui molestiae harum laboriosam. Rerum non amet illo voluptatem odio pariatur. Ut minus enim. +- Unordered (Wrapping): Fugiat qui tempore ratione amet repellendus repudiandae non. Rerum nisi officia enim. Itaque est alias voluptatibus id molestiae accusantium. Cupiditate sequi qui omnis sed faceere aliquid quia ut. + +### 任务清单 :id=task-list + +- [x] Task +- [ ] Task + - [ ] Subtask + - [ ] Subtask + - [x] Subtask +- [ ] Task (Wrapping): Earum consequuntur itaque numquam sunt error omnis ipsum repudiandae. Est assumenda neque eum quia quisquam laborum beatae autem ad. Fuga fugiat perspiciatis harum quia dignissimos molestiae. Officia quo eveniet tempore modi voluptates consequatur. Eum odio adipisci labore. + - [x] Subtask (Wrapping): Vel possimus eaque laborum. Voluptates qui debitis quaerat atque molestiae quia explicabo doloremque. Reprehenderit perspiciatis a aut impedit temporibus aut quasi quia. Incidunt sed recusandae vitae asperiores sit in. + +## Output + + +

Et cum fugiat nesciunt voluptates. A atque quos doloribus dolorem quo. Et dignissimos omnis nam. Recusandae voluptatem nam. Tenetur veniam et qui consequatur. Aut sequi atque fuga itaque iusto eum nihil quod iure.

+
    +
  1. Item
  2. +
  3. Item
  4. +
  5. Item
  6. +
+
+ +## 表格 :id=tables + +### Alignment + +| Left Align | Center Align | Right Align | Non‑Breaking&nbsp;Header | +| ---------- | :----------: | ----------: | -------------------------------------------------------------------------- | +| A1 | A2 | A3 | A4 | +| B1 | B2 | B3 | B4 | +| C1 | C2 | C3 | C4 | + +### Headerless + +| | | | | +| -- | -- | -- | -- | +| A1 | A2 | A3 | A4 | +| B1 | B2 | B3 | B4 | +| C1 | C2 | C3 | C4 | + +### Scrolling + +| Header | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Dicta&nbsp;in&nbsp;nobis&nbsp;dolor&nbsp;adipisci&nbsp;qui.&nbsp;Accusantium&nbsp;voluptates&nbsp;est&nbsp;dolor&nbsp;laboriosam&nbsp;qui&nbsp;voluptatibus.&nbsp;Veritatis&nbsp;eos&nbsp;aspernatur&nbsp;iusto&nbsp;et&nbsp;dicta&nbsp;quas.&nbsp;Fugit&nbsp;voluptatem&nbsp;dolorum&nbsp;qui&nbsp;quisquam.&nbsp;nihil | +| Aut&nbsp;praesentium&nbsp;officia&nbsp;aut&nbsp;delectus.&nbsp;Quas&nbsp;atque&nbsp;reprehenderit&nbsp;saepe.&nbsp;Et&nbsp;voluptatibus&nbsp;qui&nbsp;dolores&nbsp;rem&nbsp;facere&nbsp;in&nbsp;dignissimos&nbsp;id&nbsp;aut.&nbsp;Debitis&nbsp;excepturi&nbsp;delectus&nbsp;et&nbsp;quos&nbsp;numquam&nbsp;magnam. | +| Sed&nbsp;eum&nbsp;atque&nbsp;at&nbsp;laborum&nbsp;aut&nbsp;et&nbsp;repellendus&nbsp;ullam&nbsp;dolor.&nbsp;Cupiditate&nbsp;saepe&nbsp;voluptatibus&nbsp;odit&nbsp;est&nbsp;pariatur&nbsp;qui.&nbsp;Hic&nbsp;sunt&nbsp;nihil&nbsp;optio&nbsp;enim&nbsp;eum&nbsp;laudantium.&nbsp;Repellendus&nbsp;voluptate. | + +## Text Elements + +Marked text + +
Preformatted text
+ +Sample Output + +Small Text + +This is subscript + +This is superscript + +Underlined Text + +## Text Styles + +Body text + +**Bold text** + +_Italic text_ + +**_Bold and italic text_** + +~~Strikethrough~~ diff --git a/vue.md b/vue.md index a239b5a..5f823a2 100644 --- a/vue.md +++ b/vue.md @@ -1,22 +1,12 @@ # 兼容 Vue -你可以直接在 Markdown 文件里写 Vue 代码,它将被执行。我们可以用它写一些 Vue 的 Demo 或者示例代码。 +Docsify 允许 [Vue.js](https://vuejs.org) 内容直接添加到你的 markdown 页面。 这可以极大地简化与数据的工作并将反应添加到你的站点。 -首先,将 Vue[2.x](https://vuejs.org) 或 [3.x](https://v3.vuejs.org) 添加到你的`index.html`文件中。 +Vue [template syntax](https://vuejs.org/guide/essentials/template-syntax) 可以用来将动态内容添加到你的页面。 当使用 [data](#data)、[computed properties](#computed-properties)、[methods](#methods) 和 [lifecycle hooks](#lifecycle-hooks) 时,Vue 内容会变得更加有趣。 这些选项可以指定为 [全局选项](#global-options) 或 DOM [mounts](#mounts) 和 [components](#components)。 -为你的站点选择合适的生产版本或开发版本,以获得有用的控制台警告和 [Vue.js devtools](https://github.com/vuejs/vue-devtools) 支持。 +## 设置 -#### Vue 2.x - -```html - - - - - -``` - -#### Vue 3.x +若要开始,请将 Vue.js 添加到你的 `index.html` 文件。 为你的站点选择合适的生产版本或开发版本,以获得有用的控制台警告和 [Vue.js devtools](https://github.com/vuejs/vue-devtools) 支持。 ```html @@ -26,12 +16,12 @@ ``` -## 模板语法 +## 模板语法 :id=template-syntax -Vue[模板语法](https://vuejs.org/v2/guide/syntax.html) 用于创建动态内容。无需额外的配置,这种语法提供了一些有用的功能,如支持 [JavaScript表达式](https://vuejs.org/v2/guide/syntax.html#Using-JavaScript-Expressions) 和 Vue[指令](https://vuejs.org/v2/guide/syntax.html#Directives) 的循环和条件渲染。 +Vue [template syntax](https://vuejs.org/guide/essentials/template-syntax) 提供了一些有用的功能,例如支持 [JavaScript expressions](https://vuejs.org/guide/essentials/template-syntax.html#using-javascript-expressions) 和 Vue [directives](https://vuejs.org/guide/essentials/template-syntax.html#directtives) 用于循环和条件渲染。 ```markdown - +

Text for GitHub

@@ -53,11 +43,31 @@ Vue[模板语法](https://vuejs.org/v2/guide/syntax.html) 用于创建动态内

2 + 2 = {{ 2 + 2 }}

-[在GitHub上查看输出](https://github.com/docsifyjs/docsify/blob/develop/docs/vue.md#template-syntax) +[在 GitHub 上查看输出](https://github.com/docsifyjs/docsify/blob/develop/docs/vue.md#template-syntax) + +## 代码块 :id=code-blocks + +默认情况下,Docsify 忽略代码块中的 Vue 模板语法: + +````markdown +``` +{{ message }} +``` +```` + +要在代码块中处理 Vue 模板语法,请将代码块封装在带有 `v-template` 属性的元素中: + +````markdown +
-当使用[data](#data)、[computed properties](#computed-properties)、[methods](#methods)和[lifecycle hooks](#lifecycle-hooks)时,Vue内容会变得更加有趣。这些选项可以作为[全局选项](#global-options)或在DOM中的[mounts](#mounts)和[component](#components)来指定。 +``` +{{ message }} +``` + +
+```` -### Data +## 数据 :id=data ```js { @@ -70,29 +80,26 @@ Vue[模板语法](https://vuejs.org/v2/guide/syntax.html) 用于创建动态内 ``` + ```markdown - + {{ message }} - +

- - -

Text for GitHub

``` + - -{{ message }} +

{{ message }}

-

Text for GitHub

-[在GitHub上查看输出](https://github.com/docsifyjs/docsify/blob/develop/docs/vue.md#data) +[在 GitHub 上查看输出](https://github.com/docsifyjs/docsify/blob/develop/docs/vue.md#data) -### Computed properties +## 计算属性 :id=computed-properties ```js { @@ -125,7 +132,7 @@ Good {{ timeOfDay }}! -### Methods +## 方法 :id=methods ```js { @@ -150,7 +157,7 @@ Good {{ timeOfDay }}!

-### Lifecycle Hooks +## 生命周期钩子 :id=lifecycle-hooks ```js { @@ -188,14 +195,15 @@ Good {{ timeOfDay }}!
+
{{ image.title }}
-## Global options +## 全局选项 :id=global-options -使用`vueGlobalOptions`来指定 [Vue options](https://vuejs.org/v2/api/#Options-Data) ,用于未明确挂载[vueMounts](#mounts)、[vueComponents](#components)或[markdown脚本](#markdown-script)的Vue内容。对全局`data`的更改将持续存在,并反映在任何使用全局引用的地方。 +使用 `vueGlobalOptions` 来指定用于使用 Vue 内容的全局 Vue 选项,这些内容没有被明确挂载 [vueMounts](#mounts)、[vueComponents](#components) 或 [markdown 脚本](#markdown-script)。 对全局 `data` 的更改将持续存在,并在使用全局引用的任何地方得到反映。 ```js window.$docsify = { @@ -211,17 +219,17 @@ window.$docsify = { ```markdown

- - {{ count }} + {{ count }} +

```

- - {{ count }} + {{ count }} +

@@ -229,17 +237,17 @@ window.$docsify = {

- - {{ count }} + {{ count }} +

-对一个计数器的更改会影响两个计数器。这是因为两个实例都引用了相同的全局`count`值。现在,导航到一个新的页面,并返回本节,查看对全局数据的更改如何在页面加载之间持久化。 +对一个计数器的更改会影响到两个计数器。 这是因为两个实例都引用了相同的全局 `count` 值。 现在,导航到一个新页面,然后返回到本节,看看在页面加载之间对全局数据所做的更改是如何持续的。 -## Mounts +## 挂载 :id=mounts -使用`vueMounts`来指定要挂载为 [Vue实例](https://vuejs.org/v2/guide/instance.html) 的DOM元素及其相关选项。挂载元素使用 [CSS选择器](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors) 作为键,并使用一个包含Vue选项的对象作为其值。每次加载新页面时,Docsify将挂载主内容区域中第一个匹配的元素。挂载元素`data`对每个实例来说都是唯一的,并且在用户浏览网站时不会持久。 +使用 `vueMounts` 指定要挂载为 Vue 实例的 DOM 元素及其相关选项。 挂载元素是使用 [CSS 选择器](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors) 作为键,包含 Vue 选项的对象作为值来指定的。 每次加载新页面时,Docsify 都会在主内容区域挂载第一个匹配元素。 挂载元素 `data` 是每个实例的唯一特性,不会在用户导航站点时持续存在。 ```js window.$docsify = { @@ -257,21 +265,21 @@ window.$docsify = { ```markdown
- - {{ count }} + {{ count }} +
``` - - {{ count }} + {{ count }} + -## Components +## 组件 :id=components -使用`vueComponents`创建和注册全局[Vue组件](https://vuejs.org/v2/guide/components.html) 。组件是以组件名称为键,以包含Vue选项的对象为值来指定的。组件`data`对每个实例来说都是唯一的,并且在用户浏览网站时不会持久存在。 +使用 `vueComponents` 创建和注册全局 [Vue components](https://vuejs.org/guide/essentials/component-basics.html)。 指定组件时,以组件名称为键,以包含 Vue 选项的对象为值。 组件 `data` 在每个实例中都是唯一的,不会在用户导航站点时持续存在。 ```js window.$docsify = { @@ -302,24 +310,13 @@ window.$docsify = { -## Markdown script +## Markdown 脚本 :id=markdown-script -Vue内容可以使用 Markdown 页面中的` -``` - -```html - ``` -## Technical Notes +## 技术说明 :id=technical-notes -- Docsify processes Vue content in the following order on each page load: - 1. Execute markdown ` ``` -!> 如果需要用 docsify 的内部方法,可以通过 `window.Docsify` 获取,通过 `vm` 获取当前实例。 +## 模板 -## 例子 +下面是一个插件模板,其中包含所有可用生命周期钩子的占位符。 + +1. 复制模板 +2. 酌情修改 `myPlugin` 名称 +3. 添加你的插件逻辑 +4. 删除未使用的生命周期钩子 +5. 将文件保存为 `docsify-plugin-[name].js` +6. 使用标准 '