diff --git a/.github/workflows/algolia-atomic.yml b/.github/workflows/algolia-atomic.yml index 23933572..2832b42e 100644 --- a/.github/workflows/algolia-atomic.yml +++ b/.github/workflows/algolia-atomic.yml @@ -31,7 +31,7 @@ jobs: ALGOLIA_APP_ID: YKOM6PKLUY ALGOLIA_ADMIN_KEY: ${{ secrets.ALGOLIA_ADMIN_KEY }} ALGOLIA_INDEX_NAME: 'index.en' - ALGOLIA_INDEX_FILE: './exampleSite/public/index.json' + ALGOLIA_INDEX_FILE: './docs/public/index.json' run: | npm run algolia @@ -40,6 +40,6 @@ jobs: ALGOLIA_APP_ID: YKOM6PKLUY ALGOLIA_ADMIN_KEY: ${{ secrets.ALGOLIA_ADMIN_KEY }} ALGOLIA_INDEX_NAME: 'index.zh-cn' - ALGOLIA_INDEX_FILE: './exampleSite/public/zh-cn/index.json' + ALGOLIA_INDEX_FILE: './docs/public/zh-cn/index.json' run: | npm run algolia diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 63fb69cb..f16f8818 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,4 +18,4 @@ jobs: hugo-version: latest extended: true - name: Build Hugo static files - run: hugo -v --source=exampleSite --themesDir ../.. --gc + run: hugo -v --source=docs --gc --minify diff --git a/.gitignore b/.gitignore index cc403cad..f11f416e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,10 @@ # Hugo default output directory public/ -/exampleSite/resources/ - -node_modules/ -build/ resources/ +# NPM +node_modules/ + ## OS Files # Windows Thumbs.db diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..598d2692 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "docs"] + path = docs + url = https://github.com/Lruihao/FixIt-Docs.git diff --git a/README.md b/README.md index 5ddc31d5..d66cec40 100644 --- a/README.md +++ b/README.md @@ -22,10 +22,12 @@ Head to this [documentation page](https://fixit.lruihao.cn/theme-documentation-b Or run [Documentation Site](https://fixit.lruihao.cn) locally: ```bash -hugo server --source=exampleSite +git clone --recursive https://github.com/Lruihao/FixIt.git FixIt +cd FixIt +hugo server --source=docs ``` -Of course, you can also read the [FixIt wiki](https://github.com/Lruihao/FixIt/wiki) directly. +In addition, there is the [FixIt wiki](https://github.com/Lruihao/FixIt/wiki). ## Migrate and Update diff --git a/README.zh-cn.md b/README.zh-cn.md index 0d3f7b89..3c7b301e 100644 --- a/README.zh-cn.md +++ b/README.zh-cn.md @@ -22,10 +22,12 @@ FixIt 主题继承了这些主题的优秀功能,并在此基础上添加了 或者,在本地构建 [文档](https://fixit.lruihao.cn/zh-cn/): ```bash -hugo server --source=exampleSite +git clone --recursive https://github.com/Lruihao/FixIt.git FixIt +cd FixIt +hugo server --source=docs ``` -当然,你也可以直接阅读 [FixIt 主题维基](https://github.com/Lruihao/FixIt/wiki) +除此之外,还有[FixIt 主题维基](https://github.com/Lruihao/FixIt/wiki)。 ## 迁移和升级 diff --git a/docs b/docs new file mode 160000 index 00000000..a089d1a9 --- /dev/null +++ b/docs @@ -0,0 +1 @@ +Subproject commit a089d1a90783c105a7e7bc0fd22a7520ba2aca4c diff --git a/exampleSite/assets/css/_custom.scss b/exampleSite/assets/css/_custom.scss deleted file mode 100644 index 37edf904..00000000 --- a/exampleSite/assets/css/_custom.scss +++ /dev/null @@ -1,4 +0,0 @@ -// ============================== -// Custom style -// 自定义样式 -// ============================== diff --git a/exampleSite/assets/css/_override.scss b/exampleSite/assets/css/_override.scss deleted file mode 100644 index c37b4ec3..00000000 --- a/exampleSite/assets/css/_override.scss +++ /dev/null @@ -1,4 +0,0 @@ -// ============================== -// Override Variables -// 覆盖变量 -// ============================== diff --git a/exampleSite/assets/images/Apple-Devices-Preview.png b/exampleSite/assets/images/Apple-Devices-Preview.png deleted file mode 100644 index 56c7280f..00000000 Binary files a/exampleSite/assets/images/Apple-Devices-Preview.png and /dev/null differ diff --git a/exampleSite/assets/images/Wavelength.jpg b/exampleSite/assets/images/Wavelength.jpg deleted file mode 100644 index d3455927..00000000 Binary files a/exampleSite/assets/images/Wavelength.jpg and /dev/null differ diff --git a/exampleSite/assets/images/avatar.png b/exampleSite/assets/images/avatar.png deleted file mode 100644 index 8a6de77c..00000000 Binary files a/exampleSite/assets/images/avatar.png and /dev/null differ diff --git a/exampleSite/assets/images/lighthouse-large.jpg b/exampleSite/assets/images/lighthouse-large.jpg deleted file mode 100644 index b68d08e9..00000000 Binary files a/exampleSite/assets/images/lighthouse-large.jpg and /dev/null differ diff --git a/exampleSite/assets/images/lighthouse-small.jpg b/exampleSite/assets/images/lighthouse-small.jpg deleted file mode 100644 index 3386791e..00000000 Binary files a/exampleSite/assets/images/lighthouse-small.jpg and /dev/null differ diff --git a/exampleSite/assets/images/lighthouse.jpg b/exampleSite/assets/images/lighthouse.jpg deleted file mode 100644 index 478ad8d1..00000000 Binary files a/exampleSite/assets/images/lighthouse.jpg and /dev/null differ diff --git a/exampleSite/assets/images/screenshot.png b/exampleSite/assets/images/screenshot.png deleted file mode 100644 index 7d96249d..00000000 Binary files a/exampleSite/assets/images/screenshot.png and /dev/null differ diff --git a/exampleSite/assets/js/_custom.js b/exampleSite/assets/js/_custom.js deleted file mode 100644 index b5304b62..00000000 --- a/exampleSite/assets/js/_custom.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * @author @Lruihao https://lruihao.cn - * @description Custom javascript for the hugo theme FixIt. - */ -const CustomJS = new (function () { - /** - * Rest in Peace. R.I.P 🕯️ - * @2022-3-28 [3.21-mu5735] 沉痛哀悼 132 名遇难同胞:东航航班失事,遇难者含旅客 123 人,机组 9 人 - * @returns {CustomJS} - */ - this.RIP = () => { - if (new Date() < new Date('2022-03-31')) { - document.querySelector('html').style.filter = 'grayscale(100%)'; - } - return this; - }; - /** - * Initialize. - * @returns {CustomJS} - */ - this.init = () => { - this.RIP(); - return this; - }; -})(); - -/** - * Immediate. - */ -(() => { - // CustomJS.init(); - // It will be executed when the DOM tree is built. - document.addEventListener('DOMContentLoaded', () => { - // console.log('DOM content loaded!') - }); -})(); diff --git a/exampleSite/assets/music/Wavelength.mp3 b/exampleSite/assets/music/Wavelength.mp3 deleted file mode 100644 index 8abd9643..00000000 Binary files a/exampleSite/assets/music/Wavelength.mp3 and /dev/null differ diff --git a/exampleSite/config.toml b/exampleSite/config.toml deleted file mode 100644 index 04c2cae4..00000000 --- a/exampleSite/config.toml +++ /dev/null @@ -1,1280 +0,0 @@ -baseURL = "https://fixit.lruihao.cn" -# [en, zh-cn, fr, pl, ...] determines default content language -# [en, zh-cn, fr, pl, ...] 设置默认的语言 -defaultContentLanguage = "en" -# theme -# 主题 -theme = "FixIt" -# themes directory -# 主题目录 -themesDir = "../.." - -# website title -# 网站标题 -title = "FixIt" - -# Ignore errors -# 忽略错误 -ignoreErrors = ["error-remote-getjson"] - -# whether to use robots.txt -# 是否使用 robots.txt -enableRobotsTXT = true -# whether to use git commit log -# 是否使用 git 信息 -enableGitInfo = true -# whether to use emoji code -# 是否使用 emoji 代码 -enableEmoji = true - -# Post frontmatter config -[frontmatter] - lastmod = [":git", "lastmod", ":fileModTime", ":defalut"] - -[languages] - [languages.en] - weight = 1 - # language code - languageCode = "en" - # language name - languageName = "English" - # whether to include Chinese/Japanese/Korean - hasCJKLanguage = false - # default amount of posts in each pages - paginate = 12 - # [UA-XXXXXXXX-X] google analytics code - googleAnalytics = "" - # copyright description used only for seo schema - copyright = "This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License." - # Menu config - [languages.en.menu] - [[languages.en.menu.main]] - identifier = "posts" - # Identifier of the parent menu item since v0.2.14 - parent = "" - # you can add extra information before the name (HTML format is supported), such as icons - pre = "" - # you can add extra information after the name (HTML format is supported), such as icons - post = "" - name = "Posts" - url = "/posts/" - # title will be shown when you hover on this menu link - title = "" - weight = 1 - [[languages.en.menu.main]] - identifier = "categories" - pre = "" - post = "" - name = "Categories" - url = "/categories/" - title = "" - weight = 2 - [[languages.en.menu.main]] - identifier = "tags" - pre = "" - post = "" - name = "Tags" - url = "/tags/" - title = "" - weight = 3 - [[languages.en.menu.main]] - identifier = "documentation" - pre = "" - post = "" - name = "Docs" - url = "/categories/documentation/" - title = "Theme Documentation" - weight = 4 - [[languages.en.menu.main]] - identifier = "tests" - pre = "" - post = "" - name = "Tests" - url = "/tests/" - title = "Test for FixIt" - weight = 5 - [languages.en.menu.main.params] - draft = true - [[languages.en.menu.main]] - identifier = "friends" - pre = "" - post = "" - name = "Friends" - url = "/friends/" - title = "" - weight = 6 - [[languages.en.menu.main]] - identifier = "about" - pre = "" - post = "" - name = "About" - url = "/about/" - title = "" - weight = 7 - [[languages.en.menu.main]] - identifier = "github" - pre = "" - post = "" - name = "" - url = "https://github.com/Lruihao/FixIt" - title = "GitHub" - weight = 8 - [languages.en.menu.main.params] - class = "d-none-desktop text-center" - [languages.en.params] - # site description - description = "About FixIt Theme" - # site keywords - keywords = ["Theme", "Hugo"] - # App icon config - [languages.en.params.app] - # optional site title override for the app when added to an iOS home screen or Android launcher - title = "FixIt" - # whether to omit favicon resource links - noFavicon = false - # modern SVG favicon to use in place of older style .png and .ico files - svgFavicon = "" - # Safari mask icon color - iconColor = "#5bbad5" - # Windows v8-10 tile color - tileColor = "#da532c" - # Android browser theme color - [languages.en.params.app.themeColor] - light = "#ffffff" - dark = "#252627" - # Search config - [languages.en.params.search] - enable = true - # type of search engine ("lunr", "algolia") - type = "algolia" - # max index length of the chunked content - contentLength = 4000 - # placeholder of the search bar - placeholder = "" - # max number of results length - maxResultLength = 10 - # snippet length of the result - snippetLength = 30 - # HTML tag name of the highlight part in results - highlightTag = "em" - # whether to use the absolute URL based on the baseURL in search index - absoluteURL = false - [languages.en.params.search.algolia] - index = "index.en" - appID = "YKOM6PKLUY" - searchKey = "a44c110d3ac360be2c69cd79d34b77a8" - # Home page config - [languages.en.params.home] - # amount of RSS pages - rss = 10 - # Home page profile - [languages.en.params.home.profile] - enable = true - # Gravatar Email for preferred avatar in home page - gravatarEmail = "" - # URL of avatar shown in home page - avatarURL = "/images/avatar.png" - # title shown in home page (HTML format is supported) - title = "" - # subtitle shown in home page - subtitle = "A Clean, Elegant but Advanced Hugo Theme" - # whether to use typeit animation for subtitle - typeit = true - # whether to show social links - social = true - # disclaimer (HTML format is supported) - disclaimer = "" - # Home page posts - [languages.en.params.home.posts] - enable = true - # special amount of posts in each home posts page - paginate = 6 - # Social config in home page - [languages.en.params.social] - GitHub = "xxxx" - Linkedin = "" - Twitter = "xxxx" - Instagram = "xxxx" - Facebook = "xxxx" - Telegram = "xxxx" - Medium = "" - Gitlab = "" - Youtubelegacy = "xxxx" - Youtubecustom = "" - Youtubechannel = "" - Tumblr = "" - Quora = "" - Keybase = "" - Pinterest = "" - Reddit = "" - Codepen = "" - FreeCodeCamp = "" - Bitbucket = "" - Stackoverflow = "" - Weibo = "" - Odnoklassniki = "" - VK = "" - Flickr = "" - Xing = "" - Snapchat = "" - Soundcloud = "" - Spotify = "" - Bandcamp = "" - Paypal = "" - Fivehundredpx = "" - Mix = "" - Goodreads = "" - Lastfm = "" - Foursquare = "" - Hackernews = "" - Kickstarter = "" - Patreon = "" - Steam = "" - Twitch = "" - Strava = "" - Skype = "" - Whatsapp = "" - Zhihu = "" - Douban = "" - Angellist = "" - Slidershare = "" - Jsfiddle = "" - Deviantart = "" - Behance = "" - Dribbble = "" - Wordpress = "" - Vine = "" - Googlescholar = "" - Researchgate = "" - Thingiverse = "" - Devto = "" - Gitea = "" - XMPP = "" - Matrix = "" - Bilibili = "" - # ORCID, ... , CSDN since v0.2.13 - ORCID = "" - Liberapay = "" - Ko-Fi = "" - BuyMeaCoffee = "" - Linktree = "" - QQ = "" - QQGroup = "" # https://qun.qq.com/join.html - Diaspora = "" - CSDN = "" - Email = "xxxx@xxxx.com" - RSS = true # since v0.2.0 - [languages.en.params.social.Mastodon] - id = "@xxxx" - prefix = "https://mastodon.technology/" - - [languages.zh-cn] - weight = 2 - # 网站语言, 仅在这里 CN 大写 - languageCode = "zh-CN" - # 语言名称 - languageName = "简体中文" - # 是否包括中日韩文字 - hasCJKLanguage = true - # 默认每页列表显示的文章数目 - paginate = 12 - # [UA-XXXXXXXX-X] 谷歌分析代号 - googleAnalytics = "" - # 版权描述,仅仅用于 SEO - copyright = "This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License." - # 菜单配置 - [languages.zh-cn.menu] - [[languages.zh-cn.menu.main]] - identifier = "posts" - # 父级菜单项的标识符 (identifier) since v0.2.14 - parent = "" - # 你可以在名称 (允许 HTML 格式) 之前添加其他信息, 例如图标 - pre = "" - # 你可以在名称 (允许 HTML 格式) 之后添加其他信息, 例如图标 - post = "" - name = "所有文章" - url = "/posts/" - title = "" - weight = 1 - [[languages.zh-cn.menu.main]] - identifier = "categories" - pre = "" - post = "" - name = "分类" - url = "/categories/" - title = "" - weight = 2 - [[languages.zh-cn.menu.main]] - identifier = "tags" - pre = "" - post = "" - name = "标签" - url = "/tags/" - title = "" - weight = 3 - [[languages.zh-cn.menu.main]] - identifier = "documentation" - pre = "" - name = "文档" - url = "/categories/documentation/" - title = "主题文档" - weight = 4 - [[languages.zh-cn.menu.main]] - identifier = "tests" - pre = "" - post = "" - name = "测试" - url = "/tests/" - title = "FixIt 测试" - weight = 5 - [languages.zh-cn.menu.main.params] - draft = true - [[languages.zh-cn.menu.main]] - identifier = "friends" - pre = "" - post = "" - name = "友链" - url = "/friends/" - title = "友情链接" - weight = 6 - [[languages.zh-cn.menu.main]] - identifier = "about" - pre = "" - post = "" - name = "关于" - url = "/about/" - title = "" - weight = 7 - [[languages.zh-cn.menu.main]] - identifier = "github" - pre = "" - post = "" - name = "" - url = "https://github.com/Lruihao/FixIt" - title = "GitHub" - weight = 8 - [languages.zh-cn.menu.main.params] - class = "d-none-desktop text-center" - [languages.zh-cn.params] - # 网站描述 - description = "关于 FixIt 主题" - # 网站关键词 - keywords = ["Theme", "Hugo"] - # 应用图标配置 - [languages.zh-cn.params.app] - # 当添加到 iOS 主屏幕或者 Android 启动器时的标题, 覆盖默认标题 - title = "FixIt" - # 是否隐藏网站图标资源链接 - noFavicon = false - # 更现代的 SVG 网站图标, 可替代旧的 .png 和 .ico 文件 - svgFavicon = "" - # Safari 图标颜色 - iconColor = "#5bbad5" - # Windows v8-10 磁贴颜色 - tileColor = "#da532c" - # Android 浏览器主题色 - [languages.zh-cn.params.app.themeColor] - light = "#ffffff" - dark = "#252627" - # 搜索配置 - [languages.zh-cn.params.search] - enable = true - # 搜索引擎的类型 ("lunr", "algolia") - type = "algolia" - # 文章内容最长索引长度 - contentLength = 4000 - # 搜索框的占位提示语 - placeholder = "" - # 最大结果数目 - maxResultLength = 10 - # 结果内容片段长度 - snippetLength = 50 - # 搜索结果中高亮部分的 HTML 标签 - highlightTag = "em" - # 是否在搜索索引中使用基于 baseURL 的绝对路径 - absoluteURL = false - [languages.zh-cn.params.search.algolia] - index = "index.zh-cn" - appID = "YKOM6PKLUY" - searchKey = "a44c110d3ac360be2c69cd79d34b77a8" - # 主页信息设置 - [languages.zh-cn.params.home] - # RSS 文章数目 - rss = 10 - # 主页个人信息 - [languages.zh-cn.params.home.profile] - enable = true - # Gravatar 邮箱,用于优先在主页显示的头像 - gravatarEmail = "" - # 主页显示头像的 URL - avatarURL = "/images/avatar.png" - # 主页显示的网站标题 (支持 HTML 格式) - title = "" - # 主页显示的网站副标题 - subtitle = "一个简洁、优雅且高效的 Hugo 主题" - # 是否为副标题显示打字机动画 - typeit = true - # 是否显示社交账号 - social = true - # 免责声明 (支持 HTML 格式) - disclaimer = "" - # 主页文章列表 - [languages.zh-cn.params.home.posts] - enable = true - # 主页每页显示文章数量 - paginate = 6 - # 主页的社交信息设置 - [languages.zh-cn.params.social] - GitHub = "xxxx" - Linkedin = "" - Twitter = "" - Instagram = "" - Facebook = "" - Telegram = "" - Medium = "" - Gitlab = "" - Youtubelegacy = "" - Youtubecustom = "" - Youtubechannel = "" - Tumblr = "" - Quora = "" - Keybase = "" - Pinterest = "" - Reddit = "" - Codepen = "" - FreeCodeCamp = "" - Bitbucket = "" - Stackoverflow = "" - Weibo = "xxxx" - Odnoklassniki = "" - VK = "" - Flickr = "" - Xing = "" - Snapchat = "" - Soundcloud = "" - Spotify = "" - Bandcamp = "" - Paypal = "" - Fivehundredpx = "" - Mix = "" - Goodreads = "" - Lastfm = "" - Foursquare = "" - Hackernews = "" - Kickstarter = "" - Patreon = "" - Steam = "xxxx" - Twitch = "" - Strava = "" - Skype = "" - Whatsapp = "" - Zhihu = "xxxx" - Douban = "xxxx" - Angellist = "" - Slidershare = "" - Jsfiddle = "" - Deviantart = "" - Behance = "" - Dribbble = "" - Wordpress = "" - Vine = "" - Googlescholar = "" - Researchgate = "" - Mastodon = "" - Thingiverse = "" - Devto = "xxxx" - Gitea = "" - XMPP = "" - Matrix = "" - Bilibili = "xxxx" - # ORCID, ... , CSDN since v0.2.13 - ORCID = "" - Liberapay = "" - Ko-Fi = "" - BuyMeaCoffee = "" - Linktree = "" - QQ = "" - QQGroup = "awbwdTtSQ_-H5QGzeJxdWgv6JMbNehNM" # https://qun.qq.com/join.html - Diaspora = "" - CSDN = "" - Email = "xxxx@xxxx.com" - RSS = true # since v0.2.0 - # 盘古之白配置 since v0.2.12 - [languages.zh-cn.params.pangu] - # 适用于中文写作用户 - enable = true - # 水印配置 since v0.2.12 - # 详细参数见 https://github.com/Lruihao/watermark#readme - [languages.zh-cn.params.watermark] - enable = true - # 水印内容 (允许 HTML 格式) - content = 'FixIt logo FixIt 主题' - # 水印透明度 - opacity = 0.0125 - # 单水印高度 单位:px - height = 21 - # 在顶部右侧显示 GitHub 开源链接 since v0.2.14 - [languages.zh-cn.params.githubCorner] - enable = true - permalink = "https://github.com/Lruihao/FixIt" - title = "在 GitHub 上查看源代码" - position = "right" # left, right - # Gravatar 设置 since v0.2.14 - [languages.zh-cn.params.gravatar] - # Gravatar 主机,默认:“www.gravatar.com” - host = "gravatar.loli.net" - style = "mp" # "", mp, identicon, monsterid, wavatar, retro, blank, robohash - -[params] - # FixIt theme version - # FixIt 主题版本 - version = "0.2.X" - # site default theme ("light", "dark", "auto") - # 网站默认主题 ("light", "dark", "auto") - defaultTheme = "auto" - # public git repo url only then enableGitInfo is true - # 公共 git 仓库路径,仅在 enableGitInfo 设为 true 时有效 - gitRepo = "https://github.com/Lruihao/FixIt" - # which hash function used for SRI, when empty, no SRI is used ("sha256", "sha384", "sha512", "md5") - # 哪种哈希函数用来 SRI, 为空时表示不使用 SRI ("sha256", "sha384", "sha512", "md5") - fingerprint = "" - # date format - # 日期格式 - dateFormat = "2006-01-02" - # website images for Open Graph and Twitter Cards - # 网站图片, 用于 Open Graph 和 Twitter Cards - images = ["/logo.png"] - # enable PWA since v0.2.12 - # 开启 PWA 支持 since v0.2.12 - enablePWA = true - # whether to add external Icon for external links automatically since v0.2.14 - # 是否自动显示外链图标 since v0.2.14 - externalIcon = true - # FixIt will, by default, inject a theme meta tag in the HTML head on the home page only. since v0.2.14 - # You can turn it off, but we would really appreciate if you don’t, as this is a good way to watch FixIt's popularity on the rise. - # 默认情况下,FixIt 只会在主页的 HTML 头中注入主题元标记。since v0.2.14 - # 您可以将其关闭,但如果您不这样做,我们将不胜感激,因为这是观察 FixIt 受欢迎程度上升的好方法。 - disableThemeInject = false - - # Header config - # 页面头部导航栏配置 - [params.header] - # desktop header mode ("sticky", "normal", "auto") - # 桌面端导航栏模式 ("sticky", "normal", "auto") - desktopMode = "sticky" - # mobile header mode ("sticky", "normal", "auto") - # 移动端导航栏模式 ("sticky", "normal", "auto") - mobileMode = "auto" - # Header title config - # 页面头部导航栏标题配置 - [params.header.title] - # URL of the LOGO - # LOGO 的 URL - logo = "/images/fixit.svg" - # title name - # 标题名称 - name = "FixIt" - # you can add extra information before the name (HTML format is supported), such as icons - # 你可以在名称 (允许 HTML 格式) 之前添加其他信息, 例如图标 - pre = "" - # you can add extra information after the name (HTML format is supported), such as icons - # 你可以在名称 (允许 HTML 格式) 之后添加其他信息, 例如图标 - post = "" - # whether to use typeit animation for title name - # 是否为标题显示打字机动画 - typeit = false - # Header subtitle config since v0.2.12 - # 页面头部导航栏副标题配置 since v0.2.12 - [params.header.subtitle] - # subtitle name - # 副标题名称 - name = "" - # whether to use typeit animation for subtitle name - # 是否为副标题显示打字机动画 - typeit = false - - # Footer config - # 页面底部信息配置 - [params.footer] - enable = true - # Custom content (HTML format is supported) - # 自定义内容 (支持 HTML 格式) - custom = '' - # whether to show Hugo and theme info - # 是否显示 Hugo 和主题信息 - hugo = true - # whether to show copyright info - # 是否显示版权信息 - copyright = true - # whether to show the author - # 是否显示作者 - author = true - # site creation year - # 网站创立年份 - since = 2021 - # Site creation time since v0.2.14 - # 网站创立时间 since v0.2.14 - siteTime = '2021-12-18T16:15:22+08:00' - # whether to show total word count of site content since v0.2.14 - # 是否显示网站内容总字数 since v0.2.14 - wordCount = true - # Public network security only in China (HTML format is supported) since v0.2.12 - # 公网安备信息,仅在中国使用 (支持 HTML 格式) since v0.2.12 - gov = "" - # ICP info only in China (HTML format is supported) - # ICP 备案信息,仅在中国使用 (支持 HTML 格式) - icp = "" - # license info (HTML format is supported) - # 许可协议信息 (支持 HTML 格式) - license = 'CC BY-NC 4.0' - - # Section (all posts) page config - # Section (所有文章) 页面配置 - [params.section] - # special amount of posts in each section page - # section 页面每页显示文章数量 - paginate = 20 - # date format (month and day) - # 日期格式 (月和日) - dateFormat = "01-02" - # amount of RSS pages - # RSS 文章数目 - rss = 10 - # recently updated posts settings since v0.2.13 - # 最近更新文章设置 since v0.2.13 - [params.section.recentlyUpdated] - enable = true - rss = true - days = 30 - maxCount = 10 - - # List (category or tag) page config - # List (目录或标签) 页面配置 - [params.list] - # special amount of posts in each list page - # list 页面每页显示文章数量 - paginate = 20 - # date format (month and day) - # 日期格式 (月和日) - dateFormat = "01-02" - # amount of RSS pages - # RSS 文章数目 - rss = 10 - - # Page config - # 文章页面配置 - [params.page] - # whether to hide a page from home page - # 是否在主页隐藏一篇文章 - hiddenFromHomePage = false - # whether to hide a page from search results - # 是否在搜索结果中隐藏一篇文章 - hiddenFromSearch = false - # whether to enable twemoji - # 是否使用 twemoji - twemoji = false - # whether to enable lightgallery - # 是否使用 lightgallery - lightgallery = false - # whether to enable the ruby extended syntax - # 是否使用 ruby 扩展语法 - ruby = true - # whether to enable the fraction extended syntax - # 是否使用 fraction 扩展语法 - fraction = true - # whether to enable the fontawesome extended syntax - # 是否使用 fontawesome 扩展语法 - fontawesome = true - # license info (HTML format is supported) - # 许可协议信息(支持 HTML 格式) - license = 'CC BY-NC 4.0' - # whether to show link to Raw Markdown content of the content - # 是否显示原始 Markdown 文档内容的链接 - linkToMarkdown = true - # whether to show the full text content in RSS - # 是否在 RSS 中显示全文内容 - rssFullText = false - # Page style ("narrow", "normal", "wide", ...) since v0.2.13 - # 页面样式 ("narrow", "normal", "wide", ...) since v0.2.13 - pageStyle = "normal" - # Gravatar is force-used as the author's avatar since v0.2.14 - # 强制使用 Gravatar 作为作者头像 since v0.2.14 - gravatarForce = true - # Repost config since v0.2.15 - # 转载配置 since v0.2.15 - [params.page.repost] - enable = false - url = "" - # Table of the contents config - # 目录配置 - [params.page.toc] - # whether to enable the table of the contents - # 是否使用目录 - enable = true - # whether to keep the static table of the contents in front of the post - # 是否保持使用文章前面的静态目录 - keepStatic = false - # whether to make the table of the contents in the sidebar automatically collapsed - # 是否使侧边目录自动折叠展开 - auto = true - # position of TOC ("left", "right") since v0.2.13 - # 目录位置 ("left", "right") since v0.2.13 - position = "right" - # Display a message at the beginning of an article to warn the reader that its content might be expired. since v0.2.13 - # 在文章开头显示提示信息,提醒读者文章内容可能过时。 since v0.2.13 - [params.page.expirationReminder] - enable = true - # Display the reminder if the last modified time is more than 90 days ago - # 如果文章最后更新于这天数之前,显示提醒 - reminder = 90 - # Display warning if the last modified time is more than 180 days ago - # 如果文章最后更新于这天数之前,显示警告 - warning = 180 - # If the article expires, close the comment or not - # 如果文章到期是否关闭评论 - closeComment = false - # Code config - # 代码配置 - [params.page.code] - # whether to show the copy button of the code block - # 是否显示代码块的复制按钮 - copy = true - # whether to show the edit button of the code block since v0.2.13 - # 是否显示代码块的编辑按钮 since v0.2.13 - edit = true - # the maximum number of lines of displayed code by default - # 默认展开显示的代码行数 - maxShownLines = 10 - # Post edit since v0.2.14 - # 文章编辑 since v0.2.14 - [params.page.edit] - enable = true - # url = "https://github.com/user-name/repo-name/edit/branch-name/subdirectory-name" # Link for fork & edit - url = "https://github.com/Lruihao/FixIt/edit/master/exampleSite/content" # Link for fork & edit - # KaTeX mathematical formulas config (KaTeX https://katex.org/) - # KaTeX 数学公式配置 (KaTeX https://katex.org/) - [params.page.math] - enable = false - # default block delimiter is $$ ... $$ and \\[ ... \\] - # 默认块定界符是 $$ ... $$ 和 \\[ ... \\] - blockLeftDelimiter = "" - blockRightDelimiter = "" - # default inline delimiter is $ ... $ and \\( ... \\) - # 默认行内定界符是 $ ... $ 和 \\( ... \\) - inlineLeftDelimiter = "" - inlineRightDelimiter = "" - # KaTeX extension copy_tex - # KaTeX 插件 copy_tex - copyTex = true - # KaTeX extension mhchem - # KaTeX 插件 mhchem - mhchem = true - # Mapbox GL JS config (Mapbox GL JS https://docs.mapbox.com/mapbox-gl-js) - # Mapbox GL JS 配置 (Mapbox GL JS https://docs.mapbox.com/mapbox-gl-js) - [params.page.mapbox] - # access token of Mapbox GL JS - # Mapbox GL JS 的 access token - accessToken = "pk.eyJ1IjoiZGlsbG9uenEiLCJhIjoiY2s2czd2M2x3MDA0NjNmcGxmcjVrZmc2cyJ9.aSjv2BNuZUfARvxRYjSVZQ" - # style for the light theme - # 浅色主题的地图样式 - lightStyle = "mapbox://styles/mapbox/light-v10?optimize=true" - # style for the dark theme - # 深色主题的地图样式 - darkStyle = "mapbox://styles/mapbox/dark-v10?optimize=true" - # whether to add NavigationControl (https://docs.mapbox.com/mapbox-gl-js/api/#navigationcontrol) - # 是否添加 NavigationControl (https://docs.mapbox.com/mapbox-gl-js/api/#navigationcontrol) - navigation = true - # whether to add GeolocateControl (https://docs.mapbox.com/mapbox-gl-js/api/#geolocatecontrol) - # 是否添加 GeolocateControl (https://docs.mapbox.com/mapbox-gl-js/api/#geolocatecontrol) - geolocate = true - # whether to add ScaleControl (https://docs.mapbox.com/mapbox-gl-js/api/#scalecontrol) - # 是否添加 ScaleControl (https://docs.mapbox.com/mapbox-gl-js/api/#scalecontrol) - scale = true - # whether to add FullscreenControl (https://docs.mapbox.com/mapbox-gl-js/api/#fullscreencontrol) - # 是否添加 FullscreenControl (https://docs.mapbox.com/mapbox-gl-js/api/#fullscreencontrol) - fullscreen = true - # Social share links in post page - # 文章页面的分享信息设置 - [params.page.share] - enable = true - Twitter = true - Facebook = true - Linkedin = false - Whatsapp = false - Pinterest = false - Tumblr = false - HackerNews = true - Reddit = false - VK = false - Buffer = false - Xing = false - Line = true - Instapaper = false - Pocket = false - Digg = false - Stumbleupon = false - Flipboard = false - Weibo = true - Renren = false - Myspace = false - Blogger = false - Baidu = false - Odnoklassniki = false - Evernote = false - Skype = false - Trello = false - Mix = false - # Comment config - # 评论系统设置 - [params.page.comment] - enable = true - # Artalk comment config (https://artalk.js.org/) since v0.2.13 - # Artalk 评论系统设置 (https://artalk.js.org/) since v0.2.13 - [params.page.comment.artalk] - enable = false - server = "https://yourdomain/api/" - site = "默认站点" - placeholder = "" - noComment = "" - sendBtn = "" - editorTravel = true - flatMode = 'auto' - maxNesting = 3 - # It take effect when `params.page.lightgallery` is enabled - # 当 `params.page.lightgallery` 启用时生效 - lightgallery = false - locale = "" # since v0.2.15 - # Disqus comment config (https://disqus.com/) - # Disqus 评论系统设置 (https://disqus.com/) - [params.page.comment.disqus] - enable = false - # Disqus shortname to use Disqus in posts - # Disqus 的 shortname,用来在文章中启用 Disqus 评论系统 - shortname = "" - # Gitalk comment config (https://github.com/gitalk/gitalk) - # Gitalk 评论系统设置 (https://github.com/gitalk/gitalk) - [params.page.comment.gitalk] - enable = false - owner = "" - repo = "" - clientId = "" - clientSecret = "" - # Valine comment config (https://github.com/xCss/Valine) - # Valine 评论系统设置 (https://github.com/xCss/Valine) - [params.page.comment.valine] - enable = false - appId = "" - appKey = "" - placeholder = "" - avatar = "mp" - meta= "" - pageSize = 10 - lang = "" - visitor = true - recordIP = true - highlight = true - enableQQ = false - serverURLs = "" - # emoji data file name, default is "google.yml" - # ("apple.yml", "google.yml", "facebook.yml", "twitter.yml") - # located in "themes/FixIt/assets/data/emoji/" directory - # you can store your own data files in the same path under your project: - # "assets/data/emoji/" - # emoji 数据文件名称, 默认是 "google.yml" - # ("apple.yml", "google.yml", "facebook.yml", "twitter.yml") - # 位于 "themes/FixIt/assets/data/emoji/" 目录 - # 可以在你的项目下相同路径存放你自己的数据文件: - # "assets/data/emoji/" - emoji = "" - commentCount = true # since v0.2.13 - # Waline comment config (https://waline.js.org) since v0.2.13 - # Waline 评论系统设置 (https://waline.js.org) since v0.2.13 - [params.page.comment.waline] - enable = false - serverURL = "" - pageview = false - emoji = ['//unpkg.com/@waline/emojis@1.0.1/weibo'] - meta = ['nick', 'mail', 'link'] - requiredMeta = [] - login = 'enable' - wordLimit = 0 - pageSize = 10 - imageUploader = false - highlighter = false - comment = false - # Facebook comment config (https://developers.facebook.com/docs/plugins/comments) - # Facebook 评论系统设置 (https://developers.facebook.com/docs/plugins/comments) - [params.page.comment.facebook] - enable = false - width = "100%" - numPosts = 10 - appId = "" - languageCode = "" - # Telegram comments config (https://comments.app/) - # Telegram 评论系统设置 (https://comments.app/) - [params.page.comment.telegram] - enable = false - siteID = "" - limit = 5 - height = "" - color = "" - colorful = true - dislikes = false - outlined = false - # Commento comment config (https://commento.io/) - # Commento 评论系统设置 (https://commento.io/) - [params.page.comment.commento] - enable = false - # Utterances comment config (https://utteranc.es/) - # Utterances 评论系统设置 (https://utteranc.es/) - [params.page.comment.utterances] - enable = false - # owner/repo - repo = "" - issueTerm = "pathname" - label = "" - lightTheme = "github-light" - darkTheme = "github-dark" - # Twikoo comment config (https://twikoo.js.org/) since v0.2.13 - # Twikoo 评论系统设置 (https://twikoo.js.org/) since v0.2.13 - [params.page.comment.twikoo] - enable = false - envId = "" - region = "" - path = "" - visitor = true - commentCount = true - # It take effect when `params.page.lightgallery` is enabled - # 当 `params.page.lightgallery` 启用时生效 - lightgallery = false - # Giscus comments config (https://giscus.app/) since v0.2.14 - # Giscus 评论系统设置 (https://giscus.app/) since v0.2.14 - [params.page.comment.giscus] - enable = true - repo = "Lruihao/FixIt" - repoId = "R_kgDOGihPtQ" - category = "General" - categoryId = "DIC_kwDOGihPtc4CApHX" - mapping = "title" - term = "" - reactionsEnabled = "1" - emitMetadata = "0" - inputPosition = "bottom" # top, bottom - lightTheme = "light" - darkTheme = "dark_dimmed" - lazyLoad = true - # Third-party library config - # 第三方库配置 - [params.page.library] - [params.page.library.css] - # someCSS = "some.css" - # located in "assets/" 位于 "assets/" - # Or 或者 - # someCSS = "https://cdn.example.com/some.css" - [params.page.library.js] - # someJavascript = "some.js" - # located in "assets/" 位于 "assets/" - # Or 或者 - # someJavascript = "https://cdn.example.com/some.js" - # Page SEO config - # 页面 SEO 配置 - [params.page.seo] - # image URL - # 图片 URL - images = [] - # Publisher info - # 出版者信息 - [params.page.seo.publisher] - name = "Lruihao" - logoUrl = "/images/avatar.png" - - # TypeIt config - # TypeIt 配置 - [params.typeit] - # typing speed between each step (measured in milliseconds) - # 每一步的打字速度 (单位是毫秒) - speed = 100 - # blinking speed of the cursor (measured in milliseconds) - # 光标的闪烁速度 (单位是毫秒) - cursorSpeed = 1000 - # character used for the cursor (HTML format is supported) - # 光标的字符 (支持 HTML 格式) - cursorChar = "|" - # cursor duration after typing finishing (measured in milliseconds, "-1" means unlimited) - # 打字结束之后光标的持续时间 (单位是毫秒, "-1" 代表无限大) - duration = -1 - - # Mermaid config since v0.2.15 - # Mermaid 配置 since v0.2.15 - [params.mermaid] - # For values, see https://mermaid-js.github.io/mermaid/#/Setup?id=theme - # 取值详见 https://mermaid-js.github.io/mermaid/#/Setup?id=theme - themes = ['neutral', 'dark'] - - # PanguJS config since v0.2.12 - # 盘古之白配置 since v0.2.12 - [params.pangu] - # For Chinese writing - # 适用于中文写作用户 - enable = false - # TODO 为空则全局生效 - selector = '' - - # Watermark config since v0.2.12 - # Detail config see https://github.com/Lruihao/watermark#readme - # 水印配置 since v0.2.12 - # 详细参数见 https://github.com/Lruihao/watermark#readme - [params.watermark] - enable = true - # watermark's text (HTML format is supported) - # 水印内容 (允许 HTML 格式) - content = 'FixIt logo FixIt Theme' - # watermark's transparency - # 水印透明度 - opacity = 0.0125 - # parent of watermark's container - # 水印父节点 - appendTo = '.wrapper>main' - # watermark's width. unit: px - # 单水印宽度 单位:px - width = 150 - # watermark's height. unit: px - # 单水印高度 单位:px - height = 21 - # row spacing of watermarks. unit: px - # 水印行间距 单位:px - rowSpacing = 60 - # col spacing of watermarks. unit: px - # 水印列间距 单位:px - colSpacing = 30 - # watermark's tangent angle. unit: deg - # 水印旋转角度 单位:deg - rotate = 15 - # watermark's fontSize. unit: rem - # 水印字体大小,单位:rem - fontSize = 0.85 - # watermark's fontFamily - # 水印字体 - fontFamily = 'inherit' - - # Busuanzi count since v0.2.12 - # 不蒜子统计 since v0.2.12 - [params.ibruce] - enable = true - # Enable in post meta - # 在文章中开启 - enablePost = true - - # Site verification code for Google/Bing/Yandex/Pinterest/Baidu/360/Sogou - # 网站验证代码,用于 Google/Bing/Yandex/Pinterest/Baidu/360/Sogou - [params.verification] - google = "" - bing = "" - yandex = "" - pinterest = "" - baidu = "" - so = "" - sogou = "" - - # Site SEO config - # 网站 SEO 配置 - [params.seo] - # image URL - # 图片 URL - image = "/images/Apple-Devices-Preview.png" - # thumbnail URL - # 缩略图 URL - thumbnailUrl = "/images/screenshot.png" - - # Analytics config - # 网站分析配置 - [params.analytics] - enable = false - # Google Analytics - [params.analytics.google] - id = "" - # whether to anonymize IP - # 是否匿名化用户 IP - anonymizeIP = true - # Fathom Analytics - [params.analytics.fathom] - id = "" - # server url for your tracker if you're self hosting - # 自行托管追踪器时的主机路径 - server = "" - - # Cookie consent config - # Cookie 许可配置 - [params.cookieconsent] - enable = true - # text strings used for Cookie consent banner - # 用于 Cookie 许可横幅的文本字符串 - [params.cookieconsent.content] - message = "" - dismiss = "" - link = "" - - # CDN config for third-party library files - # 第三方库文件的 CDN 设置 - [params.cdn] - # CDN data file name, disabled by default - # ("jsdelivr.yml", "unpkg.yml") - # located in "themes/FixIt/assets/data/cdn/" directory - # you can store your own data files in the same path under your project: - # "assets/data/cdn/" - # CDN 数据文件名称, 默认不启用 - # ("jsdelivr.yml", "unpkg.yml") - # 位于 "themes/FixIt/assets/data/cdn/" 目录 - # 可以在你的项目下相同路径存放你自己的数据文件: - # "assets/data/cdn/" - # data = "unpkg.yml" - - # Compatibility config - # 兼容性设置 - [params.compatibility] - # whether to use Polyfill.io to be compatible with older browsers - # 是否使用 Polyfill.io 来兼容旧式浏览器 - polyfill = false - # whether to use object-fit-images to be compatible with older browsers - # 是否使用 object-fit-images 来兼容旧式浏览器 - objectFit = false - - # Custom JS at last. since v0.2.12 - # "_custom.js" located in "themes/FixIt/assets/js/" - # you can store your custom JS file in the same path under your project: - # "assets/js/_custom.js" - # 页面最后添加自定义 JS since v0.2.12 - # "_custom.js" 位于 "themes/FixIt/assets/js" 目录 - # 可以在你的项目下相同路径存放你自己的自定义 JS 文件: - # "assets/js/_custom.js" - [params.customJS] - enable = true - # GitHub banner in the top-right or top-left corner since v0.2.14 - # 在左上角或者右上角显示 GitHub 开源链接 since v0.2.14 - [params.githubCorner] - enable = true - permalink = "https://github.com/Lruihao/FixIt" - title = "View source on GitHub" - position = "right" # left, right - # Gravatar config since v0.2.14 - # Gravatar 设置 since v0.2.14 - [params.gravatar] - # Gravatar host, default: "www.gravatar.com" - # Gravatar 主机,默认:“www.gravatar.com” - host = "www.gravatar.com" # "cn.gravatar.com", "gravatar.loli.net" - style = "mp" # "", mp, identicon, monsterid, wavatar, retro, blank, robohash - # Developer options since v0.2.15 - # 开发者选项 since v0.2.15 - [params.dev] - enable = false - # Check for updates - # 检查更新 - c4u = false - # For using the GitHub API, please do not expose to public! - # 用于使用 GitHub API,请勿公开展示! - githubToken = "" - # Mobile Devtools config - # 移动端开发者工具配置 - [params.dev.mDevtools] - enable = false - # "vConsole", "eruda" supported - # 支持 "vConsole", "eruda" - type = "vConsole" - - -# Markup related configuration in Hugo -# Hugo 解析文档的配置 -[markup] - # Syntax Highlighting (https://gohugo.io/content-management/syntax-highlighting) - # 语法高亮设置 (https://gohugo.io/content-management/syntax-highlighting) - [markup.highlight] - ######## 必要配置 necessary configurations ######## - # https://github.com/Lruihao/FixIt/issues/43 - codeFences = true - lineNos = true - lineNumbersInTable = true - noClasses = false - ######## 必要配置 necessary configurations ######## - guessSyntax = true - # Goldmark is from Hugo 0.60 the default library used for Markdown - # Goldmark 是 Hugo 0.60 以来的默认 Markdown 解析库 - [markup.goldmark] - [markup.goldmark.extensions] - definitionList = true - footnote = true - linkify = true - strikethrough = true - table = true - taskList = true - typographer = true - [markup.goldmark.renderer] - # whether to use HTML tags directly in the document - # 是否在文档中直接使用 HTML 标签 - unsafe = true - # Table Of Contents settings - # 目录设置 - [markup.tableOfContents] - startLevel = 2 - endLevel = 6 - -# Author config -# 作者配置 -[author] - name = "Lruihao" - email = "1024@lruihao.cn" - link = "https://lruihao.cn" - -# Sitemap config -# 网站地图配置 -[sitemap] - changefreq = "weekly" - filename = "sitemap.xml" - priority = 0.5 - -# Permalinks config (https://gohugo.io/content-management/urls/#permalinks) -# Permalinks 配置 (https://gohugo.io/content-management/urls/#permalinks) -[Permalinks] - # posts = ":year/:month/:filename" - posts = ":filename" - -# Privacy config (https://gohugo.io/about/hugo-and-gdpr/) -# 隐私信息配置 (https://gohugo.io/about/hugo-and-gdpr/) -[privacy] - [privacy.twitter] - enableDNT = true - [privacy.youtube] - privacyEnhanced = true - -[mediaTypes] - # Options to make output .md files - # 用于输出 Markdown 格式文档的设置 - [mediaTypes."text/markdown"] - suffixes = ["md"] - # Options to make output .txt files - # 用于输出 txt 文件的设置 - [mediaTypes."text/plain"] - suffixes = ["txt"] - -[outputFormats] - # Options to make output .md files - # 用于输出 Markdown 格式文档的设置 - [outputFormats.MarkDown] - mediaType = "text/markdown" - isPlainText = true - isHTML = false - # Options to make output baidu_urls.txt file - # 用于输出 baidu_urls.txt 文件的设置 - [outputFormats.BaiduUrls] - baseName = "baidu_urls" - mediaType = "text/plain" - isPlainText = true - isHTML = false - -# Options to make hugo output files -# 用于 Hugo 输出文档的设置 -[outputs] - home = ["HTML", "RSS", "JSON", "BaiduUrls"] - page = ["HTML", "MarkDown"] - section = ["HTML", "RSS"] - taxonomy = ["HTML", "RSS"] - taxonomyTerm = ["HTML"] diff --git a/exampleSite/content/about/index.en.md b/exampleSite/content/about/index.en.md deleted file mode 100644 index 904480dd..00000000 --- a/exampleSite/content/about/index.en.md +++ /dev/null @@ -1,139 +0,0 @@ ---- -title: "About FixIt" -date: 2019-08-02T11:04:49+08:00 -draft: false -comment: false -pageStyle: "wide" - -lightgallery: true - -math: - enable: true ---- - -{{< style "img { height: 1.25rem; }" >}} -[![GitHub release (latest by date)](https://img.shields.io/github/v/release/Lruihao/FixIt?style=flat-square)](https://github.com/Lruihao/FixIt/releases) -[![GitHub commits since tagged version](https://img.shields.io/github/commits-since/Lruihao/FixIt/v0.2.10?style=flat-square)](https://github.com/Lruihao/FixIt/compare/v0.2.10...master) -[![Hugo](https://img.shields.io/badge/Hugo-%5E0.84.0-ff4088?style=flat-square&logo=hugo)](https://gohugo.io/) -[![License](https://img.shields.io/github/license/Lruihao/FixIt?style=flat-square)](https://github.com/Lruihao/FixIt/blob/master/LICENSE) -[![GitHub stars](https://img.shields.io/github/stars/Lruihao/FixIt?style=social)](https://github.com/Lruihao/FixIt) -[![GitHub forks](https://img.shields.io/github/forks/Lruihao/FixIt?style=social)](https://github.com/Lruihao/FixIt/fork) -{{< /style >}} - -> [FixIt logo FixIt](https://github.com/Lruihao/FixIt) is a **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/) developed by [Lruihao](https://lruihao.cn). -> -> It is based on the original [LoveIt Theme](https://github.com/dillonzq/LoveIt), [LeaveIt Theme](https://github.com/liuzc/LeaveIt) and [KeepIt Theme](https://github.com/Fastbyte01/KeepIt). - -![Hugo Theme FixIt](/images/Apple-Devices-Preview.png "Hugo Theme FixIt") - -### Features - -#### Performance and SEO - -* :(fa-solid fa-rocket fa-fw): Optimized for **performance**: [99]/[100] on mobile and [100]/[100] on desktop in [Google PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights) -* :(fa-brands fa-searchengin fa-fw): Optimized SEO performance with a correct **SEO SCHEMA** based on JSON-LD -* :(fa-brands fa-google fa-fw): **[Google Analytics](https://analytics.google.com/analytics)** supported -* :(fa-regular fa-chart-bar fa-fw): **[Fathom Analytics](https://usefathom.com/)** supported -* :(fa-solid fa-search fa-fw): Search engine **verification** supported (Google, Bind, Yandex, Baidu, 360 and Sogou) -* :(fa-solid fa-tachometer-alt fa-fw): **CDN** for third-party libraries supported -* :(fa-solid fa-cloud-download-alt fa-fw): Automatically converted images with **Lazy Load** by [lazysizes](https://github.com/aFarkas/lazysizes) - -#### Appearance and Layout - -* [:(fa-solid fa-desktop):]/[:(fa-solid fa-mobile):] **Responsive** layout -* [:(fa-solid fa-sun):]/[:(fa-solid fa-moon):] **[Light]/[Dark]** mode -* :(fa-solid fa-layer-group fa-fw): Globally consistent **design language** -* :(fa-solid fa-ellipsis-h fa-fw): **Pagination** supported -* :(fa-regular fa-list-alt fa-fw): Easy-to-use and self-expanding **table of contents** -* :(fa-solid fa-language fa-fw): **Multilanguage** supported and i18n ready -* :(fa-brands fa-css3-alt fa-fw): Beautiful **CSS animation** - -#### Social and Comment Systems - -* :(fa-regular fa-user fa-fw): **Gravatar** supported by [Gravatar](https://gravatar.com) -* :(fa-solid fa-user-circle fa-fw): Local **Avatar** supported -* :(fa-regular fa-id-card fa-fw): Up to **73** social links supported -* :(fa-solid fa-share-square fa-fw): Up to **28** share sites supported -* :(fa-regular fa-comment fa-fw): **Disqus** comment system supported by [Disqus](https://disqus.com) -* :(fa-regular fa-comment-dots fa-fw): **Gitalk** comment system supported by [Gitalk](https://github.com/gitalk/gitalk) -* :(fa-regular fa-comment-alt fa-fw): **Valine** comment system supported by [Valine](https://valine.js.org/) -* :(fa-regular fa-comment-alt fa-fw): **Waline** comment system supported by [Waline](https://waline.js.org/) -* :(fa-regular fa-comments fa-fw): **Facebook comments** system supported by [Facebook](https://developers.facebook.com/docs/plugins/comments/) -* :(fa-solid fa-comment fa-fw): **Telegram comments** system supported by [Comments](https://comments.app/) -* :(fa-solid fa-comment-dots fa-fw): **Commento** comment system supported by [Commento](https://commento.io/) -* :(fa-regular fa-comment-alt fa-fw): **Utterances** comment system supported by [Utterances](https://utteranc.es/) -* :(fa-regular fa-comment-alt fa-fw): **Artalk** comment system supported by [Artalk](https://artalk.js.org/) -* :(fa-solid fa-comment-alt fa-fw): **Twikoo** comment system supported by [Twikoo](https://twikoo.js.org/) -* :(fa-solid fa-comment-alt fa-fw): **giscus** comment system supported by [giscus](https://giscus.app/) - -#### Extended Features - -* :(fa-solid fa-desktop fa-fw): **PWA (Progressive Web App)** supported -* :(fa-solid fa-bars fa-fw): **Sub Menu** supported -* :(fa-solid fa-lock fa-fw): **Content Encryption** supported (Pages, Partial) -* :(fa-solid fa-users fa-fw): **Friends** page embedded template -* :(fa-solid fa-search fa-fw): **Search** supported by [Lunr.js](https://lunrjs.com/) or [algolia](https://www.algolia.com/) -* :(fa-regular fa-grin-tongue-wink fa-fw): **Twemoji** supported -* :(fa-solid fa-code fa-fw): Automatically **highlighting** code -* :(fa-regular fa-copy fa-fw): **Copy code** to clipboard with one click -* :(fa-regular fa-images fa-fw): **Images gallery** supported by [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js) -* :(fa-brands fa-font-awesome fa-fw): Extended Markdown syntax for **[Font Awesome](https://fontawesome.com/) icons** -* :(fa-regular fa-sticky-note fa-fw): Extended Markdown syntax for **ruby annotation** -* :(fa-solid fa-percentage fa-fw): Extended Markdown syntax for **fraction** -* :(fa-solid fa-square-root-alt fa-fw): **Mathematical formula** supported by [$ \KaTeX $](https://katex.org/) -* :(fa-solid fa-project-diagram fa-fw): **Diagrams** shortcode supported by [mermaid](https://github.com/knsv/mermaid) -* :(fa-solid fa-chart-pie fa-fw): **Interactive data visualization** shortcode supported by [ECharts](https://echarts.apache.org/) -* :(fa-solid fa-map-marked-alt fa-fw): **Mapbox** shortcode supported by [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js) -* :(fa-solid fa-music fa-fw): **Music player** shortcode supported by [APlayer](https://github.com/MoePlayer/APlayer) and [MetingJS](https://github.com/metowolf/MetingJS) -* :(fa-solid fa-video fa-fw): **Bilibili player** shortcode -* :(fa-regular fa-bell fa-fw): Kinds of **admonitions** shortcode -* :(fa-solid fa-align-left fa-fw): **Custom style** shortcode -* :(fa-brands fa-js-square fa-fw): **Custom script** shortcode -* :(fa-solid fa-i-cursor fa-fw): **Animated typing** supported by [TypeIt](https://typeitjs.com/) -* :(fa-solid fa-cookie-bite fa-fw): **Cookie consent banner** supported by [cookieconsent](https://github.com/osano/cookieconsent) -* :(fa-solid fa-signature fa-fw): **Web Watermark** supported by [cell-watermark](https://github.com/Lruihao/watermark) -* :(fa-solid fa-language fa-fw): **Chinese typesetting** supported by [pangu.js](https://github.com/vinta/pangu.js) -* ... - -### Acknowledgements - -
-Thanks to the authors of following resources included in the theme: - -* [normalize.css](https://github.com/necolas/normalize.css) -* [Font Awesome](https://fontawesome.com/) -* [Simple Icons](https://github.com/simple-icons/simple-icons) -* [Animate.css](https://daneden.github.io/animate.css/) -* [autocomplete.js](https://github.com/algolia/autocomplete.js) -* [Lunr.js](https://lunrjs.com/) -* [algoliasearch](https://github.com/algolia/algoliasearch-client-javascript) -* [lazysizes](https://github.com/aFarkas/lazysizes) -* [object-fit-images](https://github.com/fregante/object-fit-images) -* [Twemoji](https://github.com/twitter/twemoji) -* [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js) -* [Sharer.js](https://github.com/ellisonleao/sharer.js) -* [TypeIt](https://typeitjs.com/) -* [$ \KaTeX $](https://katex.org/) -* [mermaid](https://github.com/knsv/mermaid) -* [ECharts](https://echarts.apache.org/) -* [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js) -* [APlayer](https://github.com/MoePlayer/APlayer) -* [MetingJS](https://github.com/metowolf/MetingJS) -* [Gitalk](https://github.com/gitalk/gitalk) -* [Valine](https://valine.js.org/) -* [cookieconsent](https://github.com/osano/cookieconsent) -* [cell-watermark](https://github.com/Lruihao/watermark) -* [pangu.js](https://github.com/vinta/pangu.js) -* [Artalk](https://artalk.js.org/) -* [Waline](https://waline.js.org/) -* [Twikoo](https://twikoo.js.org/) -* [github-corners](https://github.com/tholman/github-corners) -* [giscus](https://giscus.app/) -* [crypto-js](https://github.com/brix/crypto-js) -* [vConsole](https://github.com/Tencent/vConsole) -* [eruda](https://github.com/liriliri/eruda) -
- -### License - -FixIt is licensed under the **MIT** license. Check the [LICENSE file](https://github.com/Lruihao/FixIt/blob/master/LICENSE) for details. \ No newline at end of file diff --git a/exampleSite/content/about/index.zh-cn.md b/exampleSite/content/about/index.zh-cn.md deleted file mode 100644 index a278d2a2..00000000 --- a/exampleSite/content/about/index.zh-cn.md +++ /dev/null @@ -1,140 +0,0 @@ ---- -title: "关于 FixIt" -date: 2019-08-02T11:04:49+08:00 -draft: false -comment: false -comment: false -pageStyle: "wide" - -lightgallery: true - -math: - enable: true ---- - -{{< style "img { height: 1.25rem; }" >}} -[![GitHub release (latest by date)](https://img.shields.io/github/v/release/Lruihao/FixIt?style=flat-square)](https://github.com/Lruihao/FixIt/releases) -[![GitHub commits since tagged version](https://img.shields.io/github/commits-since/Lruihao/FixIt/v0.2.10?style=flat-square)](https://github.com/Lruihao/FixIt/compare/v0.2.10...master) -[![Hugo](https://img.shields.io/badge/Hugo-%5E0.84.0-ff4088?style=flat-square&logo=hugo)](https://gohugo.io/) -[![License](https://img.shields.io/github/license/Lruihao/FixIt?style=flat-square)](https://github.com/Lruihao/FixIt/blob/master/LICENSE) -[![GitHub stars](https://img.shields.io/github/stars/Lruihao/FixIt?style=social)](https://github.com/Lruihao/FixIt) -[![GitHub forks](https://img.shields.io/github/forks/Lruihao/FixIt?style=social)](https://github.com/Lruihao/FixIt/fork) -{{< /style >}} - -> [FixIt logo FixIt](https://github.com/Lruihao/FixIt) 是一个由 [Lruihao](https://lruihao.cn) 开发的**简洁**、**优雅**且**高效**的 [Hugo](https://gohugo.io/) 博客主题。 -> -> 它的原型基于 [LoveIt 主题](https://github.com/dillonzq/LoveIt),[LeaveIt 主题](https://github.com/liuzc/LeaveIt) 和 [KeepIt 主题](https://github.com/Fastbyte01/KeepIt)。 - -![Hugo 主题 FixIt](/images/Apple-Devices-Preview.png "Hugo 主题 FixIt") - -### 特性 - -#### 性能和 SEO - -* :(fa-solid fa-rocket fa-fw): **性能**优化:在 [Google PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights) 中, [99]/[100] 的移动设备得分和 [100]/[100] 的桌面设备得分 -* :(fa-brands fa-searchengin fa-fw): 使用基于 JSON-LD 格式 的 **SEO SCHEMA** 文件进行 SEO 优化 -* :(fa-brands fa-google fa-fw): 支持 **[Google Analytics](https://analytics.google.com/analytics)** -* :(fa-regular fa-chart-bar fa-fw): 支持 **[Fathom Analytics](https://usefathom.com/)** -* :(fa-solid fa-search fa-fw): 支持搜索引擎的**网站验证** (Google, Bind, Yandex, Baidu, 360 and Sogou) -* :(fa-solid fa-tachometer-alt fa-fw): 支持所有第三方库的 **CDN** -* :(fa-solid fa-cloud-download-alt fa-fw): 基于 [lazysizes](https://github.com/aFarkas/lazysizes) 自动转换图片为**懒加载** - -#### 外观和布局 - -* [:(fa-solid fa-desktop):]/[:(fa-solid fa-mobile):] **响应式**布局 -* [:(fa-solid fa-sun):]/[:(fa-solid fa-moon):] **[浅色]/[深色]** 主题模式 -* :(fa-solid fa-layer-group fa-fw): 全局一致的**设计语言** -* :(fa-solid fa-ellipsis-h fa-fw): 支持**分页** -* :(fa-regular fa-list-alt fa-fw): 易用和自动展开的**文章目录** -* :(fa-solid fa-language fa-fw): 支持**多语言**和国际化 -* :(fa-brands fa-css3-alt fa-fw): 美观的 **CSS 动画** - -#### 社交和评论系统 - -* :(fa-regular fa-user fa-fw): 支持 **[Gravatar](https://gravatar.com)** 头像 -* :(fa-solid fa-user-circle fa-fw): 支持本地**头像** -* :(fa-regular fa-id-card fa-fw): 支持多达 **73** 种社交链接 -* :(fa-solid fa-share-square fa-fw): 支持多达 **28** 种网站分享 -* :(fa-regular fa-comment fa-fw): 支持 **[Disqus](https://disqus.com)** 评论系统 -* :(fa-regular fa-comment-dots fa-fw): 支持 **[Gitalk](https://github.com/gitalk/gitalk)** 评论系统 -* :(fa-regular fa-comment-alt fa-fw): 支持 **[Valine](https://valine.js.org/)** 评论系统 -* :(fa-regular fa-comment-alt fa-fw): 支持 **[Waline](https://waline.js.org/)** 评论系统 -* :(fa-regular fa-comments fa-fw): 支持 **[Facebook](https://developers.facebook.com/docs/plugins/comments/) 评论**系统 -* :(fa-solid fa-comment fa-fw): 支持 **[Telegram comments](https://comments.app/) 评论**系统 -* :(fa-solid fa-comment-dots fa-fw): 支持 **[Commento](https://commento.io/)** 评论系统 -* :(fa-regular fa-comment-alt fa-fw): 支持 **[Utterances](https://utteranc.es/)** 评论系统 -* :(fa-regular fa-comment-alt fa-fw): 支持 **[Artalk](https://artalk.js.org/)** 评论系统 -* :(fa-regular fa-comment-alt fa-fw): 支持 **[Twikoo](https://twikoo.js.org/)** 评论系统 -* :(fa-regular fa-comment-alt fa-fw): 支持 **[giscus](https://giscus.app/zh-CN/)** 评论系统 - -#### 扩展功能 - -* :(fa-solid fa-desktop fa-fw): 支持**渐进式网页应用** -* :(fa-solid fa-bars fa-fw): 支持**二级菜单** -* :(fa-solid fa-lock fa-fw): 支持**内容加密**(页面、局部) -* :(fa-solid fa-users fa-fw): 支持**友情链接**的页面模板 -* :(fa-solid fa-search fa-fw): 支持基于 [Lunr.js](https://lunrjs.com/) 或 [algolia](https://www.algolia.com/) 的**搜索** -* :(fa-regular fa-grin-tongue-wink fa-fw): 支持 **Twemoji** -* :(fa-solid fa-code fa-fw): 支持**代码高亮** -* :(fa-regular fa-copy fa-fw): 一键**复制代码**到剪贴板 -* :(fa-regular fa-images fa-fw): 支持基于 [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js) 的**图片画廊** -* :(fa-brands fa-font-awesome fa-fw): 支持 **[Font Awesome](https://fontawesome.com/) 图标**的扩展 Markdown 语法 -* :(fa-regular fa-sticky-note fa-fw): 支持**上标注释**的扩展 Markdown 语法 -* :(fa-solid fa-percentage fa-fw): 支持**分数**的扩展 Markdown 语法 -* :(fa-solid fa-square-root-alt fa-fw): 支持基于 [$ \KaTeX $](https://katex.org/) 的**数学公式** -* :(fa-solid fa-project-diagram fa-fw): 支持基于 [mermaid](https://github.com/knsv/mermaid) 的**图表** shortcode -* :(fa-solid fa-chart-pie fa-fw): 支持基于 [ECharts](https://echarts.apache.org/) 的**交互式数据可视化** shortcode -* :(fa-solid fa-map-marked-alt fa-fw): 支持基于 [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js) 的 **Mapbox** shortcode -* :(fa-solid fa-music fa-fw): 支持基于 [APlayer](https://github.com/MoePlayer/APlayer) 和 [MetingJS](https://github.com/metowolf/MetingJS) 的**音乐播放器** shortcode -* :(fa-solid fa-video fa-fw): 支持 **Bilibili 视频** shortcode -* :(fa-regular fa-bell fa-fw): 支持多种**注释**的 shortcode -* :(fa-solid fa-align-left fa-fw): 支持**自定义样式**的 shortcode -* :(fa-brands fa-js-square fa-fw): 支持**自定义脚本**的 shortcode -* :(fa-solid fa-i-cursor fa-fw): 支持基于 [TypeIt](https://typeitjs.com/) 的**打字动画** shortcode -* :(fa-solid fa-cookie-bite fa-fw): 支持基于 [cookieconsent](https://github.com/osano/cookieconsent) 的 **Cookie 许可横幅** -* :(fa-solid fa-signature fa-fw): 支持基于 [cell-watermark](https://github.com/Lruihao/watermark) 的**网页水印** -* :(fa-solid fa-language fa-fw): 支持基于 [pangu.js](https://github.com/vinta/pangu.js) 的**中文排版** -* ... - -### 致谢 - -
-FixIt 主题中用到了以下项目,感谢它们的作者: - -* [normalize.css](https://github.com/necolas/normalize.css) -* [Font Awesome](https://fontawesome.com/) -* [Simple Icons](https://github.com/simple-icons/simple-icons) -* [Animate.css](https://daneden.github.io/animate.css/) -* [autocomplete.js](https://github.com/algolia/autocomplete.js) -* [Lunr.js](https://lunrjs.com/) -* [algoliasearch](https://github.com/algolia/algoliasearch-client-javascript) -* [lazysizes](https://github.com/aFarkas/lazysizes) -* [object-fit-images](https://github.com/fregante/object-fit-images) -* [Twemoji](https://github.com/twitter/twemoji) -* [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js) -* [Sharer.js](https://github.com/ellisonleao/sharer.js) -* [TypeIt](https://typeitjs.com/) -* [$ \KaTeX $](https://katex.org/) -* [mermaid](https://github.com/knsv/mermaid) -* [ECharts](https://echarts.apache.org/) -* [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js) -* [APlayer](https://github.com/MoePlayer/APlayer) -* [MetingJS](https://github.com/metowolf/MetingJS) -* [Gitalk](https://github.com/gitalk/gitalk) -* [Valine](https://valine.js.org/) -* [cookieconsent](https://github.com/osano/cookieconsent) -* [cell-watermark](https://github.com/Lruihao/watermark) -* [pangu.js](https://github.com/vinta/pangu.js) -* [Artalk](https://artalk.js.org/) -* [Waline](https://waline.js.org/) -* [Twikoo](https://twikoo.js.org/) -* [github-corners](https://github.com/tholman/github-corners) -* [giscus](https://giscus.app/zh-CN) -* [crypto-js](https://github.com/brix/crypto-js) -* [vConsole](https://github.com/Tencent/vConsole) -* [eruda](https://github.com/liriliri/eruda) -
- -### 许可协议 - -FixIt 根据 **MIT** 许可协议授权。 更多信息请查看 [LICENSE 文件](https://github.com/Lruihao/FixIt/blob/master/LICENSE)。 \ No newline at end of file diff --git a/exampleSite/content/categories/documentation/_index.en.md b/exampleSite/content/categories/documentation/_index.en.md deleted file mode 100644 index b40df67a..00000000 --- a/exampleSite/content/categories/documentation/_index.en.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -title: "Documentation" ---- diff --git a/exampleSite/content/categories/documentation/_index.zh-cn.md b/exampleSite/content/categories/documentation/_index.zh-cn.md deleted file mode 100644 index ceb16165..00000000 --- a/exampleSite/content/categories/documentation/_index.zh-cn.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -title: "文档" ---- diff --git a/exampleSite/content/categories/test/_index.zh-cn.md b/exampleSite/content/categories/test/_index.zh-cn.md deleted file mode 100644 index bde973bc..00000000 --- a/exampleSite/content/categories/test/_index.zh-cn.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -title: "测试" ---- diff --git a/exampleSite/content/friends/index.en.md b/exampleSite/content/friends/index.en.md deleted file mode 100644 index b8abdc77..00000000 --- a/exampleSite/content/friends/index.en.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Friends" -subtitle: Recording some friends who use FixIt theme -type: "friends" -description: "Friends tempalate demo of FixIt theme" -keywords: - - Hugo - - friends tempalate -comment: - giscus: - mapping: "number" - term: "120" ---- - ---- - -{{< admonition tip "Add your FixIt site" >}} -You could add your FixIt site to this page via [making a PR :(fa-solid fa-code-branch fa-fw):](https://github.com/Lruihao/FixIt/pulls). (e.g. [#111](https://github.com/Lruihao/FixIt/pull/111)) - -> :(fa-solid fa-exclamation-triangle): *Website failure, stop maintenance and improper content may be unlinked!* -{{< /admonition >}} diff --git a/exampleSite/content/friends/index.zh-cn.md b/exampleSite/content/friends/index.zh-cn.md deleted file mode 100644 index 4b1e6783..00000000 --- a/exampleSite/content/friends/index.zh-cn.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "友情链接" -subtitle: 记录一些使用 FixIt 主题的朋友们 -type: "friends" -description: "FixIt 主题的友链模板 Demo" -keywords: - - Hugo - - 友情链接 -comment: - giscus: - mapping: "number" - term: "120" ---- - ---- - -{{< admonition tip "添加您的 FixIt 网站" >}} -您可以通过 [创建 PR :(fa-solid fa-code-branch fa-fw):](https://github.com/Lruihao/FixIt/pulls) 将您的 FixIt 网站添加到此页面。(例如:[#111](https://github.com/Lruihao/FixIt/pull/111)) - -> :(fa-solid fa-exclamation-triangle): *网站失效、停止维护、不当内容都可能被取消链接!* -{{< /admonition >}} diff --git a/exampleSite/content/offline/index.en.md b/exampleSite/content/offline/index.en.md deleted file mode 100644 index bdff60c0..00000000 --- a/exampleSite/content/offline/index.en.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -type: "offline" -description: "offline cache page of FixIt theme" -keywords: - - PWA - - offline - - 离线 ---- \ No newline at end of file diff --git a/exampleSite/content/offline/index.zh-cn.md b/exampleSite/content/offline/index.zh-cn.md deleted file mode 100644 index cecf350b..00000000 --- a/exampleSite/content/offline/index.zh-cn.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -type: "offline" -description: "FixIt 主题的离线缓存页面" -keywords: - - PWA - - offline - - 离线 ---- \ No newline at end of file diff --git a/exampleSite/content/posts/basic-markdown-syntax/featured-image.png b/exampleSite/content/posts/basic-markdown-syntax/featured-image.png deleted file mode 100644 index 20c52dfd..00000000 Binary files a/exampleSite/content/posts/basic-markdown-syntax/featured-image.png and /dev/null differ diff --git a/exampleSite/content/posts/basic-markdown-syntax/index.en.md b/exampleSite/content/posts/basic-markdown-syntax/index.en.md deleted file mode 100644 index cfac6678..00000000 --- a/exampleSite/content/posts/basic-markdown-syntax/index.en.md +++ /dev/null @@ -1,763 +0,0 @@ ---- -title: "Basic Markdown Syntax" -date: 2021-12-18T16:15:22+08:00 -draft: false -description: "This article shows the basic Markdown syntax and format." -resources: -- name: "featured-image" - src: "featured-image.png" - -tags: ["Markdown", "HTML"] -categories: ["Markdown"] - -lightgallery: true - -repost: - enable: true - url: "https://hugoloveit.com/basic-markdown-syntax/" ---- - -This article offers a sample of basic Markdown syntax that can be used in Hugo content files. - - - -{{< admonition >}} -This article is a shameful copy of the great [Grav original page](http://learn.getgrav.org/content/markdown). - -If you want to know about the extented Markdown syntax of **FixIt** theme, please read [extended Markdown syntax page](../theme-documentation-content#extended-markdown-syntax). -{{< /admonition >}} - -Let's face it: Writing content for the Web is tiresome. WYSIWYG editors help alleviate this task, but they generally result in horrible code, or worse yet, ugly web pages. - -**Markdown** is a better way to write **HTML**, without all the complexities and ugliness that usually accompanies it. - -Some of the key benefits are: - -1. Markdown is simple to learn, with minimal extra characters, so it's also quicker to write content. -2. Less chance of errors when writing in Markdown. -3. Produces valid XHTML output. -4. Keeps the content and the visual display separate, so you cannot mess up the look of your site. -5. Write in any text editor or Markdown application you like. -6. Markdown is a joy to use! - -John Gruber, the author of Markdown, puts it like this: - -> The overriding design goal for Markdown’s formatting syntax is to make it as readable as possible. -> The idea is that a Markdown-formatted document should be publishable as-is, as plain text, -> without looking like it’s been marked up with tags or formatting instructions. -> While Markdown’s syntax has been influenced by several existing text-to-HTML filters, -> the single biggest source of inspiration for Markdown’s syntax is the format of plain text email. -> -> {{< style "text-align: right;" >}}-- _John Gruber_{{< /style >}} - -Without further delay, let us go over the main elements of Markdown and what the resulting HTML looks like! - -{{< admonition tip >}} -:(fa-regular fa-bookmark fa-fw): Bookmark this page for easy future reference! -{{< /admonition >}} - -## 1 Headings - -Headings from `h2` through `h6` are constructed with a `#` for each level: - -```markdown -## h2 Heading -### h3 Heading -#### h4 Heading -##### h5 Heading -###### h6 Heading -``` - -The HTML looks like this: - -```html -

h2 Heading

-

h3 Heading

-

h4 Heading

-
h5 Heading
-
h6 Heading
-``` - -{{< admonition note "Heading IDs" >}} -To add a custom heading ID, enclose the custom ID in curly braces on the same line as the heading: - -```markdown -### A Great Heading {#custom-id} -``` - -The HTML looks like this: - -```html -

A Great Heading

-``` -{{< /admonition >}} - -## 2 Comments - -Comments should be HTML compatible. - -```html - -``` - -Comment below should **NOT** be seen: - - - -## 3 Horizontal Rules - -The HTML `
` element is for creating a "thematic break" between paragraph-level elements. -In Markdown, you can create a `
` with any of the following: - -* `___`: three consecutive underscores -* `---`: three consecutive dashes -* `***`: three consecutive asterisks - -The rendered output looks like this: - -___ ---- -*** - -## 4 Body Copy - -Body copy written as normal, plain text will be wrapped with `

` tags in the rendered HTML. - -So this body copy: - -```markdown -Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus. Et legere ocurreret pri, -animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, -soluta officiis concludaturque ei qui, vide sensibus vim ad. -``` - -The HTML looks like this: - -```html -

Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus. Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad.

-``` - -A **line break** can be done with one blank line. - -## 5 Inline HTML - -If you need a certain HTML tag (with a class) you can simply use HTML: - -```html -Paragraph in Markdown. - -
- This is HTML -
- -Paragraph in Markdown. -``` - -## 6 Emphasis - -### Bold - -For emphasizing a snippet of text with a heavier font-weight. - -The following snippet of text is **rendered as bold text**. - -```markdown -**rendered as bold text** -__rendered as bold text__ -``` - -The HTML looks like this: - -```html -rendered as bold text -``` - -### Italics - -For emphasizing a snippet of text with italics. - -The following snippet of text is _rendered as italicized text_. - -```markdown -*rendered as italicized text* -_rendered as italicized text_ -``` - -The HTML looks like this: - -```html -rendered as italicized text -``` - -### Strikethrough - -In [[GFM]^(GitHub flavored Markdown)](https://github.github.com/gfm/) you can do strikethroughs. - -```markdown -~~Strike through this text.~~ -``` - -The rendered output looks like this: - -~~Strike through this text.~~ - -The HTML looks like this: - -```html -Strike through this text. -``` - -### Combination - -Bold, italics, and strikethrough can be used in combination. - -```markdown -***bold and italics*** -~~**strikethrough and bold**~~ -~~*strikethrough and italics*~~ -~~***bold, italics and strikethrough***~~ -``` - -The rendered output looks like this: - -***bold and italics*** - -~~**strikethrough and bold**~~ - -~~*strikethrough and italics*~~ - -~~***bold, italics and strikethrough***~~ - -The HTML looks like this: - -```html -bold and italics -strikethrough and bold -strikethrough and italics -bold, italics and strikethrough -``` - -## 7 Blockquotes - -For quoting blocks of content from another source within your document. - -Add `>` before any text you want to quote: - -```markdown -> **Fusion Drive** combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined. -``` - -The rendered output looks like this: - -> **Fusion Drive** combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined. - -The HTML looks like this: - -```html -
-

- Fusion Drive combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined. -

-
-``` - -Blockquotes can also be nested: - -```markdown -> Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue. -Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi. ->> Sed adipiscing elit vitae augue consectetur a gravida nunc vehicula. Donec auctor -odio non est accumsan facilisis. Aliquam id turpis in dolor tincidunt mollis ac eu diam. -``` - -The rendered output looks like this: - -> Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue. -Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi. ->> Sed adipiscing elit vitae augue consectetur a gravida nunc vehicula. Donec auctor -odio non est accumsan facilisis. Aliquam id turpis in dolor tincidunt mollis ac eu diam. - -## 8 Lists - -### Unordered - -A list of items in which the order of the items does not explicitly matter. - -You may use any of the following symbols to denote bullets for each list item: - -```markdown -* valid bullet -- valid bullet -+ valid bullet -``` - -For example: - -```markdown -* Lorem ipsum dolor sit amet -* Consectetur adipiscing elit -* Integer molestie lorem at massa -* Facilisis in pretium nisl aliquet -* Nulla volutpat aliquam velit - * Phasellus iaculis neque - * Purus sodales ultricies - * Vestibulum laoreet porttitor sem - * Ac tristique libero volutpat at -* Faucibus porta lacus fringilla vel -* Aenean sit amet erat nunc -* Eget porttitor lorem -``` - -The rendered output looks like this: - -* Lorem ipsum dolor sit amet -* Consectetur adipiscing elit -* Integer molestie lorem at massa -* Facilisis in pretium nisl aliquet -* Nulla volutpat aliquam velit - * Phasellus iaculis neque - * Purus sodales ultricies - * Vestibulum laoreet porttitor sem - * Ac tristique libero volutpat at -* Faucibus porta lacus fringilla vel -* Aenean sit amet erat nunc -* Eget porttitor lorem - -The HTML looks like this: - -```html - -``` - -### Ordered - -A list of items in which the order of items does explicitly matter. - -```markdown -1. Lorem ipsum dolor sit amet -2. Consectetur adipiscing elit -3. Integer molestie lorem at massa -4. Facilisis in pretium nisl aliquet -5. Nulla volutpat aliquam velit -6. Faucibus porta lacus fringilla vel -7. Aenean sit amet erat nunc -8. Eget porttitor lorem -``` - -The rendered output looks like this: - -1. Lorem ipsum dolor sit amet -2. Consectetur adipiscing elit -3. Integer molestie lorem at massa -4. Facilisis in pretium nisl aliquet -5. Nulla volutpat aliquam velit -6. Faucibus porta lacus fringilla vel -7. Aenean sit amet erat nunc -8. Eget porttitor lorem - -The HTML looks like this: - -```html -
    -
  1. Lorem ipsum dolor sit amet
  2. -
  3. Consectetur adipiscing elit
  4. -
  5. Integer molestie lorem at massa
  6. -
  7. Facilisis in pretium nisl aliquet
  8. -
  9. Nulla volutpat aliquam velit
  10. -
  11. Faucibus porta lacus fringilla vel
  12. -
  13. Aenean sit amet erat nunc
  14. -
  15. Eget porttitor lorem
  16. -
-``` - -{{< admonition tip >}} -If you just use `1.` for each number, Markdown will automatically number each item. For example: - -```markdown -1. Lorem ipsum dolor sit amet -1. Consectetur adipiscing elit -1. Integer molestie lorem at massa -1. Facilisis in pretium nisl aliquet -1. Nulla volutpat aliquam velit -1. Faucibus porta lacus fringilla vel -1. Aenean sit amet erat nunc -1. Eget porttitor lorem -``` - -The rendered output looks like this: - -1. Lorem ipsum dolor sit amet -1. Consectetur adipiscing elit -1. Integer molestie lorem at massa -1. Facilisis in pretium nisl aliquet -1. Nulla volutpat aliquam velit -1. Faucibus porta lacus fringilla vel -1. Aenean sit amet erat nunc -1. Eget porttitor lorem -{{< /admonition >}} - -### Task Lists - -Task lists allow you to create a list of items with checkboxes. To create a task list, add dashes (`-`) and brackets with a space (`[ ]`) before task list items. To select a checkbox, add an x in between the brackets (`[x]`). - -```markdown -- [x] Write the press release -- [ ] Update the website -- [ ] Contact the media -``` - -The rendered output looks like this: - -- [x] Write the press release -- [ ] Update the website -- [ ] Contact the media - -## 9 Code - -### Inline Code - -Wrap inline snippets of code with `. - -```markdown -In this example, `
` should be wrapped as **code**. -``` - -The rendered output looks like this: - -In this example, `
` should be wrapped as **code**. - -The HTML looks like this: - -```html -

- In this example, <section></section> should be wrapped with code. -

-``` - -### Indented Code - -Or indent several lines of code by at least four spaces, as in: - -```markdown - // Some comments - line 1 of code - line 2 of code - line 3 of code -``` - -The rendered output looks like this: - - // Some comments - line 1 of code - line 2 of code - line 3 of code - -The HTML looks like this: - -```html -
-  
-    // Some comments
-    line 1 of code
-    line 2 of code
-    line 3 of code
-  
-
-``` - -### Block Fenced Code - -Use "fences" ``` to block in multiple lines of code with a language attribute. - -{{< highlight markdown >}} -```markdown -Sample text here... -``` -{{< / highlight >}} - -The HTML looks like this: - -```html -
-  Sample text here...
-
-``` - -### Syntax Highlighting - -[GFM]^(GitHub Flavored Markdown) also supports syntax highlighting. - -To activate it, simply add the file extension of the language you want to use directly after the first code "fence", -```js, and syntax highlighting will automatically be applied in the rendered HTML. - -For example, to apply syntax highlighting to JavaScript code: - -{{< highlight markdown >}} -```js -grunt.initConfig({ - assemble: { - options: { - assets: 'docs/assets', - data: 'src/data/*.{json,yml}', - helpers: 'src/custom-helpers.js', - partials: ['src/partials/**/*.{hbs,md}'] - }, - pages: { - options: { - layout: 'default.hbs' - }, - files: { - './': ['src/templates/pages/index.hbs'] - } - } - } -}; -``` -{{< / highlight >}} - -The rendered output looks like this: - -```js -grunt.initConfig({ - assemble: { - options: { - assets: 'docs/assets', - data: 'src/data/*.{json,yml}', - helpers: 'src/custom-helpers.js', - partials: ['src/partials/**/*.{hbs,md}'] - }, - pages: { - options: { - layout: 'default.hbs' - }, - files: { - './': ['src/templates/pages/index.hbs'] - } - } - } -}; -``` - -{{< admonition >}} -[Syntax highlighting page](https://gohugo.io/content-management/syntax-highlighting/) in **Hugo** Docs introduces more about syntax highlighting, including highlight shortcode. -{{< /admonition >}} - -## 10 Tables - -Tables are created by adding pipes as dividers between each cell, and by adding a line of dashes (also separated by bars) beneath the header. Note that the pipes do not need to be vertically aligned. - -```markdown -| Option | Description | -| ------ | ----------- | -| data | path to data files to supply the data that will be passed into templates. | -| engine | engine to be used for processing templates. Handlebars is the default. | -| ext | extension to be used for dest files. | -``` - -The rendered output looks like this: - -| Option | Description | -| ------ | ----------- | -| data | path to data files to supply the data that will be passed into templates. | -| engine | engine to be used for processing templates. Handlebars is the default. | -| ext | extension to be used for dest files. | - -The HTML looks like this: - -```html - - - - - - - - - - - - - - - - - - - - - -
OptionDescription
datapath to data files to supply the data that will be passed into templates.
engineengine to be used for processing templates. Handlebars is the default.
extextension to be used for dest files.
-``` - -{{< admonition note "Right or center aligned text" >}} -Adding a colon on the right side of the dashes below any heading will right align text for that column. - -Adding colons on both sides of the dashes below any heading will center align text for that column. - -```markdown -| Option | Description | -|:------:| -----------:| -| data | path to data files to supply the data that will be passed into templates. | -| engine | engine to be used for processing templates. Handlebars is the default. | -| ext | extension to be used for dest files. | -``` - -The rendered output looks like this: - -| Option | Description | -|:------:| -----------:| -| data | path to data files to supply the data that will be passed into templates. | -| engine | engine to be used for processing templates. Handlebars is the default. | -| ext | extension to be used for dest files. | -{{< /admonition >}} - -## 11 Links {#links} - -### Basic Link - -```markdown - - -[Assemble](https://assemble.io) -``` - -The rendered output looks like this (hover over the link, there is no tooltip): - - - - - -[Assemble](https://assemble.io) - -The HTML looks like this: - -```html -https://assemble.io -contact@revolunet.com -Assemble -``` - -### Add a Title - -```markdown -[Upstage](https://github.com/upstage/ "Visit Upstage!") -``` - -The rendered output looks like this (hover over the link, there should be a tooltip): - -[Upstage](https://github.com/upstage/ "Visit Upstage!") - -The HTML looks like this: - -```html -Upstage -``` - -### Named Anchors - -Named anchors enable you to jump to the specified anchor point on the same page. For example, each of these chapters: - -```markdown -## Table of Contents - * [Chapter 1](#chapter-1) - * [Chapter 2](#chapter-2) - * [Chapter 3](#chapter-3) -``` - -will jump to these sections: - -```markdown -## Chapter 1 -Content for chapter one. - -## Chapter 2 -Content for chapter one. - -## Chapter 3 -Content for chapter one. -``` - -{{< admonition >}} -The specific placement of the anchor tag seems to be arbitrary. They are placed inline here since it seems to be unobtrusive, and it works. -{{< /admonition >}} - -## 12 Footnotes - -Footnotes allow you to add notes and references without cluttering the body of the document. When you create a footnote, a superscript number with a link appears where you added the footnote reference. Readers can click the link to jump to the content of the footnote at the bottom of the page. - -To create a footnote reference, add a caret and an identifier inside brackets (`[^1]`). Identifiers can be numbers or words, but they can’t contain spaces or tabs. Identifiers only correlate the footnote reference with the footnote itself — in the output, footnotes are numbered sequentially. - -Add the footnote using another caret and number inside brackets with a colon and text (`[^1]: My footnote.`). You don’t have to put footnotes at the end of the document. You can put them anywhere except inside other elements like lists, block quotes, and tables. - -```markdown -This is a digital footnote[^1]. -This is a footnote with "label"[^label] - -[^1]: This is a digital footnote -[^label]: This is a footnote with "label" -``` - -This is a digital footnote[^1]. - -This is a footnote with "label"[^label] - -[^1]: This is a digital footnote -[^label]: This is a footnote with "label" - -## 13 Images - -Images have a similar syntax to links but include a preceding exclamation point. - -```markdown -![Minion](https://octodex.github.com/images/minion.png) -``` - -![Minion](https://octodex.github.com/images/minion.png) - -or: - -```markdown -![Alt text](https://octodex.github.com/images/stormtroopocat.jpg "The Stormtroopocat") -``` - -![Alt text](https://octodex.github.com/images/stormtroopocat.jpg "The Stormtroopocat") - -Like links, images also have a footnote style syntax: - -```markdown -![Alt text][id] -``` - -![Alt text][id] - -With a reference later in the document defining the URL location: - -```markdown -[id]: https://octodex.github.com/images/dojocat.jpg "The Dojocat" -``` - -[id]: https://octodex.github.com/images/dojocat.jpg "The Dojocat" - -{{< admonition tip >}} -**FixIt** theme has [special shortcode for image](../theme-documentation-extended-shortcodes#image), which provides more features. -{{< /admonition >}} diff --git a/exampleSite/content/posts/basic-markdown-syntax/index.zh-cn.md b/exampleSite/content/posts/basic-markdown-syntax/index.zh-cn.md deleted file mode 100644 index f00b5ae0..00000000 --- a/exampleSite/content/posts/basic-markdown-syntax/index.zh-cn.md +++ /dev/null @@ -1,770 +0,0 @@ ---- -title: "Markdown 基本语法" -date: 2021-12-18T16:15:22+08:00 -draft: false -description: "这篇文章展示了基本的 Markdown 语法和格式。" -resources: -- name: "featured-image" - src: "featured-image.png" - -tags: ["Markdown", "HTML"] -categories: ["Markdown"] - -lightgallery: true - -repost: - enable: true - url: "https://hugoloveit.com/zh-cn/basic-markdown-syntax/" ---- - -这篇文章提供了可以在 Hugo 的文章中使用的基本 Markdown 语法示例。 - - - -{{< admonition >}} -这篇文章借鉴了一篇很棒的 [来自 Grav 的文章](http://learn.getgrav.org/content/markdown)。 - -如果你想了解 **FixIt** 主题的扩展 Markdown 语法,请阅读 [扩展 Markdown 语法页面](../theme-documentation-content#extended-markdown-syntax)。 -{{< /admonition >}} - -事实上,编写 Web 内容很麻烦。[WYSIWYG]^(所见即所得) 编辑器帮助减轻了这一任务。但通常会导致代码太糟,或更糟糕的是,网页也会很丑。 - -没有通常伴随的所有复杂和丑陋的问题,**Markdown** 是一种更好的生成 **HTML** 内容的方式。 - -一些主要好处是: - -1. Markdown 简单易学,几乎没有多余的字符,因此编写内容也更快。 -2. 用 Markdown 书写时出错的机会更少。 -3. 可以产生有效的 XHTML 输出。 -4. 将内容和视觉显示保持分开,这样就不会打乱网站的外观。 -5. 可以在你喜欢的任何文本编辑器或 Markdown 应用程序中编写内容。 -6. Markdown 使用起来很有趣! - -John Gruber, Markdown 的作者如是说: - -> Markdown 格式的首要设计目标是更具可读性。 -> 最初的想法是 Markdown 格式的文档应当以纯文本形式发布, -> 而不会看起来像被标签或格式说明所标记。 -> 虽然 Markdown 的语法受到几种现有的文本到 HTML 转换工具的影响, -> 但 Markdown 语法的最大灵感来源是纯文本电子邮件的格式。 -> -> {{< style "text-align: right;" >}}-- _John Gruber_{{< /style >}} - -话不多说,我们来回顾一下 Markdown 的主要语法以及生成的 HTML 样式! - -{{< admonition tip >}} -:(fa-regular fa-bookmark fa-fw): 将此页保存为书签,以备将来参考! -{{< /admonition >}} - -## 1 标题 - -从 `h2` 到 `h6` 的标题在每个级别上都加上一个 `#`: - -```markdown -## h2 标题 -### h3 标题 -#### h4 标题 -##### h5 标题 -###### h6 标题 -``` - -输出的 HTML 看起来像这样: - -```html -

h2 标题

-

h3 标题

-

h4 标题

-
h5 标题
-
h6 标题
-``` - -{{< admonition note "标题 ID" >}} -要添加自定义标题 ID, 请在与标题相同的行中将自定义 ID 放在花括号中: - -```markdown -### 一个很棒的标题 {#custom-id} -``` - -输出的 HTML 看起来像这样: - -```html -

一个很棒的标题

-``` -{{< /admonition >}} - -## 2 注释 - -注释是和 HTML 兼容的: - -```html - -``` - -**不能**看到以下的注释: - - - -## 3 水平线 - -HTML 中的 `
` 标签是用来在段落元素之间创建一个 "专题间隔" 的。 -使用 Markdown, 你可以用以下方式创建一个 `
` 标签: - -* `___`: 三个连续的下划线 -* `---`: 三个连续的破折号 -* `***`: 三个连续的星号 - -呈现的输出效果如下: - -___ ---- -*** - -## 4 段落 - -按照纯文本的方式书写段落,纯文本在呈现的 HTML 中将用 `

`/`

` 标签包裹。 - -如下段落: - -```markdown -Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus. Et legere ocurreret pri, -animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, -soluta officiis concludaturque ei qui, vide sensibus vim ad. -``` - -输出的 HTML 看起来像这样: - -```html -

Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus. Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad.

-``` - -可以使用一个空白行进行**换行**. - -## 5 内联 HTML 元素 - -如果你需要某个 HTML 标签 (带有一个类), 则可以简单地像这样使用: - -```html -Markdown 格式的段落。 - -
- 这是 HTML -
- -Markdown 格式的段落。 -``` - -## 6 强调 - -### 加粗 - -用于强调带有较粗字体的文本片段。 - -以下文本片段会被 **渲染为粗体**. - -```markdown -**渲染为粗体** -__渲染为粗体__ -``` - -输出的 HTML 看起来像这样: - -```html -渲染为粗体 -``` - -### 斜体 - -用于强调带有斜体的文本片段。 - -以下文本片段被 _渲染为斜体_。 - -```markdown -*渲染为斜体* -_渲染为斜体_ -``` - -输出的 HTML 看起来像这样: - -```html -渲染为斜体 -``` - -### 删除线 - -按照 [[GFM]^(GitHub flavored Markdown)](https://github.github.com/gfm/) 你可以使用删除线。 - -```markdown -~~这段文本带有删除线。~~ -``` - -呈现的输出效果如下: - -~~这段文本带有删除线。~~ - -输出的 HTML 看起来像这样: - -```html -这段文本带有删除线。 -``` - -### 组合 - -加粗,斜体,和删除线可以 组合使用。 - -```markdown -***加粗和斜体*** -~~**删除线和加粗**~~ -~~*删除线和斜体*~~ -~~***加粗,斜体和删除线***~~ -``` - -呈现的输出效果如下: - -***加粗和斜体*** - -~~**删除线和加粗**~~ - -~~*删除线和斜体*~~ - -~~***加粗,斜体和删除线***~~ - -输出的 HTML 看起来像这样: - -```html -加粗和斜体 -删除线和加粗 -删除线和斜体 -加粗,斜体和删除线 -``` - -## 7 引用 - -用于在文档中引用其他来源的内容块。 - -在要引用的任何文本之前添加 `>`: - -```markdown -> **Fusion Drive** combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined. -``` - -呈现的输出效果如下: - -> **Fusion Drive** combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined. - -输出的 HTML 看起来像这样: - -```html -
-

- Fusion Drive combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined. -

-
-``` - -引用也可以嵌套: - -```markdown -> Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue. -Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi. ->> Sed adipiscing elit vitae augue consectetur a gravida nunc vehicula. Donec auctor -odio non est accumsan facilisis. Aliquam id turpis in dolor tincidunt mollis ac eu diam. -``` - -呈现的输出效果如下: - -> Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue. -Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi. ->> Sed adipiscing elit vitae augue consectetur a gravida nunc vehicula. Donec auctor -odio non est accumsan facilisis. Aliquam id turpis in dolor tincidunt mollis ac eu diam. - -## 8 列表 - -### 无序列表 - -一系列项的列表,其中项的顺序没有明显关系。 - -你可以使用以下任何符号来表示无序列表中的项: - -```markdown -* 一项内容 -- 一项内容 -+ 一项内容 -``` - -例如: - -```markdown -* Lorem ipsum dolor sit amet -* Consectetur adipiscing elit -* Integer molestie lorem at massa -* Facilisis in pretium nisl aliquet -* Nulla volutpat aliquam velit - * Phasellus iaculis neque - * Purus sodales ultricies - * Vestibulum laoreet porttitor sem - * Ac tristique libero volutpat at -* Faucibus porta lacus fringilla vel -* Aenean sit amet erat nunc -* Eget porttitor lorem -``` - -呈现的输出效果如下: - -* Lorem ipsum dolor sit amet -* Consectetur adipiscing elit -* Integer molestie lorem at massa -* Facilisis in pretium nisl aliquet -* Nulla volutpat aliquam velit - * Phasellus iaculis neque - * Purus sodales ultricies - * Vestibulum laoreet porttitor sem - * Ac tristique libero volutpat at -* Faucibus porta lacus fringilla vel -* Aenean sit amet erat nunc -* Eget porttitor lorem - -输出的 HTML 看起来像这样: - -```html -
    -
  • Lorem ipsum dolor sit amet
  • -
  • Consectetur adipiscing elit
  • -
  • Integer molestie lorem at massa
  • -
  • Facilisis in pretium nisl aliquet
  • -
  • Nulla volutpat aliquam velit -
      -
    • Phasellus iaculis neque
    • -
    • Purus sodales ultricies
    • -
    • Vestibulum laoreet porttitor sem
    • -
    • Ac tristique libero volutpat at
    • -
    -
  • -
  • Faucibus porta lacus fringilla vel
  • -
  • Aenean sit amet erat nunc
  • -
  • Eget porttitor lorem
  • -
-``` - -### 有序列表 - -一系列项的列表,其中项的顺序确实很重要。 - -```markdown -1. Lorem ipsum dolor sit amet -2. Consectetur adipiscing elit -3. Integer molestie lorem at massa -4. Facilisis in pretium nisl aliquet -5. Nulla volutpat aliquam velit -6. Faucibus porta lacus fringilla vel -7. Aenean sit amet erat nunc -8. Eget porttitor lorem -``` - -呈现的输出效果如下: - -1. Lorem ipsum dolor sit amet -2. Consectetur adipiscing elit -3. Integer molestie lorem at massa -4. Facilisis in pretium nisl aliquet -5. Nulla volutpat aliquam velit -6. Faucibus porta lacus fringilla vel -7. Aenean sit amet erat nunc -8. Eget porttitor lorem - -输出的 HTML 看起来像这样: - -```html -
    -
  1. Lorem ipsum dolor sit amet
  2. -
  3. Consectetur adipiscing elit
  4. -
  5. Integer molestie lorem at massa
  6. -
  7. Facilisis in pretium nisl aliquet
  8. -
  9. Nulla volutpat aliquam velit
  10. -
  11. Faucibus porta lacus fringilla vel
  12. -
  13. Aenean sit amet erat nunc
  14. -
  15. Eget porttitor lorem
  16. -
-``` - -{{< admonition tip >}} -如果你对每一项使用 `1.`, Markdown 将自动为每一项编号。例如: - -```markdown -1. Lorem ipsum dolor sit amet -1. Consectetur adipiscing elit -1. Integer molestie lorem at massa -1. Facilisis in pretium nisl aliquet -1. Nulla volutpat aliquam velit -1. Faucibus porta lacus fringilla vel -1. Aenean sit amet erat nunc -1. Eget porttitor lorem -``` - -呈现的输出效果如下: - -1. Lorem ipsum dolor sit amet -1. Consectetur adipiscing elit -1. Integer molestie lorem at massa -1. Facilisis in pretium nisl aliquet -1. Nulla volutpat aliquam velit -1. Faucibus porta lacus fringilla vel -1. Aenean sit amet erat nunc -1. Eget porttitor lorem -{{< /admonition >}} - -### 任务列表 - -任务列表使你可以创建带有复选框的列表。 -要创建任务列表,请在任务列表项之前添加破折号 (`-`) 和带有空格的方括号 (`[ ]`),要选择一个复选框,请在方括号之间添加 x (`[x]`)。 - -```markdown -- [x] Write the press release -- [ ] Update the website -- [ ] Contact the media -``` - -呈现的输出效果如下: - -- [x] Write the press release -- [ ] Update the website -- [ ] Contact the media - -## 9 代码 - -### 行内代码 - -用 ` 包装行内代码段。 - -```markdown -在这个例子中,`
` 会被包裹成 **代码**。 -``` - -呈现的输出效果如下: - -在这个例子中,`
` 会被包裹成 **代码**。 - -输出的 HTML 看起来像这样: - -```html -

- 在这个例子中,<section></section> 会被包裹成 代码。 -

-``` - -### 缩进代码 - -将几行代码缩进至少四个空格,例如: - -```markdown - // Some comments - line 1 of code - line 2 of code - line 3 of code -``` - -呈现的输出效果如下: - - // Some comments - line 1 of code - line 2 of code - line 3 of code - -输出的 HTML 看起来像这样: - -```html -
-  
-    // Some comments
-    line 1 of code
-    line 2 of code
-    line 3 of code
-  
-
-``` - -### 围栏代码块 - -使用 "围栏" ``` 来生成一段带有语言属性的代码块。 - -{{< highlight markdown >}} -```markdown -Sample text here... -``` -{{< / highlight >}} - -输出的 HTML 看起来像这样: - -```html -
-  Sample text here...
-
-``` - -### 语法高亮 - -[GFM]^(GitHub Flavored Markdown) 也支持语法高亮。 - -要激活它,只需在第一个代码 "围栏" 之后直接添加你要使用的语言的文件扩展名, -```js, 语法高亮显示将自动应用于渲染的 HTML 中。 - -例如,在以下 JavaScript 代码中应用语法高亮: - -{{< highlight markdown >}} -```js -grunt.initConfig({ - assemble: { - options: { - assets: 'docs/assets', - data: 'src/data/*.{json,yml}', - helpers: 'src/custom-helpers.js', - partials: ['src/partials/**/*.{hbs,md}'] - }, - pages: { - options: { - layout: 'default.hbs' - }, - files: { - './': ['src/templates/pages/index.hbs'] - } - } - } -}; -``` -{{< / highlight >}} - -呈现的输出效果如下: - -```js -grunt.initConfig({ - assemble: { - options: { - assets: 'docs/assets', - data: 'src/data/*.{json,yml}', - helpers: 'src/custom-helpers.js', - partials: ['src/partials/**/*.{hbs,md}'] - }, - pages: { - options: { - layout: 'default.hbs' - }, - files: { - './': ['src/templates/pages/index.hbs'] - } - } - } -}; -``` - -{{< admonition >}} -**Hugo** 文档中的 [语法高亮页面](https://gohugo.io/content-management/syntax-highlighting/) 介绍了有关语法高亮的更多信息, -包括语法高亮的 shortcode。 -{{< /admonition >}} - -## 10 表格 - -通过在每个单元格之间添加竖线作为分隔线,并在标题下添加一行破折号 (也由竖线分隔) 来创建表格。注意,竖线不需要垂直对齐。 - -```markdown -| Option | Description | -| ------ | ----------- | -| data | path to data files to supply the data that will be passed into templates. | -| engine | engine to be used for processing templates. Handlebars is the default. | -| ext | extension to be used for dest files. | -``` - -呈现的输出效果如下: - -| Option | Description | -| ------ | ----------- | -| data | path to data files to supply the data that will be passed into templates. | -| engine | engine to be used for processing templates. Handlebars is the default. | -| ext | extension to be used for dest files. | - -输出的 HTML 看起来像这样: - -```html - - - - - - - - - - - - - - - - - - - - - -
OptionDescription
datapath to data files to supply the data that will be passed into templates.
engineengine to be used for processing templates. Handlebars is the default.
extextension to be used for dest files.
-``` - -{{< admonition note "文本右对齐或居中对齐" >}} -在任何标题下方的破折号右侧添加冒号将使该列的文本右对齐。 - -在任何标题下方的破折号两边添加冒号将使该列的对齐文本居中。 - -```markdown -| Option | Description | -|:------:| -----------:| -| data | path to data files to supply the data that will be passed into templates. | -| engine | engine to be used for processing templates. Handlebars is the default. | -| ext | extension to be used for dest files. | -``` - -呈现的输出效果如下: - -| Option | Description | -|:------:| -----------:| -| data | path to data files to supply the data that will be passed into templates. | -| engine | engine to be used for processing templates. Handlebars is the default. | -| ext | extension to be used for dest files. | -{{< /admonition >}} - -## 11 链接 {#links} - -### 基本链接 - -```markdown - - -[Assemble](https://assemble.io) -``` - -呈现的输出效果如下 (将鼠标悬停在链接上,没有提示): - - - - - -[Assemble](https://assemble.io) - -输出的 HTML 看起来像这样: - -```html -https://assemble.io -contact@revolunet.com -Assemble -``` - -### 添加一个标题 - -```markdown -[Upstage](https://github.com/upstage/ "Visit Upstage!") -``` - -呈现的输出效果如下 (将鼠标悬停在链接上,会有一行提示): - -[Upstage](https://github.com/upstage/ "Visit Upstage!") - -输出的 HTML 看起来像这样: - -```html -Upstage -``` - -### 定位标记 - -定位标记使你可以跳至同一页面上的指定锚点。例如,每个章节: - -```markdown -## Table of Contents - * [Chapter 1](#chapter-1) - * [Chapter 2](#chapter-2) - * [Chapter 3](#chapter-3) -``` - -将跳转到这些部分: - -```markdown -## Chapter 1 -Content for chapter one. - -## Chapter 2 -Content for chapter one. - -## Chapter 3 -Content for chapter one. -``` - -{{< admonition >}} -定位标记的位置几乎是任意的。因为它们并不引人注目,所以它们通常被放在同一行了。 -{{< /admonition >}} - -## 12 脚注 - -脚注使你可以添加注释和参考,而不会使文档正文混乱。 -当你创建脚注时,会在添加脚注引用的位置出现带有链接的上标编号。 -读者可以单击链接以跳至页面底部的脚注内容。 - -要创建脚注引用,请在方括号中添加插入符号和标识符 (`[^1]`)。 -标识符可以是数字或单词,但不能包含空格或制表符。 -标识符仅将脚注引用与脚注本身相关联 - 在脚注输出中,脚注按顺序编号。 - -在中括号内使用插入符号和数字以及用冒号和文本来添加脚注内容 (`[^1]:这是一段脚注`)。 -你不一定要在文档末尾添加脚注。可以将它们放在除列表,引用和表格等元素之外的任何位置。 - -```markdown -这是一个数字脚注 [^1] -这是一个带标签的脚注 [^label] - -[^1]: 这是一个数字脚注 -[^label]: 这是一个带标签的脚注 -``` - -这是一个数字脚注 [^1] - -这是一个带标签的脚注 [^label] - -[^1]: 这是一个数字脚注 -[^label]: 这是一个带标签的脚注 - -## 13 图片 - -图片的语法与链接相似,但包含一个在前面的感叹号。 - -```markdown -![Minion](https://octodex.github.com/images/minion.png) -``` - -![Minion](https://octodex.github.com/images/minion.png) - -或者: - -```markdown -![Alt text](https://octodex.github.com/images/stormtroopocat.jpg "The Stormtroopocat") -``` - -![Alt text](https://octodex.github.com/images/stormtroopocat.jpg "The Stormtroopocat") - -像链接一样,图片也具有脚注样式的语法: - -```markdown -![Alt text][id] -``` - -![Alt text][id] - -稍后在文档中提供参考内容,用来定义 URL 的位置: - -```markdown -[id]: https://octodex.github.com/images/dojocat.jpg "The Dojocat" -``` - -[id]: https://octodex.github.com/images/dojocat.jpg "The Dojocat" - -{{< admonition tip >}} -**FixIt** 主题提供了一个包含更多功能的 [图片的 shortcode](../theme-documentation-extended-shortcodes#image). -{{< /admonition >}} diff --git a/exampleSite/content/posts/emoji-support/featured-image.jpg b/exampleSite/content/posts/emoji-support/featured-image.jpg deleted file mode 100644 index 5758440e..00000000 Binary files a/exampleSite/content/posts/emoji-support/featured-image.jpg and /dev/null differ diff --git a/exampleSite/content/posts/emoji-support/index.en.md b/exampleSite/content/posts/emoji-support/index.en.md deleted file mode 100644 index 09fbdc70..00000000 --- a/exampleSite/content/posts/emoji-support/index.en.md +++ /dev/null @@ -1,1282 +0,0 @@ ---- -title: "Emoji Support" -date: 2019-10-01T17:55:28+08:00 -lastmod: 2019-10-01T17:55:28+08:00 -draft: false -author: "Dillon" -authorLink: "https://dillonzq.com" -description: "Guide to emoji usage in Hugo and FixIt." -resources: -- name: "featured-image" - src: "featured-image.jpg" - -tags: ["emoji"] -categories: ["Markdown"] - -lightgallery: true ---- - -Emoji can be enabled in a Hugo project in a number of ways. - - - -The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates#inline-shortcodes). - -To enable emoji globally, set `enableEmoji` to `true` in your [site configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files. - -These begin and end with a **colon** and include the **code** of an emoji: - -```markdown -Gone camping! {?:}tent: Be back soon. - -That is so funny! {?:}joy: -``` - -The rendered output looks like this: - -Gone camping! :tent: Be back soon. - -That is so funny! :joy: - -The following **cheat sheet** is a useful reference for emoji shorthand codes. - -## Smileys & Emotion - -### Face Smiling - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :grinning: | `grinning` | :smiley: | `smiley` | -| :smile: | `smile` | :grin: | `grin` | -| :laughing: | `laughing`
`satisfied` | :sweat_smile: | `sweat_smile` | -| :rofl: | `rofl` | :joy: | `joy` | -| :slightly_smiling_face: | `slightly_smiling_face` | :upside_down_face: | `upside_down_face` | -| :wink: | `wink` | :blush: | `blush` | -| :innocent: | `innocent` | | | - -### Face Affection - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :heart_eyes: | `heart_eyes` | :kissing_heart: | `kissing_heart` | -| :kissing: | `kissing` | :relaxed: | `relaxed` | -| :kissing_closed_eyes: | `kissing_closed_eyes` | :kissing_smiling_eyes: | `kissing_smiling_eyes` | - -### Face Tongue - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :yum: | `yum` | :stuck_out_tongue: | `stuck_out_tongue` | -| :stuck_out_tongue_winking_eye: | `stuck_out_tongue_winking_eye` | :stuck_out_tongue_closed_eyes: | `stuck_out_tongue_closed_eyes` | -| :money_mouth_face: | `money_mouth_face` | | | - -### Face Hand - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :hugs: | `hugs` | :thinking: | `thinking` | - -### Face Neutral Skeptical - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :zipper_mouth_face: | `zipper_mouth_face` | :neutral_face: | `neutral_face` | -| :expressionless: | `expressionless` | :no_mouth: | `no_mouth` | -| :smirk: | `smirk` | :unamused: | `unamused` | -| :roll_eyes: | `roll_eyes` | :grimacing: | `grimacing` | -| :lying_face: | `lying_face` | | | - -### Face Sleepy - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :relieved: | `relieved` | :pensive: | `pensive` | -| :sleepy: | `sleepy` | :drooling_face: | `drooling_face` | -| :sleeping: | `sleeping` | | | - -### Face Unwell - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :mask: | `mask` | :face_with_thermometer: | `face_with_thermometer` | -| :face_with_head_bandage: | `face_with_head_bandage` | :nauseated_face: | `nauseated_face` | -| :sneezing_face: | `sneezing_face` | :dizzy_face: | `dizzy_face` | - -### Face Hat - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :cowboy_hat_face: | `cowboy_hat_face` | | | - -### Face Glasses - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :sunglasses: | `sunglasses` | :nerd_face: | `nerd_face` | - -### Face Concerned - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :confused: | `confused` | :worried: | `worried` | -| :slightly_frowning_face: | `slightly_frowning_face` | :frowning_face: | `frowning_face` | -| :open_mouth: | `open_mouth` | :hushed: | `hushed` | -| :astonished: | `astonished` | :flushed: | `flushed` | -| :frowning: | `frowning` | :anguished: | `anguished` | -| :fearful: | `fearful` | :cold_sweat: | `cold_sweat` | -| :disappointed_relieved: | `disappointed_relieved` | :cry: | `cry` | -| :sob: | `sob` | :scream: | `scream` | -| :confounded: | `confounded` | :persevere: | `persevere` | -| :disappointed: | `disappointed` | :sweat: | `sweat` | -| :weary: | `weary` | :tired_face: | `tired_face` | - -### Face Negative - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :triumph: | `triumph` | :pout: | `pout`
`rage` | -| :angry: | `angry` | :smiling_imp: | `smiling_imp` | -| :imp: | `imp` | :skull: | `skull` | -| :skull_and_crossbones: | `skull_and_crossbones` | | | - -### Face Costume - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :hankey: | `hankey`
`poop`
`shit` | :clown_face: | `clown_face` | -| :japanese_ogre: | `japanese_ogre` | :japanese_goblin: | `japanese_goblin` | -| :ghost: | `ghost` | :alien: | `alien` | -| :space_invader: | `space_invader` | :robot: | `robot` | - -### Cat Face - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :smiley_cat: | `smiley_cat` | :smile_cat: | `smile_cat` | -| :joy_cat: | `joy_cat` | :heart_eyes_cat: | `heart_eyes_cat` | -| :smirk_cat: | `smirk_cat` | :kissing_cat: | `kissing_cat` | -| :scream_cat: | `scream_cat` | :crying_cat_face: | `crying_cat_face` | -| :pouting_cat: | `pouting_cat` | | | - -### Monkey Face - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :see_no_evil: | `see_no_evil` | :hear_no_evil: | `hear_no_evil` | -| :speak_no_evil: | `speak_no_evil` | | | - -### Emotion - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :kiss: | `kiss` | :love_letter: | `love_letter` | -| :cupid: | `cupid` | :gift_heart: | `gift_heart` | -| :sparkling_heart: | `sparkling_heart` | :heartpulse: | `heartpulse` | -| :heartbeat: | `heartbeat` | :revolving_hearts: | `revolving_hearts` | -| :two_hearts: | `two_hearts` | :heart_decoration: | `heart_decoration` | -| :heavy_heart_exclamation: | `heavy_heart_exclamation` | :broken_heart: | `broken_heart` | -| :heart: | `heart` | :yellow_heart: | `yellow_heart` | -| :green_heart: | `green_heart` | :blue_heart: | `blue_heart` | -| :purple_heart: | `purple_heart` | :black_heart: | `black_heart` | -| :100: | `100` | :anger: | `anger` | -| :boom: | `boom`
`collision` | :dizzy: | `dizzy` | -| :sweat_drops: | `sweat_drops` | :dash: | `dash` | -| :hole: | `hole` | :bomb: | `bomb` | -| :speech_balloon: | `speech_balloon` | :eye_speech_bubble: | `eye_speech_bubble` | -| :right_anger_bubble: | `right_anger_bubble` | :thought_balloon: | `thought_balloon` | -| :zzz: | `zzz` | | | - -## People & Body - -### Hand Fingers Open - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :wave: | `wave` | :raised_back_of_hand: | `raised_back_of_hand` | -| :raised_hand_with_fingers_splayed: | `raised_hand_with_fingers_splayed` | :hand: | `hand`
`raised_hand` | -| :vulcan_salute: | `vulcan_salute` | | | - -### Hand Fingers Partial - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :ok_hand: | `ok_hand` | :v: | `v` | -| :crossed_fingers: | `crossed_fingers` | :metal: | `metal` | -| :call_me_hand: | `call_me_hand` | | | - -### Hand Single Finger - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :point_left: | `point_left` | :point_right: | `point_right` | -| :point_up_2: | `point_up_2` | :fu: | `fu`
`middle_finger` | -| :point_down: | `point_down` | :point_up: | `point_up` | - -### Hand Fingers Closed - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :+1: | `+1`
`thumbsup` | :-1: | `-1`
`thumbsdown` | -| :fist: | `fist`
`fist_raised` | :facepunch: | `facepunch`
`fist_oncoming`
`punch` | -| :fist_left: | `fist_left` | :fist_right: | `fist_right` | - -### Hands - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :clap: | `clap` | :raised_hands: | `raised_hands` | -| :open_hands: | `open_hands` | :handshake: | `handshake` | -| :pray: | `pray` | | | - -### Hand Prop - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :writing_hand: | `writing_hand` | :nail_care: | `nail_care` | -| :selfie: | `selfie` | | | - -### Body Parts - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :muscle: | `muscle` | :ear: | `ear` | -| :nose: | `nose` | :eyes: | `eyes` | -| :eye: | `eye` | :tongue: | `tongue` | -| :lips: | `lips` | | | - -### Person - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :baby: | `baby` | :boy: | `boy` | -| :girl: | `girl` | :blonde_man: | `blonde_man`
`person_with_blond_hair` | -| :man: | `man` | :woman: | `woman` | -| :blonde_woman: | `blonde_woman` | :older_man: | `older_man` | -| :older_woman: | `older_woman` | | | - -### Person Gesture - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :frowning_woman: | `frowning_woman`
`person_frowning` | :frowning_man: | `frowning_man` | -| :person_with_pouting_face: | `person_with_pouting_face`
`pouting_woman` | :pouting_man: | `pouting_man` | -| :ng_woman: | `ng_woman`
`no_good`
`no_good_woman` | :ng_man: | `ng_man`
`no_good_man` | -| :ok_woman: | `ok_woman` | :ok_man: | `ok_man` | -| :information_desk_person: | `information_desk_person`
`sassy_woman`
`tipping_hand_woman` | :sassy_man: | `sassy_man`
`tipping_hand_man` | -| :raising_hand: | `raising_hand`
`raising_hand_woman` | :raising_hand_man: | `raising_hand_man` | -| :bow: | `bow`
`bowing_man` | :bowing_woman: | `bowing_woman` | -| :man_facepalming: | `man_facepalming` | :woman_facepalming: | `woman_facepalming` | -| :man_shrugging: | `man_shrugging` | :woman_shrugging: | `woman_shrugging` | - -### Person Role - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :man_health_worker: | `man_health_worker` | :woman_health_worker: | `woman_health_worker` | -| :man_student: | `man_student` | :woman_student: | `woman_student` | -| :man_teacher: | `man_teacher` | :woman_teacher: | `woman_teacher` | -| :man_judge: | `man_judge` | :woman_judge: | `woman_judge` | -| :man_farmer: | `man_farmer` | :woman_farmer: | `woman_farmer` | -| :man_cook: | `man_cook` | :woman_cook: | `woman_cook` | -| :man_mechanic: | `man_mechanic` | :woman_mechanic: | `woman_mechanic` | -| :man_factory_worker: | `man_factory_worker` | :woman_factory_worker: | `woman_factory_worker` | -| :man_office_worker: | `man_office_worker` | :woman_office_worker: | `woman_office_worker` | -| :man_scientist: | `man_scientist` | :woman_scientist: | `woman_scientist` | -| :man_technologist: | `man_technologist` | :woman_technologist: | `woman_technologist` | -| :man_singer: | `man_singer` | :woman_singer: | `woman_singer` | -| :man_artist: | `man_artist` | :woman_artist: | `woman_artist` | -| :man_pilot: | `man_pilot` | :woman_pilot: | `woman_pilot` | -| :man_astronaut: | `man_astronaut` | :woman_astronaut: | `woman_astronaut` | -| :man_firefighter: | `man_firefighter` | :woman_firefighter: | `woman_firefighter` | -| :cop: | `cop`
`policeman` | :policewoman: | `policewoman` | -| :detective: | `detective`
`male_detective` | :female_detective: | `female_detective` | -| :guardsman: | `guardsman` | :guardswoman: | `guardswoman` | -| :construction_worker: | `construction_worker`
`construction_worker_man` | :construction_worker_woman: | `construction_worker_woman` | -| :prince: | `prince` | :princess: | `princess` | -| :man_with_turban: | `man_with_turban` | :woman_with_turban: | `woman_with_turban` | -| :man_with_gua_pi_mao: | `man_with_gua_pi_mao` | :man_in_tuxedo: | `man_in_tuxedo` | -| :bride_with_veil: | `bride_with_veil` | :pregnant_woman: | `pregnant_woman` | - -### Person Fantasy - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :angel: | `angel` | :santa: | `santa` | -| :mrs_claus: | `mrs_claus` | | | - -### Person Activity - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :massage: | `massage`
`massage_woman` | :massage_man: | `massage_man` | -| :haircut: | `haircut`
`haircut_woman` | :haircut_man: | `haircut_man` | -| :walking: | `walking`
`walking_man` | :walking_woman: | `walking_woman` | -| :runner: | `runner`
`running`
`running_man` | :running_woman: | `running_woman` | -| :dancer: | `dancer` | :man_dancing: | `man_dancing` | -| :business_suit_levitating: | `business_suit_levitating` | :dancers: | `dancers`
`dancing_women` | -| :dancing_men: | `dancing_men` | | | - -### Person Sport - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :person_fencing: | `person_fencing` | :horse_racing: | `horse_racing` | -| :skier: | `skier` | :snowboarder: | `snowboarder` | -| :golfing_man: | `golfing_man` | :golfing_woman: | `golfing_woman` | -| :surfer: | `surfer`
`surfing_man` | :surfing_woman: | `surfing_woman` | -| :rowboat: | `rowboat`
`rowing_man` | :rowing_woman: | `rowing_woman` | -| :swimmer: | `swimmer`
`swimming_man` | :swimming_woman: | `swimming_woman` | -| :basketball_man: | `basketball_man` | :basketball_woman: | `basketball_woman` | -| :weight_lifting_man: | `weight_lifting_man` | :weight_lifting_woman: | `weight_lifting_woman` | -| :bicyclist: | `bicyclist`
`biking_man` | :biking_woman: | `biking_woman` | -| :mountain_bicyclist: | `mountain_bicyclist`
`mountain_biking_man` | :mountain_biking_woman: | `mountain_biking_woman` | -| :man_cartwheeling: | `man_cartwheeling` | :woman_cartwheeling: | `woman_cartwheeling` | -| :men_wrestling: | `men_wrestling` | :women_wrestling: | `women_wrestling` | -| :man_playing_water_polo: | `man_playing_water_polo` | :woman_playing_water_polo: | `woman_playing_water_polo` | -| :man_playing_handball: | `man_playing_handball` | :woman_playing_handball: | `woman_playing_handball` | -| :man_juggling: | `man_juggling` | :woman_juggling: | `woman_juggling` | - -### Person Resting - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :bath: | `bath` | :sleeping_bed: | `sleeping_bed` | - -### Family - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :two_women_holding_hands: | `two_women_holding_hands` | :couple: | `couple` | -| :two_men_holding_hands: | `two_men_holding_hands` | :couplekiss_man_woman: | `couplekiss_man_woman` | -| :couplekiss_man_man: | `couplekiss_man_man` | :couplekiss_woman_woman: | `couplekiss_woman_woman` | -| :couple_with_heart: | `couple_with_heart`
`couple_with_heart_woman_man` | :couple_with_heart_man_man: | `couple_with_heart_man_man` | -| :couple_with_heart_woman_woman: | `couple_with_heart_woman_woman` | :family: | `family`
`family_man_woman_boy` | -| :family_man_woman_girl: | `family_man_woman_girl` | :family_man_woman_girl_boy: | `family_man_woman_girl_boy` | -| :family_man_woman_boy_boy: | `family_man_woman_boy_boy` | :family_man_woman_girl_girl: | `family_man_woman_girl_girl` | -| :family_man_man_boy: | `family_man_man_boy` | :family_man_man_girl: | `family_man_man_girl` | -| :family_man_man_girl_boy: | `family_man_man_girl_boy` | :family_man_man_boy_boy: | `family_man_man_boy_boy` | -| :family_man_man_girl_girl: | `family_man_man_girl_girl` | :family_woman_woman_boy: | `family_woman_woman_boy` | -| :family_woman_woman_girl: | `family_woman_woman_girl` | :family_woman_woman_girl_boy: | `family_woman_woman_girl_boy` | -| :family_woman_woman_boy_boy: | `family_woman_woman_boy_boy` | :family_woman_woman_girl_girl: | `family_woman_woman_girl_girl` | -| :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_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` | - -### Person Symbol - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :speaking_head: | `speaking_head` | :bust_in_silhouette: | `bust_in_silhouette` | -| :busts_in_silhouette: | `busts_in_silhouette` | :footprints: | `footprints` | - -## Animals & Nature - -### Animal Mammal - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :monkey_face: | `monkey_face` | :monkey: | `monkey` | -| :gorilla: | `gorilla` | :dog: | `dog` | -| :dog2: | `dog2` | :poodle: | `poodle` | -| :wolf: | `wolf` | :fox_face: | `fox_face` | -| :cat: | `cat` | :cat2: | `cat2` | -| :lion: | `lion` | :tiger: | `tiger` | -| :tiger2: | `tiger2` | :leopard: | `leopard` | -| :horse: | `horse` | :racehorse: | `racehorse` | -| :unicorn: | `unicorn` | :deer: | `deer` | -| :cow: | `cow` | :ox: | `ox` | -| :water_buffalo: | `water_buffalo` | :cow2: | `cow2` | -| :pig: | `pig` | :pig2: | `pig2` | -| :boar: | `boar` | :pig_nose: | `pig_nose` | -| :ram: | `ram` | :sheep: | `sheep` | -| :goat: | `goat` | :dromedary_camel: | `dromedary_camel` | -| :camel: | `camel` | :elephant: | `elephant` | -| :rhinoceros: | `rhinoceros` | :mouse: | `mouse` | -| :mouse2: | `mouse2` | :rat: | `rat` | -| :hamster: | `hamster` | :rabbit: | `rabbit` | -| :rabbit2: | `rabbit2` | :chipmunk: | `chipmunk` | -| :bat: | `bat` | :bear: | `bear` | -| :koala: | `koala` | :panda_face: | `panda_face` | -| :feet: | `feet`
`paw_prints` | | | - -### Animal Bird - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :turkey: | `turkey` | :chicken: | `chicken` | -| :rooster: | `rooster` | :hatching_chick: | `hatching_chick` | -| :baby_chick: | `baby_chick` | :hatched_chick: | `hatched_chick` | -| :bird: | `bird` | :penguin: | `penguin` | -| :dove: | `dove` | :eagle: | `eagle` | -| :duck: | `duck` | :owl: | `owl` | - -### Animal Amphibian - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :frog: | `frog` | - -### Animal Reptile - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :crocodile: | `crocodile` | :turtle: | `turtle` | -| :lizard: | `lizard` | :snake: | `snake` | -| :dragon_face: | `dragon_face` | :dragon: | `dragon` | - -### Animal Marine - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :whale: | `whale` | :whale2: | `whale2` | -| :dolphin: | `dolphin`
`flipper` | :fish: | `fish` | -| :tropical_fish: | `tropical_fish` | :blowfish: | `blowfish` | -| :shark: | `shark` | :octopus: | `octopus` | -| :shell: | `shell` | | | - -### Animal Bug - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :snail: | `snail` | :butterfly: | `butterfly` | -| :bug: | `bug` | :ant: | `ant` | -| :bee: | `bee`
`honeybee` | :beetle: | `beetle` | -| :spider: | `spider` | :spider_web: | `spider_web` | -| :scorpion: | `scorpion` | | | - -### Plant Flower - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :bouquet: | `bouquet` | :cherry_blossom: | `cherry_blossom` | -| :white_flower: | `white_flower` | :rosette: | `rosette` | -| :rose: | `rose` | :wilted_flower: | `wilted_flower` | -| :hibiscus: | `hibiscus` | :sunflower: | `sunflower` | -| :blossom: | `blossom` | :tulip: | `tulip` | - -### Plant Other - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :seedling: | `seedling` | :evergreen_tree: | `evergreen_tree` | -| :deciduous_tree: | `deciduous_tree` | :palm_tree: | `palm_tree` | -| :cactus: | `cactus` | :ear_of_rice: | `ear_of_rice` | -| :herb: | `herb` | :shamrock: | `shamrock` | -| :four_leaf_clover: | `four_leaf_clover` | :maple_leaf: | `maple_leaf` | -| :fallen_leaf: | `fallen_leaf` | :leaves: | `leaves` | - -## Food & Drink - -### Food Fruit - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :grapes: | `grapes` | :melon: | `melon` | -| :watermelon: | `watermelon` | :mandarin: | `mandarin`
`orange`
`tangerine` | -| :lemon: | `lemon` | :banana: | `banana` | -| :pineapple: | `pineapple` | :apple: | `apple` | -| :green_apple: | `green_apple` | :pear: | `pear` | -| :peach: | `peach` | :cherries: | `cherries` | -| :strawberry: | `strawberry` | :kiwi_fruit: | `kiwi_fruit` | -| :tomato: | `tomato` | | | - -### Food Vegetable - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :avocado: | `avocado` | :eggplant: | `eggplant` | -| :potato: | `potato` | :carrot: | `carrot` | -| :corn: | `corn` | :hot_pepper: | `hot_pepper` | -| :cucumber: | `cucumber` | :mushroom: | `mushroom` | -| :peanuts: | `peanuts` | :chestnut: | `chestnut` | - -### Food Prepared - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :bread: | `bread` | :croissant: | `croissant` | -| :baguette_bread: | `baguette_bread` | :pancakes: | `pancakes` | -| :cheese: | `cheese` | :meat_on_bone: | `meat_on_bone` | -| :poultry_leg: | `poultry_leg` | :bacon: | `bacon` | -| :hamburger: | `hamburger` | :fries: | `fries` | -| :pizza: | `pizza` | :hotdog: | `hotdog` | -| :taco: | `taco` | :burrito: | `burrito` | -| :stuffed_flatbread: | `stuffed_flatbread` | :egg: | `egg` | -| :fried_egg: | `fried_egg` | :shallow_pan_of_food: | `shallow_pan_of_food` | -| :stew: | `stew` | :green_salad: | `green_salad` | -| :popcorn: | `popcorn` | | | - -### Food Asian - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :bento: | `bento` | :rice_cracker: | `rice_cracker` | -| :rice_ball: | `rice_ball` | :rice: | `rice` | -| :curry: | `curry` | :ramen: | `ramen` | -| :spaghetti: | `spaghetti` | :sweet_potato: | `sweet_potato` | -| :oden: | `oden` | :sushi: | `sushi` | -| :fried_shrimp: | `fried_shrimp` | :fish_cake: | `fish_cake` | -| :dango: | `dango` | | | - -### Food Marine - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :crab: | `crab` | :shrimp: | `shrimp` | -| :squid: | `squid` | | | - -### Food Sweet - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :icecream: | `icecream` | :shaved_ice: | `shaved_ice` | -| :ice_cream: | `ice_cream` | :doughnut: | `doughnut` | -| :cookie: | `cookie` | :birthday: | `birthday` | -| :cake: | `cake` | :chocolate_bar: | `chocolate_bar` | -| :candy: | `candy` | :lollipop: | `lollipop` | -| :custard: | `custard` | :honey_pot: | `honey_pot` | - -### Drink - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :baby_bottle: | `baby_bottle` | :milk_glass: | `milk_glass` | -| :coffee: | `coffee` | :tea: | `tea` | -| :sake: | `sake` | :champagne: | `champagne` | -| :wine_glass: | `wine_glass` | :cocktail: | `cocktail` | -| :tropical_drink: | `tropical_drink` | :beer: | `beer` | -| :beers: | `beers` | :clinking_glasses: | `clinking_glasses` | -| :tumbler_glass: | `tumbler_glass` | | | - -### Dishware - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :plate_with_cutlery: | `plate_with_cutlery` | :fork_and_knife: | `fork_and_knife` | -| :spoon: | `spoon` | :hocho: | `hocho`
`knife` | -| :amphora: | `amphora` | | | - -## Travel & Places - -### Place Map - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :earth_africa: | `earth_africa` | :earth_americas: | `earth_americas` | -| :earth_asia: | `earth_asia` | :globe_with_meridians: | `globe_with_meridians` | -| :world_map: | `world_map` | :japan: | `japan` | - -### Place Geographic - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :mountain_snow: | `mountain_snow` | :mountain: | `mountain` | -| :volcano: | `volcano` | :mount_fuji: | `mount_fuji` | -| :camping: | `camping` | :beach_umbrella: | `beach_umbrella` | -| :desert: | `desert` | :desert_island: | `desert_island` | -| :national_park: | `national_park` | | | - -### Place Building - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :stadium: | `stadium` | :classical_building: | `classical_building` | -| :building_construction: | `building_construction` | :houses: | `houses` | -| :derelict_house: | `derelict_house` | :house: | `house` | -| :house_with_garden: | `house_with_garden` | :office: | `office` | -| :post_office: | `post_office` | :european_post_office: | `european_post_office` | -| :hospital: | `hospital` | :bank: | `bank` | -| :hotel: | `hotel` | :love_hotel: | `love_hotel` | -| :convenience_store: | `convenience_store` | :school: | `school` | -| :department_store: | `department_store` | :factory: | `factory` | -| :japanese_castle: | `japanese_castle` | :european_castle: | `european_castle` | -| :wedding: | `wedding` | :tokyo_tower: | `tokyo_tower` | -| :statue_of_liberty: | `statue_of_liberty` | | | - -### Place Religious - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :church: | `church` | :mosque: | `mosque` | -| :synagogue: | `synagogue` | :shinto_shrine: | `shinto_shrine` | -| :kaaba: | `kaaba` | | | - -### Place Other - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :fountain: | `fountain` | :tent: | `tent` | -| :foggy: | `foggy` | :night_with_stars: | `night_with_stars` | -| :cityscape: | `cityscape` | :sunrise_over_mountains: | `sunrise_over_mountains` | -| :sunrise: | `sunrise` | :city_sunset: | `city_sunset` | -| :city_sunrise: | `city_sunrise` | :bridge_at_night: | `bridge_at_night` | -| :hotsprings: | `hotsprings` | :carousel_horse: | `carousel_horse` | -| :ferris_wheel: | `ferris_wheel` | :roller_coaster: | `roller_coaster` | -| :barber: | `barber` | :circus_tent: | `circus_tent` | - -### Transport Ground - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :steam_locomotive: | `steam_locomotive` | :railway_car: | `railway_car` | -| :bullettrain_side: | `bullettrain_side` | :bullettrain_front: | `bullettrain_front` | -| :train2: | `train2` | :metro: | `metro` | -| :light_rail: | `light_rail` | :station: | `station` | -| :tram: | `tram` | :monorail: | `monorail` | -| :mountain_railway: | `mountain_railway` | :train: | `train` | -| :bus: | `bus` | :oncoming_bus: | `oncoming_bus` | -| :trolleybus: | `trolleybus` | :minibus: | `minibus` | -| :ambulance: | `ambulance` | :fire_engine: | `fire_engine` | -| :police_car: | `police_car` | :oncoming_police_car: | `oncoming_police_car` | -| :taxi: | `taxi` | :oncoming_taxi: | `oncoming_taxi` | -| :car: | `car`
`red_car` | :oncoming_automobile: | `oncoming_automobile` | -| :blue_car: | `blue_car` | :truck: | `truck` | -| :articulated_lorry: | `articulated_lorry` | :tractor: | `tractor` | -| :racing_car: | `racing_car` | :motorcycle: | `motorcycle` | -| :motor_scooter: | `motor_scooter` | :bike: | `bike` | -| :kick_scooter: | `kick_scooter` | :busstop: | `busstop` | -| :motorway: | `motorway` | :railway_track: | `railway_track` | -| :oil_drum: | `oil_drum` | :fuelpump: | `fuelpump` | -| :rotating_light: | `rotating_light` | :traffic_light: | `traffic_light` | -| :vertical_traffic_light: | `vertical_traffic_light` | :stop_sign: | `stop_sign` | -| :construction: | `construction` | | | - -### Transport Water - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :anchor: | `anchor` | :boat: | `boat`
`sailboat` | -| :canoe: | `canoe` | :speedboat: | `speedboat` | -| :passenger_ship: | `passenger_ship` | :ferry: | `ferry` | -| :motor_boat: | `motor_boat` | :ship: | `ship` | - -### Transport Air - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :airplane: | `airplane` | :small_airplane: | `small_airplane` | -| :flight_departure: | `flight_departure` | :flight_arrival: | `flight_arrival` | -| :seat: | `seat` | :helicopter: | `helicopter` | -| :suspension_railway: | `suspension_railway` | :mountain_cableway: | `mountain_cableway` | -| :aerial_tramway: | `aerial_tramway` | :artificial_satellite: | `artificial_satellite` | -| :rocket: | `rocket` | | | - -### Hotel - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :bellhop_bell: | `bellhop_bell` | - -### Time - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :hourglass: | `hourglass` | :hourglass_flowing_sand: | `hourglass_flowing_sand` | -| :watch: | `watch` | :alarm_clock: | `alarm_clock` | -| :stopwatch: | `stopwatch` | :timer_clock: | `timer_clock` | -| :mantelpiece_clock: | `mantelpiece_clock` | :clock12: | `clock12` | -| :clock1230: | `clock1230` | :clock1: | `clock1` | -| :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` | :clock10: | `clock10` | -| :clock1030: | `clock1030` | :clock11: | `clock11` | -| :clock1130: | `clock1130` | | | - -### Sky & Weather - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :new_moon: | `new_moon` | :waxing_crescent_moon: | `waxing_crescent_moon` | -| :first_quarter_moon: | `first_quarter_moon` | :moon: | `moon`
`waxing_gibbous_moon` | -| :full_moon: | `full_moon` | :waning_gibbous_moon: | `waning_gibbous_moon` | -| :last_quarter_moon: | `last_quarter_moon` | :waning_crescent_moon: | `waning_crescent_moon` | -| :crescent_moon: | `crescent_moon` | :new_moon_with_face: | `new_moon_with_face` | -| :first_quarter_moon_with_face: | `first_quarter_moon_with_face` | :last_quarter_moon_with_face: | `last_quarter_moon_with_face` | -| :thermometer: | `thermometer` | :sunny: | `sunny` | -| :full_moon_with_face: | `full_moon_with_face` | :sun_with_face: | `sun_with_face` | -| :star: | `star` | :star2: | `star2` | -| :stars: | `stars` | :milky_way: | `milky_way` | -| :cloud: | `cloud` | :partly_sunny: | `partly_sunny` | -| :cloud_with_lightning_and_rain: | `cloud_with_lightning_and_rain` | :sun_behind_small_cloud: | `sun_behind_small_cloud` | -| :sun_behind_large_cloud: | `sun_behind_large_cloud` | :sun_behind_rain_cloud: | `sun_behind_rain_cloud` | -| :cloud_with_rain: | `cloud_with_rain` | :cloud_with_snow: | `cloud_with_snow` | -| :cloud_with_lightning: | `cloud_with_lightning` | :tornado: | `tornado` | -| :fog: | `fog` | :wind_face: | `wind_face` | -| :cyclone: | `cyclone` | :rainbow: | `rainbow` | -| :closed_umbrella: | `closed_umbrella` | :open_umbrella: | `open_umbrella` | -| :umbrella: | `umbrella` | :parasol_on_ground: | `parasol_on_ground` | -| :zap: | `zap` | :snowflake: | `snowflake` | -| :snowman_with_snow: | `snowman_with_snow` | :snowman: | `snowman` | -| :comet: | `comet` | :fire: | `fire` | -| :droplet: | `droplet` | :ocean: | `ocean` | - -## Activities - -### Event - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :jack_o_lantern: | `jack_o_lantern` | :christmas_tree: | `christmas_tree` | -| :fireworks: | `fireworks` | :sparkler: | `sparkler` | -| :sparkles: | `sparkles` | :balloon: | `balloon` | -| :tada: | `tada` | :confetti_ball: | `confetti_ball` | -| :tanabata_tree: | `tanabata_tree` | :bamboo: | `bamboo` | -| :dolls: | `dolls` | :flags: | `flags` | -| :wind_chime: | `wind_chime` | :rice_scene: | `rice_scene` | -| :ribbon: | `ribbon` | :gift: | `gift` | -| :reminder_ribbon: | `reminder_ribbon` | :tickets: | `tickets` | -| :ticket: | `ticket` | | | - -### Award Medal - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :medal_military: | `medal_military` | :trophy: | `trophy` | -| :medal_sports: | `medal_sports` | :1st_place_medal: | `1st_place_medal` | -| :2nd_place_medal: | `2nd_place_medal` | :3rd_place_medal: | `3rd_place_medal` | - -### Sport - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :soccer: | `soccer` | :baseball: | `baseball` | -| :basketball: | `basketball` | :volleyball: | `volleyball` | -| :football: | `football` | :rugby_football: | `rugby_football` | -| :tennis: | `tennis` | :bowling: | `bowling` | -| :cricket: | `cricket` | :field_hockey: | `field_hockey` | -| :ice_hockey: | `ice_hockey` | :ping_pong: | `ping_pong` | -| :badminton: | `badminton` | :boxing_glove: | `boxing_glove` | -| :martial_arts_uniform: | `martial_arts_uniform` | :goal_net: | `goal_net` | -| :golf: | `golf` | :ice_skate: | `ice_skate` | -| :fishing_pole_and_fish: | `fishing_pole_and_fish` | :running_shirt_with_sash: | `running_shirt_with_sash` | -| :ski: | `ski` | | | - -### Game - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :dart: | `dart` | :8ball: | `8ball` | -| :crystal_ball: | `crystal_ball` | :video_game: | `video_game` | -| :joystick: | `joystick` | :slot_machine: | `slot_machine` | -| :game_die: | `game_die` | :spades: | `spades` | -| :hearts: | `hearts` | :diamonds: | `diamonds` | -| :clubs: | `clubs` | :black_joker: | `black_joker` | -| :mahjong: | `mahjong` | :flower_playing_cards: | `flower_playing_cards` | - -### Arts & Crafts - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :performing_arts: | `performing_arts` | :framed_picture: | `framed_picture` | -| :art: | `art` | | | - -## Objects - -### Clothing - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :eyeglasses: | `eyeglasses` | :dark_sunglasses: | `dark_sunglasses` | -| :necktie: | `necktie` | :shirt: | `shirt`
`tshirt` | -| :jeans: | `jeans` | :dress: | `dress` | -| :kimono: | `kimono` | :bikini: | `bikini` | -| :womans_clothes: | `womans_clothes` | :purse: | `purse` | -| :handbag: | `handbag` | :pouch: | `pouch` | -| :shopping: | `shopping` | :school_satchel: | `school_satchel` | -| :mans_shoe: | `mans_shoe`
`shoe` | :athletic_shoe: | `athletic_shoe` | -| :high_heel: | `high_heel` | :sandal: | `sandal` | -| :boot: | `boot` | :crown: | `crown` | -| :womans_hat: | `womans_hat` | :tophat: | `tophat` | -| :mortar_board: | `mortar_board` | :rescue_worker_helmet: | `rescue_worker_helmet` | -| :prayer_beads: | `prayer_beads` | :lipstick: | `lipstick` | -| :ring: | `ring` | :gem: | `gem` | - -### Sound - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :mute: | `mute` | :speaker: | `speaker` | -| :sound: | `sound` | :loud_sound: | `loud_sound` | -| :loudspeaker: | `loudspeaker` | :mega: | `mega` | -| :postal_horn: | `postal_horn` | :bell: | `bell` | -| :no_bell: | `no_bell` | | | - -### Music - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :musical_score: | `musical_score` | :musical_note: | `musical_note` | -| :notes: | `notes` | :studio_microphone: | `studio_microphone` | -| :level_slider: | `level_slider` | :control_knobs: | `control_knobs` | -| :microphone: | `microphone` | :headphones: | `headphones` | -| :radio: | `radio` | | | - -### Musical Instrument - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :saxophone: | `saxophone` | :guitar: | `guitar` | -| :musical_keyboard: | `musical_keyboard` | :trumpet: | `trumpet` | -| :violin: | `violin` | :drum: | `drum` | - -### Phone - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :iphone: | `iphone` | :calling: | `calling` | -| :phone: | `phone`
`telephone` | :telephone_receiver: | `telephone_receiver` | -| :pager: | `pager` | :fax: | `fax` | - -### Computer - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :battery: | `battery` | :electric_plug: | `electric_plug` | -| :computer: | `computer` | :desktop_computer: | `desktop_computer` | -| :printer: | `printer` | :keyboard: | `keyboard` | -| :computer_mouse: | `computer_mouse` | :trackball: | `trackball` | -| :minidisc: | `minidisc` | :floppy_disk: | `floppy_disk` | -| :cd: | `cd` | :dvd: | `dvd` | - -### Light & Video - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :movie_camera: | `movie_camera` | :film_strip: | `film_strip` | -| :film_projector: | `film_projector` | :clapper: | `clapper` | -| :tv: | `tv` | :camera: | `camera` | -| :camera_flash: | `camera_flash` | :video_camera: | `video_camera` | -| :vhs: | `vhs` | :mag: | `mag` | -| :mag_right: | `mag_right` | :candle: | `candle` | -| :bulb: | `bulb` | :flashlight: | `flashlight` | -| :izakaya_lantern: | `izakaya_lantern`
`lantern` | | | - -### Book Paper - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :notebook_with_decorative_cover: | `notebook_with_decorative_cover` | :closed_book: | `closed_book` | -| :book: | `book`
`open_book` | :green_book: | `green_book` | -| :blue_book: | `blue_book` | :orange_book: | `orange_book` | -| :books: | `books` | :notebook: | `notebook` | -| :ledger: | `ledger` | :page_with_curl: | `page_with_curl` | -| :scroll: | `scroll` | :page_facing_up: | `page_facing_up` | -| :newspaper: | `newspaper` | :newspaper_roll: | `newspaper_roll` | -| :bookmark_tabs: | `bookmark_tabs` | :bookmark: | `bookmark` | -| :label: | `label` | | | - -### Money - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :moneybag: | `moneybag` | :yen: | `yen` | -| :dollar: | `dollar` | :euro: | `euro` | -| :pound: | `pound` | :money_with_wings: | `money_with_wings` | -| :credit_card: | `credit_card` | :chart: | `chart` | - -### Mail - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :email: | `email`
`envelope` | :e-mail: | `:e-mail:` | -| :incoming_envelope: | `incoming_envelope` | :envelope_with_arrow: | `envelope_with_arrow` | -| :outbox_tray: | `outbox_tray` | :inbox_tray: | `inbox_tray` | -| :package: | `package` | :mailbox: | `mailbox` | -| :mailbox_closed: | `mailbox_closed` | :mailbox_with_mail: | `mailbox_with_mail` | -| :mailbox_with_no_mail: | `mailbox_with_no_mail` | :postbox: | `postbox` | -| :ballot_box: | `ballot_box` | | | - -### Writing - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :pencil2: | `pencil2` | :black_nib: | `black_nib` | -| :fountain_pen: | `fountain_pen` | :pen: | `pen` | -| :paintbrush: | `paintbrush` | :crayon: | `crayon` | -| :memo: | `memo`
`pencil` | | | - -### Office - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :briefcase: | `briefcase` | :file_folder: | `file_folder` | -| :open_file_folder: | `open_file_folder` | :card_index_dividers: | `card_index_dividers` | -| :date: | `date` | :calendar: | `calendar` | -| :spiral_notepad: | `spiral_notepad` | :spiral_calendar: | `spiral_calendar` | -| :card_index: | `card_index` | :chart_with_upwards_trend: | `chart_with_upwards_trend` | -| :chart_with_downwards_trend: | `chart_with_downwards_trend` | :bar_chart: | `bar_chart` | -| :clipboard: | `clipboard` | :pushpin: | `pushpin` | -| :round_pushpin: | `round_pushpin` | :paperclip: | `paperclip` | -| :paperclips: | `paperclips` | :straight_ruler: | `straight_ruler` | -| :triangular_ruler: | `triangular_ruler` | :scissors: | `scissors` | -| :card_file_box: | `card_file_box` | :file_cabinet: | `file_cabinet` | -| :wastebasket: | `wastebasket` | | | - -### Lock - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :lock: | `lock` | :unlock: | `unlock` | -| :lock_with_ink_pen: | `lock_with_ink_pen` | :closed_lock_with_key: | `closed_lock_with_key` | -| :key: | `key` | :old_key: | `old_key` | - -### Tool - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :hammer: | `hammer` | :pick: | `pick` | -| :hammer_and_pick: | `hammer_and_pick` | :hammer_and_wrench: | `hammer_and_wrench` | -| :dagger: | `dagger` | :crossed_swords: | `crossed_swords` | -| :gun: | `gun` | :bow_and_arrow: | `bow_and_arrow` | -| :shield: | `shield` | :wrench: | `wrench` | -| :nut_and_bolt: | `nut_and_bolt` | :gear: | `gear` | -| :clamp: | `clamp` | :balance_scale: | `balance_scale` | -| :link: | `link` | :chains: | `chains` | - -### Science - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :alembic: | `alembic` | :microscope: | `microscope` | -| :telescope: | `telescope` | :satellite: | `satellite` | - -### Medical - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :syringe: | `syringe` | :pill: | `pill` | - -### Household - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :door: | `door` | :bed: | `bed` | -| :couch_and_lamp: | `couch_and_lamp` | :toilet: | `toilet` | -| :shower: | `shower` | :bathtub: | `bathtub` | -| :shopping_cart: | `shopping_cart` | | | - -### Other Object - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :smoking: | `smoking` | :coffin: | `coffin` | -| :funeral_urn: | `funeral_urn` | :moyai: | `moyai` | - -## Symbols - -### Transport Sign - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :atm: | `atm` | :put_litter_in_its_place: | `put_litter_in_its_place` | -| :potable_water: | `potable_water` | :wheelchair: | `wheelchair` | -| :mens: | `mens` | :womens: | `womens` | -| :restroom: | `restroom` | :baby_symbol: | `baby_symbol` | -| :wc: | `wc` | :passport_control: | `passport_control` | -| :customs: | `customs` | :baggage_claim: | `baggage_claim` | -| :left_luggage: | `left_luggage` | | | - -### Warning - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :warning: | `warning` | :children_crossing: | `children_crossing` | -| :no_entry: | `no_entry` | :no_entry_sign: | `no_entry_sign` | -| :no_bicycles: | `no_bicycles` | :no_smoking: | `no_smoking` | -| :do_not_litter: | `do_not_litter` | :non-potable_water: | `:non-potable_water:` | -| :no_pedestrians: | `no_pedestrians` | :no_mobile_phones: | `no_mobile_phones` | -| :underage: | `underage` | :radioactive: | `radioactive` | -| :biohazard: | `biohazard` | | | - -### Arrow - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :arrow_up: | `arrow_up` | :arrow_upper_right: | `arrow_upper_right` | -| :arrow_right: | `arrow_right` | :arrow_lower_right: | `arrow_lower_right` | -| :arrow_down: | `arrow_down` | :arrow_lower_left: | `arrow_lower_left` | -| :arrow_left: | `arrow_left` | :arrow_upper_left: | `arrow_upper_left` | -| :arrow_up_down: | `arrow_up_down` | :left_right_arrow: | `left_right_arrow` | -| :leftwards_arrow_with_hook: | `leftwards_arrow_with_hook` | :arrow_right_hook: | `arrow_right_hook` | -| :arrow_heading_up: | `arrow_heading_up` | :arrow_heading_down: | `arrow_heading_down` | -| :arrows_clockwise: | `arrows_clockwise` | :arrows_counterclockwise: | `arrows_counterclockwise` | -| :back: | `back` | :end: | `end` | -| :on: | `on` | :soon: | `soon` | -| :top: | `top` | | | - -### Religion - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :place_of_worship: | `place_of_worship` | :atom_symbol: | `atom_symbol` | -| :om: | `om` | :star_of_david: | `star_of_david` | -| :wheel_of_dharma: | `wheel_of_dharma` | :yin_yang: | `yin_yang` | -| :latin_cross: | `latin_cross` | :orthodox_cross: | `orthodox_cross` | -| :star_and_crescent: | `star_and_crescent` | :peace_symbol: | `peace_symbol` | -| :menorah: | `menorah` | :six_pointed_star: | `six_pointed_star` | - -### Zodiac - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :aries: | `aries` | :taurus: | `taurus` | -| :gemini: | `gemini` | :cancer: | `cancer` | -| :leo: | `leo` | :virgo: | `virgo` | -| :libra: | `libra` | :scorpius: | `scorpius` | -| :sagittarius: | `sagittarius` | :capricorn: | `capricorn` | -| :aquarius: | `aquarius` | :pisces: | `pisces` | -| :ophiuchus: | `ophiuchus` | | | - -### Av Symbol - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :twisted_rightwards_arrows: | `twisted_rightwards_arrows` | :repeat: | `repeat` | -| :repeat_one: | `repeat_one` | :arrow_forward: | `arrow_forward` | -| :fast_forward: | `fast_forward` | :next_track_button: | `next_track_button` | -| :play_or_pause_button: | `play_or_pause_button` | :arrow_backward: | `arrow_backward` | -| :rewind: | `rewind` | :previous_track_button: | `previous_track_button` | -| :arrow_up_small: | `arrow_up_small` | :arrow_double_up: | `arrow_double_up` | -| :arrow_down_small: | `arrow_down_small` | :arrow_double_down: | `arrow_double_down` | -| :pause_button: | `pause_button` | :stop_button: | `stop_button` | -| :record_button: | `record_button` | :cinema: | `cinema` | -| :low_brightness: | `low_brightness` | :high_brightness: | `high_brightness` | -| :signal_strength: | `signal_strength` | :vibration_mode: | `vibration_mode` | -| :mobile_phone_off: | `mobile_phone_off` | | | - -### Math - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :heavy_multiplication_x: | `heavy_multiplication_x` | :heavy_plus_sign: | `heavy_plus_sign` | -| :heavy_minus_sign: | `heavy_minus_sign` | :heavy_division_sign: | `heavy_division_sign` | - -### Punctuation - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :bangbang: | `bangbang` | :interrobang: | `interrobang` | -| :question: | `question` | :grey_question: | `grey_question` | -| :grey_exclamation: | `grey_exclamation` | :exclamation: | `exclamation`
`heavy_exclamation_mark` | -| :wavy_dash: | `wavy_dash` | | | - -### Currency - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :currency_exchange: | `currency_exchange` | :heavy_dollar_sign: | `heavy_dollar_sign` | - -### Keycap - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :hash: | `hash` | :asterisk: | `asterisk` | -| :zero: | `zero` | :one: | `one` | -| :two: | `two` | :three: | `three` | -| :four: | `four` | :five: | `five` | -| :six: | `six` | :seven: | `seven` | -| :eight: | `eight` | :nine: | `nine` | -| :keycap_ten: | `keycap_ten` | | | - -### Alphabet - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :capital_abcd: | `capital_abcd` | :abcd: | `abcd` | -| :1234: | `1234` | :symbols: | `symbols` | -| :abc: | `abc` | :a: | `a` | -| :ab: | `ab` | :b: | `b` | -| :cl: | `cl` | :cool: | `cool` | -| :free: | `free` | :information_source: | `information_source` | -| :id: | `id` | :m: | `m` | -| :new: | `new` | :ng: | `ng` | -| :o2: | `o2` | :ok: | `ok` | -| :parking: | `parking` | :sos: | `sos` | -| :up: | `up` | :vs: | `vs` | -| :koko: | `koko` | :sa: | `sa` | -| :u6708: | `u6708` | :u6709: | `u6709` | -| :u6307: | `u6307` | :ideograph_advantage: | `ideograph_advantage` | -| :u5272: | `u5272` | :u7121: | `u7121` | -| :u7981: | `u7981` | :accept: | `accept` | -| :u7533: | `u7533` | :u5408: | `u5408` | -| :u7a7a: | `u7a7a` | :congratulations: | `congratulations` | -| :secret: | `secret` | :u55b6: | `u55b6` | -| :u6e80: | `u6e80` | | | - -### Geometric - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :red_circle: | `red_circle` | :large_blue_circle: | `large_blue_circle` | -| :black_circle: | `black_circle` | :white_circle: | `white_circle` | -| :black_large_square: | `black_large_square` | :white_large_square: | `white_large_square` | -| :black_medium_square: | `black_medium_square` | :white_medium_square: | `white_medium_square` | -| :black_medium_small_square: | `black_medium_small_square` | :white_medium_small_square: | `white_medium_small_square` | -| :black_small_square: | `black_small_square` | :white_small_square: | `white_small_square` | -| :large_orange_diamond: | `large_orange_diamond` | :large_blue_diamond: | `large_blue_diamond` | -| :small_orange_diamond: | `small_orange_diamond` | :small_blue_diamond: | `small_blue_diamond` | -| :small_red_triangle: | `small_red_triangle` | :small_red_triangle_down: | `small_red_triangle_down` | -| :diamond_shape_with_a_dot_inside: | `diamond_shape_with_a_dot_inside` | :radio_button: | `radio_button` | -| :white_square_button: | `white_square_button` | :black_square_button: | `black_square_button` | - -### Other Symbol - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :recycle: | `recycle` | :fleur_de_lis: | `fleur_de_lis` | -| :trident: | `trident` | :name_badge: | `name_badge` | -| :beginner: | `beginner` | :o: | `o` | -| :white_check_mark: | `white_check_mark` | :ballot_box_with_check: | `ballot_box_with_check` | -| :heavy_check_mark: | `heavy_check_mark` | :x: | `x` | -| :negative_squared_cross_mark: | `negative_squared_cross_mark` | :curly_loop: | `curly_loop` | -| :loop: | `loop` | :part_alternation_mark: | `part_alternation_mark` | -| :eight_spoked_asterisk: | `eight_spoked_asterisk` | :eight_pointed_black_star: | `eight_pointed_black_star` | -| :sparkle: | `sparkle` | :copyright: | `copyright` | -| :registered: | `registered` | :tm: | `tm` | - -## Flags - -### Common Flags - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :checkered_flag: | `checkered_flag` | :triangular_flag_on_post: | `triangular_flag_on_post` | -| :crossed_flags: | `crossed_flags` | :black_flag: | `black_flag` | -| :white_flag: | `white_flag` | :rainbow_flag: | `rainbow_flag` | - -### Country and Region Flags - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :andorra: | `andorra` | :united_arab_emirates: | `united_arab_emirates` | -| :afghanistan: | `afghanistan` | :antigua_barbuda: | `antigua_barbuda` | -| :anguilla: | `anguilla` | :albania: | `albania` | -| :armenia: | `armenia` | :angola: | `angola` | -| :antarctica: | `antarctica` | :argentina: | `argentina` | -| :american_samoa: | `american_samoa` | :austria: | `austria` | -| :australia: | `australia` | :aruba: | `aruba` | -| :aland_islands: | `aland_islands` | :azerbaijan: | `azerbaijan` | -| :bosnia_herzegovina: | `bosnia_herzegovina` | :barbados: | `barbados` | -| :bangladesh: | `bangladesh` | :belgium: | `belgium` | -| :burkina_faso: | `burkina_faso` | :bulgaria: | `bulgaria` | -| :bahrain: | `bahrain` | :burundi: | `burundi` | -| :benin: | `benin` | :st_barthelemy: | `st_barthelemy` | -| :bermuda: | `bermuda` | :brunei: | `brunei` | -| :bolivia: | `bolivia` | :caribbean_netherlands: | `caribbean_netherlands` | -| :brazil: | `brazil` | :bahamas: | `bahamas` | -| :bhutan: | `bhutan` | :botswana: | `botswana` | -| :belarus: | `belarus` | :belize: | `belize` | -| :canada: | `canada` | :cocos_islands: | `cocos_islands` | -| :congo_kinshasa: | `congo_kinshasa` | :central_african_republic: | `central_african_republic` | -| :congo_brazzaville: | `congo_brazzaville` | :switzerland: | `switzerland` | -| :cote_divoire: | `cote_divoire` | :cook_islands: | `cook_islands` | -| :chile: | `chile` | :cameroon: | `cameroon` | -| :cn: | `cn` | :colombia: | `colombia` | -| :costa_rica: | `costa_rica` | :cuba: | `cuba` | -| :cape_verde: | `cape_verde` | :curacao: | `curacao` | -| :christmas_island: | `christmas_island` | :cyprus: | `cyprus` | -| :czech_republic: | `czech_republic` | :de: | `de` | -| :djibouti: | `djibouti` | :denmark: | `denmark` | -| :dominica: | `dominica` | :dominican_republic: | `dominican_republic` | -| :algeria: | `algeria` | :ecuador: | `ecuador` | -| :estonia: | `estonia` | :egypt: | `egypt` | -| :western_sahara: | `western_sahara` | :eritrea: | `eritrea` | -| :es: | `es` | :ethiopia: | `ethiopia` | -| :eu: | `eu`
`european_union` | :finland: | `finland` | -| :fiji: | `fiji` | :falkland_islands: | `falkland_islands` | -| :micronesia: | `micronesia` | :faroe_islands: | `faroe_islands` | -| :fr: | `fr` | :gabon: | `gabon` | -| :gb: | `gb`
`uk` | :grenada: | `grenada` | -| :georgia: | `georgia` | :french_guiana: | `french_guiana` | -| :guernsey: | `guernsey` | :ghana: | `ghana` | -| :gibraltar: | `gibraltar` | :greenland: | `greenland` | -| :gambia: | `gambia` | :guinea: | `guinea` | -| :guadeloupe: | `guadeloupe` | :equatorial_guinea: | `equatorial_guinea` | -| :greece: | `greece` | :south_georgia_south_sandwich_islands: | `south_georgia_south_sandwich_islands` | -| :guatemala: | `guatemala` | :guam: | `guam` | -| :guinea_bissau: | `guinea_bissau` | :guyana: | `guyana` | -| :hong_kong: | `hong_kong` | :honduras: | `honduras` | -| :croatia: | `croatia` | :haiti: | `haiti` | -| :hungary: | `hungary` | :canary_islands: | `canary_islands` | -| :indonesia: | `indonesia` | :ireland: | `ireland` | -| :israel: | `israel` | :isle_of_man: | `isle_of_man` | -| :india: | `india` | :british_indian_ocean_territory: | `british_indian_ocean_territory` | -| :iraq: | `iraq` | :iran: | `iran` | -| :iceland: | `iceland` | :it: | `it` | -| :jersey: | `jersey` | :jamaica: | `jamaica` | -| :jordan: | `jordan` | :jp: | `jp` | -| :kenya: | `kenya` | :kyrgyzstan: | `kyrgyzstan` | -| :cambodia: | `cambodia` | :kiribati: | `kiribati` | -| :comoros: | `comoros` | :st_kitts_nevis: | `st_kitts_nevis` | -| :north_korea: | `north_korea` | :kr: | `kr` | -| :kuwait: | `kuwait` | :cayman_islands: | `cayman_islands` | -| :kazakhstan: | `kazakhstan` | :laos: | `laos` | -| :lebanon: | `lebanon` | :st_lucia: | `st_lucia` | -| :liechtenstein: | `liechtenstein` | :sri_lanka: | `sri_lanka` | -| :liberia: | `liberia` | :lesotho: | `lesotho` | -| :lithuania: | `lithuania` | :luxembourg: | `luxembourg` | -| :latvia: | `latvia` | :libya: | `libya` | -| :morocco: | `morocco` | :monaco: | `monaco` | -| :moldova: | `moldova` | :montenegro: | `montenegro` | -| :madagascar: | `madagascar` | :marshall_islands: | `marshall_islands` | -| :macedonia: | `macedonia` | :mali: | `mali` | -| :myanmar: | `myanmar` | :mongolia: | `mongolia` | -| :macau: | `macau` | :northern_mariana_islands: | `northern_mariana_islands` | -| :martinique: | `martinique` | :mauritania: | `mauritania` | -| :montserrat: | `montserrat` | :malta: | `malta` | -| :mauritius: | `mauritius` | :maldives: | `maldives` | -| :malawi: | `malawi` | :mexico: | `mexico` | -| :malaysia: | `malaysia` | :mozambique: | `mozambique` | -| :namibia: | `namibia` | :new_caledonia: | `new_caledonia` | -| :niger: | `niger` | :norfolk_island: | `norfolk_island` | -| :nigeria: | `nigeria` | :nicaragua: | `nicaragua` | -| :netherlands: | `netherlands` | :norway: | `norway` | -| :nepal: | `nepal` | :nauru: | `nauru` | -| :niue: | `niue` | :new_zealand: | `new_zealand` | -| :oman: | `oman` | :panama: | `panama` | -| :peru: | `peru` | :french_polynesia: | `french_polynesia` | -| :papua_new_guinea: | `papua_new_guinea` | :philippines: | `philippines` | -| :pakistan: | `pakistan` | :poland: | `poland` | -| :st_pierre_miquelon: | `st_pierre_miquelon` | :pitcairn_islands: | `pitcairn_islands` | -| :puerto_rico: | `puerto_rico` | :palestinian_territories: | `palestinian_territories` | -| :portugal: | `portugal` | :palau: | `palau` | -| :paraguay: | `paraguay` | :qatar: | `qatar` | -| :reunion: | `reunion` | :romania: | `romania` | -| :serbia: | `serbia` | :ru: | `ru` | -| :rwanda: | `rwanda` | :saudi_arabia: | `saudi_arabia` | -| :solomon_islands: | `solomon_islands` | :seychelles: | `seychelles` | -| :sudan: | `sudan` | :sweden: | `sweden` | -| :singapore: | `singapore` | :st_helena: | `st_helena` | -| :slovenia: | `slovenia` | :slovakia: | `slovakia` | -| :sierra_leone: | `sierra_leone` | :san_marino: | `san_marino` | -| :senegal: | `senegal` | :somalia: | `somalia` | -| :suriname: | `suriname` | :south_sudan: | `south_sudan` | -| :sao_tome_principe: | `sao_tome_principe` | :el_salvador: | `el_salvador` | -| :sint_maarten: | `sint_maarten` | :syria: | `syria` | -| :swaziland: | `swaziland` | :turks_caicos_islands: | `turks_caicos_islands` | -| :chad: | `chad` | :french_southern_territories: | `french_southern_territories` | -| :togo: | `togo` | :thailand: | `thailand` | -| :tajikistan: | `tajikistan` | :tokelau: | `tokelau` | -| :timor_leste: | `timor_leste` | :turkmenistan: | `turkmenistan` | -| :tunisia: | `tunisia` | :tonga: | `tonga` | -| :tr: | `tr` | :trinidad_tobago: | `trinidad_tobago` | -| :tuvalu: | `tuvalu` | :taiwan: | `taiwan` | -| :tanzania: | `tanzania` | :ukraine: | `ukraine` | -| :uganda: | `uganda` | :us: | `us` | -| :uruguay: | `uruguay` | :uzbekistan: | `uzbekistan` | -| :vatican_city: | `vatican_city` | :st_vincent_grenadines: | `st_vincent_grenadines` | -| :venezuela: | `venezuela` | :british_virgin_islands: | `british_virgin_islands` | -| :us_virgin_islands: | `us_virgin_islands` | :vietnam: | `vietnam` | -| :vanuatu: | `vanuatu` | :wallis_futuna: | `wallis_futuna` | -| :samoa: | `samoa` | :kosovo: | `kosovo` | -| :yemen: | `yemen` | :mayotte: | `mayotte` | -| :south_africa: | `south_africa` | :zambia: | `zambia` | -| :zimbabwe: | `zimbabwe` | | | diff --git a/exampleSite/content/posts/emoji-support/index.zh-cn.md b/exampleSite/content/posts/emoji-support/index.zh-cn.md deleted file mode 100644 index 762ba644..00000000 --- a/exampleSite/content/posts/emoji-support/index.zh-cn.md +++ /dev/null @@ -1,1282 +0,0 @@ ---- -title: "Emoji 支持" -date: 2019-10-01T17:55:28+08:00 -lastmod: 2022-01-19T19:48:28+08:00 -draft: false -author: "Dillon" -authorLink: "https://dillonzq.com" -description: "Hugo 和 FixIt 中的 Emoji 的用法指南。" -resources: -- name: "featured-image" - src: "featured-image.jpg" - -tags: ["emoji"] -categories: ["Markdown"] - -lightgallery: true ---- - -Emoji 可以通过多种方式在 Hugo 项目中启用。 - - - -[`emojify`](https://gohugo.io/functions/emojify/) 方法可以直接在模板中调用,或者使用 [行内 Shortcodes](https://gohugo.io/templates/shortcode-templates#inline-shortcodes)。 - -要全局使用 emoji, 需要在你的 [网站配置](https://gohugo.io/getting-started/configuration/) 中设置 `enableEmoji` 为 `true`, -然后你就可以直接在文章中输入 emoji 的代码。 -它们以**冒号**开头和结尾,并且包含 emoji 的 **代码**: - -```markdown -去露营啦!{?:}tent: 很快就回来。 - -真开心!{?:}joy: -``` - -呈现的输出效果如下: - -去露营啦!:tent: 很快就回来。 - -真开心!:joy: - -以下**符号清单**是 emoji 代码的非常有用的参考。 - -## 表情与情感 - -### 笑脸表情 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :grinning: | `grinning` | :smiley: | `smiley` | -| :smile: | `smile` | :grin: | `grin` | -| :laughing: | `laughing`
`satisfied` | :sweat_smile: | `sweat_smile` | -| :rofl: | `rofl` | :joy: | `joy` | -| :slightly_smiling_face: | `slightly_smiling_face` | :upside_down_face: | `upside_down_face` | -| :wink: | `wink` | :blush: | `blush` | -| :innocent: | `innocent` | | | - -### 爱意表情 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :heart_eyes: | `heart_eyes` | :kissing_heart: | `kissing_heart` | -| :kissing: | `kissing` | :relaxed: | `relaxed` | -| :kissing_closed_eyes: | `kissing_closed_eyes` | :kissing_smiling_eyes: | `kissing_smiling_eyes` | - -### 吐舌头表情 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :yum: | `yum` | :stuck_out_tongue: | `stuck_out_tongue` | -| :stuck_out_tongue_winking_eye: | `stuck_out_tongue_winking_eye` | :stuck_out_tongue_closed_eyes: | `stuck_out_tongue_closed_eyes` | -| :money_mouth_face: | `money_mouth_face` | | | - -### 带手的表情 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :hugs: | `hugs` | :thinking: | `thinking` | - -### 中性表情 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :zipper_mouth_face: | `zipper_mouth_face` | :neutral_face: | `neutral_face` | -| :expressionless: | `expressionless` | :no_mouth: | `no_mouth` | -| :smirk: | `smirk` | :unamused: | `unamused` | -| :roll_eyes: | `roll_eyes` | :grimacing: | `grimacing` | -| :lying_face: | `lying_face` | | | - -### 困倦的表情 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :relieved: | `relieved` | :pensive: | `pensive` | -| :sleepy: | `sleepy` | :drooling_face: | `drooling_face` | -| :sleeping: | `sleeping` | | | - -### 不适的表情 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :mask: | `mask` | :face_with_thermometer: | `face_with_thermometer` | -| :face_with_head_bandage: | `face_with_head_bandage` | :nauseated_face: | `nauseated_face` | -| :sneezing_face: | `sneezing_face` | :dizzy_face: | `dizzy_face` | - -### 戴帽子的表情 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :cowboy_hat_face: | `cowboy_hat_face` | | | - -### 戴眼镜的表情 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :sunglasses: | `sunglasses` | :nerd_face: | `nerd_face` | - -### 担心的表情 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :confused: | `confused` | :worried: | `worried` | -| :slightly_frowning_face: | `slightly_frowning_face` | :frowning_face: | `frowning_face` | -| :open_mouth: | `open_mouth` | :hushed: | `hushed` | -| :astonished: | `astonished` | :flushed: | `flushed` | -| :frowning: | `frowning` | :anguished: | `anguished` | -| :fearful: | `fearful` | :cold_sweat: | `cold_sweat` | -| :disappointed_relieved: | `disappointed_relieved` | :cry: | `cry` | -| :sob: | `sob` | :scream: | `scream` | -| :confounded: | `confounded` | :persevere: | `persevere` | -| :disappointed: | `disappointed` | :sweat: | `sweat` | -| :weary: | `weary` | :tired_face: | `tired_face` | - -### 否定的表情 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :triumph: | `triumph` | :pout: | `pout`
`rage` | -| :angry: | `angry` | :smiling_imp: | `smiling_imp` | -| :imp: | `imp` | :skull: | `skull` | -| :skull_and_crossbones: | `skull_and_crossbones` | | | - -### 特殊打扮的表情 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :hankey: | `hankey`
`poop`
`shit` | :clown_face: | `clown_face` | -| :japanese_ogre: | `japanese_ogre` | :japanese_goblin: | `japanese_goblin` | -| :ghost: | `ghost` | :alien: | `alien` | -| :space_invader: | `space_invader` | :robot: | `robot` | - -### 猫脸表情 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :smiley_cat: | `smiley_cat` | :smile_cat: | `smile_cat` | -| :joy_cat: | `joy_cat` | :heart_eyes_cat: | `heart_eyes_cat` | -| :smirk_cat: | `smirk_cat` | :kissing_cat: | `kissing_cat` | -| :scream_cat: | `scream_cat` | :crying_cat_face: | `crying_cat_face` | -| :pouting_cat: | `pouting_cat` | | | - -### 猴脸表情 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :see_no_evil: | `see_no_evil` | :hear_no_evil: | `hear_no_evil` | -| :speak_no_evil: | `speak_no_evil` | | | - -### 情感 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :kiss: | `kiss` | :love_letter: | `love_letter` | -| :cupid: | `cupid` | :gift_heart: | `gift_heart` | -| :sparkling_heart: | `sparkling_heart` | :heartpulse: | `heartpulse` | -| :heartbeat: | `heartbeat` | :revolving_hearts: | `revolving_hearts` | -| :two_hearts: | `two_hearts` | :heart_decoration: | `heart_decoration` | -| :heavy_heart_exclamation: | `heavy_heart_exclamation` | :broken_heart: | `broken_heart` | -| :heart: | `heart` | :yellow_heart: | `yellow_heart` | -| :green_heart: | `green_heart` | :blue_heart: | `blue_heart` | -| :purple_heart: | `purple_heart` | :black_heart: | `black_heart` | -| :100: | `100` | :anger: | `anger` | -| :boom: | `boom`
`collision` | :dizzy: | `dizzy` | -| :sweat_drops: | `sweat_drops` | :dash: | `dash` | -| :hole: | `hole` | :bomb: | `bomb` | -| :speech_balloon: | `speech_balloon` | :eye_speech_bubble: | `eye_speech_bubble` | -| :right_anger_bubble: | `right_anger_bubble` | :thought_balloon: | `thought_balloon` | -| :zzz: | `zzz` | | | - -## 人与身体 - -### 张开手掌的手势 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :wave: | `wave` | :raised_back_of_hand: | `raised_back_of_hand` | -| :raised_hand_with_fingers_splayed: | `raised_hand_with_fingers_splayed` | :hand: | `hand`
`raised_hand` | -| :vulcan_salute: | `vulcan_salute` | | | - -### 部分手指的手势 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :ok_hand: | `ok_hand` | :v: | `v` | -| :crossed_fingers: | `crossed_fingers` | :metal: | `metal` | -| :call_me_hand: | `call_me_hand` | | | - -### 一根手指的手势 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :point_left: | `point_left` | :point_right: | `point_right` | -| :point_up_2: | `point_up_2` | :fu: | `fu`
`middle_finger` | -| :point_down: | `point_down` | :point_up: | `point_up` | - -### 握紧的手势 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :+1: | `+1`
`thumbsup` | :-1: | `-1`
`thumbsdown` | -| :fist: | `fist`
`fist_raised` | :facepunch: | `facepunch`
`fist_oncoming`
`punch` | -| :fist_left: | `fist_left` | :fist_right: | `fist_right` | - -### 两只手 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :clap: | `clap` | :raised_hands: | `raised_hands` | -| :open_hands: | `open_hands` | :handshake: | `handshake` | -| :pray: | `pray` | | | - -### 握住东西的手势 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :writing_hand: | `writing_hand` | :nail_care: | `nail_care` | -| :selfie: | `selfie` | | | - -### 身体部位 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :muscle: | `muscle` | :ear: | `ear` | -| :nose: | `nose` | :eyes: | `eyes` | -| :eye: | `eye` | :tongue: | `tongue` | -| :lips: | `lips` | | | - -### 人 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :baby: | `baby` | :boy: | `boy` | -| :girl: | `girl` | :blonde_man: | `blonde_man`
`person_with_blond_hair` | -| :man: | `man` | :woman: | `woman` | -| :blonde_woman: | `blonde_woman` | :older_man: | `older_man` | -| :older_woman: | `older_woman` | | | - -### 身体动作 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :frowning_woman: | `frowning_woman`
`person_frowning` | :frowning_man: | `frowning_man` | -| :person_with_pouting_face: | `person_with_pouting_face`
`pouting_woman` | :pouting_man: | `pouting_man` | -| :ng_woman: | `ng_woman`
`no_good`
`no_good_woman` | :ng_man: | `ng_man`
`no_good_man` | -| :ok_woman: | `ok_woman` | :ok_man: | `ok_man` | -| :information_desk_person: | `information_desk_person`
`sassy_woman`
`tipping_hand_woman` | :sassy_man: | `sassy_man`
`tipping_hand_man` | -| :raising_hand: | `raising_hand`
`raising_hand_woman` | :raising_hand_man: | `raising_hand_man` | -| :bow: | `bow`
`bowing_man` | :bowing_woman: | `bowing_woman` | -| :man_facepalming: | `man_facepalming` | :woman_facepalming: | `woman_facepalming` | -| :man_shrugging: | `man_shrugging` | :woman_shrugging: | `woman_shrugging` | - -### 人物角色 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :man_health_worker: | `man_health_worker` | :woman_health_worker: | `woman_health_worker` | -| :man_student: | `man_student` | :woman_student: | `woman_student` | -| :man_teacher: | `man_teacher` | :woman_teacher: | `woman_teacher` | -| :man_judge: | `man_judge` | :woman_judge: | `woman_judge` | -| :man_farmer: | `man_farmer` | :woman_farmer: | `woman_farmer` | -| :man_cook: | `man_cook` | :woman_cook: | `woman_cook` | -| :man_mechanic: | `man_mechanic` | :woman_mechanic: | `woman_mechanic` | -| :man_factory_worker: | `man_factory_worker` | :woman_factory_worker: | `woman_factory_worker` | -| :man_office_worker: | `man_office_worker` | :woman_office_worker: | `woman_office_worker` | -| :man_scientist: | `man_scientist` | :woman_scientist: | `woman_scientist` | -| :man_technologist: | `man_technologist` | :woman_technologist: | `woman_technologist` | -| :man_singer: | `man_singer` | :woman_singer: | `woman_singer` | -| :man_artist: | `man_artist` | :woman_artist: | `woman_artist` | -| :man_pilot: | `man_pilot` | :woman_pilot: | `woman_pilot` | -| :man_astronaut: | `man_astronaut` | :woman_astronaut: | `woman_astronaut` | -| :man_firefighter: | `man_firefighter` | :woman_firefighter: | `woman_firefighter` | -| :cop: | `cop`
`policeman` | :policewoman: | `policewoman` | -| :detective: | `detective`
`male_detective` | :female_detective: | `female_detective` | -| :guardsman: | `guardsman` | :guardswoman: | `guardswoman` | -| :construction_worker: | `construction_worker`
`construction_worker_man` | :construction_worker_woman: | `construction_worker_woman` | -| :prince: | `prince` | :princess: | `princess` | -| :man_with_turban: | `man_with_turban` | :woman_with_turban: | `woman_with_turban` | -| :man_with_gua_pi_mao: | `man_with_gua_pi_mao` | :man_in_tuxedo: | `man_in_tuxedo` | -| :bride_with_veil: | `bride_with_veil` | :pregnant_woman: | `pregnant_woman` | - -### 幻想的人物 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :angel: | `angel` | :santa: | `santa` | -| :mrs_claus: | `mrs_claus` | | | - -### 人物活动 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :massage: | `massage`
`massage_woman` | :massage_man: | `massage_man` | -| :haircut: | `haircut`
`haircut_woman` | :haircut_man: | `haircut_man` | -| :walking: | `walking`
`walking_man` | :walking_woman: | `walking_woman` | -| :runner: | `runner`
`running`
`running_man` | :running_woman: | `running_woman` | -| :dancer: | `dancer` | :man_dancing: | `man_dancing` | -| :business_suit_levitating: | `business_suit_levitating` | :dancers: | `dancers`
`dancing_women` | -| :dancing_men: | `dancing_men` | | | - -### 体育 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :person_fencing: | `person_fencing` | :horse_racing: | `horse_racing` | -| :skier: | `skier` | :snowboarder: | `snowboarder` | -| :golfing_man: | `golfing_man` | :golfing_woman: | `golfing_woman` | -| :surfer: | `surfer`
`surfing_man` | :surfing_woman: | `surfing_woman` | -| :rowboat: | `rowboat`
`rowing_man` | :rowing_woman: | `rowing_woman` | -| :swimmer: | `swimmer`
`swimming_man` | :swimming_woman: | `swimming_woman` | -| :basketball_man: | `basketball_man` | :basketball_woman: | `basketball_woman` | -| :weight_lifting_man: | `weight_lifting_man` | :weight_lifting_woman: | `weight_lifting_woman` | -| :bicyclist: | `bicyclist`
`biking_man` | :biking_woman: | `biking_woman` | -| :mountain_bicyclist: | `mountain_bicyclist`
`mountain_biking_man` | :mountain_biking_woman: | `mountain_biking_woman` | -| :man_cartwheeling: | `man_cartwheeling` | :woman_cartwheeling: | `woman_cartwheeling` | -| :men_wrestling: | `men_wrestling` | :women_wrestling: | `women_wrestling` | -| :man_playing_water_polo: | `man_playing_water_polo` | :woman_playing_water_polo: | `woman_playing_water_polo` | -| :man_playing_handball: | `man_playing_handball` | :woman_playing_handball: | `woman_playing_handball` | -| :man_juggling: | `man_juggling` | :woman_juggling: | `woman_juggling` | - -### 休息 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :bath: | `bath` | :sleeping_bed: | `sleeping_bed` | - -### 家庭 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :two_women_holding_hands: | `two_women_holding_hands` | :couple: | `couple` | -| :two_men_holding_hands: | `two_men_holding_hands` | :couplekiss_man_woman: | `couplekiss_man_woman` | -| :couplekiss_man_man: | `couplekiss_man_man` | :couplekiss_woman_woman: | `couplekiss_woman_woman` | -| :couple_with_heart: | `couple_with_heart`
`couple_with_heart_woman_man` | :couple_with_heart_man_man: | `couple_with_heart_man_man` | -| :couple_with_heart_woman_woman: | `couple_with_heart_woman_woman` | :family: | `family`
`family_man_woman_boy` | -| :family_man_woman_girl: | `family_man_woman_girl` | :family_man_woman_girl_boy: | `family_man_woman_girl_boy` | -| :family_man_woman_boy_boy: | `family_man_woman_boy_boy` | :family_man_woman_girl_girl: | `family_man_woman_girl_girl` | -| :family_man_man_boy: | `family_man_man_boy` | :family_man_man_girl: | `family_man_man_girl` | -| :family_man_man_girl_boy: | `family_man_man_girl_boy` | :family_man_man_boy_boy: | `family_man_man_boy_boy` | -| :family_man_man_girl_girl: | `family_man_man_girl_girl` | :family_woman_woman_boy: | `family_woman_woman_boy` | -| :family_woman_woman_girl: | `family_woman_woman_girl` | :family_woman_woman_girl_boy: | `family_woman_woman_girl_boy` | -| :family_woman_woman_boy_boy: | `family_woman_woman_boy_boy` | :family_woman_woman_girl_girl: | `family_woman_woman_girl_girl` | -| :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_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` | - -### 人物符号 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :speaking_head: | `speaking_head` | :bust_in_silhouette: | `bust_in_silhouette` | -| :busts_in_silhouette: | `busts_in_silhouette` | :footprints: | `footprints` | - -## 动物与自然 - -### 哺乳动物 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :monkey_face: | `monkey_face` | :monkey: | `monkey` | -| :gorilla: | `gorilla` | :dog: | `dog` | -| :dog2: | `dog2` | :poodle: | `poodle` | -| :wolf: | `wolf` | :fox_face: | `fox_face` | -| :cat: | `cat` | :cat2: | `cat2` | -| :lion: | `lion` | :tiger: | `tiger` | -| :tiger2: | `tiger2` | :leopard: | `leopard` | -| :horse: | `horse` | :racehorse: | `racehorse` | -| :unicorn: | `unicorn` | :deer: | `deer` | -| :cow: | `cow` | :ox: | `ox` | -| :water_buffalo: | `water_buffalo` | :cow2: | `cow2` | -| :pig: | `pig` | :pig2: | `pig2` | -| :boar: | `boar` | :pig_nose: | `pig_nose` | -| :ram: | `ram` | :sheep: | `sheep` | -| :goat: | `goat` | :dromedary_camel: | `dromedary_camel` | -| :camel: | `camel` | :elephant: | `elephant` | -| :rhinoceros: | `rhinoceros` | :mouse: | `mouse` | -| :mouse2: | `mouse2` | :rat: | `rat` | -| :hamster: | `hamster` | :rabbit: | `rabbit` | -| :rabbit2: | `rabbit2` | :chipmunk: | `chipmunk` | -| :bat: | `bat` | :bear: | `bear` | -| :koala: | `koala` | :panda_face: | `panda_face` | -| :feet: | `feet`
`paw_prints` | | | - -### 鸟类 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :turkey: | `turkey` | :chicken: | `chicken` | -| :rooster: | `rooster` | :hatching_chick: | `hatching_chick` | -| :baby_chick: | `baby_chick` | :hatched_chick: | `hatched_chick` | -| :bird: | `bird` | :penguin: | `penguin` | -| :dove: | `dove` | :eagle: | `eagle` | -| :duck: | `duck` | :owl: | `owl` | - -### 两栖动物 - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :frog: | `frog` | - -### 爬虫类 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :crocodile: | `crocodile` | :turtle: | `turtle` | -| :lizard: | `lizard` | :snake: | `snake` | -| :dragon_face: | `dragon_face` | :dragon: | `dragon` | - -### 海洋动物 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :whale: | `whale` | :whale2: | `whale2` | -| :dolphin: | `dolphin`
`flipper` | :fish: | `fish` | -| :tropical_fish: | `tropical_fish` | :blowfish: | `blowfish` | -| :shark: | `shark` | :octopus: | `octopus` | -| :shell: | `shell` | | | - -### 虫类 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :snail: | `snail` | :butterfly: | `butterfly` | -| :bug: | `bug` | :ant: | `ant` | -| :bee: | `bee`
`honeybee` | :beetle: | `beetle` | -| :spider: | `spider` | :spider_web: | `spider_web` | -| :scorpion: | `scorpion` | | | - -### 花类植物 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :bouquet: | `bouquet` | :cherry_blossom: | `cherry_blossom` | -| :white_flower: | `white_flower` | :rosette: | `rosette` | -| :rose: | `rose` | :wilted_flower: | `wilted_flower` | -| :hibiscus: | `hibiscus` | :sunflower: | `sunflower` | -| :blossom: | `blossom` | :tulip: | `tulip` | - -### 其它植物 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :seedling: | `seedling` | :evergreen_tree: | `evergreen_tree` | -| :deciduous_tree: | `deciduous_tree` | :palm_tree: | `palm_tree` | -| :cactus: | `cactus` | :ear_of_rice: | `ear_of_rice` | -| :herb: | `herb` | :shamrock: | `shamrock` | -| :four_leaf_clover: | `four_leaf_clover` | :maple_leaf: | `maple_leaf` | -| :fallen_leaf: | `fallen_leaf` | :leaves: | `leaves` | - -## 食物与饮料 - -### 水果 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :grapes: | `grapes` | :melon: | `melon` | -| :watermelon: | `watermelon` | :mandarin: | `mandarin`
`orange`
`tangerine` | -| :lemon: | `lemon` | :banana: | `banana` | -| :pineapple: | `pineapple` | :apple: | `apple` | -| :green_apple: | `green_apple` | :pear: | `pear` | -| :peach: | `peach` | :cherries: | `cherries` | -| :strawberry: | `strawberry` | :kiwi_fruit: | `kiwi_fruit` | -| :tomato: | `tomato` | | | - -### 蔬菜 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :avocado: | `avocado` | :eggplant: | `eggplant` | -| :potato: | `potato` | :carrot: | `carrot` | -| :corn: | `corn` | :hot_pepper: | `hot_pepper` | -| :cucumber: | `cucumber` | :mushroom: | `mushroom` | -| :peanuts: | `peanuts` | :chestnut: | `chestnut` | - -### 快餐 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :bread: | `bread` | :croissant: | `croissant` | -| :baguette_bread: | `baguette_bread` | :pancakes: | `pancakes` | -| :cheese: | `cheese` | :meat_on_bone: | `meat_on_bone` | -| :poultry_leg: | `poultry_leg` | :bacon: | `bacon` | -| :hamburger: | `hamburger` | :fries: | `fries` | -| :pizza: | `pizza` | :hotdog: | `hotdog` | -| :taco: | `taco` | :burrito: | `burrito` | -| :stuffed_flatbread: | `stuffed_flatbread` | :egg: | `egg` | -| :fried_egg: | `fried_egg` | :shallow_pan_of_food: | `shallow_pan_of_food` | -| :stew: | `stew` | :green_salad: | `green_salad` | -| :popcorn: | `popcorn` | | | - -### 亚洲食物 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :bento: | `bento` | :rice_cracker: | `rice_cracker` | -| :rice_ball: | `rice_ball` | :rice: | `rice` | -| :curry: | `curry` | :ramen: | `ramen` | -| :spaghetti: | `spaghetti` | :sweet_potato: | `sweet_potato` | -| :oden: | `oden` | :sushi: | `sushi` | -| :fried_shrimp: | `fried_shrimp` | :fish_cake: | `fish_cake` | -| :dango: | `dango` | | | - -### 海鲜 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :crab: | `crab` | :shrimp: | `shrimp` | -| :squid: | `squid` | | | - -### 甜点 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :icecream: | `icecream` | :shaved_ice: | `shaved_ice` | -| :ice_cream: | `ice_cream` | :doughnut: | `doughnut` | -| :cookie: | `cookie` | :birthday: | `birthday` | -| :cake: | `cake` | :chocolate_bar: | `chocolate_bar` | -| :candy: | `candy` | :lollipop: | `lollipop` | -| :custard: | `custard` | :honey_pot: | `honey_pot` | - -### 饮料 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :baby_bottle: | `baby_bottle` | :milk_glass: | `milk_glass` | -| :coffee: | `coffee` | :tea: | `tea` | -| :sake: | `sake` | :champagne: | `champagne` | -| :wine_glass: | `wine_glass` | :cocktail: | `cocktail` | -| :tropical_drink: | `tropical_drink` | :beer: | `beer` | -| :beers: | `beers` | :clinking_glasses: | `clinking_glasses` | -| :tumbler_glass: | `tumbler_glass` | | | - -### 餐具 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :plate_with_cutlery: | `plate_with_cutlery` | :fork_and_knife: | `fork_and_knife` | -| :spoon: | `spoon` | :hocho: | `hocho`
`knife` | -| :amphora: | `amphora` | | | - -## 旅游与地理 - -### 地图 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :earth_africa: | `earth_africa` | :earth_americas: | `earth_americas` | -| :earth_asia: | `earth_asia` | :globe_with_meridians: | `globe_with_meridians` | -| :world_map: | `world_map` | :japan: | `japan` | - -### 地理现象 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :mountain_snow: | `mountain_snow` | :mountain: | `mountain` | -| :volcano: | `volcano` | :mount_fuji: | `mount_fuji` | -| :camping: | `camping` | :beach_umbrella: | `beach_umbrella` | -| :desert: | `desert` | :desert_island: | `desert_island` | -| :national_park: | `national_park` | | | - -### 建筑物 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :stadium: | `stadium` | :classical_building: | `classical_building` | -| :building_construction: | `building_construction` | :houses: | `houses` | -| :derelict_house: | `derelict_house` | :house: | `house` | -| :house_with_garden: | `house_with_garden` | :office: | `office` | -| :post_office: | `post_office` | :european_post_office: | `european_post_office` | -| :hospital: | `hospital` | :bank: | `bank` | -| :hotel: | `hotel` | :love_hotel: | `love_hotel` | -| :convenience_store: | `convenience_store` | :school: | `school` | -| :department_store: | `department_store` | :factory: | `factory` | -| :japanese_castle: | `japanese_castle` | :european_castle: | `european_castle` | -| :wedding: | `wedding` | :tokyo_tower: | `tokyo_tower` | -| :statue_of_liberty: | `statue_of_liberty` | | | - -### 宗教建筑 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :church: | `church` | :mosque: | `mosque` | -| :synagogue: | `synagogue` | :shinto_shrine: | `shinto_shrine` | -| :kaaba: | `kaaba` | | | - -### 其它地点 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :fountain: | `fountain` | :tent: | `tent` | -| :foggy: | `foggy` | :night_with_stars: | `night_with_stars` | -| :cityscape: | `cityscape` | :sunrise_over_mountains: | `sunrise_over_mountains` | -| :sunrise: | `sunrise` | :city_sunset: | `city_sunset` | -| :city_sunrise: | `city_sunrise` | :bridge_at_night: | `bridge_at_night` | -| :hotsprings: | `hotsprings` | :carousel_horse: | `carousel_horse` | -| :ferris_wheel: | `ferris_wheel` | :roller_coaster: | `roller_coaster` | -| :barber: | `barber` | :circus_tent: | `circus_tent` | - -### 陆路运输 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :steam_locomotive: | `steam_locomotive` | :railway_car: | `railway_car` | -| :bullettrain_side: | `bullettrain_side` | :bullettrain_front: | `bullettrain_front` | -| :train2: | `train2` | :metro: | `metro` | -| :light_rail: | `light_rail` | :station: | `station` | -| :tram: | `tram` | :monorail: | `monorail` | -| :mountain_railway: | `mountain_railway` | :train: | `train` | -| :bus: | `bus` | :oncoming_bus: | `oncoming_bus` | -| :trolleybus: | `trolleybus` | :minibus: | `minibus` | -| :ambulance: | `ambulance` | :fire_engine: | `fire_engine` | -| :police_car: | `police_car` | :oncoming_police_car: | `oncoming_police_car` | -| :taxi: | `taxi` | :oncoming_taxi: | `oncoming_taxi` | -| :car: | `car`
`red_car` | :oncoming_automobile: | `oncoming_automobile` | -| :blue_car: | `blue_car` | :truck: | `truck` | -| :articulated_lorry: | `articulated_lorry` | :tractor: | `tractor` | -| :racing_car: | `racing_car` | :motorcycle: | `motorcycle` | -| :motor_scooter: | `motor_scooter` | :bike: | `bike` | -| :kick_scooter: | `kick_scooter` | :busstop: | `busstop` | -| :motorway: | `motorway` | :railway_track: | `railway_track` | -| :oil_drum: | `oil_drum` | :fuelpump: | `fuelpump` | -| :rotating_light: | `rotating_light` | :traffic_light: | `traffic_light` | -| :vertical_traffic_light: | `vertical_traffic_light` | :stop_sign: | `stop_sign` | -| :construction: | `construction` | | | - -### 水路运输 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :anchor: | `anchor` | :boat: | `boat`
`sailboat` | -| :canoe: | `canoe` | :speedboat: | `speedboat` | -| :passenger_ship: | `passenger_ship` | :ferry: | `ferry` | -| :motor_boat: | `motor_boat` | :ship: | `ship` | - -### 空中运输 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :airplane: | `airplane` | :small_airplane: | `small_airplane` | -| :flight_departure: | `flight_departure` | :flight_arrival: | `flight_arrival` | -| :seat: | `seat` | :helicopter: | `helicopter` | -| :suspension_railway: | `suspension_railway` | :mountain_cableway: | `mountain_cableway` | -| :aerial_tramway: | `aerial_tramway` | :artificial_satellite: | `artificial_satellite` | -| :rocket: | `rocket` | | | - -### 旅馆 - -| icon | code | icon | code | -| :-: | - | :-: | - | -| :bellhop_bell: | `bellhop_bell` | - -### 时间 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :hourglass: | `hourglass` | :hourglass_flowing_sand: | `hourglass_flowing_sand` | -| :watch: | `watch` | :alarm_clock: | `alarm_clock` | -| :stopwatch: | `stopwatch` | :timer_clock: | `timer_clock` | -| :mantelpiece_clock: | `mantelpiece_clock` | :clock12: | `clock12` | -| :clock1230: | `clock1230` | :clock1: | `clock1` | -| :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` | :clock10: | `clock10` | -| :clock1030: | `clock1030` | :clock11: | `clock11` | -| :clock1130: | `clock1130` | | | - -### 天空与天气 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :new_moon: | `new_moon` | :waxing_crescent_moon: | `waxing_crescent_moon` | -| :first_quarter_moon: | `first_quarter_moon` | :moon: | `moon`
`waxing_gibbous_moon` | -| :full_moon: | `full_moon` | :waning_gibbous_moon: | `waning_gibbous_moon` | -| :last_quarter_moon: | `last_quarter_moon` | :waning_crescent_moon: | `waning_crescent_moon` | -| :crescent_moon: | `crescent_moon` | :new_moon_with_face: | `new_moon_with_face` | -| :first_quarter_moon_with_face: | `first_quarter_moon_with_face` | :last_quarter_moon_with_face: | `last_quarter_moon_with_face` | -| :thermometer: | `thermometer` | :sunny: | `sunny` | -| :full_moon_with_face: | `full_moon_with_face` | :sun_with_face: | `sun_with_face` | -| :star: | `star` | :star2: | `star2` | -| :stars: | `stars` | :milky_way: | `milky_way` | -| :cloud: | `cloud` | :partly_sunny: | `partly_sunny` | -| :cloud_with_lightning_and_rain: | `cloud_with_lightning_and_rain` | :sun_behind_small_cloud: | `sun_behind_small_cloud` | -| :sun_behind_large_cloud: | `sun_behind_large_cloud` | :sun_behind_rain_cloud: | `sun_behind_rain_cloud` | -| :cloud_with_rain: | `cloud_with_rain` | :cloud_with_snow: | `cloud_with_snow` | -| :cloud_with_lightning: | `cloud_with_lightning` | :tornado: | `tornado` | -| :fog: | `fog` | :wind_face: | `wind_face` | -| :cyclone: | `cyclone` | :rainbow: | `rainbow` | -| :closed_umbrella: | `closed_umbrella` | :open_umbrella: | `open_umbrella` | -| :umbrella: | `umbrella` | :parasol_on_ground: | `parasol_on_ground` | -| :zap: | `zap` | :snowflake: | `snowflake` | -| :snowman_with_snow: | `snowman_with_snow` | :snowman: | `snowman` | -| :comet: | `comet` | :fire: | `fire` | -| :droplet: | `droplet` | :ocean: | `ocean` | - -## 活动 - -### 事件 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :jack_o_lantern: | `jack_o_lantern` | :christmas_tree: | `christmas_tree` | -| :fireworks: | `fireworks` | :sparkler: | `sparkler` | -| :sparkles: | `sparkles` | :balloon: | `balloon` | -| :tada: | `tada` | :confetti_ball: | `confetti_ball` | -| :tanabata_tree: | `tanabata_tree` | :bamboo: | `bamboo` | -| :dolls: | `dolls` | :flags: | `flags` | -| :wind_chime: | `wind_chime` | :rice_scene: | `rice_scene` | -| :ribbon: | `ribbon` | :gift: | `gift` | -| :reminder_ribbon: | `reminder_ribbon` | :tickets: | `tickets` | -| :ticket: | `ticket` | | | - -### 奖杯与奖牌 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :medal_military: | `medal_military` | :trophy: | `trophy` | -| :medal_sports: | `medal_sports` | :1st_place_medal: | `1st_place_medal` | -| :2nd_place_medal: | `2nd_place_medal` | :3rd_place_medal: | `3rd_place_medal` | - -### 体育运动 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :soccer: | `soccer` | :baseball: | `baseball` | -| :basketball: | `basketball` | :volleyball: | `volleyball` | -| :football: | `football` | :rugby_football: | `rugby_football` | -| :tennis: | `tennis` | :bowling: | `bowling` | -| :cricket: | `cricket` | :field_hockey: | `field_hockey` | -| :ice_hockey: | `ice_hockey` | :ping_pong: | `ping_pong` | -| :badminton: | `badminton` | :boxing_glove: | `boxing_glove` | -| :martial_arts_uniform: | `martial_arts_uniform` | :goal_net: | `goal_net` | -| :golf: | `golf` | :ice_skate: | `ice_skate` | -| :fishing_pole_and_fish: | `fishing_pole_and_fish` | :running_shirt_with_sash: | `running_shirt_with_sash` | -| :ski: | `ski` | | | - -### 游戏 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :dart: | `dart` | :8ball: | `8ball` | -| :crystal_ball: | `crystal_ball` | :video_game: | `video_game` | -| :joystick: | `joystick` | :slot_machine: | `slot_machine` | -| :game_die: | `game_die` | :spades: | `spades` | -| :hearts: | `hearts` | :diamonds: | `diamonds` | -| :clubs: | `clubs` | :black_joker: | `black_joker` | -| :mahjong: | `mahjong` | :flower_playing_cards: | `flower_playing_cards` | - -### 艺术与工艺 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :performing_arts: | `performing_arts` | :framed_picture: | `framed_picture` | -| :art: | `art` | | | - -## 物品 - -### 服装 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :eyeglasses: | `eyeglasses` | :dark_sunglasses: | `dark_sunglasses` | -| :necktie: | `necktie` | :shirt: | `shirt`
`tshirt` | -| :jeans: | `jeans` | :dress: | `dress` | -| :kimono: | `kimono` | :bikini: | `bikini` | -| :womans_clothes: | `womans_clothes` | :purse: | `purse` | -| :handbag: | `handbag` | :pouch: | `pouch` | -| :shopping: | `shopping` | :school_satchel: | `school_satchel` | -| :mans_shoe: | `mans_shoe`
`shoe` | :athletic_shoe: | `athletic_shoe` | -| :high_heel: | `high_heel` | :sandal: | `sandal` | -| :boot: | `boot` | :crown: | `crown` | -| :womans_hat: | `womans_hat` | :tophat: | `tophat` | -| :mortar_board: | `mortar_board` | :rescue_worker_helmet: | `rescue_worker_helmet` | -| :prayer_beads: | `prayer_beads` | :lipstick: | `lipstick` | -| :ring: | `ring` | :gem: | `gem` | - -### 声音 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :mute: | `mute` | :speaker: | `speaker` | -| :sound: | `sound` | :loud_sound: | `loud_sound` | -| :loudspeaker: | `loudspeaker` | :mega: | `mega` | -| :postal_horn: | `postal_horn` | :bell: | `bell` | -| :no_bell: | `no_bell` | | | - -### 音乐 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :musical_score: | `musical_score` | :musical_note: | `musical_note` | -| :notes: | `notes` | :studio_microphone: | `studio_microphone` | -| :level_slider: | `level_slider` | :control_knobs: | `control_knobs` | -| :microphone: | `microphone` | :headphones: | `headphones` | -| :radio: | `radio` | | | - -### 乐器 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :saxophone: | `saxophone` | :guitar: | `guitar` | -| :musical_keyboard: | `musical_keyboard` | :trumpet: | `trumpet` | -| :violin: | `violin` | :drum: | `drum` | - -### 电话 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :iphone: | `iphone` | :calling: | `calling` | -| :phone: | `phone`
`telephone` | :telephone_receiver: | `telephone_receiver` | -| :pager: | `pager` | :fax: | `fax` | - -### 电脑 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :battery: | `battery` | :electric_plug: | `electric_plug` | -| :computer: | `computer` | :desktop_computer: | `desktop_computer` | -| :printer: | `printer` | :keyboard: | `keyboard` | -| :computer_mouse: | `computer_mouse` | :trackball: | `trackball` | -| :minidisc: | `minidisc` | :floppy_disk: | `floppy_disk` | -| :cd: | `cd` | :dvd: | `dvd` | - -### 灯光与影像 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :movie_camera: | `movie_camera` | :film_strip: | `film_strip` | -| :film_projector: | `film_projector` | :clapper: | `clapper` | -| :tv: | `tv` | :camera: | `camera` | -| :camera_flash: | `camera_flash` | :video_camera: | `video_camera` | -| :vhs: | `vhs` | :mag: | `mag` | -| :mag_right: | `mag_right` | :candle: | `candle` | -| :bulb: | `bulb` | :flashlight: | `flashlight` | -| :izakaya_lantern: | `izakaya_lantern`
`lantern` | | | - -### 书与纸张 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :notebook_with_decorative_cover: | `notebook_with_decorative_cover` | :closed_book: | `closed_book` | -| :book: | `book`
`open_book` | :green_book: | `green_book` | -| :blue_book: | `blue_book` | :orange_book: | `orange_book` | -| :books: | `books` | :notebook: | `notebook` | -| :ledger: | `ledger` | :page_with_curl: | `page_with_curl` | -| :scroll: | `scroll` | :page_facing_up: | `page_facing_up` | -| :newspaper: | `newspaper` | :newspaper_roll: | `newspaper_roll` | -| :bookmark_tabs: | `bookmark_tabs` | :bookmark: | `bookmark` | -| :label: | `label` | | | - -### 钱 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :moneybag: | `moneybag` | :yen: | `yen` | -| :dollar: | `dollar` | :euro: | `euro` | -| :pound: | `pound` | :money_with_wings: | `money_with_wings` | -| :credit_card: | `credit_card` | :chart: | `chart` | - -### 邮件 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :email: | `email`
`envelope` | :e-mail: | `:e-mail:` | -| :incoming_envelope: | `incoming_envelope` | :envelope_with_arrow: | `envelope_with_arrow` | -| :outbox_tray: | `outbox_tray` | :inbox_tray: | `inbox_tray` | -| :package: | `package` | :mailbox: | `mailbox` | -| :mailbox_closed: | `mailbox_closed` | :mailbox_with_mail: | `mailbox_with_mail` | -| :mailbox_with_no_mail: | `mailbox_with_no_mail` | :postbox: | `postbox` | -| :ballot_box: | `ballot_box` | | | - -### 书写 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :pencil2: | `pencil2` | :black_nib: | `black_nib` | -| :fountain_pen: | `fountain_pen` | :pen: | `pen` | -| :paintbrush: | `paintbrush` | :crayon: | `crayon` | -| :memo: | `memo`
`pencil` | | | - -### 办公 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :briefcase: | `briefcase` | :file_folder: | `file_folder` | -| :open_file_folder: | `open_file_folder` | :card_index_dividers: | `card_index_dividers` | -| :date: | `date` | :calendar: | `calendar` | -| :spiral_notepad: | `spiral_notepad` | :spiral_calendar: | `spiral_calendar` | -| :card_index: | `card_index` | :chart_with_upwards_trend: | `chart_with_upwards_trend` | -| :chart_with_downwards_trend: | `chart_with_downwards_trend` | :bar_chart: | `bar_chart` | -| :clipboard: | `clipboard` | :pushpin: | `pushpin` | -| :round_pushpin: | `round_pushpin` | :paperclip: | `paperclip` | -| :paperclips: | `paperclips` | :straight_ruler: | `straight_ruler` | -| :triangular_ruler: | `triangular_ruler` | :scissors: | `scissors` | -| :card_file_box: | `card_file_box` | :file_cabinet: | `file_cabinet` | -| :wastebasket: | `wastebasket` | | | - -### 锁 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :lock: | `lock` | :unlock: | `unlock` | -| :lock_with_ink_pen: | `lock_with_ink_pen` | :closed_lock_with_key: | `closed_lock_with_key` | -| :key: | `key` | :old_key: | `old_key` | - -### 工具 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :hammer: | `hammer` | :pick: | `pick` | -| :hammer_and_pick: | `hammer_and_pick` | :hammer_and_wrench: | `hammer_and_wrench` | -| :dagger: | `dagger` | :crossed_swords: | `crossed_swords` | -| :gun: | `gun` | :bow_and_arrow: | `bow_and_arrow` | -| :shield: | `shield` | :wrench: | `wrench` | -| :nut_and_bolt: | `nut_and_bolt` | :gear: | `gear` | -| :clamp: | `clamp` | :balance_scale: | `balance_scale` | -| :link: | `link` | :chains: | `chains` | - -### 科学 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :alembic: | `alembic` | :microscope: | `microscope` | -| :telescope: | `telescope` | :satellite: | `satellite` | - -### 医疗 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :syringe: | `syringe` | :pill: | `pill` | - -### 生活用品 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :door: | `door` | :bed: | `bed` | -| :couch_and_lamp: | `couch_and_lamp` | :toilet: | `toilet` | -| :shower: | `shower` | :bathtub: | `bathtub` | -| :shopping_cart: | `shopping_cart` | | | - -### 其它物品 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :smoking: | `smoking` | :coffin: | `coffin` | -| :funeral_urn: | `funeral_urn` | :moyai: | `moyai` | - -## 符号 - -### 交通标识 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :atm: | `atm` | :put_litter_in_its_place: | `put_litter_in_its_place` | -| :potable_water: | `potable_water` | :wheelchair: | `wheelchair` | -| :mens: | `mens` | :womens: | `womens` | -| :restroom: | `restroom` | :baby_symbol: | `baby_symbol` | -| :wc: | `wc` | :passport_control: | `passport_control` | -| :customs: | `customs` | :baggage_claim: | `baggage_claim` | -| :left_luggage: | `left_luggage` | | | - -### 警告 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :warning: | `warning` | :children_crossing: | `children_crossing` | -| :no_entry: | `no_entry` | :no_entry_sign: | `no_entry_sign` | -| :no_bicycles: | `no_bicycles` | :no_smoking: | `no_smoking` | -| :do_not_litter: | `do_not_litter` | :non-potable_water: | `:non-potable_water:` | -| :no_pedestrians: | `no_pedestrians` | :no_mobile_phones: | `no_mobile_phones` | -| :underage: | `underage` | :radioactive: | `radioactive` | -| :biohazard: | `biohazard` | | | - -### 箭头 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :arrow_up: | `arrow_up` | :arrow_upper_right: | `arrow_upper_right` | -| :arrow_right: | `arrow_right` | :arrow_lower_right: | `arrow_lower_right` | -| :arrow_down: | `arrow_down` | :arrow_lower_left: | `arrow_lower_left` | -| :arrow_left: | `arrow_left` | :arrow_upper_left: | `arrow_upper_left` | -| :arrow_up_down: | `arrow_up_down` | :left_right_arrow: | `left_right_arrow` | -| :leftwards_arrow_with_hook: | `leftwards_arrow_with_hook` | :arrow_right_hook: | `arrow_right_hook` | -| :arrow_heading_up: | `arrow_heading_up` | :arrow_heading_down: | `arrow_heading_down` | -| :arrows_clockwise: | `arrows_clockwise` | :arrows_counterclockwise: | `arrows_counterclockwise` | -| :back: | `back` | :end: | `end` | -| :on: | `on` | :soon: | `soon` | -| :top: | `top` | | | - -### 宗教 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :place_of_worship: | `place_of_worship` | :atom_symbol: | `atom_symbol` | -| :om: | `om` | :star_of_david: | `star_of_david` | -| :wheel_of_dharma: | `wheel_of_dharma` | :yin_yang: | `yin_yang` | -| :latin_cross: | `latin_cross` | :orthodox_cross: | `orthodox_cross` | -| :star_and_crescent: | `star_and_crescent` | :peace_symbol: | `peace_symbol` | -| :menorah: | `menorah` | :six_pointed_star: | `six_pointed_star` | - -### 生肖 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :aries: | `aries` | :taurus: | `taurus` | -| :gemini: | `gemini` | :cancer: | `cancer` | -| :leo: | `leo` | :virgo: | `virgo` | -| :libra: | `libra` | :scorpius: | `scorpius` | -| :sagittarius: | `sagittarius` | :capricorn: | `capricorn` | -| :aquarius: | `aquarius` | :pisces: | `pisces` | -| :ophiuchus: | `ophiuchus` | | | - -### 影像符号 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :twisted_rightwards_arrows: | `twisted_rightwards_arrows` | :repeat: | `repeat` | -| :repeat_one: | `repeat_one` | :arrow_forward: | `arrow_forward` | -| :fast_forward: | `fast_forward` | :next_track_button: | `next_track_button` | -| :play_or_pause_button: | `play_or_pause_button` | :arrow_backward: | `arrow_backward` | -| :rewind: | `rewind` | :previous_track_button: | `previous_track_button` | -| :arrow_up_small: | `arrow_up_small` | :arrow_double_up: | `arrow_double_up` | -| :arrow_down_small: | `arrow_down_small` | :arrow_double_down: | `arrow_double_down` | -| :pause_button: | `pause_button` | :stop_button: | `stop_button` | -| :record_button: | `record_button` | :cinema: | `cinema` | -| :low_brightness: | `low_brightness` | :high_brightness: | `high_brightness` | -| :signal_strength: | `signal_strength` | :vibration_mode: | `vibration_mode` | -| :mobile_phone_off: | `mobile_phone_off` | | | - -### 数学 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :heavy_multiplication_x: | `heavy_multiplication_x` | :heavy_plus_sign: | `heavy_plus_sign` | -| :heavy_minus_sign: | `heavy_minus_sign` | :heavy_division_sign: | `heavy_division_sign` | - -### 标点符号 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :bangbang: | `bangbang` | :interrobang: | `interrobang` | -| :question: | `question` | :grey_question: | `grey_question` | -| :grey_exclamation: | `grey_exclamation` | :exclamation: | `exclamation`
`heavy_exclamation_mark` | -| :wavy_dash: | `wavy_dash` | | | - -### 货币 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :currency_exchange: | `currency_exchange` | :heavy_dollar_sign: | `heavy_dollar_sign` | - -### 按键符号 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :hash: | `hash` | :asterisk: | `asterisk` | -| :zero: | `zero` | :one: | `one` | -| :two: | `two` | :three: | `three` | -| :four: | `four` | :five: | `five` | -| :six: | `six` | :seven: | `seven` | -| :eight: | `eight` | :nine: | `nine` | -| :keycap_ten: | `keycap_ten` | | | - -### 字母符号 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :capital_abcd: | `capital_abcd` | :abcd: | `abcd` | -| :1234: | `1234` | :symbols: | `symbols` | -| :abc: | `abc` | :a: | `a` | -| :ab: | `ab` | :b: | `b` | -| :cl: | `cl` | :cool: | `cool` | -| :free: | `free` | :information_source: | `information_source` | -| :id: | `id` | :m: | `m` | -| :new: | `new` | :ng: | `ng` | -| :o2: | `o2` | :ok: | `ok` | -| :parking: | `parking` | :sos: | `sos` | -| :up: | `up` | :vs: | `vs` | -| :koko: | `koko` | :sa: | `sa` | -| :u6708: | `u6708` | :u6709: | `u6709` | -| :u6307: | `u6307` | :ideograph_advantage: | `ideograph_advantage` | -| :u5272: | `u5272` | :u7121: | `u7121` | -| :u7981: | `u7981` | :accept: | `accept` | -| :u7533: | `u7533` | :u5408: | `u5408` | -| :u7a7a: | `u7a7a` | :congratulations: | `congratulations` | -| :secret: | `secret` | :u55b6: | `u55b6` | -| :u6e80: | `u6e80` | | | - -### 几何符号 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :red_circle: | `red_circle` | :large_blue_circle: | `large_blue_circle` | -| :black_circle: | `black_circle` | :white_circle: | `white_circle` | -| :black_large_square: | `black_large_square` | :white_large_square: | `white_large_square` | -| :black_medium_square: | `black_medium_square` | :white_medium_square: | `white_medium_square` | -| :black_medium_small_square: | `black_medium_small_square` | :white_medium_small_square: | `white_medium_small_square` | -| :black_small_square: | `black_small_square` | :white_small_square: | `white_small_square` | -| :large_orange_diamond: | `large_orange_diamond` | :large_blue_diamond: | `large_blue_diamond` | -| :small_orange_diamond: | `small_orange_diamond` | :small_blue_diamond: | `small_blue_diamond` | -| :small_red_triangle: | `small_red_triangle` | :small_red_triangle_down: | `small_red_triangle_down` | -| :diamond_shape_with_a_dot_inside: | `diamond_shape_with_a_dot_inside` | :radio_button: | `radio_button` | -| :white_square_button: | `white_square_button` | :black_square_button: | `black_square_button` | - -### 其它符合 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :recycle: | `recycle` | :fleur_de_lis: | `fleur_de_lis` | -| :trident: | `trident` | :name_badge: | `name_badge` | -| :beginner: | `beginner` | :o: | `o` | -| :white_check_mark: | `white_check_mark` | :ballot_box_with_check: | `ballot_box_with_check` | -| :heavy_check_mark: | `heavy_check_mark` | :x: | `x` | -| :negative_squared_cross_mark: | `negative_squared_cross_mark` | :curly_loop: | `curly_loop` | -| :loop: | `loop` | :part_alternation_mark: | `part_alternation_mark` | -| :eight_spoked_asterisk: | `eight_spoked_asterisk` | :eight_pointed_black_star: | `eight_pointed_black_star` | -| :sparkle: | `sparkle` | :copyright: | `copyright` | -| :registered: | `registered` | :tm: | `tm` | - -## 旗帜 - -### 常用旗帜 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :checkered_flag: | `checkered_flag` | :triangular_flag_on_post: | `triangular_flag_on_post` | -| :crossed_flags: | `crossed_flags` | :black_flag: | `black_flag` | -| :white_flag: | `white_flag` | :rainbow_flag: | `rainbow_flag` | - -### 国家和地区旗帜 - -| 图标 | 代码 | 图标 | 代码 | -| :-: | - | :-: | - | -| :andorra: | `andorra` | :united_arab_emirates: | `united_arab_emirates` | -| :afghanistan: | `afghanistan` | :antigua_barbuda: | `antigua_barbuda` | -| :anguilla: | `anguilla` | :albania: | `albania` | -| :armenia: | `armenia` | :angola: | `angola` | -| :antarctica: | `antarctica` | :argentina: | `argentina` | -| :american_samoa: | `american_samoa` | :austria: | `austria` | -| :australia: | `australia` | :aruba: | `aruba` | -| :aland_islands: | `aland_islands` | :azerbaijan: | `azerbaijan` | -| :bosnia_herzegovina: | `bosnia_herzegovina` | :barbados: | `barbados` | -| :bangladesh: | `bangladesh` | :belgium: | `belgium` | -| :burkina_faso: | `burkina_faso` | :bulgaria: | `bulgaria` | -| :bahrain: | `bahrain` | :burundi: | `burundi` | -| :benin: | `benin` | :st_barthelemy: | `st_barthelemy` | -| :bermuda: | `bermuda` | :brunei: | `brunei` | -| :bolivia: | `bolivia` | :caribbean_netherlands: | `caribbean_netherlands` | -| :brazil: | `brazil` | :bahamas: | `bahamas` | -| :bhutan: | `bhutan` | :botswana: | `botswana` | -| :belarus: | `belarus` | :belize: | `belize` | -| :canada: | `canada` | :cocos_islands: | `cocos_islands` | -| :congo_kinshasa: | `congo_kinshasa` | :central_african_republic: | `central_african_republic` | -| :congo_brazzaville: | `congo_brazzaville` | :switzerland: | `switzerland` | -| :cote_divoire: | `cote_divoire` | :cook_islands: | `cook_islands` | -| :chile: | `chile` | :cameroon: | `cameroon` | -| :cn: | `cn` | :colombia: | `colombia` | -| :costa_rica: | `costa_rica` | :cuba: | `cuba` | -| :cape_verde: | `cape_verde` | :curacao: | `curacao` | -| :christmas_island: | `christmas_island` | :cyprus: | `cyprus` | -| :czech_republic: | `czech_republic` | :de: | `de` | -| :djibouti: | `djibouti` | :denmark: | `denmark` | -| :dominica: | `dominica` | :dominican_republic: | `dominican_republic` | -| :algeria: | `algeria` | :ecuador: | `ecuador` | -| :estonia: | `estonia` | :egypt: | `egypt` | -| :western_sahara: | `western_sahara` | :eritrea: | `eritrea` | -| :es: | `es` | :ethiopia: | `ethiopia` | -| :eu: | `eu`
`european_union` | :finland: | `finland` | -| :fiji: | `fiji` | :falkland_islands: | `falkland_islands` | -| :micronesia: | `micronesia` | :faroe_islands: | `faroe_islands` | -| :fr: | `fr` | :gabon: | `gabon` | -| :gb: | `gb`
`uk` | :grenada: | `grenada` | -| :georgia: | `georgia` | :french_guiana: | `french_guiana` | -| :guernsey: | `guernsey` | :ghana: | `ghana` | -| :gibraltar: | `gibraltar` | :greenland: | `greenland` | -| :gambia: | `gambia` | :guinea: | `guinea` | -| :guadeloupe: | `guadeloupe` | :equatorial_guinea: | `equatorial_guinea` | -| :greece: | `greece` | :south_georgia_south_sandwich_islands: | `south_georgia_south_sandwich_islands` | -| :guatemala: | `guatemala` | :guam: | `guam` | -| :guinea_bissau: | `guinea_bissau` | :guyana: | `guyana` | -| :hong_kong: | `hong_kong` | :honduras: | `honduras` | -| :croatia: | `croatia` | :haiti: | `haiti` | -| :hungary: | `hungary` | :canary_islands: | `canary_islands` | -| :indonesia: | `indonesia` | :ireland: | `ireland` | -| :israel: | `israel` | :isle_of_man: | `isle_of_man` | -| :india: | `india` | :british_indian_ocean_territory: | `british_indian_ocean_territory` | -| :iraq: | `iraq` | :iran: | `iran` | -| :iceland: | `iceland` | :it: | `it` | -| :jersey: | `jersey` | :jamaica: | `jamaica` | -| :jordan: | `jordan` | :jp: | `jp` | -| :kenya: | `kenya` | :kyrgyzstan: | `kyrgyzstan` | -| :cambodia: | `cambodia` | :kiribati: | `kiribati` | -| :comoros: | `comoros` | :st_kitts_nevis: | `st_kitts_nevis` | -| :north_korea: | `north_korea` | :kr: | `kr` | -| :kuwait: | `kuwait` | :cayman_islands: | `cayman_islands` | -| :kazakhstan: | `kazakhstan` | :laos: | `laos` | -| :lebanon: | `lebanon` | :st_lucia: | `st_lucia` | -| :liechtenstein: | `liechtenstein` | :sri_lanka: | `sri_lanka` | -| :liberia: | `liberia` | :lesotho: | `lesotho` | -| :lithuania: | `lithuania` | :luxembourg: | `luxembourg` | -| :latvia: | `latvia` | :libya: | `libya` | -| :morocco: | `morocco` | :monaco: | `monaco` | -| :moldova: | `moldova` | :montenegro: | `montenegro` | -| :madagascar: | `madagascar` | :marshall_islands: | `marshall_islands` | -| :macedonia: | `macedonia` | :mali: | `mali` | -| :myanmar: | `myanmar` | :mongolia: | `mongolia` | -| :macau: | `macau` | :northern_mariana_islands: | `northern_mariana_islands` | -| :martinique: | `martinique` | :mauritania: | `mauritania` | -| :montserrat: | `montserrat` | :malta: | `malta` | -| :mauritius: | `mauritius` | :maldives: | `maldives` | -| :malawi: | `malawi` | :mexico: | `mexico` | -| :malaysia: | `malaysia` | :mozambique: | `mozambique` | -| :namibia: | `namibia` | :new_caledonia: | `new_caledonia` | -| :niger: | `niger` | :norfolk_island: | `norfolk_island` | -| :nigeria: | `nigeria` | :nicaragua: | `nicaragua` | -| :netherlands: | `netherlands` | :norway: | `norway` | -| :nepal: | `nepal` | :nauru: | `nauru` | -| :niue: | `niue` | :new_zealand: | `new_zealand` | -| :oman: | `oman` | :panama: | `panama` | -| :peru: | `peru` | :french_polynesia: | `french_polynesia` | -| :papua_new_guinea: | `papua_new_guinea` | :philippines: | `philippines` | -| :pakistan: | `pakistan` | :poland: | `poland` | -| :st_pierre_miquelon: | `st_pierre_miquelon` | :pitcairn_islands: | `pitcairn_islands` | -| :puerto_rico: | `puerto_rico` | :palestinian_territories: | `palestinian_territories` | -| :portugal: | `portugal` | :palau: | `palau` | -| :paraguay: | `paraguay` | :qatar: | `qatar` | -| :reunion: | `reunion` | :romania: | `romania` | -| :serbia: | `serbia` | :ru: | `ru` | -| :rwanda: | `rwanda` | :saudi_arabia: | `saudi_arabia` | -| :solomon_islands: | `solomon_islands` | :seychelles: | `seychelles` | -| :sudan: | `sudan` | :sweden: | `sweden` | -| :singapore: | `singapore` | :st_helena: | `st_helena` | -| :slovenia: | `slovenia` | :slovakia: | `slovakia` | -| :sierra_leone: | `sierra_leone` | :san_marino: | `san_marino` | -| :senegal: | `senegal` | :somalia: | `somalia` | -| :suriname: | `suriname` | :south_sudan: | `south_sudan` | -| :sao_tome_principe: | `sao_tome_principe` | :el_salvador: | `el_salvador` | -| :sint_maarten: | `sint_maarten` | :syria: | `syria` | -| :swaziland: | `swaziland` | :turks_caicos_islands: | `turks_caicos_islands` | -| :chad: | `chad` | :french_southern_territories: | `french_southern_territories` | -| :togo: | `togo` | :thailand: | `thailand` | -| :tajikistan: | `tajikistan` | :tokelau: | `tokelau` | -| :timor_leste: | `timor_leste` | :turkmenistan: | `turkmenistan` | -| :tunisia: | `tunisia` | :tonga: | `tonga` | -| :tr: | `tr` | :trinidad_tobago: | `trinidad_tobago` | -| :tuvalu: | `tuvalu` | :taiwan: | `taiwan` | -| :tanzania: | `tanzania` | :ukraine: | `ukraine` | -| :uganda: | `uganda` | :us: | `us` | -| :uruguay: | `uruguay` | :uzbekistan: | `uzbekistan` | -| :vatican_city: | `vatican_city` | :st_vincent_grenadines: | `st_vincent_grenadines` | -| :venezuela: | `venezuela` | :british_virgin_islands: | `british_virgin_islands` | -| :us_virgin_islands: | `us_virgin_islands` | :vietnam: | `vietnam` | -| :vanuatu: | `vanuatu` | :wallis_futuna: | `wallis_futuna` | -| :samoa: | `samoa` | :kosovo: | `kosovo` | -| :yemen: | `yemen` | :mayotte: | `mayotte` | -| :south_africa: | `south_africa` | :zambia: | `zambia` | -| :zimbabwe: | `zimbabwe` | | | diff --git a/exampleSite/content/posts/extended-shortcode-bilibili/featured-image.jpg b/exampleSite/content/posts/extended-shortcode-bilibili/featured-image.jpg deleted file mode 100644 index 90dbcb0f..00000000 Binary files a/exampleSite/content/posts/extended-shortcode-bilibili/featured-image.jpg and /dev/null differ diff --git a/exampleSite/content/posts/extended-shortcode-bilibili/index.en.md b/exampleSite/content/posts/extended-shortcode-bilibili/index.en.md deleted file mode 100644 index 3e65fed8..00000000 --- a/exampleSite/content/posts/extended-shortcode-bilibili/index.en.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: "Extended Shortcode - bilibili" -date: 2022-07-20T13:55:03+08:00 -author: "Lruihao" -authorLink: "https://lruihao.cn" -description: "The bilibili shortcode embeds a responsive video player for bilibili videos." -resources: -- name: "featured-image" - src: "featured-image.jpg" - -tags: ["shortcodes"] -categories: ["documentation"] - -hiddenFromHomePage: true ---- - -{{< version 0.2.0 changed >}} - -The `bilibili` shortcode embeds a responsive video player for bilibili videos. - - - -When the video only has one part, only the BV `id` of the video is required, e.g.: - -```code -https://www.bilibili.com/video/BV1Sx411T7QQ -``` - -Example `bilibili` input: - -```go-html-template -{{}} -Or -{{}} -``` - -The rendered output looks like this: - -{{< bilibili id=BV1Sx411T7QQ >}} - -When the video has multiple parts, in addition to the BV `id` of the video, -`p` is also required, whose default value is `1`, e.g.: - -```code -https://www.bilibili.com/video/BV1TJ411C7An?p=3 -``` - -Example `bilibili` input with `p`: - -```go-html-template -{{}} -Or -{{}} -``` - -The rendered output looks like this: - -{{< bilibili id=BV1TJ411C7An p=3 >}} \ No newline at end of file diff --git a/exampleSite/content/posts/extended-shortcode-bilibili/index.zh-cn.md b/exampleSite/content/posts/extended-shortcode-bilibili/index.zh-cn.md deleted file mode 100644 index 8e5bcd57..00000000 --- a/exampleSite/content/posts/extended-shortcode-bilibili/index.zh-cn.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -title: "扩展 Shortcode - bilibili" -date: 2022-07-20T13:55:03+08:00 -author: "Lruihao" -authorLink: "https://lruihao.cn" -description: "bilibili shortcode 提供了一个内嵌的用来播放 bilibili 视频的响应式播放器。" -resources: -- name: "featured-image" - src: "featured-image.jpg" - -tags: ["shortcodes"] -categories: ["documentation"] - -hiddenFromHomePage: true ---- - -{{< version 0.2.0 changed >}} - -`bilibili` shortcode 提供了一个内嵌的用来播放 bilibili 视频的响应式播放器。 - - - -如果视频只有一个部分,则仅需要视频的 BV `id`, 例如: - -```code -https://www.bilibili.com/video/BV1Sx411T7QQ -``` - -一个 `bilibili` 示例: - -```go-html-template -{{}} -或者 -{{}} -``` - -呈现的输出效果如下: - -{{< bilibili id=BV1Sx411T7QQ >}} - -如果视频包含多个部分,则除了视频的 BV `id` 之外,还需要 `p`, 默认值为 `1`, 例如: - -```code -https://www.bilibili.com/video/BV1TJ411C7An?p=3 -``` - -一个带有 `p` 参数的 `bilibili` 示例: - -```go-html-template -{{}} -或者 -{{}} -``` - -呈现的输出效果如下: - -{{< bilibili id=BV1TJ411C7An p=3 >}} \ No newline at end of file diff --git a/exampleSite/content/posts/extended-shortcode-echarts/featured-image.jpg b/exampleSite/content/posts/extended-shortcode-echarts/featured-image.jpg deleted file mode 100644 index 5554bc16..00000000 Binary files a/exampleSite/content/posts/extended-shortcode-echarts/featured-image.jpg and /dev/null differ diff --git a/exampleSite/content/posts/extended-shortcode-echarts/index.en.md b/exampleSite/content/posts/extended-shortcode-echarts/index.en.md deleted file mode 100644 index 67cc0e52..00000000 --- a/exampleSite/content/posts/extended-shortcode-echarts/index.en.md +++ /dev/null @@ -1,407 +0,0 @@ ---- -title: "Extended Shortcode - echarts" -date: 2022-07-20T11:44:15+08:00 -author: "Lruihao" -authorLink: "https://lruihao.cn" -description: "The echarts shortcode supports data visualization in Hugo with ECharts library." -resources: -- name: "featured-image" - src: "featured-image.jpg" - -tags: ["shortcodes"] -categories: ["documentation"] - -hiddenFromHomePage: true -code: - maxShownLines: 70 ---- - -The `echarts` shortcode supports data visualization in Hugo with [ECharts](https://echarts.apache.org/) library. - - - -**ECharts** is a library helping you to generate interactive data visualization. - -The basic chart types ECharts supports include [line series](https://echarts.apache.org/en/option.html#series-line), [bar series](https://echarts.apache.org/en/option.html#series-line), [scatter series](https://echarts.apache.org/en/option.html#series-scatter), [pie charts](https://echarts.apache.org/en/option.html#series-pie), [candle-stick series](https://echarts.apache.org/en/option.html#series-candlestick), [boxplot series](https://echarts.apache.org/en/option.html#series-boxplot) for statistics, [map series](https://echarts.apache.org/en/option.html#series-map), [heatmap series](https://echarts.apache.org/en/option.html#series-heatmap), [lines series](https://echarts.apache.org/en/option.html#series-lines) for directional information, [graph series](https://echarts.apache.org/en/option.html#series-graph) for relationships, [treemap series](https://echarts.apache.org/en/option.html#series-treemap), [sunburst series](https://echarts.apache.org/en/option.html#series-sunburst), [parallel series](https://echarts.apache.org/en/option.html#series-parallel) for multi-dimensional data, [funnel series](https://echarts.apache.org/en/option.html#series-funnel), [gauge series](https://echarts.apache.org/en/option.html#series-gauge). And it's extremely easy to create a combinition of them with ECharts. - -Just insert your ECharts option in `JSON`/`YAML`/`TOML` format in the `echarts` shortcode and that’s it. - -Example `echarts` input in `JSON` format: - -```json -{{}} -{ - "title": { - "text": "Summary Line Chart", - "top": "2%", - "left": "center" - }, - "tooltip": { - "trigger": "axis" - }, - "legend": { - "data": ["Email Marketing", "Affiliate Advertising", "Video Advertising", "Direct View", "Search Engine"], - "top": "10%" - }, - "grid": { - "left": "5%", - "right": "5%", - "bottom": "5%", - "top": "20%", - "containLabel": true - }, - "toolbox": { - "feature": { - "saveAsImage": { - "title": "Save as Image" - } - } - }, - "xAxis": { - "type": "category", - "boundaryGap": false, - "data": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"] - }, - "yAxis": { - "type": "value" - }, - "series": [ - { - "name": "Email Marketing", - "type": "line", - "stack": "Total", - "data": [120, 132, 101, 134, 90, 230, 210] - }, - { - "name": "Affiliate Advertising", - "type": "line", - "stack": "Total", - "data": [220, 182, 191, 234, 290, 330, 310] - }, - { - "name": "Video Advertising", - "type": "line", - "stack": "Total", - "data": [150, 232, 201, 154, 190, 330, 410] - }, - { - "name": "Direct View", - "type": "line", - "stack": "Total", - "data": [320, 332, 301, 334, 390, 330, 320] - }, - { - "name": "Search Engine", - "type": "line", - "stack": "Total", - "data": [820, 932, 901, 934, 1290, 1330, 1320] - } - ] -} -{{}} -``` - -The same in `YAML` format: - -```yaml -{{}} -title: - text: Summary Line Chart - top: 2% - left: center -tooltip: - trigger: axis -legend: - data: - - Email Marketing - - Affiliate Advertising - - Video Advertising - - Direct View - - Search Engine - top: 10% -grid: - left: 5% - right: 5% - bottom: 5% - top: 20% - containLabel: true -toolbox: - feature: - saveAsImage: - title: Save as Image -xAxis: - type: category - boundaryGap: false - data: - - Monday - - Tuesday - - Wednesday - - Thursday - - Friday - - Saturday - - Sunday -yAxis: - type: value -series: - - name: Email Marketing - type: line - stack: Total - data: - - 120 - - 132 - - 101 - - 134 - - 90 - - 230 - - 210 - - name: Affiliate Advertising - type: line - stack: Total - data: - - 220 - - 182 - - 191 - - 234 - - 290 - - 330 - - 310 - - name: Video Advertising - type: line - stack: Total - data: - - 150 - - 232 - - 201 - - 154 - - 190 - - 330 - - 410 - - name: Direct View - type: line - stack: Total - data: - - 320 - - 332 - - 301 - - 334 - - 390 - - 330 - - 320 - - name: Search Engine - type: line - stack: Total - data: - - 820 - - 932 - - 901 - - 934 - - 1290 - - 1330 - - 1320 -{{}} -``` - -The same in `TOML` format: - -```toml -{{}} -[title] -text = "Summary Line Chart" -top = "2%" -left = "center" - -[tooltip] -trigger = "axis" - -[legend] -data = [ - "Email Marketing", - "Affiliate Advertising", - "Video Advertising", - "Direct View", - "Search Engine" -] -top = "10%" - -[grid] -left = "5%" -right = "5%" -bottom = "5%" -top = "20%" -containLabel = true - -[toolbox] -[toolbox.feature] -[toolbox.feature.saveAsImage] -title = "Save as Image" - -[xAxis] -type = "category" -boundaryGap = false -data = [ - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday", - "Sunday" -] - -[yAxis] -type = "value" - -[[series]] -name = "Email Marketing" -type = "line" -stack = "Total" -data = [ - 120.0, - 132.0, - 101.0, - 134.0, - 90.0, - 230.0, - 210.0 -] - -[[series]] -name = "Affiliate Advertising" -type = "line" -stack = "Total" -data = [ - 220.0, - 182.0, - 191.0, - 234.0, - 290.0, - 330.0, - 310.0 -] - -[[series]] -name = "Video Advertising" -type = "line" -stack = "Total" -data = [ - 150.0, - 232.0, - 201.0, - 154.0, - 190.0, - 330.0, - 410.0 -] - -[[series]] -name = "Direct View" -type = "line" -stack = "Total" -data = [ - 320.0, - 332.0, - 301.0, - 334.0, - 390.0, - 330.0, - 320.0 -] - -[[series]] -name = "Search Engine" -type = "line" -stack = "Total" -data = [ - 820.0, - 932.0, - 901.0, - 934.0, - 1290.0, - 1330.0, - 1320.0 -] -{{}} -``` - -The rendered output looks like this: - -{{< echarts >}} -{ - "title": { - "text": "Summary Line Chart", - "top": "2%", - "left": "center" - }, - "tooltip": { - "trigger": "axis" - }, - "legend": { - "data": ["Email Marketing", "Affiliate Advertising", "Video Advertising", "Direct View", "Search Engine"], - "top": "10%" - }, - "grid": { - "left": "5%", - "right": "5%", - "bottom": "5%", - "top": "20%", - "containLabel": true - }, - "toolbox": { - "feature": { - "saveAsImage": { - "title": "Save as Image" - } - } - }, - "xAxis": { - "type": "category", - "boundaryGap": false, - "data": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"] - }, - "yAxis": { - "type": "value" - }, - "series": [ - { - "name": "Email Marketing", - "type": "line", - "stack": "Total", - "data": [120, 132, 101, 134, 90, 230, 210] - }, - { - "name": "Affiliate Advertising", - "type": "line", - "stack": "Total", - "data": [220, 182, 191, 234, 290, 330, 310] - }, - { - "name": "Video Advertising", - "type": "line", - "stack": "Total", - "data": [150, 232, 201, 154, 190, 330, 410] - }, - { - "name": "Direct View", - "type": "line", - "stack": "Total", - "data": [320, 332, 301, 334, 390, 330, 320] - }, - { - "name": "Search Engine", - "type": "line", - "stack": "Total", - "data": [820, 932, 901, 934, 1290, 1330, 1320] - } - ] -} -{{< /echarts >}} - -The `echarts` shortcode has also the following named parameters: - -* **width** *[optional]* (**first** positional parameter) - - {{< version 0.2.0 >}} Width of the data visualization, default value is `100%`. - -* **height** *[optional]* (**second** positional parameter) - - {{< version 0.2.0 >}} Height of the data visualization, default value is `30rem`. diff --git a/exampleSite/content/posts/extended-shortcode-echarts/index.zh-cn.md b/exampleSite/content/posts/extended-shortcode-echarts/index.zh-cn.md deleted file mode 100644 index 1e605133..00000000 --- a/exampleSite/content/posts/extended-shortcode-echarts/index.zh-cn.md +++ /dev/null @@ -1,407 +0,0 @@ ---- -title: "扩展 Shortcode - echarts" -date: 2022-07-20T11:44:15+08:00 -author: "Lruihao" -authorLink: "https://lruihao.cn" -description: "echarts shortcode 使用 ECharts 库提供数据可视化的功能。" -resources: -- name: "featured-image" - src: "featured-image.jpg" - -tags: ["shortcodes"] -categories: ["documentation"] - -hiddenFromHomePage: true -code: - maxShownLines: 70 ---- - -`echarts` shortcode 使用 [ECharts](https://echarts.apache.org/) 库提供数据可视化的功能. - - - -**ECharts** 是一个帮助你生成交互式数据可视化的库. - -ECharts 提供了常规的 [折线图](https://echarts.apache.org/zh/option.html#series-line), [柱状图](https://echarts.apache.org/zh/option.html#series-line), [散点图](https://echarts.apache.org/zh/option.html#series-scatter), [饼图](https://echarts.apache.org/zh/option.html#series-pie), [K线图](https://echarts.apache.org/zh/option.html#series-candlestick), 用于统计的 [盒形图](https://echarts.apache.org/zh/option.html#series-boxplot), 用于地理数据可视化的 [地图](https://echarts.apache.org/zh/option.html#series-map), [热力图](https://echarts.apache.org/zh/option.html#series-heatmap), [线图](https://echarts.apache.org/zh/option.html#series-lines), 用于关系数据可视化的 [关系图](https://echarts.apache.org/zh/option.html#series-graph), [treemap](https://echarts.apache.org/zh/option.html#series-treemap), [旭日图](https://echarts.apache.org/zh/option.html#series-sunburst), 多维数据可视化的 [平行坐标](https://echarts.apache.org/zh/option.html#series-parallel), 还有用于 BI 的 [漏斗图](https://echarts.apache.org/zh/option.html#series-funnel), [仪表盘](https://echarts.apache.org/zh/option.html#series-gauge), 并且支持图与图之间的混搭. - -只需在 `echarts` shortcode 中以 `JSON`/`YAML`/`TOML`格式插入 ECharts 选项即可. - -一个 `JSON` 格式的 `echarts` 示例: - -```json -{{}} -{ - "title": { - "text": "折线统计图", - "top": "2%", - "left": "center" - }, - "tooltip": { - "trigger": "axis" - }, - "legend": { - "data": ["邮件营销", "联盟广告", "视频广告", "直接访问", "搜索引擎"], - "top": "10%" - }, - "grid": { - "left": "5%", - "right": "5%", - "bottom": "5%", - "top": "20%", - "containLabel": true - }, - "toolbox": { - "feature": { - "saveAsImage": { - "title": "保存为图片" - } - } - }, - "xAxis": { - "type": "category", - "boundaryGap": false, - "data": ["周一", "周二", "周三", "周四", "周五", "周六", "周日"] - }, - "yAxis": { - "type": "value" - }, - "series": [ - { - "name": "邮件营销", - "type": "line", - "stack": "总量", - "data": [120, 132, 101, 134, 90, 230, 210] - }, - { - "name": "联盟广告", - "type": "line", - "stack": "总量", - "data": [220, 182, 191, 234, 290, 330, 310] - }, - { - "name": "视频广告", - "type": "line", - "stack": "总量", - "data": [150, 232, 201, 154, 190, 330, 410] - }, - { - "name": "直接访问", - "type": "line", - "stack": "总量", - "data": [320, 332, 301, 334, 390, 330, 320] - }, - { - "name": "搜索引擎", - "type": "line", - "stack": "总量", - "data": [820, 932, 901, 934, 1290, 1330, 1320] - } - ] -} -{{}} -``` - -一个 `YAML` 格式的 `echarts` 示例: - -```yaml -{{}} -title: - text: 折线统计图 - top: 2% - left: center -tooltip: - trigger: axis -legend: - data: - - 邮件营销 - - 联盟广告 - - 视频广告 - - 直接访问 - - 搜索引擎 - top: 10% -grid: - left: 5% - right: 5% - bottom: 5% - top: 20% - containLabel: true -toolbox: - feature: - saveAsImage: - title: 保存为图片 -xAxis: - type: category - boundaryGap: false - data: - - 周一 - - 周二 - - 周三 - - 周四 - - 周五 - - 周六 - - 周日 -yAxis: - type: value -series: - - name: 邮件营销 - type: line - stack: 总量 - data: - - 120 - - 132 - - 101 - - 134 - - 90 - - 230 - - 210 - - name: 联盟广告 - type: line - stack: 总量 - data: - - 220 - - 182 - - 191 - - 234 - - 290 - - 330 - - 310 - - name: 视频广告 - type: line - stack: 总量 - data: - - 150 - - 232 - - 201 - - 154 - - 190 - - 330 - - 410 - - name: 直接访问 - type: line - stack: 总量 - data: - - 320 - - 332 - - 301 - - 334 - - 390 - - 330 - - 320 - - name: 搜索引擎 - type: line - stack: 总量 - data: - - 820 - - 932 - - 901 - - 934 - - 1290 - - 1330 - - 1320 -{{}} -``` - -一个 `TOML` 格式的 `echarts` 示例: - -```toml -{{}} -[title] -text = "折线统计图" -top = "2%" -left = "center" - -[tooltip] -trigger = "axis" - -[legend] -data = [ - "邮件营销", - "联盟广告", - "视频广告", - "直接访问", - "搜索引擎" -] -top = "10%" - -[grid] -left = "5%" -right = "5%" -bottom = "5%" -top = "20%" -containLabel = true - -[toolbox] -[toolbox.feature] -[toolbox.feature.saveAsImage] -title = "保存为图片" - -[xAxis] -type = "category" -boundaryGap = false -data = [ - "周一", - "周二", - "周三", - "周四", - "周五", - "周六", - "周日" -] - -[yAxis] -type = "value" - -[[series]] -name = "邮件营销" -type = "line" -stack = "总量" -data = [ - 120.0, - 132.0, - 101.0, - 134.0, - 90.0, - 230.0, - 210.0 -] - -[[series]] -name = "联盟广告" -type = "line" -stack = "总量" -data = [ - 220.0, - 182.0, - 191.0, - 234.0, - 290.0, - 330.0, - 310.0 -] - -[[series]] -name = "视频广告" -type = "line" -stack = "总量" -data = [ - 150.0, - 232.0, - 201.0, - 154.0, - 190.0, - 330.0, - 410.0 -] - -[[series]] -name = "直接访问" -type = "line" -stack = "总量" -data = [ - 320.0, - 332.0, - 301.0, - 334.0, - 390.0, - 330.0, - 320.0 -] - -[[series]] -name = "搜索引擎" -type = "line" -stack = "总量" -data = [ - 820.0, - 932.0, - 901.0, - 934.0, - 1290.0, - 1330.0, - 1320.0 -] -{{}} -``` - -呈现的输出效果如下: - -{{< echarts >}} -{ - "title": { - "text": "折线统计图", - "top": "2%", - "left": "center" - }, - "tooltip": { - "trigger": "axis" - }, - "legend": { - "data": ["邮件营销", "联盟广告", "视频广告", "直接访问", "搜索引擎"], - "top": "10%" - }, - "grid": { - "left": "5%", - "right": "5%", - "bottom": "5%", - "top": "20%", - "containLabel": true - }, - "toolbox": { - "feature": { - "saveAsImage": { - "title": "保存为图片" - } - } - }, - "xAxis": { - "type": "category", - "boundaryGap": false, - "data": ["周一", "周二", "周三", "周四", "周五", "周六", "周日"] - }, - "yAxis": { - "type": "value" - }, - "series": [ - { - "name": "邮件营销", - "type": "line", - "stack": "总量", - "data": [120, 132, 101, 134, 90, 230, 210] - }, - { - "name": "联盟广告", - "type": "line", - "stack": "总量", - "data": [220, 182, 191, 234, 290, 330, 310] - }, - { - "name": "视频广告", - "type": "line", - "stack": "总量", - "data": [150, 232, 201, 154, 190, 330, 410] - }, - { - "name": "直接访问", - "type": "line", - "stack": "总量", - "data": [320, 332, 301, 334, 390, 330, 320] - }, - { - "name": "搜索引擎", - "type": "line", - "stack": "总量", - "data": [820, 932, 901, 934, 1290, 1330, 1320] - } - ] -} -{{< /echarts >}} - -`echarts` shortcode 还有以下命名参数: - -* **width** *[可选]* (**第一个**位置参数) - - {{< version 0.2.0 >}} 数据可视化的宽度, 默认值是 `100%`. - -* **height** *[可选]* (**第二个**位置参数) - - {{< version 0.2.0 >}} 数据可视化的高度, 默认值是 `30rem`. diff --git a/exampleSite/content/posts/extended-shortcode-mapbox/featured-image.jpg b/exampleSite/content/posts/extended-shortcode-mapbox/featured-image.jpg deleted file mode 100644 index 1e769144..00000000 Binary files a/exampleSite/content/posts/extended-shortcode-mapbox/featured-image.jpg and /dev/null differ diff --git a/exampleSite/content/posts/extended-shortcode-mapbox/index.en.md b/exampleSite/content/posts/extended-shortcode-mapbox/index.en.md deleted file mode 100644 index 0843bf65..00000000 --- a/exampleSite/content/posts/extended-shortcode-mapbox/index.en.md +++ /dev/null @@ -1,97 +0,0 @@ ---- -title: "Extended Shortcode - mapbox" -date: 2022-07-20T12:22:15+08:00 -author: "Lruihao" -authorLink: "https://lruihao.cn" -description: "The mapbox shortcode supports interactive maps in Hugo with Mapbox GL JS library." -resources: -- name: "featured-image" - src: "featured-image.jpg" - -tags: ["shortcodes"] -categories: ["documentation"] - -hiddenFromHomePage: true ---- - -{{< version 0.2.0 >}} - -The `mapbox` shortcode supports interactive maps in Hugo with [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js) library. - - - -[Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js) is a JavaScript library that uses WebGL to render interactive maps from [vector tiles](https://docs.mapbox.com/help/glossary/vector-tiles/) and [Mapbox styles](https://docs.mapbox.com/mapbox-gl-js/style-spec/). - -The `mapbox` shortcode has the following named parameters to use Mapbox GL JS: - -* **lng** *[required]* (**first** positional parameter) - - Longitude of the inital centerpoint of the map, measured in degrees. - -* **lat** *[required]* (**second** positional parameter) - - Latitude of the inital centerpoint of the map, measured in degrees. - -* **zoom** *[optional]* (**third** positional parameter) - - The initial zoom level of the map, default value is `10`. - -* **marked** *[optional]* (**fourth** positional parameter) - - Whether to add a marker at the inital centerpoint of the map, default value is `true`. - -* **light-style** *[optional]* (**fifth** positional parameter) - - Style for the light theme, default value is the value set in the [front matter](../theme-documentation-content#front-matter) or the [site configuration](../theme-documentation-basics#site-configuration). - -* **dark-style** *[optional]* (**sixth** positional parameter) - - Style for the dark theme, default value is the value set in the [front matter](../theme-documentation-content#front-matter) or the [site configuration](../theme-documentation-basics#site-configuration). - -* **navigation** *[optional]* - - Whether to add [NavigationControl](https://docs.mapbox.com/mapbox-gl-js/api#navigationcontrol), default value is the value set in the [front matter](../theme-documentation-content#front-matter) or the [site configuration](../theme-documentation-basics#site-configuration). - -* **geolocate** *[optional]* - - Whether to add [GeolocateControl](https://docs.mapbox.com/mapbox-gl-js/api#geolocatecontrol), default value is the value set in the [front matter](../theme-documentation-content#front-matter) or the [site configuration](../theme-documentation-basics#site-configuration). - -* **scale** *[optional]* - - Whether to add [ScaleControl](https://docs.mapbox.com/mapbox-gl-js/api#scalecontrol), default value is the value set in the [front matter](../theme-documentation-content#front-matter) or the [site configuration](../theme-documentation-basics#site-configuration). - -* **fullscreen** *[optional]* - - Whether to add [FullscreenControl](https://docs.mapbox.com/mapbox-gl-js/api#fullscreencontrol), default value is the value set in the [front matter](../theme-documentation-content#front-matter) or the [site configuration](../theme-documentation-basics#site-configuration). - -* **width** *[optional]* - - Width of the map, default value is `100%`. - -* **height** *[optional]* - - Height of the map, default value is `20rem`. - -Example simple `mapbox` input: - -```go-html-template -{{}} -Or -{{}} -``` - -The rendered output looks like this: - -{{< mapbox 113.953277 22.559102 11 >}} - -Example `mapbox` input with the custom style: - -```go-html-template -{{}} -Or -{{}} -``` - -The rendered output looks like this: - -{{< mapbox -122.252 37.453 10 false "mapbox://styles/mapbox/navigation-preview-day-v4?optimize=true" "mapbox://styles/mapbox/navigation-preview-night-v4?optimize=true" >}} diff --git a/exampleSite/content/posts/extended-shortcode-mapbox/index.zh-cn.md b/exampleSite/content/posts/extended-shortcode-mapbox/index.zh-cn.md deleted file mode 100644 index 67e6681b..00000000 --- a/exampleSite/content/posts/extended-shortcode-mapbox/index.zh-cn.md +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: "扩展 Shortcode - mapbox" -date: 2022-07-20T12:22:15+08:00 -author: "Lruihao" -authorLink: "https://lruihao.cn" -description: "mapbox shortcode 使用 Mapbox GL JS 库提供互动式地图的功能。" -resources: -- name: "featured-image" - src: "featured-image.jpg" - -tags: ["shortcodes"] -categories: ["documentation"] - -hiddenFromHomePage: true - -mapbox: - lightStyle: mapbox://styles/mapbox/light-zh-v1?optimize=true - darkStyle: mapbox://styles/mapbox/dark-zh-v1?optimize=true ---- - -{{< version 0.2.0 >}} - -`mapbox` shortcode 使用 [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js) 库提供互动式地图的功能. - - - -[Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js) 是一个 JavaScript 库,它使用 WebGL, 以 [vector tiles](https://docs.mapbox.com/help/glossary/vector-tiles/) 和 [Mapbox styles](https://docs.mapbox.com/mapbox-gl-js/style-spec/) 为来源,将它们渲染成互动式地图。 - -`mapbox` shortcode 有以下命名参数来使用 Mapbox GL JS: - -* **lng** *[必需]*(**第一个**位置参数) - - 地图初始中心点的经度,以度为单位。 - -* **lat** *[必需]*(**第二个**位置参数) - - 地图初始中心点的纬度,以度为单位。 - -* **zoom** *[可选]*(**第三个**位置参数) - - 地图的初始缩放级别,默认值是 `10`。 - -* **marked** *[可选]*(**第四个**位置参数) - - 是否在地图的初始中心点添加图钉,默认值是 `true`。 - -* **light-style** *[可选]*(**第五个**位置参数) - - 浅色主题的地图样式,默认值是 [前置参数](../theme-documentation-content#front-matter) 或者 [网站配置](../theme-documentation-basics#site-configuration) 中设置的值。 - -* **dark-style** *[可选]*(**第六个**位置参数) - - 深色主题的地图样式,默认值是 [前置参数](../theme-documentation-content#front-matter) 或者 [网站配置](../theme-documentation-basics#site-configuration) 中设置的值。 - -* **navigation** *[可选]* - - 是否添加 [NavigationControl](https://docs.mapbox.com/mapbox-gl-js/api#navigationcontrol), 默认值是 [前置参数](../theme-documentation-content#front-matter) 或者 [网站配置](../theme-documentation-basics#site-configuration) 中设置的值。 - -* **geolocate** *[可选]* - - 是否添加 [GeolocateControl](https://docs.mapbox.com/mapbox-gl-js/api#geolocatecontrol), 默认值是 [前置参数](../theme-documentation-content#front-matter) 或者 [网站配置](../theme-documentation-basics#site-configuration) 中设置的值。 - -* **scale** *[可选]* - - 是否添加 [ScaleControl](https://docs.mapbox.com/mapbox-gl-js/api#scalecontrol), 默认值是 [前置参数](../theme-documentation-content#front-matter) 或者 [网站配置](../theme-documentation-basics#site-configuration) 中设置的值。 - -* **fullscreen** *[可选]* - - 是否添加 [FullscreenControl](https://docs.mapbox.com/mapbox-gl-js/api#fullscreencontrol), 默认值是 [前置参数](../theme-documentation-content#front-matter) 或者 [网站配置](../theme-documentation-basics#site-configuration) 中设置的值。 - -* **width** *[可选]* - - 地图的宽度,默认值是 `100%`。 - -* **height** *[可选]* - - 地图的高度,默认值是 `20rem`。 - -一个简单的 `mapbox` 示例: - -```go-html-template -{{}} -或者 -{{}} -``` - -呈现的输出效果如下: - -{{< mapbox 113.953277 22.559102 11 >}} - -一个带有自定义样式的 `mapbox` 示例: - -```go-html-template -{{}} -或者 -{{}} -``` - -呈现的输出效果如下: - -{{< mapbox -122.252 37.453 10 false "mapbox://styles/mapbox/streets-zh-v1?optimize=true" >}} diff --git a/exampleSite/content/posts/extended-shortcode-mermaid/featured-image.png b/exampleSite/content/posts/extended-shortcode-mermaid/featured-image.png deleted file mode 100644 index 6db8635c..00000000 Binary files a/exampleSite/content/posts/extended-shortcode-mermaid/featured-image.png and /dev/null differ diff --git a/exampleSite/content/posts/extended-shortcode-mermaid/index.en.md b/exampleSite/content/posts/extended-shortcode-mermaid/index.en.md deleted file mode 100644 index a67e8e09..00000000 --- a/exampleSite/content/posts/extended-shortcode-mermaid/index.en.md +++ /dev/null @@ -1,361 +0,0 @@ ---- -title: "Extended Shortcode - mermaid" -date: 2022-07-09T17:20:15+08:00 -author: "Lruihao" -authorLink: "https://lruihao.cn" -description: "The mermaid shortcode supports diagrams in Hugo with Mermaid library." -resources: -- name: "featured-image" - src: "featured-image.png" - -tags: ["shortcodes"] -categories: ["documentation"] - -hiddenFromHomePage: true ---- - -{{< version 0.2.15 changed >}} - -The `mermaid` shortcode supports diagrams in Hugo with [Mermaid](https://mermaidjs.github.io/) library. - - - -**Mermaid** is a library helping you to generate diagram and flowcharts from text, in a similar manner as Markdown. - -Just insert your mermaid code in the `mermaid` shortcode and that’s it. - -{{< admonition tip >}} -You can configure mermaid themes globally in `config.toml` via the `params.mermaid` parameter -{{< /admonition >}} - -## Flowchart {#flowchart} - -Example **flowchart** `mermaid` input: - -```markdown -{{}} -graph LR; - A[Hard edge] -->|Link text| B(Round edge) - B --> C{Decision} - C -->|One| D[Result one] - C -->|Two| E[Result two] -{{}} -``` - -The rendered output looks like this: - -{{< mermaid >}} -graph LR; - A[Hard edge] -->|Link text| B(Round edge) - B --> C{Decision} - C -->|One| D[Result one] - C -->|Two| E[Result two] -{{< /mermaid >}} - -## Sequence Diagram {#sequence-diagram} - -Example **sequence diagram** `mermaid` input: - -```markdown -{{}} -sequenceDiagram - participant Alice - participant Bob - Alice->>John: Hello John, how are you? - loop Healthcheck - John->John: Fight against hypochondria - end - Note right of John: Rational thoughts
prevail... - John-->Alice: Great! - John->Bob: How about you? - Bob-->John: Jolly good! -{{}} -``` - -The rendered output looks like this: - -{{< mermaid >}} -sequenceDiagram - participant Alice - participant Bob - Alice->>John: Hello John, how are you? - loop Healthcheck - John->John: Fight against hypochondria - end - Note right of John: Rational thoughts
prevail... - John-->Alice: Great! - John->Bob: How about you? - Bob-->John: Jolly good! -{{< /mermaid >}} - -## Gantt {#gantt} - -Example **Gantt** `mermaid` input: - -```markdown -{{}} -gantt -dateFormat YYYY-MM-DD -title Adding GANTT diagram to mermaid -excludes weekdays 2014-01-10 - -section A section -Completed task :done, des1, 2014-01-06,2014-01-08 -Active task :active, des2, 2014-01-09, 3d -Future task : des3, after des2, 5d -Future task2 : des4, after des3, 5d -{{}} -``` - -The rendered output looks like this: - -{{< mermaid >}} -gantt -dateFormat YYYY-MM-DD -title Adding GANTT diagram to mermaid -excludes weekdays 2014-01-10 - -section A section -Completed task :done, des1, 2014-01-06,2014-01-08 -Active task :active, des2, 2014-01-09, 3d -Future task : des3, after des2, 5d -Future task2 : des4, after des3, 5d -{{< /mermaid >}} - -## Class Diagram {#class-diagram} - -Example **class diagram** `mermaid` input: - -```markdown -{{}} -classDiagram - Animal <|-- Duck - Animal <|-- Fish - Animal <|-- Zebra - Animal : +int age - Animal : +String gender - Animal: +isMammal() - Animal: +mate() - class Duck{ - +String beakColor - +swim() - +quack() - } - class Fish{ - -int sizeInFeet - -canEat() - } - class Zebra{ - +bool is_wild - +run() - } -{{}} -``` - -The rendered output looks like this: - -{{< mermaid >}} -classDiagram - Animal <|-- Duck - Animal <|-- Fish - Animal <|-- Zebra - Animal : +int age - Animal : +String gender - Animal: +isMammal() - Animal: +mate() - class Duck{ - +String beakColor - +swim() - +quack() - } - class Fish{ - -int sizeInFeet - -canEat() - } - class Zebra{ - +bool is_wild - +run() - } -{{< /mermaid >}} - -## State Diagram {#state-diagram} - -Example **state diagram** `mermaid` input: - -```markdown -{{}} -stateDiagram-v2 - [*] --> Still - Still --> [*] - Still --> Moving - Moving --> Still - Moving --> Crash - Crash --> [*] -{{}} -``` - -The rendered output looks like this: - -{{< mermaid >}} -stateDiagram-v2 - [*] --> Still - Still --> [*] - Still --> Moving - Moving --> Still - Moving --> Crash - Crash --> [*] -{{< /mermaid >}} - -## Git Graph {#git-graph} - -Example **git graph** `mermaid` input: - -```markdown -{{}} -gitGraph - commit - commit - branch develop - checkout develop - commit - commit - checkout main - merge develop - commit - commit -{{}} -``` - -The rendered output looks like this: - -{{< mermaid >}} -gitGraph - commit - commit - branch develop - checkout develop - commit - commit - checkout main - merge develop - commit - commit -{{< /mermaid >}} - -## Entity Relationship Diagram {#entity-relationship-diagram} - -Example **entity-relationship diagram** `mermaid` input: - -```markdown -{{}} -erDiagram - CUSTOMER ||--o{ ORDER : places - ORDER ||--|{ LINE-ITEM : contains - CUSTOMER }|..|{ DELIVERY-ADDRESS : uses -{{}} -``` - -The rendered output looks like this: - -{{< mermaid >}} -erDiagram - CUSTOMER ||--o{ ORDER : places - ORDER ||--|{ LINE-ITEM : contains - CUSTOMER }|..|{ DELIVERY-ADDRESS : uses -{{< /mermaid >}} - -## User Journey {#user-journey} - -Example **user journey** `mermaid` input: - -```markdown -{{}} -journey - title My working day - section Go to work - Make tea: 5: Me - Go upstairs: 3: Me - Do work: 1: Me, Cat - section Go home - Go downstairs: 5: Me - Sit down: 5: Me -{{}} -``` - -The rendered output looks like this: - -{{< mermaid >}} -journey - title My working day - section Go to work - Make tea: 5: Me - Go upstairs: 3: Me - Do work: 1: Me, Cat - section Go home - Go downstairs: 5: Me - Sit down: 5: Me -{{< /mermaid >}} - -## Pie Chart {#pie-chart} - -Example **pie chart** `mermaid` input: - -```markdown -{{}} -pie - "Dogs" : 386 - "Cats" : 85 - "Rats" : 15 -{{}} -``` - -The rendered output looks like this: - -{{< mermaid >}} -pie - "Dogs" : 386 - "Cats" : 85 - "Rats" : 15 -{{< /mermaid >}} - -## Requirement Diagram {#requirement-diagram} - -Example **requirement diagram** `mermaid` input: - -```markdown -{{}} -requirementDiagram - -requirement test_req { -id: 1 -text: the test text. -risk: high -verifymethod: test -} - -element test_entity { -type: simulation -} - -test_entity - satisfies -> test_req -{{}} -``` - -The rendered output looks like this: - -{{< mermaid >}} -requirementDiagram - -requirement test_req { -id: 1 -text: the test text. -risk: high -verifymethod: test -} - -element test_entity { -type: simulation -} - -test_entity - satisfies -> test_req -{{< /mermaid >}} diff --git a/exampleSite/content/posts/extended-shortcode-mermaid/index.zh-cn.md b/exampleSite/content/posts/extended-shortcode-mermaid/index.zh-cn.md deleted file mode 100644 index 8a620cde..00000000 --- a/exampleSite/content/posts/extended-shortcode-mermaid/index.zh-cn.md +++ /dev/null @@ -1,361 +0,0 @@ ---- -title: "扩展 Shortcode - mermaid" -date: 2022-07-09T17:20:15+08:00 -author: "Lruihao" -authorLink: "https://lruihao.cn" -description: "mermaid shortcode 使用 Mermaid 库提供绘制图表和流程图的功能。" -resources: -- name: "featured-image" - src: "featured-image.png" - -tags: ["shortcodes"] -categories: ["documentation"] - -hiddenFromHomePage: true ---- - -{{< version 0.2.15 changed >}} - -`mermaid` shortcode 使用 [Mermaid](https://mermaidjs.github.io/) 库提供绘制图表和流程图的功能. - - - -[mermaid](https://mermaidjs.github.io/) 是一个可以帮助你在文章中绘制图表和流程图的库, 类似 Markdown 的语法. - -只需将你的 mermaid 代码插入 `mermaid` shortcode 中即可. - -{{< admonition tip >}} -你可以在 `config.toml` 中通过 `params.mermaid` 参数全局配置 mermaid 的主题 -{{< /admonition >}} - -## 流程图 {#flowchart} - -一个 **流程图** `mermaid` 示例: - -```markdown -{{}} -graph LR; - A[Hard edge] -->|Link text| B(Round edge) - B --> C{Decision} - C -->|One| D[Result one] - C -->|Two| E[Result two] -{{}} -``` - -呈现的输出效果如下: - -{{< mermaid >}} -graph LR; - A[Hard edge] -->|Link text| B(Round edge) - B --> C{Decision} - C -->|One| D[Result one] - C -->|Two| E[Result two] -{{< /mermaid >}} - -## 时序图 {#sequence-diagram} - -一个 **时序图** `mermaid` 示例: - -```markdown -{{}} -sequenceDiagram - participant Alice - participant Bob - Alice->>John: Hello John, how are you? - loop Healthcheck - John->John: Fight against hypochondria - end - Note right of John: Rational thoughts
prevail... - John-->Alice: Great! - John->Bob: How about you? - Bob-->John: Jolly good! -{{}} -``` - -呈现的输出效果如下: - -{{< mermaid >}} -sequenceDiagram - participant Alice - participant Bob - Alice->>John: Hello John, how are you? - loop Healthcheck - John->John: Fight against hypochondria - end - Note right of John: Rational thoughts
prevail... - John-->Alice: Great! - John->Bob: How about you? - Bob-->John: Jolly good! -{{< /mermaid >}} - -## 甘特图 {#gantt} - -一个 **甘特图** `mermaid` 示例: - -```markdown -{{}} -gantt -dateFormat YYYY-MM-DD -title Adding GANTT diagram to mermaid -excludes weekdays 2014-01-10 - -section A section -Completed task :done, des1, 2014-01-06,2014-01-08 -Active task :active, des2, 2014-01-09, 3d -Future task : des3, after des2, 5d -Future task2 : des4, after des3, 5d -{{}} -``` - -呈现的输出效果如下: - -{{< mermaid >}} -gantt -dateFormat YYYY-MM-DD -title Adding GANTT diagram to mermaid -excludes weekdays 2014-01-10 - -section A section -Completed task :done, des1, 2014-01-06,2014-01-08 -Active task :active, des2, 2014-01-09, 3d -Future task : des3, after des2, 5d -Future task2 : des4, after des3, 5d -{{< /mermaid >}} - -## 类图 {#class-diagram} - -一个 **类图** `mermaid` 示例: - -```markdown -{{}} -classDiagram - Animal <|-- Duck - Animal <|-- Fish - Animal <|-- Zebra - Animal : +int age - Animal : +String gender - Animal: +isMammal() - Animal: +mate() - class Duck{ - +String beakColor - +swim() - +quack() - } - class Fish{ - -int sizeInFeet - -canEat() - } - class Zebra{ - +bool is_wild - +run() - } -{{}} -``` - -呈现的输出效果如下: - -{{< mermaid >}} -classDiagram - Animal <|-- Duck - Animal <|-- Fish - Animal <|-- Zebra - Animal : +int age - Animal : +String gender - Animal: +isMammal() - Animal: +mate() - class Duck{ - +String beakColor - +swim() - +quack() - } - class Fish{ - -int sizeInFeet - -canEat() - } - class Zebra{ - +bool is_wild - +run() - } -{{< /mermaid >}} - -## 状态图 {#state-diagram} - -一个 **状态图** `mermaid` 示例: - -```markdown -{{}} -stateDiagram-v2 - [*] --> Still - Still --> [*] - Still --> Moving - Moving --> Still - Moving --> Crash - Crash --> [*] -{{}} -``` - -呈现的输出效果如下: - -{{< mermaid >}} -stateDiagram-v2 - [*] --> Still - Still --> [*] - Still --> Moving - Moving --> Still - Moving --> Crash - Crash --> [*] -{{< /mermaid >}} - -## Git 图 {#git-graph} - -一个 **Git 图** `mermaid` 示例: - -```markdown -{{}} -gitGraph - commit - commit - branch develop - checkout develop - commit - commit - checkout main - merge develop - commit - commit -{{}} -``` - -呈现的输出效果如下: - -{{< mermaid >}} -gitGraph - commit - commit - branch develop - checkout develop - commit - commit - checkout main - merge develop - commit - commit -{{< /mermaid >}} - -## 实体关系图 {#entity-relationship-diagram} - -一个 **实体关系图** `mermaid` 示例: - -```markdown -{{}} -erDiagram - CUSTOMER ||--o{ ORDER : places - ORDER ||--|{ LINE-ITEM : contains - CUSTOMER }|..|{ DELIVERY-ADDRESS : uses -{{}} -``` - -呈现的输出效果如下: - -{{< mermaid >}} -erDiagram - CUSTOMER ||--o{ ORDER : places - ORDER ||--|{ LINE-ITEM : contains - CUSTOMER }|..|{ DELIVERY-ADDRESS : uses -{{< /mermaid >}} - -## 用户体验旅程图 {#user-journey} - -一个 **用户体验旅程图** `mermaid` 示例: - -```markdown -{{}} -journey - title My working day - section Go to work - Make tea: 5: Me - Go upstairs: 3: Me - Do work: 1: Me, Cat - section Go home - Go downstairs: 5: Me - Sit down: 5: Me -{{}} -``` - -呈现的输出效果如下: - -{{< mermaid >}} -journey - title My working day - section Go to work - Make tea: 5: Me - Go upstairs: 3: Me - Do work: 1: Me, Cat - section Go home - Go downstairs: 5: Me - Sit down: 5: Me -{{< /mermaid >}} - -## 饼图 {#pie} - -一个 **饼图** `mermaid` 示例: - -```markdown -{{}} -pie - "Dogs" : 386 - "Cats" : 85 - "Rats" : 15 -{{}} -``` - -呈现的输出效果如下: - -{{< mermaid >}} -pie - "Dogs" : 386 - "Cats" : 85 - "Rats" : 15 -{{< /mermaid >}} - -## 依赖图 {#requirement-diagram} - -一个 **依赖图** `mermaid` 示例: - -```markdown -{{}} -requirementDiagram - -requirement test_req { -id: 1 -text: the test text. -risk: high -verifymethod: test -} - -element test_entity { -type: simulation -} - -test_entity - satisfies -> test_req -{{}} -``` - -呈现的输出效果如下: - -{{< mermaid >}} -requirementDiagram - -requirement test_req { -id: 1 -text: the test text. -risk: high -verifymethod: test -} - -element test_entity { -type: simulation -} - -test_entity - satisfies -> test_req -{{< /mermaid >}} diff --git a/exampleSite/content/posts/extended-shortcode-music/featured-image.png b/exampleSite/content/posts/extended-shortcode-music/featured-image.png deleted file mode 100644 index b0246371..00000000 Binary files a/exampleSite/content/posts/extended-shortcode-music/featured-image.png and /dev/null differ diff --git a/exampleSite/content/posts/extended-shortcode-music/index.en.md b/exampleSite/content/posts/extended-shortcode-music/index.en.md deleted file mode 100644 index 8932fdf1..00000000 --- a/exampleSite/content/posts/extended-shortcode-music/index.en.md +++ /dev/null @@ -1,156 +0,0 @@ ---- -title: "Extended Shortcode - music" -date: 2022-07-20T13:01:03+08:00 -author: "Lruihao" -authorLink: "https://lruihao.cn" -description: "The music shortcode embeds a responsive music player based on APlayer and MetingJS library." -resources: -- name: "featured-image" - src: "featured-image.jpg" - -tags: ["shortcodes"] -categories: ["documentation"] - -hiddenFromHomePage: true ---- - -The `music` shortcode embeds a responsive music player based on [APlayer](https://github.com/MoePlayer/APlayer) and [MetingJS](https://github.com/metowolf/MetingJS). - - - -There are three ways to use it the `music` shortcode. - -## 1 Custom Music URL {#custom-music-url} - -{{< version 0.2.10 >}} The complete usage of [local resource references](../theme-documentation-content#contents-organization) is supported. - -The `music` shortcode has the following named parameters by custom music URL: - -* **server** *[required]* - - URL of the custom music. - -* **name** *[optional]* - - Name of the custom music. - -* **artist** *[optional]* - - Artist of the custom music. - -* **cover** *[required]* - - URL of the custom music cover. - -Example `music` input by custom music URL: - -```go-html-template -{{}} -``` - -The rendered output looks like this: - -{{< music url="/music/Wavelength.mp3" name=Wavelength artist=oldmanyoung cover="/images/Wavelength.jpg" >}} - -## 2 Music Platform URL Automatic Identification {#automatic-identification} - -The `music` shortcode has one named parameter by music platform URL automatic identification: - -* **auto** *[required]* (**first** positional parameter) - - URL of the music platform URL for automatic identification, - which supports `netease`, `tencent` and `xiami` music platform. - -Example `music` input by music platform URL automatic identification: - -```go-html-template -{{}} -Or -{{}} -``` - -The rendered output looks like this: - -{{< music auto="https://music.163.com/#/playlist?id=60198" >}} - -## 3 Custom Server, Type and ID {#custom-server} - -The `music` shortcode has the following named parameters by custom music platform: - -* **server** *[required]* (**first** positional parameter) - - [`netease`, `tencent`, `kugou`, `xiami`, `baidu`] - - Music platform. - -* **type** *[required]* (**second** positional parameter) - - [`song`, `playlist`, `album`, `search`, `artist`] - - Type of the music. - -* **id** *[required]* (**third** positional parameter) - - Song ID, or playlist ID, or album ID, or search keyword, or artist ID. - -Example `music` input by custom music platform: - -```go-html-template -{{}} -Or -{{}} -``` - -The rendered output looks like this: - -{{< music netease song 1868553 >}} - -## 4 Other Parameters {#other-parameters} - -The `music` shortcode has other named parameters applying to the above three ways: - -* **theme** *[optional]* - - {{< version 0.2.0 changed >}} Main color of the music player, default value is `#448aff`. - -* **fixed** *[optional]* - - Whether to enable fixed mode, default value is `false`. - -* **mini** *[optional]* - - Whether to enable mini mode, default value is `false`. - -* **autoplay** *[optional]* - - Whether to autoplay music, default value is `false`. - -* **volume** *[optional]* - - Default volume when the player is first opened, which will be remembered in the browser, default value is `0.7`. - -* **mutex** *[optional]* - - Whether to pause other players when this player starts playing, default value is `true`. - -The `music` shortcode has the following named parameters only applying to the type of music list: - -* **loop** *[optional]* - - [`all`, `one`, `none`] - - Loop mode of the music list, default value is `none`. - -* **order** *[optional]* - - [`list`, `random`] - - Play order of the music list, default value is `list`. - -* **list-folded** *[optional]* - - Whether the music list should be folded at first, default value is `false`. - -* **list-max-height** *[optional]* - - Max height of the music list, default value is `340px`. \ No newline at end of file diff --git a/exampleSite/content/posts/extended-shortcode-music/index.zh-cn.md b/exampleSite/content/posts/extended-shortcode-music/index.zh-cn.md deleted file mode 100644 index 504dd4d3..00000000 --- a/exampleSite/content/posts/extended-shortcode-music/index.zh-cn.md +++ /dev/null @@ -1,155 +0,0 @@ ---- -title: "扩展 Shortcode - music" -date: 2022-07-20T13:01:03+08:00 -author: "Lruihao" -authorLink: "https://lruihao.cn" -description: "music shortcode 基于 APlayer 和 MetingJS 库提供了一个内嵌的响应式音乐播放器。" -resources: -- name: "featured-image" - src: "featured-image.jpg" - -tags: ["shortcodes"] -categories: ["documentation"] - -hiddenFromHomePage: true ---- - -`music` shortcode 基于 [APlayer](https://github.com/MoePlayer/APlayer) 和 [MetingJS](https://github.com/metowolf/MetingJS) 提供了一个内嵌的响应式音乐播放器。 - - - -有三种方式使用 `music` shortcode。 - -## 1 自定义音乐 URL {#custom-music-url} - -{{< version 0.2.10 >}} 支持 [本地资源引用](../theme-documentation-content#contents-organization) 的完整用法。 - -`music` shortcode 有以下命名参数来使用自定义音乐 URL: - -* **server** *[必需]* - - 音乐的链接。 - -* **type** *[可选]* - - 音乐的名称。 - -* **artist** *[可选]* - - 音乐的创作者。 - -* **cover** *[可选]* - - 音乐的封面链接。 - -一个使用自定义音乐 URL 的 `music` 示例: - -```go-html-template -{{}} -``` - -呈现的输出效果如下: - -{{< music url="/music/Wavelength.mp3" name=Wavelength artist=oldmanyoung cover="/images/Wavelength.jpg" >}} - -## 2 音乐平台 URL 的自动识别 {#automatic-identification} - -`music` shortcode 有一个命名参数来使用音乐平台 URL 的自动识别: - -* **auto** *[必需]]*(**第一个**位置参数) - - 用来自动识别的音乐平台 URL, 支持 `netease`, `tencent` 和 `xiami` 平台。 - -一个使用音乐平台 URL 的自动识别的 `music` 示例: - -```go-html-template -{{}} -或者 -{{}} -``` - -呈现的输出效果如下: - -{{< music auto="https://music.163.com/#/playlist?id=60198" >}} - -## 3 自定义音乐平台,类型和 ID {#custom-server} - -`music` shortcode 有以下命名参数来使用自定义音乐平台: - -* **server** *[必需]*(**第一个**位置参数) - - [`netease`, `tencent`, `kugou`, `xiami`, `baidu`] - - 音乐平台。 - -* **type** *[必需]*(**第二个**位置参数) - - [`song`, `playlist`, `album`, `search`, `artist`] - - 音乐类型。 - -* **id** *[必需]*(**第三个**位置参数) - - 歌曲 ID, 或者播放列表 ID, 或者专辑 ID, 或者搜索关键词,或者创作者 ID. - -一个使用自定义音乐平台的 `music` 示例: - -```go-html-template -{{}} -或者 -{{}} -``` - -呈现的输出效果如下: - -{{< music netease song 1868553 >}} - -## 4 其它参数 {#other-parameters} - -`music` shortcode 有一些可以应用于以上三种方式的其它命名参数: - -* **theme** *[可选]* - - {{< version 0.2.0 changed >}} 音乐播放器的主题色,默认值是 `#448aff`。 - -* **fixed** *[可选]* - - 是否开启固定模式,默认值是 `false`。 - -* **mini** *[可选]* - - 是否开启迷你模式,默认值是 `false`。 - -* **autoplay** *[可选]* - - 是否自动播放音乐,默认值是 `false`。 - -* **volume** *[可选]* - - 第一次打开播放器时的默认音量,会被保存在浏览器缓存中,默认值是 `0.7`。 - -* **mutex** *[可选]* - - 是否自动暂停其它播放器,默认值是 `true`。 - -`music` shortcode 还有一些只适用于音乐列表方式的其它命名参数: - -* **loop** *[可选]* - - [`all`, `one`, `none`] - - 音乐列表的循环模式,默认值是 `none`。 - -* **order** *[可选]* - - [`list`, `random`] - - 音乐列表的播放顺序,默认值是 `list`。 - -* **list-folded** *[可选]* - - 初次打开的时候音乐列表是否折叠,默认值是 `false`。 - -* **list-max-height** *[可选]* - - 音乐列表的最大高度,默认值是 `340px`。 \ No newline at end of file diff --git a/exampleSite/content/posts/extended-shortcode-typeit/featured-image.png b/exampleSite/content/posts/extended-shortcode-typeit/featured-image.png deleted file mode 100644 index 9b53b591..00000000 Binary files a/exampleSite/content/posts/extended-shortcode-typeit/featured-image.png and /dev/null differ diff --git a/exampleSite/content/posts/extended-shortcode-typeit/index.en.md b/exampleSite/content/posts/extended-shortcode-typeit/index.en.md deleted file mode 100644 index 2c2f8f22..00000000 --- a/exampleSite/content/posts/extended-shortcode-typeit/index.en.md +++ /dev/null @@ -1,110 +0,0 @@ ---- -title: "Extended Shortcode - typeit" -date: 2022-07-20T13:56:03+08:00 -author: "Lruihao" -authorLink: "https://lruihao.cn" -description: "The typeit shortcode provides typing animation based on TypeIt library." -resources: -- name: "featured-image" - src: "featured-image.jpg" - -tags: ["shortcodes"] -categories: ["documentation"] - -hiddenFromHomePage: true ---- - -The `typeit` shortcode provides typing animation based on [TypeIt](https://typeitjs.com/) library. - - - -Just insert your content in the `typeit` shortcode and that’s it. - -## 1 Simple Content {#simple-content} - -Simple content is allowed in `Markdown` format and **without** rich block content such as images and more... - -Example `typeit` input: - -```go-html-template -{{}} -This is a *paragraph* with **typing animation** based on [TypeIt](https://typeitjs.com/)... -{{}} -``` - -The rendered output looks like this: - -{{< typeit >}} -This is a *paragraph* with **typing animation** based on [TypeIt](https://typeitjs.com/)... -{{< /typeit >}} - -Alternatively, you can use custom **HTML tags**. - -Example `typeit` input with `h4` tag: - -```go-html-template -{{}} -This is a *paragraph* with **typing animation** based on [TypeIt](https://typeitjs.com/)... -{{}} -``` - -The rendered output looks like this: - -{{< typeit tag=h4 >}} -This is a *paragraph* with **typing animation** based on [TypeIt](https://typeitjs.com/)... -{{< /typeit >}} - -## 2 Code Content {#code-content} - -Code content is allowed and will be highlighted by named parameter `code` for the type of code language. - -Example `typeit` input with `code`: - -```go-html-template -{{}} -public class HelloWorld { - public static void main(String []args) { - System.out.println("Hello World"); - } -} -{{}} -``` - -The rendered output looks like this: - -{{< typeit code=java >}} -public class HelloWorld { - public static void main(String []args) { - System.out.println("Hello World"); - } -} -{{< /typeit >}} - -## 3 Group Content {#group-content} - -All typing animations start at the same time by default. -But sometimes you may want to start a set of `typeit` contents in order. - -A set of `typeit` contents with the same value of named parameter `group` will start typing animation in sequence. - -Example `typeit` input with `group`: - -```go-html-template -{{}} -**First** this paragraph begins -{{}} - -{{}} -**Then** this paragraph begins -{{}} -``` - -The rendered output looks like this: - -{{< typeit group=paragraph >}} -**First** this paragraph begins -{{< /typeit >}} - -{{< typeit group=paragraph >}} -**Then** this paragraph begins -{{< /typeit >}} \ No newline at end of file diff --git a/exampleSite/content/posts/extended-shortcode-typeit/index.zh-cn.md b/exampleSite/content/posts/extended-shortcode-typeit/index.zh-cn.md deleted file mode 100644 index f9679a78..00000000 --- a/exampleSite/content/posts/extended-shortcode-typeit/index.zh-cn.md +++ /dev/null @@ -1,110 +0,0 @@ ---- -title: "扩展 Shortcode - typeit" -date: 2022-07-20T13:56:03+08:00 -author: "Lruihao" -authorLink: "https://lruihao.cn" -description: "typeit shortcode 基于 TypeIt 提供了打字动画。" -resources: -- name: "featured-image" - src: "featured-image.jpg" - -tags: ["shortcodes"] -categories: ["documentation"] - -hiddenFromHomePage: true ---- - -`typeit` shortcode 基于 [TypeIt](https://typeitjs.com/) 提供了打字动画。 - - - -只需将你需要打字动画的内容插入 `typeit` shortcode 中即可。 - -## 1 简单内容 {#simple-content} - -允许使用 `Markdown` 格式的简单内容,并且 **不包含** 富文本的块内容,例如图像等等 ... - -一个 `typeit` 示例: - -```go-html-template -{{}} -这一个带有基于 [TypeIt](https://typeitjs.com/) 的 **打字动画** 的 *段落* ... -{{}} -``` - -呈现的输出效果如下: - -{{< typeit >}} -这一个带有基于 [TypeIt](https://typeitjs.com/) 的 **打字动画** 的 *段落* ... -{{< /typeit >}} - -另外,你也可以自定义 **HTML 标签**. - -一个带有 `h4` 标签的 `typeit` 示例: - -```go-html-template -{{}} -这一个带有基于 [TypeIt](https://typeitjs.com/) 的 **打字动画** 的 *段落* ... -{{}} -``` - -呈现的输出效果如下: - -{{< typeit tag=h4 >}} -这一个带有基于 [TypeIt](https://typeitjs.com/) 的 **打字动画** 的 *段落* ... -{{< /typeit >}} - -## 2 代码内容 {#code-content} - -代码内容也是允许的,并且通过使用参数 `code` 指定语言类型可以实习语法高亮。 - -一个带有 `code` 参数的 `typeit` 示例: - -```go-html-template -{{}} -public class HelloWorld { - public static void main(String []args) { - System.out.println("Hello World"); - } -} -{{}} -``` - -呈现的输出效果如下: - -{{< typeit code=java >}} -public class HelloWorld { - public static void main(String []args) { - System.out.println("Hello World"); - } -} -{{< /typeit >}} - -## 3 分组内容 {#code-content} - -默认情况下,所有打字动画都是同时开始的。 -但是有时你可能需要按顺序开始一组 `typeit` 内容的打字动画。 - -一组具有相同 `group` 参数值的 `typeit` 内容将按顺序开始打字动画。 - -一个带有 `group` 参数的 `typeit` 示例: - -```go-html-template -{{}} -**首先**, 这个段落开始 -{{}} - -{{}} -**然后**, 这个段落开始 -{{}} -``` - -呈现的输出效果如下: - -{{< typeit group=paragraph >}} -**首先**, 这个段落开始 -{{< /typeit >}} - -{{< typeit group=paragraph >}} -**然后**, 这个段落开始 -{{< /typeit >}} \ No newline at end of file diff --git a/exampleSite/content/posts/pwa-support/featured-image.png b/exampleSite/content/posts/pwa-support/featured-image.png deleted file mode 100644 index 51b82a78..00000000 Binary files a/exampleSite/content/posts/pwa-support/featured-image.png and /dev/null differ diff --git a/exampleSite/content/posts/pwa-support/index.en.md b/exampleSite/content/posts/pwa-support/index.en.md deleted file mode 100644 index a3435a47..00000000 --- a/exampleSite/content/posts/pwa-support/index.en.md +++ /dev/null @@ -1,152 +0,0 @@ ---- -weight: 5 -title: "Theme Documentation - PWA Support" -date: 2022-01-26T09:32:56+08:00 -draft: false -description: "Guide to setup PWA in FixIt." - -tags: ["PWA"] -categories: ["Documentation"] - -resources: -- name: featured-image - src: featured-image.png - -toc: - auto: false - -menu: - main: - name: "PWA Support" - title: "Guide to setup PWA in FixIt." - parent: "documentation" - pre: "" - -repost: - enable: true - url: "https://hugodoit.com/pwa-support/" ---- - -Find out how to turn your FixIt site into a Progressive Web App. - - - -## What are PWAs? - -[**Progressive Web Apps** (PWAs) ](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps)are web apps that use [service workers](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API), [manifests](https://developer.mozilla.org/en-US/docs/Web/Manifest), and other web-platform features in combination with [progressive enhancement](https://developer.mozilla.org/en-US/docs/Glossary/Progressive_Enhancement) to give users an experience on par with native apps. - -## Why bother? - -Well, the straight answer to this questions is: "You don't need to turn your site into a PWA." A normal website is good enough for all the content you want to share. However, a PWA brings some extra benefits that might be useful. - -1. Pages will be automatically cached by service workers when the app is installed, which enables a near-instantaneous loading from the second visit. -2. Users can always visit cached pages when they are offline. - -These features may be useful for some websites, such as this documentation site. But it does not make much sense to turn a personal blog into a PWA. In the end, it all depends on your choice, and the FixIt theme will provide this feature for you anyway. - -## How to turn your FixIt site into a PWA? {#setup-in-fixit} - -### Configure `site.webmanifest` {#site.webmanifest} - -Under the `/static/` folder, you need to create a file named `site.webmanifest`. This file provides information about your app and it is required for your app to be installable. - -Here are the key values required. - -* **name** *[required]* - - The name of your web app. - -* **short_name** *[required]* - - A shorter name for your web app. - -* **start_url** *[required]* - - The start URL of your web app. Please fill in `"/"` by default. - -* **icons** *[required]* - - An array of objects representing image files will be served as application icons. You can reuse the favicon of your site as the icons. - -There are other optional values you can set in the manifest file, check out this [documentation](https://developer.mozilla.org/en-US/docs/Web/Manifest) for more information. - -Here is a sample `site.webmanifest` file from this documentation site. - -```json -{ - "name": "FixIt Theme Documentation", - "short_name": "FixIt Docs", - "start_url": "/", - "description": "A Clean, Elegant but Advanced Hugo Theme", - "theme_color": "#ffffff", - "background_color": "#ffffff", - "display": "standalone", - "icons": [ - { - "src": "/apple-touch-icon.png", - "sizes": "180x180", - "type": "image/png", - "purpose": "any maskable" - }, - { - "src": "/android-chrome-192x192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "/android-chrome-512x512.png", - "sizes": "512x512", - "type": "image/png" - } - ] -} -``` - -### Configure the offline page {#offline-page} - -The offline page will be served to your visitor when they are offline. - -You just need to create an `offline.md` or `offline/index.md` in the `/content/` directory, and you can create them quickly with the following commands in your site directory: - -```bash -hugo new offline.md -hugo new offline/index.md -# [i18n] if you are running a multilingual website. -hugo new offline/index.en.md -hugo new offline/index.zh-cn.md -hugo new offline/index.zh-tw.md -``` - -{{< admonition type=tip title="Permalink" open=true >}} -You need to make sure the [Permalink](https://gohugo.io/content-management/urls/#permalinks) to the offline page is `/offline/`, otherwise, you will need to modify the value of `OFFLINE_CACHE_FILES` and `OFFLINE_PAGE` in the service worker yourself. - -Currently, i18n is supported for the offline page, but only for English and Chinese. Of course, you can [Contribute with a new language](https://github.com/Lruihao/FixIt/pulls) to the theme! -{{< /admonition >}} - -Here is a sample offline page. - -```md ---- -type: "offline" ---- -``` - -### Enable the `enablePWA` option {#enable-pwa} - -Go to `config.toml`, add or change the option `enablePWA = true` under `[params]`. - -```toml -[params] - # ... - enablePWA = true -``` - -## Install your PWA - -Now, an install button should show up when you visit your website and you will be able to install your site as an app. After clicking "Install", your website should be installed as a native app. - -![Installed PWA](install-pwa.jpg "Installed PWA") - -Congratulation! You have successfully turned your static site into a PWA 🎉 - -If you have any issues during the setup process, you can check the `Console` and `Application` panels in your browser's DevTools for debugging. Alternatively, you can check your site on [PWA Builder](https://www.pwabuilder.com/) for more information. You can also start a [discussion](https://github.com/Lruihao/FixIt/discussions) if you have any questions or propose an [issue](https://github.com/Lruihao/FixIt/issues) for any bugs you find. \ No newline at end of file diff --git a/exampleSite/content/posts/pwa-support/index.zh-cn.md b/exampleSite/content/posts/pwa-support/index.zh-cn.md deleted file mode 100644 index 4f95d331..00000000 --- a/exampleSite/content/posts/pwa-support/index.zh-cn.md +++ /dev/null @@ -1,151 +0,0 @@ ---- -weight: 5 -title: "主题文档 - PWA 支持" -date: 2022-01-26T11:10:56+08:00 -draft: false -description: "在 FixIt 中设置 PWA 的指南。" - -tags: ["PWA"] -categories: ["Documentation"] - -resources: -- name: featured-image - src: featured-image.png - -toc: - auto: false - -menu: - main: - title: "在 FixIt 中设置 PWA 的指南。" - parent: "documentation" - pre: "" - -repost: - enable: true - url: "https://hugodoit.com/zh-cn/pwa-support/" ---- - -了解如何在 FixIt 主题中配置渐进式网络应用程序 (PWA)。 - - - -## 什么是 PWA? - -[**PWA**(Progressive Web Apps,渐进式 Web 应用)](https://developer.mozilla.org/zh-CN/docs/Web/Progressive_web_apps) 运用现代的 Web API 以及传统的渐进式增强策略来创建跨平台 Web 应用程序。这些应用无处不在、功能丰富,使其具有与原生应用相同的用户体验优势。 - -## 为什么要配置 PWA? - -你并不需要将你的站点配置为一个 PWA. 传统的网站足以满足你想要分享的所有内容。但是,PWA 带来了一些可能有用的额外好处。 - -1. 在用户安装 PWA 后,页面将由 service worker 自动缓存,这使得从第二次访问开始页面将被快速加载。 -2. 用户始终可以在离线时访问缓存的页面。 - -这些功能可能对某些网站(例如此文档站点)很有用,但是将个人博客配置为 PWA 就没有多少意义。当然一切都取决于你的选择,无论如何 FixIt 主题都将为你提供开启此功能的选项。 - -## 如何将使用 FixIt 主题的静态网站配置为 PWA? {#setup-in-fixit} - -### 配置 `site.webmanifest` {#site.webmanifest} - -你需要在 `/static/` 文件夹下创建名为 `site.webmanifest` 的文件,并在此文件提供有关你的 PWA 的信息。 - -以下是必填参数。 - -* **name** *[必须]* - - 你的 PWA 的名称。 - -* **short_name** *[必须]* - - 你的 PWA 的简称。 - -* **start_url** *[必须]* - - 你的 PWA 的起始地址。请默认填写`"/"`. - -* **icons** *[必须]* - - 你的 PWA 的图标。你可以将网站的 favicon 作为图标。 - -您还可以在 `site.webmanifest` 中设置其他可选值,查看这篇 [文档](https://developer.mozilla.org/zh-CN/docs/Web/Manifest) 来了解更多。 - -这是一份示例 `site.webmanifest` 文件: - -```json -{ - "name": "FixIt Theme Documentation", - "short_name": "FixIt Docs", - "start_url": "/", - "description": "A Clean, Elegant but Advanced Hugo Theme", - "theme_color": "#ffffff", - "background_color": "#ffffff", - "display": "standalone", - "icons": [ - { - "src": "/apple-touch-icon.png", - "sizes": "180x180", - "type": "image/png", - "purpose": "any maskable" - }, - { - "src": "/android-chrome-192x192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "/android-chrome-512x512.png", - "sizes": "512x512", - "type": "image/png" - } - ] -} -``` - -### 配置离线页面 {#offline-page} - -离线页面将在访客离线访问未缓存的页面时显示。 - -你只需要在 `/content/` 目录创建 `offline.md` 或者 `offline/index.md`, 你可以通过以下命令快速完成创建: - -```bash -hugo new offline.md -hugo new offline/index.md -# [i18n] if you are running a multilingual website. -hugo new offline/index.en.md -hugo new offline/index.zh-cn.md -hugo new offline/index.zh-tw.md -``` - -{{< admonition type=tip title="Permalink" open=true >}} -你需要确保离线页面的 [Permalink](https://gohugo.io/content-management/urls/#permalinks) 是 `/offline/`, 否则你需要手动更改 service worker 中 `OFFLINE_CACHE_FILES` 和 `OFFLINE_PAGE` 的值。 - -目前,离线页面支持 i18n 多语言,但只支持英文和中文。当然,你可以给主题 [贡献一种新的语言](https://github.com/Lruihao/FixIt/pulls)! -{{< /admonition >}} - -这是一个示例离线页面: - -```md ---- -type: "offline" ---- -``` - -### 开启 `enablePWA` 选项 {#enable-pwa} - -前往 `config.toml`, 添加/修改 `[params]` 配置项下 `enablePWA` 选项的值为 `true`。 - -```toml -[params] - # ... - enablePWA = true -``` - -## 安装并使用你的 PWA - -如果一切顺利,现在当你访问你的网站时,浏览器将显示一个安装按钮,单击“安装”后,你的网站将被安装为一个本地的原生应用程序。 - -![Installed PWA](install-pwa.jpg "Installed PWA") - -大功告成!你已成功将你的静态网站配置为了一个 PWA 🎉 - -如果你在配置过程中有任何问题,你可以通过浏览器调试工具中的 `Console` 与 `Application` 面板来进行调试。你也可以用 [PWA Builder](https://www.pwabuilder.com/) 来检查你的网站以获得更多信息。你可以创建一个 [discussion](https://github.com/Lruihao/FixIt/discussions) 来获得社区帮助或者提交 [issue](https://github.com/Lruihao/FixIt/issues) 来报告你遇到的任何 bug。 \ No newline at end of file diff --git a/exampleSite/content/posts/pwa-support/install-pwa.jpg b/exampleSite/content/posts/pwa-support/install-pwa.jpg deleted file mode 100644 index c8413f84..00000000 Binary files a/exampleSite/content/posts/pwa-support/install-pwa.jpg and /dev/null differ diff --git a/exampleSite/content/posts/theme-documentation-basics/basic-configuration-preview.png b/exampleSite/content/posts/theme-documentation-basics/basic-configuration-preview.png deleted file mode 100644 index 00a4e65e..00000000 Binary files a/exampleSite/content/posts/theme-documentation-basics/basic-configuration-preview.png and /dev/null differ diff --git a/exampleSite/content/posts/theme-documentation-basics/basic-configuration-preview.zh-cn.png b/exampleSite/content/posts/theme-documentation-basics/basic-configuration-preview.zh-cn.png deleted file mode 100644 index 1b1d2938..00000000 Binary files a/exampleSite/content/posts/theme-documentation-basics/basic-configuration-preview.zh-cn.png and /dev/null differ diff --git a/exampleSite/content/posts/theme-documentation-basics/complete-configuration-preview.png b/exampleSite/content/posts/theme-documentation-basics/complete-configuration-preview.png deleted file mode 100644 index 27726741..00000000 Binary files a/exampleSite/content/posts/theme-documentation-basics/complete-configuration-preview.png and /dev/null differ diff --git a/exampleSite/content/posts/theme-documentation-basics/complete-configuration-preview.zh-cn.png b/exampleSite/content/posts/theme-documentation-basics/complete-configuration-preview.zh-cn.png deleted file mode 100644 index 7990929e..00000000 Binary files a/exampleSite/content/posts/theme-documentation-basics/complete-configuration-preview.zh-cn.png and /dev/null differ diff --git a/exampleSite/content/posts/theme-documentation-basics/featured-image.jpg b/exampleSite/content/posts/theme-documentation-basics/featured-image.jpg deleted file mode 100644 index c5eef4e0..00000000 Binary files a/exampleSite/content/posts/theme-documentation-basics/featured-image.jpg and /dev/null differ diff --git a/exampleSite/content/posts/theme-documentation-basics/index.en.md b/exampleSite/content/posts/theme-documentation-basics/index.en.md deleted file mode 100644 index 095780be..00000000 --- a/exampleSite/content/posts/theme-documentation-basics/index.en.md +++ /dev/null @@ -1,1414 +0,0 @@ ---- -weight: 1 -title: "Theme Documentation - Basics" -date: 2021-12-19T16:15:22+08:00 -draft: false -author: "Lruihao" -authorLink: "https://lruihao.cn" -description: "Discover what the Hugo - FixIt theme is all about and the core-concepts behind it." -resources: -- name: "featured-image" - src: "featured-image.jpg" - -tags: ["installation", "configuration"] -categories: ["documentation"] - -lightgallery: true - -toc: - auto: false - -menu: - main: - name: "Basics" - title: "Discover what the Hugo - FixIt theme is all about and the core-concepts behind it." - parent: "documentation" - pre: "" ---- - -Discover what the Hugo - **FixIt** theme is all about and the core-concepts behind it. - - - -## 1 Requirements - -Thanks to the simplicity of Hugo, [Hugo](https://gohugo.io/) is the only dependency of this theme. - -Just install latest version of [:(fa-regular fa-file-archive fa-fw): Hugo (> 0.84.0)](https://gohugo.io/getting-started/installing/) for your OS (**Windows**, **Linux**, **macOS**). - -{{< admonition note "Why not support earlier versions of Hugo?" >}} -Since [HTTP header support in getJSON](https://gohugo.io/templates/data-templates/#add-http-headers) was introduced in the [Config Revamp](https://gohugo.io/news/0.84.0-relnotes/), this theme only supports Hugo versions above **0.84.0**. -{{< /admonition >}} - -{{< admonition tip "Hugo extended version is recommended" >}} -Since some features of this theme need to processes :(fa-brands fa-sass fa-fw): SCSS to :(fa-brands fa-css3 fa-fw): CSS, it is recommended to use Hugo **extended** version for better experience. -{{< /admonition >}} - -## 2 Installation - -The following steps are here to help you initialize your new website. If you don’t know Hugo at all, we strongly suggest you learn more about it by following this [great documentation for beginners](https://gohugo.io/getting-started/quick-start/). - -### 2.1 Create Your Project - -Hugo provides a `new` command to create a new website: - -```bash -hugo new site my_website -cd my_website -``` - -### 2.2 Install the Theme - -The **FixIt** theme’s repository is: . - -You can download the [latest release :(fa-regular fa-file-archive fa-fw): .zip file](https://github.com/Lruihao/FixIt/releases) of the theme and extract it in the `themes` directory. - -Alternatively, clone this repository to the `themes` directory: - -```bash -git clone https://github.com/Lruihao/FixIt.git themes/FixIt -``` - -Or, create an empty git repository and make this repository a submodule of your site directory: - -```bash -git init -git submodule add https://github.com/Lruihao/FixIt.git themes/FixIt -``` - -### 2.3 Basic Configuration {#basic-configuration} - -The following is a basic configuration for the FixIt theme: - -```toml -baseURL = "http://example.org/" -# [en, zh-cn, fr, ...] determines default content language -defaultContentLanguage = "en" -# language code -languageCode = "en" -title = "My New Hugo Site" - -# Change the default theme to be use when building the site with Hugo -theme = "FixIt" - -[params] - # FixIt theme version - version = "0.2.X" - -[menu] - [[menu.main]] - identifier = "posts" - # you can add extra information before the name (HTML format is supported), such as icons - pre = "" - # you can add extra information after the name (HTML format is supported), such as icons - post = "" - name = "Posts" - url = "/posts/" - # title will be shown when you hover on this menu link - title = "" - weight = 1 - [[menu.main]] - identifier = "categories" - pre = "" - post = "" - name = "Categories" - url = "/categories/" - title = "" - weight = 2 - [[menu.main]] - identifier = "tags" - pre = "" - post = "" - name = "Tags" - url = "/tags/" - title = "" - weight = 3 - -# Markup related configuration in Hugo -[markup] - # Syntax Highlighting (https://gohugo.io/content-management/syntax-highlighting) - [markup.highlight] - # false is a necessary configuration (https://github.com/Lruihao/FixIt/issues/43) - noClasses = false -``` - -{{< admonition >}} -- When building the website, you can set a theme by using `--theme` option. However, we suggest you modify the configuration file (**config.toml**) and set the theme as the default. -- {{< version 0.2.14 >}} The FixIt theme provides sub menu support. Please refer to [Menu Advanced Configuration](#menu-advanced-configuration) for details. -{{< /admonition >}} - -### 2.4 Create Your First Post - -Here is the way to create your first post: - -```bash -hugo new posts/first_post.md -``` - -Feel free to edit the post file by adding some sample content and replacing the title value in the beginning of the file. - -{{< admonition >}} -By default all posts and pages are created as a draft. If you want to render these pages, remove the property `draft: true` from the metadata, set the property `draft: false` or add `-D`/`--buildDrafts` parameter to `hugo` command. -{{< /admonition >}} - -### 2.5 Launching the Website Locally - -Launch by using the following command: - -```bash -# `hugo serve` is an alias of `hugo server`, which is not a misspelling ~ -hugo server -``` - -Go to `http://localhost:1313`. - -![Basic configuration preview](basic-configuration-preview.png "Basic configuration preview") - -{{< admonition tip >}} -When you run `hugo server`, when the contents of the files change, the page automatically refreshes with the changes. -{{< /admonition >}} - -{{< admonition >}} -Since the theme use `.Scratch` in Hugo to implement some features, -it is highly recommended that you add `--disableFastRender` parameter to `hugo server` command for the live preview of the page you are editing. - -```bash -hugo server --disableFastRender -``` -{{< /admonition >}} - -### 2.6 Build the Website - -When your site is ready to deploy, run the following command: - -```bash -hugo -``` - -A `public` folder will be generated, containing all static content and assets for your website. It can now be deployed on any web server. - -{{< admonition tip >}} -The website can be automatically published and hosted with [Netlify](https://www.netlify.com/) (Read more about [Automated HUGO deployments with Netlify](https://www.netlify.com/blog/2015/07/30/hosting-hugo-on-netlifyinsanely-fast-deploys/)). -Alternatively, you can use [AWS Amplify](https://gohugo.io/hosting-and-deployment/hosting-on-aws-amplify/), [Github pages](https://gohugo.io/hosting-and-deployment/hosting-on-github/), [Render](https://gohugo.io/hosting-and-deployment/hosting-on-render/) and more... -{{< /admonition >}} - -## 3 Configuration - -### 3.1 Site Configuration {#site-configuration} - -In addition to [Hugo global configuration](https://gohugo.io/overview/configuration/) and [menu configuration](#basic-configuration), **FixIt** lets you define the following parameters in your site configuration (here is a `config.toml`, whose values are default). - -Please open the code block below to view the complete sample configuration :(fa-regular fa-hand-point-down fa-fw):: - -```toml -[params] - # {{< version 0.2.15 changed >}} FixIt theme version - version = "0.2.X" # e.g. "0.2.X", "0.2.15", "v0.2.15" etc. - # site description - description = "This is My New Hugo Site" - # site keywords - keywords = ["Theme", "Hugo"] - # site default theme ("light", "dark", "auto") - defaultTheme = "auto" - # public git repo url only then enableGitInfo is true - gitRepo = "" - # {{< version 0.1.1 >}} which hash function used for SRI, when empty, no SRI is used - # ("sha256", "sha384", "sha512", "md5") - fingerprint = "" - # {{< version 0.2.0 >}} date format - dateFormat = "2006-01-02" - # website images for Open Graph and Twitter Cards - images = ["/logo.png"] - # {{< version 0.2.12 >}} enable PWA - enablePWA = true - # {{< version 0.2.14 >}} whether to add external Icon for external links automatically - externalIcon = false - # {{< version 0.2.14 >}} FixIt will, by default, inject a theme meta tag in the HTML head on the home page only. - # You can turn it off, but we would really appreciate if you don’t, as this is a good way to watch FixIt's popularity on the rise. - disableThemeInject = false - - # {{< version 0.2.0 >}} App icon config - [params.app] - # optional site title override for the app when added to an iOS home screen or Android launcher - title = "FixIt" - # whether to omit favicon resource links - noFavicon = false - # modern SVG favicon to use in place of older style .png and .ico files - svgFavicon = "" - # Safari mask icon color - iconColor = "#5bbad5" - # Windows v8-10 tile color - tileColor = "#da532c" - # {{< version 0.2.12 changed >}} Android browser theme color - [params.app.themeColor] - light = "#ffffff" - dark = "#252627" - - # {{< version 0.2.0 >}} Search config - [params.search] - enable = true - # type of search engine ("lunr", "algolia") - type = "lunr" - # max index length of the chunked content - contentLength = 4000 - # placeholder of the search bar - placeholder = "" - # {{< version 0.2.1 >}} max number of results length - maxResultLength = 10 - # {{< version 0.2.3 >}} snippet length of the result - snippetLength = 30 - # {{< version 0.2.1 >}} HTML tag name of the highlight part in results - highlightTag = "em" - # {{< version 0.2.4 >}} whether to use the absolute URL based on the baseURL in search index - absoluteURL = false - [params.search.algolia] - index = "" - appID = "" - searchKey = "" - - # Header config - [params.header] - # {{< version 0.2.13 changed >}} desktop header mode ("sticky", "normal", "auto") - desktopMode = "sticky" - # {{< version 0.2.13 changed >}} mobile header mode ("sticky", "normal", "auto") - mobileMode = "auto" - # {{< version 0.2.0 >}} Header title config - [params.header.title] - # URL of the LOGO - logo = "/images/fixit.svg" - # title name - name = "" - # you can add extra information before the name (HTML format is supported), such as icons - pre = "" - # you can add extra information after the name (HTML format is supported), such as icons - post = "" - # {{< version 0.2.5 >}} whether to use typeit animation for title name - typeit = false - # {{< version 0.2.12 >}} Header subtitle config - [params.header.subtitle] - # subtitle name - name = "" - # whether to use typeit animation for subtitle name - typeit = false - - # Footer config - [params.footer] - enable = true - # {{< version 0.2.0 >}} Custom content (HTML format is supported) - custom = '' - # {{< version 0.2.0 >}} whether to show Hugo and theme info - hugo = true - # {{< version 0.2.0 >}} whether to show copyright info - copyright = true - # {{< version 0.2.0 >}} whether to show the author - author = true - # Site creation year - since = 2019 - # {{< version 0.2.14 >}} Site creation time - siteTime = '' # e.g. '2019-02-03T19:30:34+08:00' - # {{< version 0.2.14 >}} whether to show total word count of site content - wordCount = true - # {{< version 0.2.12 >}} Public network security only in China (HTML format is supported) - gov = "" - # ICP info only in China (HTML format is supported) - icp = "" - # license info (HTML format is supported) - license = 'CC BY-NC 4.0' - - # {{< version 0.2.0 >}} Section (all posts) page config - [params.section] - # special amount of posts in each section page - paginate = 20 - # date format (month and day) - dateFormat = "01-02" - # amount of RSS pages - rss = 10 - # {{< version 0.2.13 >}} recently updated posts settings - [params.section.recentlyUpdated] - enable = false - rss = false - days = 30 - maxCount = 10 - - # {{< version 0.2.0 >}} List (category or tag) page config - [params.list] - # special amount of posts in each list page - paginate = 20 - # date format (month and day) - dateFormat = "01-02" - # amount of RSS pages - rss = 10 - - # Home page config - [params.home] - # {{< version 0.2.0 >}} amount of RSS pages - rss = 10 - # Home page profile - [params.home.profile] - enable = true - # {{< version 0.2.13 >}} Gravatar mirror site domain, default: "www.gravatar.com" - # {{< version 0.2.14 changed >}} {{< version 0.2.15 deleted >}} The parameter `home.profile.gravatarSite` is deprecated since v0.2.14, use `gravatar.host` instead - # gravatarSite = "" - # Gravatar Email for preferred avatar in home page - gravatarEmail = "" - # URL of avatar shown in home page - avatarURL = "/images/avatar.png" - # {{< version 0.2.7 changed >}} title shown in home page (HTML format is supported) - title = "" - # subtitle shown in home page - subtitle = "This is My New Hugo Site" - # whether to use typeit animation for subtitle - typeit = true - # whether to show social links - social = true - # {{< version 0.2.0 >}} disclaimer (HTML format is supported) - disclaimer = "" - # Home page posts - [params.home.posts] - enable = true - # special amount of posts in each home posts page - paginate = 6 - - # Social config about the author - [params.social] - GitHub = "Lruihao" - Linkedin = "" - Twitter = "" - Instagram = "" - Facebook = "" - Telegram = "" - Medium = "" - Gitlab = "" - Youtubelegacy = "" - Youtubecustom = "" - Youtubechannel = "" - Tumblr = "" - Quora = "" - Keybase = "" - Pinterest = "" - Reddit = "" - Codepen = "" - FreeCodeCamp = "" - Bitbucket = "" - Stackoverflow = "" - Weibo = "" - Odnoklassniki = "" - VK = "" - Flickr = "" - Xing = "" - Snapchat = "" - Soundcloud = "" - Spotify = "" - Bandcamp = "" - Paypal = "" - Fivehundredpx = "" - Mix = "" - Goodreads = "" - Lastfm = "" - Foursquare = "" - Hackernews = "" - Kickstarter = "" - Patreon = "" - Steam = "" - Twitch = "" - Strava = "" - Skype = "" - Whatsapp = "" - Zhihu = "" - Douban = "" - Angellist = "" - Slidershare = "" - Jsfiddle = "" - Deviantart = "" - Behance = "" - Dribbble = "" - Wordpress = "" - Vine = "" - Googlescholar = "" - Researchgate = "" - Mastodon = "" - Thingiverse = "" - Devto = "" - Gitea = "" - XMPP = "" - Matrix = "" - Bilibili = "" - # ORCID, ... , CSDN {{< version 0.2.13 >}} - ORCID = "" - Liberapay = "" - Ko-Fi = "" - BuyMeaCoffee = "" - Linktree = "" - QQ = "" - QQGroup = "" # https://qun.qq.com/join.html - Diaspora = "" - CSDN = "" - Email = "" - RSS = true # {{< version 0.2.0 >}} - - # {{< version 0.2.0 changed >}} Page config - [params.page] - # {{< version 0.2.0 >}} whether to hide a page from home page - hiddenFromHomePage = false - # {{< version 0.2.0 >}} whether to hide a page from search results - hiddenFromSearch = false - # {{< version 0.2.0 >}} whether to enable twemoji - twemoji = false - # whether to enable lightgallery - lightgallery = false - # {{< version 0.2.0 >}} whether to enable the ruby extended syntax - ruby = true - # {{< version 0.2.0 >}} whether to enable the fraction extended syntax - fraction = true - # {{< version 0.2.0 >}} whether to enable the fontawesome extended syntax - fontawesome = true - # license info (HTML format is supported) - license = 'CC BY-NC 4.0' - # whether to show link to Raw Markdown content of the content - linkToMarkdown = true - # {{< version 0.2.4 >}} whether to show the full text content in RSS - rssFullText = false - # {{< version 0.2.13 >}} Page style ("narrow", "normal", "wide", ...) - pageStyle = "normal" - # {{< version 0.2.14 >}} Gravatar is force-used as the author's avatar - gravatarForce = false - # {{< version 0.2.15 >}} Repost config - [params.page.repost] - enable = false - url = "" - # {{< version 0.2.0 >}} Table of the contents config - [params.page.toc] - # whether to enable the table of the contents - enable = true - # {{< version 0.2.9 >}} whether to keep the static table of the contents in front of the post - keepStatic = false - # whether to make the table of the contents in the sidebar automatically collapsed - auto = true - # {{< version 0.2.13 >}} position of TOC ("left", "right") - position = "right" - # {{< version 0.2.13 >}} Display a message at the beginning of an article to warn the reader that its content might be expired - [params.page.expirationReminder] - enable = false - # Display the reminder if the last modified time is more than 90 days ago - reminder = 90 - # Display warning if the last modified time is more than 180 days ago - warning = 180 - # If the article expires, close the comment or not - closeComment = false - # {{< version 0.2.0 changed >}} {{< link "https://katex.org/" KaTeX >}} mathematical formulas (https://katex.org) - [params.page.math] - enable = true - # default block delimiter is $$ ... $$ and \\[ ... \\] - blockLeftDelimiter = "" - blockRightDelimiter = "" - # default inline delimiter is $ ... $ and \\( ... \\) - inlineLeftDelimiter = "" - inlineRightDelimiter = "" - # KaTeX extension copy_tex - copyTex = true - # KaTeX extension mhchem - mhchem = true - # {{< version 0.2.0 >}} Code config - [params.page.code] - # whether to show the copy button of the code block - copy = true - # {{< version 0.2.13 >}} whether to show the edit button of the code block - edit = true - # the maximum number of lines of displayed code by default - maxShownLines = 10 - # {{< version 0.2.14 >}} Post edit - [params.page.edit] - enable = false - # url = "https://github.com/user-name/repo-name/edit/branch-name/subdirectory-name" # Link for fork & edit - url = "" # Link for fork & edit - # {{< version 0.2.0 >}} {{< link "https://docs.mapbox.com/mapbox-gl-js" "Mapbox GL JS" >}} config (https://docs.mapbox.com/mapbox-gl-js) - [params.page.mapbox] - # access token of Mapbox GL JS - accessToken = "" - # style for the light theme - lightStyle = "mapbox://styles/mapbox/light-v9" - # style for the dark theme - darkStyle = "mapbox://styles/mapbox/dark-v9" - # whether to add {{< link "https://docs.mapbox.com/mapbox-gl-js/api#navigationcontrol" NavigationControl >}} - navigation = true - # whether to add {{< link "https://docs.mapbox.com/mapbox-gl-js/api#geolocatecontrol" GeolocateControl >}} - geolocate = true - # whether to add {{< link "https://docs.mapbox.com/mapbox-gl-js/api#scalecontrol" ScaleControl >}} - scale = true - # whether to add {{< link "https://docs.mapbox.com/mapbox-gl-js/api#fullscreencontrol" FullscreenControl >}} - fullscreen = true - # {{< version 0.2.0 changed >}} social share links in post page - [params.page.share] - enable = true - Twitter = true - Facebook = true - Linkedin = false - Whatsapp = true - Pinterest = false - Tumblr = false - HackerNews = false - Reddit = false - VK = false - Buffer = false - Xing = false - Line = true - Instapaper = false - Pocket = false - Digg = false - Stumbleupon = false - Flipboard = false - Weibo = true - Renren = false - Myspace = true - Blogger = true - Baidu = false - Odnoklassniki = false - Evernote = true - Skype = false - Trello = false - Mix = false - # {{< version 0.2.15 changed >}} Comment config - [params.page.comment] - enable = false - # {{< version 0.2.13 >}} {{< link "https://artalk.js.org/" Artalk >}} comment config (https://artalk.js.org/) - [params.page.comment.artalk] - enable = false - server = "https://yourdomain/api/" - site = "默认站点" - placeholder = "" - noComment = "" - sendBtn = "" - editorTravel = true - flatMode = 'auto' - maxNesting = 3 - # It take effect when `params.page.lightgallery` is enabled - lightgallery = false - locale = "" # {{< version 0.2.15 >}} - # {{< version 0.1.1 >}} {{< link "https://disqus.com/" Disqus >}} comment config (https://disqus.com) - [params.page.comment.disqus] - enable = false - # Disqus shortname to use Disqus in posts - shortname = "" - # {{< version 0.1.1 >}} {{< link "https://github.com/gitalk/gitalk" Gitalk >}} comment config (https://github.com/gitalk/gitalk) - [params.page.comment.gitalk] - enable = false - owner = "" - repo = "" - clientId = "" - clientSecret = "" - # {{< link "https://github.com/xCss/Valine" Valine >}} comment config (https://github.com/xCss/Valine) - [params.page.comment.valine] - enable = false - appId = "" - appKey = "" - placeholder = "" - avatar = "mp" - meta= "" - pageSize = 10 - lang = "" - visitor = true - recordIP = true - highlight = true - enableQQ = false - serverURLs = "" - # {{< version 0.2.6 >}} emoji data file name, default is "google.yml" - # ("apple.yml", "google.yml", "facebook.yml", "twitter.yml") - # located in "themes/FixIt/assets/data/emoji/" directory - # you can store your own data files in the same path under your project: - # "assets/data/emoji/" - emoji = "" - commentCount = true # {{< version 0.2.13 >}} - # {{< version 0.2.13 >}} {{< link "https://waline.js.org" Waline >}} comment config (https://waline.js.org) - [params.page.comment.waline] - enable = false - serverURL = "" - pageview = false # {{< version 0.2.15 >}} - emoji = ['//unpkg.com/@waline/emojis@1.0.1/weibo'] - meta = ['nick', 'mail', 'link'] - requiredMeta = [] - login = 'enable' - wordLimit = 0 - pageSize = 10 - imageUploader = false # {{< version 0.2.15 >}} - highlighter = false # {{< version 0.2.15 >}} - comment = false # {{< version 0.2.15 >}} - # visitor = false # {{< version 0.2.15 deleted >}} renamed to pageview - # uploadImage = false # {{< version 0.2.15 deleted >}} renamed to imageUploader - # highlight = true # {{< version 0.2.15 deleted >}} renamed to highlighter - # mathTagSupport = false {{< version 0.2.15 deleted >}} - # commentCount = false {{< version 0.2.15 deleted >}} renamed to comment - # {{< link "https://developers.facebook.com/docs/plugins/comments" "Facebook comment" >}} config (https://developers.facebook.com/docs/plugins/comments) - [params.page.comment.facebook] - enable = false - width = "100%" - numPosts = 10 - appId = "" - languageCode = "" - # {{< version 0.2.0 >}} {{< link "https://comments.app/" "Telegram comments" >}} config (https://comments.app) - [params.page.comment.telegram] - enable = false - siteID = "" - limit = 5 - height = "" - color = "" - colorful = true - dislikes = false - outlined = false - # {{< version 0.2.0 >}} {{< link "https://commento.io/" "Commento" >}} comment config (https://commento.io) - [params.page.comment.commento] - enable = false - # {{< version 0.2.5 >}} {{< link "https://utteranc.es/" "Utterances" >}} comment config (https://utteranc.es) - [params.page.comment.utterances] - enable = false - # owner/repo - repo = "" - issueTerm = "pathname" - label = "" - lightTheme = "github-light" - darkTheme = "github-dark" - # {{< version 0.2.13 >}} {{< link "https://twikoo.js.org/" "Twikoo" >}} comment config (https://twikoo.js.org/) - [params.page.comment.twikoo] - enable = false - envId = "" - region = "" - path = "" - visitor = true - commentCount = true - # It take effect when `params.page.lightgallery` is enabled - lightgallery = false - # {{< version 0.2.14 >}} {{< link "https://giscus.app/" "Giscus" >}} comments config - [params.page.comment.giscus] - enable = false - repo = "" - repoId = "" - category = "" - categoryId = "" - mapping = "" - reactionsEnabled = "1" - emitMetadata = "0" - inputPosition = "bottom" # top, bottom - lightTheme = "light" - darkTheme = "dark" - lazyLoad = true - # {{< version 0.2.7 >}} Third-party library config - [params.page.library] - [params.page.library.css] - # someCSS = "some.css" - # located in "assets/" - # Or - # someCSS = "https://cdn.example.com/some.css" - [params.page.library.js] - # someJavascript = "some.js" - # located in "assets/" - # Or - # someJavascript = "https://cdn.example.com/some.js" - # {{< version 0.2.10 changed >}} Page SEO config - [params.page.seo] - # image URL - images = [] - # Publisher info - [params.page.seo.publisher] - name = "" - logoUrl = "" - - # {{< version 0.2.5 >}} TypeIt config - [params.typeit] - # typing speed between each step (measured in milliseconds) - speed = 100 - # blinking speed of the cursor (measured in milliseconds) - cursorSpeed = 1000 - # character used for the cursor (HTML format is supported) - cursorChar = "|" - # cursor duration after typing finishing (measured in milliseconds, "-1" means unlimited) - duration = -1 - - # {{< version 0.2.15 >}} Mermaid config - [params.mermaid] - # For values, see https://mermaid-js.github.io/mermaid/#/Setup?id=theme - themes = ['neutral', 'dark'] - - # {{< version 0.2.12 >}} PanguJS config - [params.pangu] - # For Chinese writing - enable = false - - # {{< version 0.2.12 >}} Watermark config - # Detail config see https://github.com/Lruihao/watermark#readme - [params.watermark] - enable = false - # watermark's text (HTML format is supported) - content = '' - # watermark's transparency - opacity = 0.1 - # parent of watermark's container - appendTo = '.wrapper>main' - # watermark's width. unit: px - width = 150 - # watermark's height. unit: px - height = 20 - # row spacing of watermarks. unit: px - rowSpacing = 60 - # col spacing of watermarks. unit: px - colSpacing = 30 - # watermark's tangent angle. unit: deg - rotate = 15 - # watermark's fontSize. unit: rem - fontSize = 0.85 - # {{< version 0.2.13 >}} watermark's fontFamily - fontFamily = 'inherit' - - # {{< version 0.2.12 >}} Busuanzi count - [params.ibruce] - enable = true - # Enable in post meta - enablePost = false - # {{< version 0.2.14 changed >}} {{< version 0.2.15 deleted >}} Site creation time - # The parameter `ibruce.siteTime` is deprecated since v0.2.14, use `footer.siteTime` instead - # siteTime = '' # e.g. '2019-02-03T19:30:34+08:00' - - # Site verification code config for Google/Bing/Yandex/Pinterest/Baidu/360/Sogou - [params.verification] - google = "" - bing = "" - yandex = "" - pinterest = "" - baidu = "" - so = "" - sogou = "" - - # {{< version 0.2.10 >}} Site SEO config - [params.seo] - # image URL - image = "" - # thumbnail URL - thumbnailUrl = "" - - # {{< version 0.2.0 >}} Analytics config - [params.analytics] - enable = false - # Google Analytics - [params.analytics.google] - id = "" - # whether to anonymize IP - anonymizeIP = true - # Fathom Analytics - [params.analytics.fathom] - id = "" - # server url for your tracker if you're self hosting - server = "" - - # {{< version 0.2.7 >}} Cookie consent config - [params.cookieconsent] - enable = true - # text strings used for Cookie consent banner - [params.cookieconsent.content] - message = "" - dismiss = "" - link = "" - - # {{< version 0.2.7 changed >}} CDN config for third-party library files - [params.cdn] - # CDN data file name, disabled by default - # ("jsdelivr.yml", "unpkg.yml") - # located in "themes/FixIt/assets/data/cdn/" directory - # you can store your own data files in the same path under your project: - # "assets/data/cdn/" - # data = "unpkg" - - # {{< version 0.2.8 >}} Compatibility config - [params.compatibility] - # whether to use Polyfill.io to be compatible with older browsers - polyfill = false - # whether to use object-fit-images to be compatible with older browsers - objectFit = false - - # {{< version 0.2.12 >}} Custom JS at last - # "_custom.js" located in "themes/FixIt/assets/js/" - # you can store your custom JS file in the same path under your project: - # "assets/js/_custom.js" - [params.customJS] - enable = true - # {{< version 0.2.14 >}} GitHub banner in the top-right or top-left corner - [params.githubCorner] - enable = false - permalink = "https://github.com/Lruihao/FixIt" - title = "View source on GitHub" - position = "right" # left, right - # {{< version 0.2.14 >}} Gravatar config - [params.gravatar] - # Gravatar host, default: "www.gravatar.com" - host = "www.gravatar.com" # "cn.gravatar.com", "gravatar.loli.net" - style = "" # "", mp, identicon, monsterid, wavatar, retro, blank, robohash - # {{< version 0.2.15 >}} Developer options - [params.dev] - enable = false - # Check for updates - c4u = false - # Please do not expose to public! - githubToken = "" - # Mobile Devtools confi - [params.dev.mDevtools] - enable = false - # "vConsole", "eruda" supported - type = "vConsole" - -# Markup related configuration in Hugo -[markup] - # {{< link "https://gohugo.io/content-management/syntax-highlighting" "Syntax Highlighting" >}} (https://gohugo.io/content-management/syntax-highlighting) - [markup.highlight] - ########## necessary configurations ########## - # {{< link "https://github.com/Lruihao/FixIt/issues/43" >}} - codeFences = true - lineNos = true - lineNumbersInTable = true - noClasses = false - ########## necessary configurations ########## - guessSyntax = true - # Goldmark is from Hugo 0.60 the default library used for Markdown - [markup.goldmark] - [markup.goldmark.extensions] - definitionList = true - footnote = true - linkify = true - strikethrough = true - table = true - taskList = true - typographer = true - [markup.goldmark.renderer] - # whether to use HTML tags directly in the document - unsafe = true - # Table Of Contents settings - [markup.tableOfContents] - startLevel = 2 - endLevel = 6 - -# Author config -[author] - name = "xxxx" - email = "" - link = "" - -# Sitemap config -[sitemap] - changefreq = "weekly" - filename = "sitemap.xml" - priority = 0.5 - -# {{< link "https://gohugo.io/content-management/urls#permalinks" "Permalinks config" >}} (https://gohugo.io/content-management/urls#permalinks) -[Permalinks] - # posts = ":year/:month/:filename" - posts = ":filename" - -# {{< link "https://gohugo.io/about/hugo-and-gdpr/" "Privacy config" >}} (https://gohugo.io/about/hugo-and-gdpr/) -[privacy] - [privacy.twitter] - enableDNT = true - [privacy.youtube] - privacyEnhanced = true - -# {{< version 0.2.15 changed >}} -[mediaTypes] - # Options to make output .md files - [mediaTypes."text/markdown"] - suffixes = ["md"] - # Options to make output .txt files - [mediaTypes."text/plain"] - suffixes = ["txt"] - -# {{< version 0.2.15 changed >}} -[outputFormats] - # Options to make output .md files - [outputFormats.MarkDown] - mediaType = "text/markdown" - isPlainText = true - isHTML = false - # {{< version 0.2.15 >}} Options to make output baidu_urls.txt file - [outputFormats.BaiduUrls] - baseName = "baidu_urls" - mediaType = "text/plain" - isPlainText = true - isHTML = false - -# {{< version 0.2.15 changed >}} Options to make hugo output files -[outputs] - home = ["HTML", "RSS", "JSON", "BaiduUrls"] - page = ["HTML", "MarkDown"] - section = ["HTML", "RSS"] - taxonomy = ["HTML", "RSS"] - taxonomyTerm = ["HTML"] -``` - -{{< admonition >}} -Note that some of these parameters are explained in details in other sections of this documentation. -{{< /admonition >}} - -{{< admonition note "Hugo environments" >}} -Default environments are `development` with `hugo server` and `production` with `hugo`. - -Due to limitations in the local `development` environment, -the **comment system**, **CDN** and **fingerprint** will not be enabled in the `development` environment. - -You could enable these features with `hugo server -e production`. -{{< /admonition >}} - -{{< admonition tip "Tips about CDN Configuration" >}} -{{< version 0.2.7 changed >}} - -```toml -[params.cdn] - # CDN data file name, disabled by default - # ("jsdelivr.yml") - data = "" -```` - -The default CDN data file is located in `themes/FixIt/assets/data/cdn/` directory. -You can store your own data file in the same path under your project: `assets/data/cdn/`. -{{< /admonition >}} - -{{< admonition tip "Tips about social Configuration" >}} -{{< version 0.2.0 >}} - -You can directly set your ID to get a default social link and its icon: - -```toml -[params.social] - Mastodon = "@xxxx" -``` - -The social link generated is `https://mastodon.technology/@xxxx`. - -Or You can set more options through a dict: - -```toml -[params.social] - [params.social.Mastodon] - # weight when arranging icons (the greater the weight, the later the icon is positioned) - weight = 0 - # your social ID - id = "@xxxx" - # prefix of your social link - prefix = "https://mastodon.social/" - # content hovering on the icon - title = "Mastodon" -``` - -The default data of all supported social links is located in `themes/FixIt/assets/data/social.yaml`, -which is you can refer to. -{{< /admonition >}} - -![Complete configuration preview](complete-configuration-preview.png "Complete configuration preview") - -### 3.2 Favicons, Browserconfig, Manifest - -It is recommended to put your own favicons: - -* apple-touch-icon.png (180x180) -* favicon-32x32.png (32x32) -* favicon-16x16.png (16x16) -* mstile-150x150.png (150x150) -* android-chrome-192x192.png (192x192) -* android-chrome-512x512.png (512x512) - -into `/static`. They’re easily created via [https://realfavicongenerator.net/](https://realfavicongenerator.net/). - -Customize `browserconfig.xml` and `site.webmanifest` to set theme-color and background-color. - -### 3.3 Style Customization - -{{< version 0.2.8 changed >}} - -{{< admonition >}} -Hugo **extended** version is necessary for the style customization. -{{< /admonition >}} - -**FixIt** theme has been built to be as configurable as possible by defining custom `.scss` style files. - -The directory including the custom `.scss` style files is `assets/css` relative to **your project root directory**. - -In `assets/css/_override.scss`, you can override the variables in `themes/FixIt/assets/css/_variables.scss` to customize the style. - -Here is a example: - -```scss -@import url('https://fonts.googleapis.com/css?family=Fira+Mono:400,700&display=swap&subset=latin-ext'); -$code-font-family: Fira Mono, Source Code Pro, Menlo, Consolas, Monaco, monospace; -``` - -In `assets/css/_custom.scss`, you can add some css style code to customize the style. - -#### 3.3.1 Page Style {#page-style} - -{{< version 0.2.13 >}} - -The FixIt theme provides a page width configuration option `pageStyle` and three values. - -* **narrow** Keep `}} - -There are three css common class for print view in FixIt Theme. - -* `page-break-before` Insert page break before element -* `page-break-after` Insert page break after element -* `print-d-none` Hide elements in print view - -Here is a simple exmple: - -```html -
-
- -``` - -### 3.4 Menu Advanced Configuration {#menu-advanced-configuration} - -Hugo has a simple yet powerful [menu system](https://gohugo.io/content-management/menus/). - -According to the interface provided by Hugo, FixIt theme only realizes some functions, but I think it is enough to meet the needs of most people and make users easier to use. - -The following is a complete menu item configuration: - -```toml -[menu] - [[menu.main]] - identifier = "posts" - # {{< version 0.2.14 >}} Identifier of the parent menu item - parent = "" - # you can add extra information before the name (HTML format is supported), such as icons - pre = "" - # you can add extra information after the name (HTML format is supported), such as icons - post = "" - name = "Posts" - url = "/posts/" - # title will be shown when you hover on this menu link - title = "" - weight = 1 - # {{< version 0.2.14 >}} add user-defined content to menu items - [menu.main.params] - # add css class to a specific menu item - class = 'text-center' - # whether set as a draft menu item whose function is similar to a draft post/page - draft = false -``` - -#### 3.4.1 Sub Menu - -{{< version 0.2.14 >}} - -In consideration of practicability and typesetting, the FixIt theme only supports two-tier nested menus, which can be configured through the `parent` field in the menu configuration. - -The parent item of a menu item should be the `identifier` of another menu item, and the identifier should be unique in the menu. - -#### 3.4.2 Menu Params - -{{< version 0.2.14 >}} - -You can also add user-defined content to menu items via the `params` field. The FixIt theme currently provides two parameters: - -* **class** *{String}* add css class to a specific menu item -* **draft** *{Boolean}* whether set as a draft menu item whose function is similar to a draft post/page - -{{< admonition >}} -The draft menu items and posts/pages can be rendered by starting the `Hugo server` command or adding the `-D`/`--buildDrafts` parameter to `hugo` command. -{{< /admonition >}} - -{{< admonition tip >}} -This helps to distinguish the different contents of preview environment and production environment during deployment. - -For example: - -- [preview environment with draft menu items](https://pre.fixit.lruihao.cn) -- [production environment without draft menu items](https://fixit.lruihao.cn) -{{< /admonition >}} - -#### 3.4.3 Add content to Menu {#content-to-menu} - -It’s also possible to create menu entries from the page by configuring `front matter` (i.e. the `.md`-file). - -Here is a `yaml` example: - -```yaml ---- -title: "Theme Documentation - Basics" -author: "Lruihao" -menu: - main: - name: "Basics" - title: "Discover what the Hugo - FixIt theme is all about and the core-concepts behind it." - parent: "documentation" - pre: "" ---- -... -``` - -## 4 Multilingual and i18n - -**FixIt** theme is fully compatible with Hugo multilingual mode, which provides in-browser language switching. - -![Language Switch](language-switch.gif "Language Switch") - -### 4.1 Compatibility {#language-compatibility} - -{{< version 0.2.10 changed >}} - -| Language | Hugo Code | HTML `lang` Attribute | Theme Docs | Lunr.js Support | -|:-------------------- |:---------:|:---------------------:|:-----------------------------:|:-----------------------------:| -| English | `en` | `en` | :(fa-regular fa-check-square fa-fw): | :(fa-regular fa-check-square fa-fw): | -| Simplified Chinese | `zh-cn` | `zh-CN` | :(fa-regular fa-check-square fa-fw): | :(fa-regular fa-check-square fa-fw): | -| Traditional Chinese | `zh-tw` | `zh-TW` | :(fa-regular fa-square fa-fw): | :(fa-regular fa-check-square fa-fw): | -| French | `fr` | `fr` | :(fa-regular fa-square fa-fw): | :(fa-regular fa-check-square fa-fw): | -| Polish | `pl` | `pl` | :(fa-regular fa-square fa-fw): | :(fa-regular fa-square fa-fw): | -| Brazilian Portuguese | `pt-br` | `pt-BR` | :(fa-regular fa-square fa-fw): | :(fa-regular fa-check-square fa-fw): | -| Italian | `it` | `it` | :(fa-regular fa-square fa-fw): | :(fa-regular fa-check-square fa-fw): | -| Spanish | `es` | `es` | :(fa-regular fa-square fa-fw): | :(fa-regular fa-check-square fa-fw): | -| German | `de` | `de` | :(fa-regular fa-square fa-fw): | :(fa-regular fa-check-square fa-fw): | -| Serbian | `sr` | `sr` | :(fa-regular fa-square fa-fw): | :(fa-regular fa-square fa-fw): | -| Russian | `ru` | `ru` | :(fa-regular fa-square fa-fw): | :(fa-regular fa-check-square fa-fw): | -| Romanian | `ro` | `ro` | :(fa-regular fa-square fa-fw): | :(fa-regular fa-check-square fa-fw): | -| Vietnamese | `vi` | `vi` | :(fa-regular fa-square fa-fw): | :(fa-regular fa-check-square fa-fw): | - -### 4.2 Basic Configuration - -After learning [how Hugo handle multilingual websites](https://gohugo.io/content-management/multilingual), define your languages in your [site configuration](#site-configuration). - -For example with English, Chinese and French website: - -```toml -# [en, zh-cn, fr, pl, ...] determines default content language -defaultContentLanguage = "en" - -[languages] - [languages.en] - weight = 1 - title = "My New Hugo Site" - languageCode = "en" - languageName = "English" - [[languages.en.menu.main]] - identifier = "posts" - pre = "" - post = "" - name = "Posts" - url = "/posts/" - title = "" - weight = 1 - [[languages.en.menu.main]] - identifier = "tags" - pre = "" - post = "" - name = "Tags" - url = "/tags/" - title = "" - weight = 2 - [[languages.en.menu.main]] - identifier = "categories" - pre = "" - post = "" - name = "Categories" - url = "/categories/" - title = "" - weight = 3 - - [languages.zh-cn] - weight = 2 - title = "我的全新 Hugo 网站" - # language code, CN only here - languageCode = "zh-CN" - languageName = "简体中文" - # whether to include Chinese/Japanese/Korean - hasCJKLanguage = true - [[languages.zh-cn.menu.main]] - identifier = "posts" - pre = "" - post = "" - name = "文章" - url = "/posts/" - title = "" - weight = 1 - [[languages.zh-cn.menu.main]] - identifier = "tags" - pre = "" - post = "" - name = "标签" - url = "/tags/" - title = "" - weight = 2 - [[languages.zh-cn.menu.main]] - identifier = "categories" - pre = "" - post = "" - name = "分类" - url = "/categories/" - title = "" - weight = 3 - - [languages.fr] - weight = 3 - title = "Mon nouveau site Hugo" - languageCode = "fr" - languageName = "Français" - [[languages.fr.menu.main]] - identifier = "posts" - pre = "" - post = "" - name = "Postes" - url = "/posts/" - title = "" - weight = 1 - [[languages.fr.menu.main]] - identifier = "tags" - pre = "" - post = "" - name = "Balises" - url = "/tags/" - title = "" - weight = 2 - [[languages.fr.menu.main]] - identifier = "categories" - name = "Catégories" - pre = "" - post = "" - url = "/categories/" - title = "" - weight = 3 -``` - -Then, for each new page, append the language code to the file name. - -Single file `my-page.md` is split in three files: - -* in English: `my-page.en.md` -* in Chinese: `my-page.zh-cn.md` -* in French: `my-page.fr.md` - -{{< admonition >}} -Be aware that only translated pages are displayed in menu. It’s not replaced with default language content. -{{< /admonition >}} - -{{< admonition tip >}} -Use [Front Matter parameter](https://gohugo.io/content-management/multilingual#translate-your-content) to translate urls too. -{{< /admonition >}} - -### 4.3 Overwrite Translation Strings - -Translations strings are used for common default values used in the theme. Translations are available in [some languages](#language-compatibility), but you may use another language or want to override default values. - -To override these values, create a new file in your local i18n folder `i18n/.toml` and inspire yourself from `themes/FixIt/i18n/en.toml`. - -By the way, as these translations could be used by other people, please take the time to propose a translation by [making a PR :(fa-solid fa-code-branch fa-fw):](https://github.com/Lruihao/FixIt/pulls) to the theme! - -## 5 Search - -{{< version 0.2.0 >}} - -Based on [Lunr.js](https://lunrjs.com/) or [algolia](https://www.algolia.com/), searching is supported in **FixIt** theme. - -### 5.1 Output Configuration - -In order to generate `index.json` for searching, add `JSON` output file type to the `home` of the `outputs` part in your [site configuration](#site-configuration). - -```toml -[outputs] - home = ["HTML", "RSS", "JSON"] -``` - -### 5.2 Search Configuration - -Based on `index.json` generated by Hugo, you could activate searching. - -Here is the search configuration in your [site configuration](#site-configuration): - -```toml -[params.search] - enable = true - # type of search engine ("lunr", "algolia") - type = "lunr" - # max index length of the chunked content - contentLength = 4000 - # placeholder of the search bar - placeholder = "" - # {{< version 0.2.1 >}} max number of results length - maxResultLength = 10 - # {{< version 0.2.3 >}} snippet length of the result - snippetLength = 30 - # {{< version 0.2.1 >}} HTML tag name of the highlight part in results - highlightTag = "em" - # {{< version 0.2.4 >}} whether to use the absolute URL based on the baseURL in search index - absoluteURL = false - [params.search.algolia] - index = "" - appID = "" - searchKey = "" -``` - -{{< admonition note "How to choose search engine?" >}} -The following is a comparison of two search engines: - -* `lunr`: simple, no need to synchronize `index.json`, no limit for `contentLength`, - but high bandwidth and low performance (Especially for Chinese which needs a large segmentit library) -* `algolia`: high performance and low bandwidth, but need to synchronize `index.json` and limit for `contentLength` - -{{< version 0.2.3 >}} The content of the post is separated by `h2` and `h3` HTML tag to improve query performance and basically implement full-text search. -`contentLength` is used to limit the max index length of the part starting with `h2` and `h3` HTML tag. -{{< /admonition >}} - -{{< admonition tip "Tips about algolia" >}} -You need to upload `index.json` files to algolia to activate searching. -You could upload the `index.json` files by browsers but a CLI tool may be better. -[Algolia Atomic](https://github.com/chrisdmacrae/atomic-algolia) is a good choice. -To be compatible with Hugo multilingual mode, -you need to upload different `index.json` for each language to the different index of algolia, such as `zh-cn/index.json` or `fr/index.json`... -{{< /admonition >}} - ---- - -{{< admonition quote "Thanks" >}} -_Thanks to the original author [Dillon](https://dillonzq.com) for preparing and revising the content before version `v0.2.10` in this documentation._ -{{< /admonition >}} \ No newline at end of file diff --git a/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md b/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md deleted file mode 100644 index dd87bba7..00000000 --- a/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md +++ /dev/null @@ -1,1413 +0,0 @@ ---- -weight: 1 -title: "主题文档 - 基本概念" -date: 2021-12-19T16:15:22+08:00 -draft: false -author: "Lruihao" -authorLink: "https://lruihao.cn" -description: "探索 Hugo - FixIt 主题的全部内容和背后的核心概念。" -resources: -- name: "featured-image" - src: "featured-image.jpg" - -tags: ["installation", "configuration"] -categories: ["documentation"] - -lightgallery: true - -toc: - auto: false - -menu: - main: - title: "探索 Hugo - FixIt 主题的全部内容和背后的核心概念。" - parent: "documentation" - pre: "" ---- - -探索 Hugo - **FixIt** 主题的全部内容和背后的核心概念。 - - - -## 1 准备 - -由于 Hugo 提供的便利性,[Hugo](https://gohugo.io/) 本身是这个主题唯一的依赖。 - -直接安装满足你操作系统 (**Windows**, **Linux**, **macOS**) 的最新版本 [:(fa-regular fa-file-archive fa-fw): Hugo (> 0.84.0)](https://gohugo.io/getting-started/installing/). - -{{< admonition note "为什么不支持早期版本的 Hugo?" >}} -由于 [getJSON 支持添加 HTTP header](https://gohugo.io/getting-started/configuration-markup#markdown-render-hooks) 在 [配置改造](https://gohugo.io/news/0.84.0-relnotes/) 中被引入,本主题只支持高于 **0.84.0** 的 Hugo 版本。 -{{< /admonition >}} - -{{< admonition tip "推荐使用 Hugo extended 版本" >}} -由于这个主题的一些特性需要将 :(fa-brands fa-sass fa-fw): SCSS 转换为 :(fa-brands fa-css3 fa-fw): CSS, 推荐使用 Hugo **extended** 版本来获得更好的使用体验。 -{{< /admonition >}} - -## 2 安装 - -以下步骤可帮助你初始化新网站。如果你根本不了解 Hugo, 我们强烈建议你按照此 [快速入门文档](https://gohugo.io/getting-started/quick-start/) 进一步了解它。 - -### 2.1 创建你的项目 - -Hugo 提供了一个 `new` 命令来创建一个新的网站: - -```bash -hugo new site my_website -cd my_website -``` - -### 2.2 安装主题 - -**FixIt** 主题的仓库是: - -你可以下载主题的 [最新版本 :(fa-regular fa-file-archive fa-fw): .zip 文件](https://github.com/Lruihao/FixIt/releases) 并且解压放到 `themes` 目录。 - -另外,也可以直接把这个主题克隆到 `themes` 目录: - -```bash -git clone https://github.com/Lruihao/FixIt.git themes/FixIt -``` - -或者,初始化你的项目目录为 git 仓库,并且把主题仓库作为你的网站目录的子模块: - -```bash -git init -git submodule add https://github.com/Lruihao/FixIt.git themes/FixIt -``` - -### 2.3 基础配置 {#basic-configuration} - -以下是 FixIt 主题的基本配置: - -```toml -baseURL = "http://example.org/" -# [en, zh-cn, fr, ...] 设置默认的语言 -defaultContentLanguage = "zh-cn" -# 网站语言,仅在这里 CN 大写 -languageCode = "zh-CN" -# 是否包括中日韩文字 -hasCJKLanguage = true -# 网站标题 -title = "我的全新 Hugo 网站" - -# 更改使用 Hugo 构建网站时使用的默认主题 -theme = "FixIt" - -[params] - # FixIt 主题版本 - version = "0.2.X" - -[menu] - [[menu.main]] - identifier = "posts" - # 你可以在名称(允许 HTML 格式)之前添加其他信息,例如图标 - pre = "" - # 你可以在名称(允许 HTML 格式)之后添加其他信息,例如图标 - post = "" - name = "文章" - url = "/posts/" - # 当你将鼠标悬停在此菜单链接上时,将显示的标题 - title = "" - weight = 1 - [[menu.main]] - identifier = "categories" - pre = "" - post = "" - name = "分类" - url = "/categories/" - title = "" - weight = 2 - [[menu.main]] - identifier = "tags" - pre = "" - post = "" - name = "标签" - url = "/tags/" - title = "" - weight = 3 - -# Hugo 解析文档的配置 -[markup] - # 语法高亮设置 (https://gohugo.io/content-management/syntax-highlighting) - [markup.highlight] - # false 是必要的设置 (https://github.com/Lruihao/FixIt/issues/43) - noClasses = false -``` - -{{< admonition >}} -- 在构建网站时,你可以使用 `--theme` 选项设置主题。但是,我建议你修改配置文件 (**config.toml**) 将本主题设置为默认主题。 -- {{< version 0.2.14 >}} FixIt 主题提供了子菜单的支持,请详见 [菜单进阶配置](#menu-advanced-configuration) -{{< /admonition >}} - -### 2.4 创建你的第一篇文章 - -以下是创建第一篇文章的方法: - -```bash -hugo new posts/first_post.md -``` - -通过添加一些示例内容并替换文件开头的标题,你可以随意编辑文章。 - -{{< admonition >}} -默认情况下,所有文章和页面均作为草稿创建。如果想要渲染这些页面,请从元数据中删除属性 `draft: true`, 设置属性 `draft: false` 或者为 `hugo` 命令添加 `-D`/`--buildDrafts` 参数。 -{{< /admonition >}} - -### 2.5 在本地启动网站 - -使用以下命令启动网站: - -```bash -# `hugo serve` 是 `hugo server` 的一个别名,并不是文档拼写错误哦 ~ -hugo server -``` - -去查看 `http://localhost:1313`. - -![基本配置下的预览](basic-configuration-preview.zh-cn.png "基本配置下的预览") - -{{< admonition tip >}} -当你运行 `hugo server` 时,当文件内容更改时,页面会随着更改自动刷新。 -{{< /admonition >}} - -{{< admonition >}} -由于本主题使用了 Hugo 中的 `.Scratch` 来实现一些特性, -非常建议你为 `hugo server` 命令添加 `--disableFastRender` 参数来实时预览你正在编辑的文章页面。 - -```bash -hugo server --disableFastRender -``` -{{< /admonition >}} - -### 2.6 构建网站 - -当你准备好部署你的网站时,运行以下命令: - -```bash -hugo -``` - -会生成一个 `public` 目录,其中包含你网站的所有静态内容和资源。现在可以将其部署在任何 Web 服务器上。 - -{{< admonition tip >}} -网站内容可以通过 [Netlify](https://www.netlify.com/) 自动发布和托管(了解有关 [通过 Netlify 进行 HUGO 自动化部署](https://www.netlify.com/blog/2015/07/30/hosting-hugo-on-netlifyinsanely-fast-deploys/) 的更多信息). -或者,您可以使用 [AWS Amplify](https://gohugo.io/hosting-and-deployment/hosting-on-aws-amplify/), [Github pages](https://gohugo.io/hosting-and-deployment/hosting-on-github/), [Render](https://gohugo.io/hosting-and-deployment/hosting-on-render/) 以及更多 ... -{{< /admonition >}} - -## 3 配置 - -### 3.1 网站配置 {#site-configuration} - -除了 [Hugo 全局配置](https://gohugo.io/overview/configuration/) 和 [菜单配置](#basic-configuration) 之外,**FixIt** 主题还允许您在网站配置中定义以下参数(这是一个示例 `config.toml`, 其内容为默认值)。 - -请打开下面的代码块查看完整的示例配置 :(fa-regular fa-hand-point-down fa-fw):: - -```toml -[params] - # {{< version 0.2.15 changed >}} FixIt 主题版本 - version = "0.2.X" # 例如:"0.2.X", "0.2.15", "v0.2.15" 等 - # 网站描述 - description = "这是我的全新 Hugo 网站" - # 网站关键词 - keywords = ["Theme", "Hugo"] - # 网站默认主题样式 ("light", "dark", "auto") - defaultTheme = "auto" - # 公共 git 仓库路径,仅在 enableGitInfo 设为 true 时有效 - gitRepo = "" - # {{< version 0.1.1 >}} 哪种哈希函数用来 SRI, 为空时表示不使用 SRI - # ("sha256", "sha384", "sha512", "md5") - fingerprint = "" - # {{< version 0.2.0 >}} 日期格式 - dateFormat = "2006-01-02" - # 网站图片,用于 Open Graph 和 Twitter Cards - images = ["/logo.png"] - # {{< version 0.2.12 >}} 开启 PWA 支持 - enablePWA = true - # {{< version 0.2.14 >}} 是否自动显示外链图标 - externalIcon = false - # {{< version 0.2.14 >}} 默认情况下,FixIt 只会在主页的 HTML 头中注入主题元标记。 - # 您可以将其关闭,但如果您不这样做,我们将不胜感激,因为这是观察 FixIt 受欢迎程度上升的好方法。 - disableThemeInject = false - - # {{< version 0.2.0 >}} 应用图标配置 - [params.app] - # 当添加到 iOS 主屏幕或者 Android 启动器时的标题,覆盖默认标题 - title = "FixIt" - # 是否隐藏网站图标资源链接 - noFavicon = false - # 更现代的 SVG 网站图标,可替代旧的 .png 和 .ico 文件 - svgFavicon = "" - # Safari 图标颜色 - iconColor = "#5bbad5" - # Windows v8-10 磁贴颜色 - tileColor = "#da532c" - # {{< version 0.2.12 changed >}} Android 浏览器主题色 - [params.app.themeColor] - light = "#ffffff" - dark = "#252627" - - # {{< version 0.2.0 >}} 搜索配置 - [params.search] - enable = true - # 搜索引擎的类型 ("lunr", "algolia") - type = "lunr" - # 文章内容最长索引长度 - contentLength = 4000 - # 搜索框的占位提示语 - placeholder = "" - # {{< version 0.2.1 >}} 最大结果数目 - maxResultLength = 10 - # {{< version 0.2.3 >}} 结果内容片段长度 - snippetLength = 50 - # {{< version 0.2.1 >}} 搜索结果中高亮部分的 HTML 标签 - highlightTag = "em" - # {{< version 0.2.4 >}} 是否在搜索索引中使用基于 baseURL 的绝对路径 - absoluteURL = false - [params.search.algolia] - index = "" - appID = "" - searchKey = "" - - # 页面头部导航栏配置 - [params.header] - # {{< version 0.2.13 changed >}} 桌面端导航栏模式 ("sticky", "normal", "auto") - desktopMode = "sticky" - # {{< version 0.2.13 changed >}} 移动端导航栏模式 ("sticky", "normal", "auto") - mobileMode = "auto" - # {{< version 0.2.0 >}} 页面头部导航栏标题配置 - [params.header.title] - # LOGO 的 URL - logo = "/images/fixit.svg" - # 标题名称 - name = "" - # 你可以在名称(允许 HTML 格式)之前添加其他信息,例如图标 - pre = "" - # 你可以在名称(允许 HTML 格式)之后添加其他信息,例如图标 - post = "" - # {{< version 0.2.5 >}} 是否为标题显示打字机动画 - typeit = false - # {{< version 0.2.12 >}} 页面头部导航栏副标题配置 - [params.header.subtitle] - # 副标题名称 - name = "" - # 是否为副标题显示打字机动画 - typeit = false - - # 页面底部信息配置 - [params.footer] - enable = true - # {{< version 0.2.0 >}} 自定义内容(支持 HTML 格式) - custom = '' - # {{< version 0.2.0 >}} 是否显示 Hugo 和主题信息 - hugo = true - # {{< version 0.2.0 >}} 是否显示版权信息 - copyright = true - # {{< version 0.2.0 >}} 是否显示作者 - author = true - # 网站创立年份 - since = 2019 - # {{< version 0.2.14 >}} 网站创立时间 - siteTime = '' # 例:'2019-02-03T19:30:34+08:00' - # {{< version 0.2.14 >}} 是否显示网站内容总字数 - wordCount = true - # {{< version 0.2.12 >}} 公网安备信息,仅在中国使用(支持 HTML 格式) - gov = "" - # {{< version 0.2.12 changed >}} ICP 备案信息,仅在中国使用(支持 HTML 格式) - icp = "" - # 许可协议信息(支持 HTML 格式) - license = 'CC BY-NC 4.0' - - # {{< version 0.2.0 >}} Section(所有文章)页面配置 - [params.section] - # section 页面每页显示文章数量 - paginate = 20 - # 日期格式(月和日) - dateFormat = "01-02" - # RSS 文章数目 - rss = 10 - # {{< version 0.2.13 >}} 最近更新文章设置 - [params.section.recentlyUpdated] - enable = false - rss = false - days = 30 - maxCount = 10 - - # {{< version 0.2.0 >}} List(目录或标签)页面配置 - [params.list] - # list 页面每页显示文章数量 - paginate = 20 - # 日期格式(月和日) - dateFormat = "01-02" - # RSS 文章数目 - rss = 10 - - # 主页配置 - [params.home] - # {{< version 0.2.0 >}} RSS 文章数目 - rss = 10 - # 主页个人信息 - [params.home.profile] - enable = true - # {{< version 0.2.13 >}} 选择使用 Gravatar 源站或其他镜像站,若留空则为默认的 "www.gravatar.com" - # {{< version 0.2.14 changed >}} {{< version 0.2.15 deleted >}} 参数 `home.profile.gravatarSite` 自 v0.2.14 起已弃用,请改用 `gravatar.host` - # gravatarSite = "" - # Gravatar 邮箱,用于优先在主页显示的头像 - gravatarEmail = "" - # 主页显示头像的 URL - avatarURL = "/images/avatar.png" - # {{< version 0.2.7 changed >}} 主页显示的网站标题(支持 HTML 格式) - title = "" - # 主页显示的网站副标题 - subtitle = "这是我的全新 Hugo 网站" - # 是否为副标题显示打字机动画 - typeit = true - # 是否显示社交账号 - social = true - # {{< version 0.2.0 >}} 免责声明(支持 HTML 格式) - disclaimer = "" - # 主页文章列表 - [params.home.posts] - enable = true - # 主页每页显示文章数量 - paginate = 6 - - # 作者的社交信息设置 - [params.social] - GitHub = "Lruihao" - Linkedin = "" - Twitter = "" - Instagram = "" - Facebook = "" - Telegram = "" - Medium = "" - Gitlab = "" - Youtubelegacy = "" - Youtubecustom = "" - Youtubechannel = "" - Tumblr = "" - Quora = "" - Keybase = "" - Pinterest = "" - Reddit = "" - Codepen = "" - FreeCodeCamp = "" - Bitbucket = "" - Stackoverflow = "" - Weibo = "" - Odnoklassniki = "" - VK = "" - Flickr = "" - Xing = "" - Snapchat = "" - Soundcloud = "" - Spotify = "" - Bandcamp = "" - Paypal = "" - Fivehundredpx = "" - Mix = "" - Goodreads = "" - Lastfm = "" - Foursquare = "" - Hackernews = "" - Kickstarter = "" - Patreon = "" - Steam = "" - Twitch = "" - Strava = "" - Skype = "" - Whatsapp = "" - Zhihu = "" - Douban = "" - Angellist = "" - Slidershare = "" - Jsfiddle = "" - Deviantart = "" - Behance = "" - Dribbble = "" - Wordpress = "" - Vine = "" - Googlescholar = "" - Researchgate = "" - Mastodon = "" - Thingiverse = "" - Devto = "" - Gitea = "" - XMPP = "" - Matrix = "" - Bilibili = "" - # ORCID, ... , CSDN {{< version 0.2.13 >}} - ORCID = "" - Liberapay = "" - Ko-Fi = "" - BuyMeaCoffee = "" - Linktree = "" - QQ = "" - QQGroup = "awbwdTtSQ_-H5QGzeJxdWgv6JMbNehNM" # https://qun.qq.com/join.html - Diaspora = "" - CSDN = "" - Email = "" - RSS = true # {{< version 0.2.0 >}} - - # {{< version 0.2.0 changed >}} 文章页面配置 - [params.page] - # {{< version 0.2.0 >}} 是否在主页隐藏一篇文章 - hiddenFromHomePage = false - # {{< version 0.2.0 >}} 是否在搜索结果中隐藏一篇文章 - hiddenFromSearch = false - # {{< version 0.2.0 >}} 是否使用 twemoji - twemoji = false - # 是否使用 lightgallery - lightgallery = false - # {{< version 0.2.0 >}} 是否使用 ruby 扩展语法 - ruby = true - # {{< version 0.2.0 >}} 是否使用 fraction 扩展语法 - fraction = true - # {{< version 0.2.0 >}} 是否使用 fontawesome 扩展语法 - fontawesome = true - # 许可协议信息(支持 HTML 格式) - license = 'CC BY-NC 4.0' - # 是否在文章页面显示原始 Markdown 文档链接 - linkToMarkdown = true - # {{< version 0.2.4 >}} 是否在 RSS 中显示全文内容 - rssFullText = false - # {{< version 0.2.13 >}} 页面样式 ("narrow", "normal", "wide", ...) - pageStyle = "normal" - # {{< version 0.2.14 >}} 强制使用 Gravatar 作为作者头像 - gravatarForce = true - # {{< version 0.2.15 >}} 转载配置 - [params.page.repost] - enable = false - url = "" - # {{< version 0.2.0 >}} 目录配置 - [params.page.toc] - # 是否使用目录 - enable = true - # {{< version 0.2.9 >}} 是否保持使用文章前面的静态目录 - keepStatic = false - # 是否使侧边目录自动折叠展开 - auto = true - # {{< version 0.2.13 >}} 目录位置 ("left", "right") - position = "right" - # {{< version 0.2.13 >}} 在文章开头显示提示信息,提醒读者文章内容可能过时 - [params.page.expirationReminder] - enable = false - # 如果文章最后更新于这天数之前,显示提醒 - reminder = 90 - # 如果文章最后更新于这天数之前,显示警告 - warning = 180 - # 如果文章到期是否关闭评论 - closeComment = false - # {{< version 0.2.0 >}} 代码配置 - [params.page.code] - # 是否显示代码块的复制按钮 - copy = true - # {{< version 0.2.13 >}} 是否显示代码块的编辑按钮 - edit = true - # 默认展开显示的代码行数 - maxShownLines = 10 - # {{< version 0.2.14 >}} 文章编辑 - [params.page.edit] - enable = false - # url = "https://github.com/user-name/repo-name/edit/branch-name/subdirectory-name" # Link for fork & edit - url = "" # Link for fork & edit - # {{< version 0.2.0 changed >}} {{< link "https://katex.org/" KaTeX >}} 数学公式 (https://katex.org) - [params.page.math] - enable = true - # 默认块定界符是 $$ ... $$ 和 \\[ ... \\] - blockLeftDelimiter = "" - blockRightDelimiter = "" - # 默认行内定界符是 $ ... $ 和 \\( ... \\) - inlineLeftDelimiter = "" - inlineRightDelimiter = "" - # KaTeX 插件 copy_tex - copyTex = true - # KaTeX 插件 mhchem - mhchem = true - # {{< version 0.2.0 >}} {{< link "https://docs.mapbox.com/mapbox-gl-js" "Mapbox GL JS" >}} 配置 (https://docs.mapbox.com/mapbox-gl-js) - [params.page.mapbox] - # Mapbox GL JS 的 access token - accessToken = "" - # 浅色主题的地图样式 - lightStyle = "mapbox://styles/mapbox/light-v9" - # 深色主题的地图样式 - darkStyle = "mapbox://styles/mapbox/dark-v9" - # 是否添加 {{< link "https://docs.mapbox.com/mapbox-gl-js/api#navigationcontrol" NavigationControl >}} - navigation = true - # 是否添加 {{< link "https://docs.mapbox.com/mapbox-gl-js/api#geolocatecontrol" GeolocateControl >}} - geolocate = true - # 是否添加 {{< link "https://docs.mapbox.com/mapbox-gl-js/api#scalecontrol" ScaleControl >}} - scale = true - # 是否添加 {{< link "https://docs.mapbox.com/mapbox-gl-js/api#fullscreencontrol" FullscreenControl >}} - fullscreen = true - # {{< version 0.2.0 changed >}} 文章页面的分享信息设置 - [params.page.share] - enable = true - Twitter = true - Facebook = true - Linkedin = false - Whatsapp = true - Pinterest = false - Tumblr = false - HackerNews = false - Reddit = false - VK = false - Buffer = false - Xing = false - Line = true - Instapaper = false - Pocket = false - Digg = false - Stumbleupon = false - Flipboard = false - Weibo = true - Renren = false - Myspace = true - Blogger = true - Baidu = false - Odnoklassniki = false - Evernote = true - Skype = false - Trello = false - Mix = false - # {{< version 0.2.15 changed >}} 评论系统设置 - [params.page.comment] - enable = false - # {{< version 0.2.13 >}} {{< link "https://artalk.js.org/" Artalk >}} 评论系统设置 (https://artalk.js.org/) - [params.page.comment.artalk] - enable = false - server = "https://yourdomain/api/" - site = "默认站点" - placeholder = "" - noComment = "" - sendBtn = "" - editorTravel = true - flatMode = 'auto' - maxNesting = 3 - # 当 `params.page.lightgallery` 启用时生效 - lightgallery = false - locale = "" # {{< version 0.2.15 >}} - # {{< version 0.1.1 >}} {{< link "https://disqus.com/" Disqus >}} 评论系统设置 (https://disqus.com) - [params.page.comment.disqus] - enable = false - # Disqus 的 shortname,用来在文章中启用 Disqus 评论系统 - shortname = "" - # {{< version 0.1.1 >}} {{< link "https://github.com/gitalk/gitalk" Gitalk >}} 评论系统设置 (https://github.com/gitalk/gitalk) - [params.page.comment.gitalk] - enable = false - owner = "" - repo = "" - clientId = "" - clientSecret = "" - # {{< link "https://github.com/xCss/Valine" Valine >}} 评论系统设置 (https://github.com/xCss/Valine) - [params.page.comment.valine] - enable = false - appId = "" - appKey = "" - placeholder = "" - avatar = "mp" - meta= "" - pageSize = 10 - lang = "" - visitor = true - recordIP = true - highlight = true - enableQQ = false - serverURLs = "" - # {{< version 0.2.6 >}} emoji 数据文件名称,默认是 "google.yml" - # ("apple.yml", "google.yml", "facebook.yml", "twitter.yml") - # 位于 "themes/FixIt/assets/data/emoji/" 目录 - # 可以在你的项目下相同路径存放你自己的数据文件: - # "assets/data/emoji/" - emoji = "" - commentCount = true # {{< version 0.2.13 >}} - # {{< version 0.2.13 >}} {{< link "https://waline.js.org" Waline >}} 评论系统设置 (https://waline.js.org) - [params.page.comment.waline] - enable = false - serverURL = "" - pageview = false # {{< version 0.2.15 >}} - emoji = ['//unpkg.com/@waline/emojis@1.0.1/weibo'] - meta = ['nick', 'mail', 'link'] - requiredMeta = [] - login = 'enable' - wordLimit = 0 - pageSize = 10 - imageUploader = false # {{< version 0.2.15 >}} - highlighter = false # {{< version 0.2.15 >}} - comment = false # {{< version 0.2.15 >}} - # visitor = false # {{< version 0.2.15 deleted >}} 更名为 pageview - # uploadImage = false # {{< version 0.2.15 deleted >}} 更名为 imageUploader - # highlight = true # {{< version 0.2.15 deleted >}} 更名为 highlighter - # mathTagSupport = false {{< version 0.2.15 deleted >}} - # commentCount = false {{< version 0.2.15 deleted >}} 更名为 comment - # {{< link "https://developers.facebook.com/docs/plugins/comments" "Facebook 评论系统" >}}设置 (https://developers.facebook.com/docs/plugins/comments) - [params.page.comment.facebook] - enable = false - width = "100%" - numPosts = 10 - appId = "" - languageCode = "zh_CN" - # {{< version 0.2.0 >}} {{< link "https://comments.app/" "Telegram Comments" >}} 评论系统设置 (https://comments.app) - [params.page.comment.telegram] - enable = false - siteID = "" - limit = 5 - height = "" - color = "" - colorful = true - dislikes = false - outlined = false - # {{< version 0.2.0 >}} {{< link "https://commento.io/" "Commento" >}} 评论系统设置 (https://commento.io) - [params.page.comment.commento] - enable = false - # {{< version 0.2.5 >}} {{< link "https://utteranc.es/" "Utterances" >}} 评论系统设置 (https://utteranc.es) - [params.page.comment.utterances] - enable = false - # owner/repo - repo = "" - issueTerm = "pathname" - label = "" - lightTheme = "github-light" - darkTheme = "github-dark" - # {{< version 0.2.13 >}} {{< link "https://twikoo.js.org/" "Twikoo" >}} 评论系统设置 (https://twikoo.js.org/) - [params.page.comment.twikoo] - enable = false - envId = "" - region = "" - path = "" - visitor = true - commentCount = true - # 当 `params.page.lightgallery` 启用时生效 - lightgallery = false - # {{< version 0.2.14 >}} {{< link "https://giscus.app/" "Giscus" >}} 评论系统设置 - [params.page.comment.giscus] - enable = false - repo = "" - repoId = "" - category = "" - categoryId = "" - mapping = "" - reactionsEnabled = "1" - emitMetadata = "0" - inputPosition = "bottom" # top, bottom - lightTheme = "light" - darkTheme = "dark" - lazyLoad = true - # {{< version 0.2.7 >}} 第三方库配置 - [params.page.library] - [params.page.library.css] - # someCSS = "some.css" - # 位于 "assets/" - # 或者 - # someCSS = "https://cdn.example.com/some.css" - [params.page.library.js] - # someJavascript = "some.js" - # 位于 "assets/" - # 或者 - # someJavascript = "https://cdn.example.com/some.js" - # {{< version 0.2.10 changed >}} 页面 SEO 配置 - [params.page.seo] - # 图片 URL - images = [] - # 出版者信息 - [params.page.seo.publisher] - name = "" - logoUrl = "" - - # {{< version 0.2.5 >}} TypeIt 配置 - [params.typeit] - # 每一步的打字速度(单位是毫秒) - speed = 100 - # 光标的闪烁速度(单位是毫秒) - cursorSpeed = 1000 - # 光标的字符(支持 HTML 格式) - cursorChar = "|" - # 打字结束之后光标的持续时间(单位是毫秒,"-1" 代表无限大) - duration = -1 - - # {{< version 0.2.15 >}} Mermaid 配置 - [params.mermaid] - # 取值详见 https://mermaid-js.github.io/mermaid/#/Setup?id=theme - themes = ['neutral', 'dark'] - - # {{< version 0.2.12 >}} 盘古之白配置 - [params.pangu] - # 适用于中文写作用户 - enable = false - - # {{< version 0.2.12 >}} 水印配置 - # 详细参数见 https://github.com/Lruihao/watermark#readme - [params.watermark] - enable = false - # 水印内容(允许 HTML 格式) - content = '' - # 水印透明度 - opacity = 0.1 - # 水印父节点 - appendTo = '.wrapper>main' - # 单水印宽度 单位:px - width = 150 - # 单水印高度 单位:px - height = 20 - # 水印行间距 单位:px - rowSpacing = 60 - # 水印列间距 单位:px - colSpacing = 30 - # 水印旋转角度 单位:deg - rotate = 15 - # 水印字体大小,单位:rem - fontSize = 0.85 - # {{< version 0.2.13 >}} 水印字体 - fontFamily = 'inherit' - - # {{< version 0.2.12 >}} 不蒜子统计 - [params.ibruce] - enable = true - # 在文章中开启 - enablePost = false - # {{< version 0.2.14 changed >}} {{< version 0.2.15 deleted >}} 网站创立时间 - # 参数 `ibruce.siteTime` 自 v0.2.14 起已弃用,请改用 `footer.siteTime` - # siteTime = '' # 例:'2019-02-03T19:30:34+08:00' - # 网站验证代码,用于 Google/Bing/Yandex/Pinterest/Baidu/360/Sogou - [params.verification] - google = "" - bing = "" - yandex = "" - pinterest = "" - baidu = "" - so = "" - sogou = "" - - # {{< version 0.2.10 >}} 网站 SEO 配置 - [params.seo] - # 图片 URL - image = "" - # 缩略图 URL - thumbnailUrl = "" - - # {{< version 0.2.0 >}} 网站分析配置 - [params.analytics] - enable = false - # Google Analytics - [params.analytics.google] - id = "" - # 是否匿名化用户 IP - anonymizeIP = true - # Fathom Analytics - [params.analytics.fathom] - id = "" - # 自行托管追踪器时的主机路径 - server = "" - - # {{< version 0.2.7 >}} Cookie 许可配置 - [params.cookieconsent] - enable = true - # 用于 Cookie 许可横幅的文本字符串 - [params.cookieconsent.content] - message = "" - dismiss = "" - link = "" - - # {{< version 0.2.7 changed >}} 第三方库文件的 CDN 设置 - [params.cdn] - # CDN 数据文件名称,默认不启用 - # ("jsdelivr.yml", "unpkg.yml") - # 位于 "themes/FixIt/assets/data/cdn/" 目录 - # 可以在你的项目下相同路径存放你自己的数据文件: - # "assets/data/cdn/" - # data = "unpkg.yml" - - # {{< version 0.2.8 >}} 兼容性设置 - [params.compatibility] - # 是否使用 Polyfill.io 来兼容旧式浏览器 - polyfill = false - # 是否使用 object-fit-images 来兼容旧式浏览器 - objectFit = false - - # {{< version 0.2.12 >}} 页面最后添加自定义 JS - # "_custom.js" 位于 "themes/FixIt/assets/js" 目录 - # 可以在你的项目下相同路径存放你自己的自定义 JS 文件: - # "assets/js/_custom.js" - [params.customJS] - enable = true - # {{< version 0.2.14 >}} 在左上角或者右上角显示 GitHub 开源链接 - [params.githubCorner] - enable = false - permalink = "https://github.com/Lruihao/FixIt" - title = "在 GitHub 上查看源代码" - position = "right" # left, right - # {{< version 0.2.14 >}} Gravatar 设置 - [params.gravatar] - # Gravatar 主机,默认:“www.gravatar.com” - host = "www.gravatar.com" # "cn.gravatar.com", "gravatar.loli.net" - style = "" # "", mp, identicon, monsterid, wavatar, retro, blank, robohash - # {{< version 0.2.15 >}} 开发者选项 - [params.dev] - enable = false - # 检查更新 - c4u = false - # 请勿公开展示! - githubToken = "" - # 移动端开发者工具配置 - [params.dev.mDevtools] - enable = false - # 支持 "vConsole", "eruda" - type = "vConsole" - -# Hugo 解析文档的配置 -[markup] - # {{< link "https://gohugo.io/content-management/syntax-highlighting" "语法高亮设置" >}} (https://gohugo.io/content-management/syntax-highlighting) - [markup.highlight] - ################## 必要的配置 ################## - # {{< link "https://github.com/Lruihao/FixIt/issues/43" >}} - codeFences = true - lineNos = true - lineNumbersInTable = true - noClasses = false - ################## 必要的配置 ################## - guessSyntax = true - # Goldmark 是 Hugo 0.60 以来的默认 Markdown 解析库 - [markup.goldmark] - [markup.goldmark.extensions] - definitionList = true - footnote = true - linkify = true - strikethrough = true - table = true - taskList = true - typographer = true - [markup.goldmark.renderer] - # 是否在文档中直接使用 HTML 标签 - unsafe = true - # 目录设置 - [markup.tableOfContents] - startLevel = 2 - endLevel = 6 - -# 作者配置 -[author] - name = "xxxx" - email = "" - link = "" - -# 网站地图配置 -[sitemap] - changefreq = "weekly" - filename = "sitemap.xml" - priority = 0.5 - -# {{< link "https://gohugo.io/content-management/urls#permalinks" "Permalinks 配置" >}} (https://gohugo.io/content-management/urls#permalinks) -[Permalinks] - # posts = ":year/:month/:filename" - posts = ":filename" - -# {{< link "https://gohugo.io/about/hugo-and-gdpr/" "隐私信息配置" >}} (https://gohugo.io/about/hugo-and-gdpr/) -[privacy] - [privacy.twitter] - enableDNT = true - [privacy.youtube] - privacyEnhanced = true - -# {{< version 0.2.15 changed >}} -[mediaTypes] - # 用于输出 Markdown 格式文档的设置 - [mediaTypes."text/markdown"] - suffixes = ["md"] - # 用于输出 txt 格式文档的设置 - [mediaTypes."text/plain"] - suffixes = ["txt"] - -# {{< version 0.2.15 changed >}} -[outputFormats] - # 用于输出 Markdown 格式文档的设置 - [outputFormats.MarkDown] - mediaType = "text/markdown" - isPlainText = true - isHTML = false - # {{< version 0.2.15 >}} 用于输出 baidu_urls.txt 文件的设置 - [outputFormats.BaiduUrls] - baseName = "baidu_urls" - mediaType = "text/plain" - isPlainText = true - isHTML = false - -# {{< version 0.2.15 changed >}} 用于 Hugo 输出文档的设置 -[outputs] - home = ["HTML", "RSS", "JSON", "BaiduUrls"] - page = ["HTML", "MarkDown"] - section = ["HTML", "RSS"] - taxonomy = ["HTML", "RSS"] - taxonomyTerm = ["HTML"] -``` - -{{< admonition >}} -请注意,本文档其他部分将详细解释其中一些参数。 -{{< /admonition >}} - -{{< admonition note "Hugo 的运行环境" >}} -`hugo server` 的默认运行环境是 `development`, -而 `hugo` 的默认运行环境是 `production`. - -由于本地 `development` 环境的限制, -**评论系统**, **CDN** 和 **fingerprint** 不会在 `development` 环境下启用。 - -你可以使用 `hugo server -e production` 命令来开启这些特性。 -{{< /admonition >}} - -{{< admonition tip "关于 CDN 配置的技巧" >}} -{{< version 0.2.7 changed >}} - -```toml -[params.cdn] - # CDN 数据文件名称,默认不启用 - # ("jsdelivr.yml") - data = "" -```` - -默认的 CDN 数据文件位于 `themes/FixIt/assets/data/cdn/` 目录。 -可以在你的项目下相同路径存放你自己的数据文件:`assets/data/cdn/`. -{{< /admonition >}} - -{{< admonition tip "关于社交链接配置的技巧" >}} -{{< version 0.2.0 >}} - -你可以直接配置你的社交 ID 来生成一个默认社交链接和图标: - -```toml -[params.social] - Mastodon = "@xxxx" -``` - -生成的社交链接是 `https://mastodon.technology/@xxxx`. - -或者你可以通过一个字典来设置更多的选项: - -```toml -[params.social] - [params.social.Mastodon] - # 排列图标时的权重(权重越大,图标的位置越靠后) - weight = 0 - # 你的社交 ID - id = "@xxxx" - # 你的社交链接的前缀 - prefix = "https://mastodon.social/" - # 当鼠标停留在图标上时的提示内容 - title = "Mastodon" -``` - -所有支持的社交链接的默认数据位于 `themes/FixIt/assets/data/social.yaml`. -你可以参考它来配置你的社交链接。 -{{< /admonition >}} - -![完整配置下的预览](complete-configuration-preview.zh-cn.png "完整配置下的预览") - -### 3.2 网站图标,浏览器配置,网站清单 - -强烈建议你把: - -* apple-touch-icon.png (180x180) -* favicon-32x32.png (32x32) -* favicon-16x16.png (16x16) -* mstile-150x150.png (150x150) -* android-chrome-192x192.png (192x192) -* android-chrome-512x512.png (512x512) - -放在 `/static` 目录。利用 [https://realfavicongenerator.net/](https://realfavicongenerator.net/) 可以很容易地生成这些文件。 - -可以自定义 `browserconfig.xml` 和 `site.webmanifest` 文件来设置 theme-color 和 background-color. - -### 3.3 自定义样式 - -{{< version 0.2.8 changed >}} - -{{< admonition >}} -Hugo **extended** 版本对于自定义样式是必需的。 -{{< /admonition >}} - -通过定义自定义 `.scss` 样式文件,**FixIt** 主题支持可配置的样式。 - -包含自定义 `.scss` 样式文件的目录相对于 **你的项目根目录** 的路径为 `assets/css`. - -在 `assets/css/_override.scss` 中,你可以覆盖 `themes/FixIt/assets/css/_variables.scss` 中的变量以自定义样式。 - -这是一个例子: - -```scss -@import url('https://fonts.googleapis.com/css?family=Fira+Mono:400,700&display=swap&subset=latin-ext'); -$code-font-family: Fira Mono, Source Code Pro, Menlo, Consolas, Monaco, monospace; -``` - -在 `assets/css/_custom.scss` 中,你可以添加一些 CSS 样式代码以自定义样式。 - -#### 3.3.1 页面宽度 {#page-style} - -{{< version 0.2.13 >}} - -FixIt 主题提供了页面宽度配置选项 `pageStyle` 并提供三种选项。 - -* **narrow** 保留 `}} - -在 FixIt 主题中,提供有三个打印视图相关的 CSS 类 - -* `page-break-before` 在元素之前插入分页符 -* `page-break-after` 在元素之后插入分页符 -* `print-d-none` 在打印视图中隐藏元素 - -下面是一个简单的例子: - -```html -
-
- -``` - -### 3.4 菜单进阶配置 {#menu-advanced-configuration} - -Hugo 有一个简单而强大的 [菜单系统](https://gohugo.io/content-management/menus/)。 - -根据 Hugo 提供的接口,FixIt 主题只实现了部分功能,但我想这足以满足大多数人的需求,也让用户在使用上更加简单。 - -下面是一个完整的菜单项配置: - -```toml -[menu] - [[menu.main]] - identifier = "posts" - # {{< version 0.2.14 >}} 父级菜单项的标识符 (identifier) - parent = "" - # 你可以在名称(允许 HTML 格式)之前添加其他信息,例如图标 - pre = "" - # 你可以在名称(允许 HTML 格式)之后添加其他信息,例如图标 - post = "" - name = "文章" - url = "/posts/" - # 当你将鼠标悬停在此菜单链接上时,将显示的标题 - title = "" - weight = 1 - # {{< version 0.2.14 >}} 向菜单项添加用户定义的内容 - [menu.main.params] - # 添加 CSS 类到特定的菜单项 - class = 'text-center' - # 是否为草稿菜单,类似草稿页面 - draft = false -``` - -#### 3.4.1 子菜单 - -{{< version 0.2.14 >}} - -考虑到实用性和排版问题,FixIt 主题只支持两层嵌套的菜单,通过在菜单配置中的 `parent` 字段即可。 - -一个菜单项的父项应该是另一个菜单项的标识符 (`identifier`),在菜单中标识符应该是唯一的。 - -#### 3.4.2 菜单参数 - -{{< version 0.2.14 >}} - -您还可以通过 `params` 字段将自定义的内容添加到菜单项。 FixIt 主题目前提供了两个参数的配置: - -* **class** *{String}* 添加 CSS 类到特定的菜单项 -* **draft** *{Boolean}* 是否为草稿菜单,类似草稿页面 - -{{< admonition >}} -`hugo server` 命令启动或者为 `hugo` 添加 `-D`/`--buildDrafts` 参数,都能渲染草稿菜单和页面。 -{{< /admonition >}} - -{{< admonition tip >}} -这样做有利于在部署时很好地区分**预览环境**和**生产环境**不同的内容。 - -例如: - -- [有草稿菜单的预览环境](https://pre.fixit.lruihao.cn/zh-cn/) -- [没有草稿菜单的生产环境](https://fixit.lruihao.cn/zh-cn/) -{{< /admonition >}} - -#### 3.4.3 添加内容到菜单 {#content-to-menu} - -也可以通过配置 `front matter` 从页面创建菜单项(即 `.md` 文件)。 - -这是一个 `yaml` 示例: - -```yaml ---- -title: "主题文档 - 基本概念" -author: "Lruihao" -menu: - main: - title: "探索 Hugo - FixIt 主题的全部内容和背后的核心概念。" - parent: "documentation" - pre: "" ---- -... -``` - -## 4 多语言和 i18n - -**FixIt** 主题完全兼容 Hugo 的多语言模式,并且支持在网页上切换语言。 - -![语言切换](language-switch.gif "语言切换") - -### 4.1 兼容性 {#language-compatibility} - -{{< version 0.2.10 changed >}} - -| 语言 | Hugo 代码 | HTML `lang` 属性 | 主题文档 | Lunr.js 支持 | -|:----|:----:|:----:|:----:|:----:| -| 英语 | `en` | `en` | :(fa-regular fa-check-square fa-fw): | :(fa-regular fa-check-square fa-fw): | -| 简体中文 | `zh-cn` | `zh-CN` | :(fa-regular fa-check-square fa-fw): | :(fa-regular fa-check-square fa-fw): | -| 繁体中文 | `zh-tw` | `zh-TW` | :(fa-regular fa-square fa-fw): | :(fa-regular fa-check-square fa-fw): | -| 法语 | `fr` | `fr` | :(fa-regular fa-square fa-fw): | :(fa-regular fa-check-square fa-fw): | -| 波兰语 | `pl` | `pl` | :(fa-regular fa-square fa-fw): | :(fa-regular fa-square fa-fw): | -| 巴西葡萄牙语 | `pt-br` | `pt-BR` | :(fa-regular fa-square fa-fw): | :(fa-regular fa-check-square fa-fw): | -| 意大利语 | `it` | `it` | :(fa-regular fa-square fa-fw): | :(fa-regular fa-check-square fa-fw): | -| 西班牙语 | `es` | `es` | :(fa-regular fa-square fa-fw): | :(fa-regular fa-check-square fa-fw): | -| 德语 | `de` | `de` | :(fa-regular fa-square fa-fw): | :(fa-regular fa-check-square fa-fw): | -| 塞尔维亚语 | `sr` | `sr` | :(fa-regular fa-square fa-fw): | :(fa-regular fa-square fa-fw): | -| 俄语 | `ru` | `ru` | :(fa-regular fa-square fa-fw): | :(fa-regular fa-check-square fa-fw): | -| 罗马尼亚语 | `ro` | `ro` | :(fa-regular fa-square fa-fw): | :(fa-regular fa-check-square fa-fw): | -| 越南语 | `vi` | `vi` | :(fa-regular fa-square fa-fw): | :(fa-regular fa-check-square fa-fw): | - -### 4.2 基本配置 - -学习了 [Hugo 如何处理多语言网站](https://gohugo.io/content-management/multilingual) 之后,请在 [站点配置](#site-configuration) 中定义你的网站语言。 - -例如,一个支持英语,中文和法语的网站配置: - -```toml -# [en, zh-cn, fr, pl, ...] 设置默认的语言 -defaultContentLanguage = "zh-cn" - -[languages] - [languages.en] - weight = 1 - title = "My New Hugo Site" - languageCode = "en" - languageName = "English" - [[languages.en.menu.main]] - identifier = "posts" - pre = "" - post = "" - name = "Posts" - url = "/posts/" - title = "" - weight = 1 - [[languages.en.menu.main]] - identifier = "tags" - pre = "" - post = "" - name = "Tags" - url = "/tags/" - title = "" - weight = 2 - [[languages.en.menu.main]] - identifier = "categories" - pre = "" - post = "" - name = "Categories" - url = "/categories/" - title = "" - weight = 3 - - [languages.zh-cn] - weight = 2 - title = "我的全新 Hugo 网站" - # 网站语言,仅在这里 CN 大写 - languageCode = "zh-CN" - languageName = "简体中文" - # 是否包括中日韩文字 - hasCJKLanguage = true - [[languages.zh-cn.menu.main]] - identifier = "posts" - pre = "" - post = "" - name = "文章" - url = "/posts/" - title = "" - weight = 1 - [[languages.zh-cn.menu.main]] - identifier = "tags" - pre = "" - post = "" - name = "标签" - url = "/tags/" - title = "" - weight = 2 - [[languages.zh-cn.menu.main]] - identifier = "categories" - pre = "" - post = "" - name = "分类" - url = "/categories/" - title = "" - weight = 3 - - [languages.fr] - weight = 3 - title = "Mon nouveau site Hugo" - languageCode = "fr" - languageName = "Français" - [[languages.fr.menu.main]] - identifier = "posts" - pre = "" - post = "" - name = "Postes" - url = "/posts/" - title = "" - weight = 1 - [[languages.fr.menu.main]] - identifier = "tags" - pre = "" - post = "" - name = "Balises" - url = "/tags/" - title = "" - weight = 2 - [[languages.fr.menu.main]] - identifier = "categories" - pre = "" - post = "" - name = "Catégories" - url = "/categories/" - title = "" - weight = 3 -``` - -然后,对于每个新页面,将语言代码附加到文件名中。 - -单个文件 `my-page.md` 需要分为三个文件: - -* 英语:`my-page.en.md` -* 中文:`my-page.zh-cn.md` -* 法语:`my-page.fr.md` - -{{< admonition >}} -请注意,菜单中仅显示翻译的页面。它不会替换为默认语言内容。 -{{< /admonition >}} - -{{< admonition tip >}} -也可以使用 [文章前置参数](https://gohugo.io/content-management/multilingual#translate-your-content) 来翻译网址。 -{{< /admonition >}} - -### 4.3 修改默认的翻译字符串 - -翻译字符串用于在主题中使用的常见默认值。 -目前提供 [一些语言](#language-compatibility) 的翻译,但你可能自定义其他语言或覆盖默认值。 - -要覆盖默认值,请在你项目的 i18n 目录 `i18n/.toml` 中创建一个新文件,并从 `themes/FixIt/i18n/en.toml` 中获得提示。 - -另外,由于你的翻译可能会帮助到其他人,请花点时间通过 [创建一个 PR :(fa-solid fa-code-branch fa-fw):](https://github.com/Lruihao/FixIt/pulls) 来贡献主题翻译,谢谢! - -## 5 搜索 - -{{< version 0.2.0 >}} - -基于 [Lunr.js](https://lunrjs.com/) 或 [algolia](https://www.algolia.com/), **FixIt** 主题支持搜索功能。 - -### 5.1 输出配置 - -为了生成搜索功能所需要的 `index.json`, 请在你的 [网站配置](#site-configuration) 中添加 `JSON` 输出文件类型到 `outputs` 部分的 `home` 字段中。 - -```toml -[outputs] - home = ["HTML", "RSS", "JSON"] -``` - -### 5.2 搜索配置 - -基于 Hugo 生成的 `index.json` 文件,你可以激活搜索功能。 - -这是你的 [网站配置](#site-configuration) 中的搜索部分: - -```toml -[params.search] - enable = true - # 搜索引擎的类型 ("lunr", "algolia") - type = "lunr" - # 文章内容最长索引长度 - contentLength = 4000 - # 搜索框的占位提示语 - placeholder = "" - # {{< version 0.2.1 >}} 最大结果数目 - maxResultLength = 10 - # {{< version 0.2.3 >}} 结果内容片段长度 - snippetLength = 50 - # {{< version 0.2.1 >}} 搜索结果中高亮部分的 HTML 标签 - highlightTag = "em" - # {{< version 0.2.4 >}} 是否在搜索索引中使用基于 baseURL 的绝对路径 - absoluteURL = false - [params.search.algolia] - index = "" - appID = "" - searchKey = "" -``` - -{{< admonition note "怎样选择搜索引擎?" >}} -以下是两种搜索引擎的对比: - -* `lunr`: 简单,无需同步 `index.json`, 没有 `contentLength` 的限制,但占用带宽大且性能低(特别是中文需要一个较大的分词依赖库) -* `algolia`: 高性能并且占用带宽低,但需要同步 `index.json` 且有 `contentLength` 的限制 - -{{< version 0.2.3 >}} 文章内容被 `h2` 和 `h3` HTML 标签切分来提高查询效果并且基本实现全文搜索。 -`contentLength` 用来限制 `h2` 和 `h3` HTML 标签开头的内容部分的最大长度。 -{{< /admonition >}} - -{{< admonition tip "关于 algolia 的使用技巧" >}} -你需要上传 `index.json` 到 algolia 来激活搜索功能。你可以使用浏览器来上传 `index.json` 文件但是一个自动化的脚本可能效果更好。 -[Algolia Atomic](https://github.com/chrisdmacrae/atomic-algolia) 是一个不错的选择。 -为了兼容 Hugo 的多语言模式,你需要上传不同语言的 `index.json` 文件到对应的 algolia index, 例如 `zh-cn/index.json` 或 `fr/index.json`... -{{< /admonition >}} - ---- - -{{< admonition quote "感谢" >}} -_本文档中 `v0.2.10` 版本之前的内容,感谢原作者 [Dillon](https://dillonzq.com) 编写修订。_ -{{< /admonition >}} \ No newline at end of file diff --git a/exampleSite/content/posts/theme-documentation-basics/language-switch.gif b/exampleSite/content/posts/theme-documentation-basics/language-switch.gif deleted file mode 100644 index 37066df5..00000000 Binary files a/exampleSite/content/posts/theme-documentation-basics/language-switch.gif and /dev/null differ diff --git a/exampleSite/content/posts/theme-documentation-built-in-shortcodes/featured-image.png b/exampleSite/content/posts/theme-documentation-built-in-shortcodes/featured-image.png deleted file mode 100644 index 1e2d981f..00000000 Binary files a/exampleSite/content/posts/theme-documentation-built-in-shortcodes/featured-image.png and /dev/null differ diff --git a/exampleSite/content/posts/theme-documentation-built-in-shortcodes/index.en.md b/exampleSite/content/posts/theme-documentation-built-in-shortcodes/index.en.md deleted file mode 100644 index 7dd4dd34..00000000 --- a/exampleSite/content/posts/theme-documentation-built-in-shortcodes/index.en.md +++ /dev/null @@ -1,186 +0,0 @@ ---- -weight: 3 -title: "Theme Documentation - Built-in Shortcodes" -date: 2021-12-19T16:15:22+08:00 -draft: false -author: "Lruihao" -authorLink: "https://lruihao.cn" -description: "Hugo provides multiple built-in shortcodes for author convenience and to keep your markdown content clean." -resources: -- name: "featured-image" - src: "featured-image.png" - -tags: ["shortcodes"] -categories: ["documentation"] - -lightgallery: true - -menu: - main: - name: "Built-in Shortcodes" - title: "Hugo provides multiple built-in shortcodes for author convenience and to keep your markdown content clean." - parent: "documentation" - pre: "" ---- - -**Hugo** provides multiple built-in shortcodes for author convenience and to keep your markdown content clean. - - - -Hugo uses Markdown for its simple content format. However, there are a lot of things that Markdown doesn’t support well. You could use pure HTML to expand possibilities. - -But this happens to be a bad idea. Everyone uses Markdown because it’s pure and simple to read even non-rendered. You should avoid HTML to keep it as simple as possible. - -To avoid this limitations, Hugo created [shortcodes](https://gohugo.io/extras/shortcodes/). -A shortcode is a simple snippet that can generate reasonable HTML code and conforms to Markdown's design philosophy. - -Hugo ships with a set of predefined shortcodes that represent very common usage. These shortcodes are provided for author convenience and to keep your markdown content clean. - - -{{< admonition tip "Use Shortcodes" >}} - -1. Shortcodes with raw string parameters \` \` -2. Shortcodes with Markdown `% %` -3. Shortcodes without Markdown `< >` - -See detail [shortcodes/#use-shortcodes](https://gohugo.io/content-management/shortcodes/#use-shortcodes) - -{{< /admonition >}} - - -## 1 figure {#figure} - -[Documentation of `figure`](https://gohugo.io/content-management/shortcodes#figure) - -Example `figure` input: - -```markdown -{{}} -``` - -The rendered output looks like this: - -{{< figure src="/images/lighthouse.jpg" title="Lighthouse (figure)" >}} - -The HTML looks like this: - -```html -
- -
-

Lighthouse (figure)

-
-
-``` - -## 2 gist - -[Documentation of `gist`](https://gohugo.io/content-management/shortcodes#gist) - -Example `gist` input: - -```markdown -{{}} -``` - -The rendered output looks like this: - -{{< gist spf13 7896402 >}} - -The HTML looks like this: - -```html - -``` - -## 3 highlight - -[Documentation of `highlight`](https://gohugo.io/content-management/shortcodes#highlight) - -Example `highlight` input: - -```markdown -{{}} -
-
-

{{ .Title }}

- {{ range .Pages }} - {{ .Render "summary"}} - {{ end }} -
-
-{{}} -``` - -The rendered output looks like this: - -{{< highlight html >}} -
-
-

{{ .Title }}

- {{ range .Pages }} - {{ .Render "summary"}} - {{ end }} -
-
-{{< /highlight >}} - -## 4 param - -[Documentation of `param`](https://gohugo.io/content-management/shortcodes#param) - -Example `param` input: - -```markdown -{{}} -``` - -The rendered output looks like this: - -{{< param description >}} - -## 5 ref and relref {#ref-and-relref} - -[Documentation of `ref` and `relref`](https://gohugo.io/content-management/shortcodes#ref-and-relref) - -## 6 tweet - -[Documentation of `tweet`](https://gohugo.io/content-management/shortcodes#tweet) - -Example `tweet` input: - -```markdown -{{}} -``` - -The rendered output looks like this: - -{{< tweet user="SanDiegoZoo" id="1453110110599868418" >}} - -## 7 vimeo - -[Documentation of `vimeo`](https://gohugo.io/content-management/shortcodes#vimeo) - -Example `vimeo` input: - -```markdown -{{}} -``` - -The rendered output looks like this: - -{{< vimeo 146022717 >}} - -## 8 youtube - -[Documentation of `youtube`](https://gohugo.io/content-management/shortcodes#youtube) - -Example `youtube` input: - -```markdown -{{}} -``` - -The rendered output looks like this: - -{{< youtube w7Ft2ymGmfc >}} diff --git a/exampleSite/content/posts/theme-documentation-built-in-shortcodes/index.zh-cn.md b/exampleSite/content/posts/theme-documentation-built-in-shortcodes/index.zh-cn.md deleted file mode 100644 index cf6a7a1a..00000000 --- a/exampleSite/content/posts/theme-documentation-built-in-shortcodes/index.zh-cn.md +++ /dev/null @@ -1,184 +0,0 @@ ---- -weight: 3 -title: "主题文档 - 内置 Shortcodes" -date: 2021-12-19T16:15:22+08:00 -draft: false -author: "Lruihao" -authorLink: "https://lruihao.cn" -description: "Hugo 提供了多个内置的 Shortcodes, 以方便作者保持 Markdown 内容的整洁。" -resources: -- name: "featured-image" - src: "featured-image.png" - -tags: ["shortcodes"] -categories: ["documentation"] - -lightgallery: true - -menu: - main: - title: "Hugo 提供了多个内置的 Shortcodes, 以方便作者保持 Markdown 内容的整洁。" - parent: "documentation" - pre: "" ---- - -**Hugo** 提供了多个内置的 Shortcodes, 以方便作者保持 Markdown 内容的整洁。 - - - -Hugo 使用 Markdown 为其简单的内容格式。但是,Markdown 在很多方面都无法很好地支持。你可以使用纯 HTML 来扩展可能性。 - -但这恰好是一个坏主意。大家使用 Markdown, 正是因为它即使不经过渲染也可以轻松阅读。应该尽可能避免使用 HTML 以保持内容简洁。 - -为了避免这种限制,Hugo 创建了 [shortcodes](https://gohugo.io/extras/shortcodes/). -shortcode 是一个简单代码段,可以生成合理的 HTML 代码,并且符合 Markdown 的设计哲学。 - -Hugo 附带了一组预定义的 shortcodes, 它们实现了一些非常常见的用法。 -提供这些 shortcodes 是为了方便保持你的 Markdown 内容简洁。 - -{{< admonition tip "使用 Shortcodes" >}} - -1. 带有原始字体串格式的 Shortcodes \` \` -2. 带有 Markdown 的 Shortcodes `% %` -3. 不带有 Markdown 的 Shortcodes `< >` - -详见 [shortcodes/#use-shortcodes](https://gohugo.io/content-management/shortcodes/#use-shortcodes) - -{{< /admonition >}} - -## 1 figure {#figure} - -[`figure` 的文档](https://gohugo.io/content-management/shortcodes#figure) - -一个 `figure` 示例: - -```markdown -{{}} -``` - -呈现的输出效果如下: - -{{< figure src="/images/lighthouse.jpg" title="Lighthouse (figure)" >}} - -输出的 HTML 看起来像这样: - -```html -
- -
-

Lighthouse (figure)

-
-
-``` - -## 2 gist - -[`gist` 的文档](https://gohugo.io/content-management/shortcodes#gist) - -一个 `gist` 示例: - -```markdown -{{}} -``` - -呈现的输出效果如下: - -{{< gist spf13 7896402 >}} - -输出的 HTML 看起来像这样: - -```html - -``` - -## 3 highlight - -[`highlight` 的文档](https://gohugo.io/content-management/shortcodes#highlight) - -一个 `highlight` 示例: - -```markdown -{{}} -
-
-

{{ .Title }}

- {{ range .Pages }} - {{ .Render "summary"}} - {{ end }} -
-
-{{}} -``` - -呈现的输出效果如下: - -{{< highlight html >}} -
-
-

{{ .Title }}

- {{ range .Pages }} - {{ .Render "summary"}} - {{ end }} -
-
-{{< /highlight >}} - -## 4 param - -[`param` 的文档](https://gohugo.io/content-management/shortcodes#param) - -一个 `param` 示例: - -```markdown -{{}} -``` - -呈现的输出效果如下: - -{{< param description >}} - -## 5 ref 和 relref {#ref-and-relref} - -[`ref` 和 `relref` 的文档](https://gohugo.io/content-management/shortcodes#ref-and-relref) - -## 6 tweet - -[`tweet` 的文档](https://gohugo.io/content-management/shortcodes#tweet) - -一个 `tweet` 示例: - -```markdown -{{}} -``` - -呈现的输出效果如下: - -{{< tweet user="SanDiegoZoo" id="1453110110599868418" >}} - -## 7 vimeo - -[`vimeo` 的文档](https://gohugo.io/content-management/shortcodes#vimeo) - -一个 `vimeo` 示例: - -```markdown -{{}} -``` - -呈现的输出效果如下: - -{{< vimeo 146022717 >}} - -## 8 youtube - -[`youtube` 的文档](https://gohugo.io/content-management/shortcodes#youtube) - -一个 `youtube` 示例: - -```markdown -{{}} -``` - -呈现的输出效果如下: - -{{< youtube w7Ft2ymGmfc >}} diff --git a/exampleSite/content/posts/theme-documentation-content-encryption/featured-image.png b/exampleSite/content/posts/theme-documentation-content-encryption/featured-image.png deleted file mode 100644 index f3fe7ebe..00000000 Binary files a/exampleSite/content/posts/theme-documentation-content-encryption/featured-image.png and /dev/null differ diff --git a/exampleSite/content/posts/theme-documentation-content-encryption/index.en.md b/exampleSite/content/posts/theme-documentation-content-encryption/index.en.md deleted file mode 100644 index 75d74c6c..00000000 --- a/exampleSite/content/posts/theme-documentation-content-encryption/index.en.md +++ /dev/null @@ -1,214 +0,0 @@ ---- -title: "Theme Documentation - Content Encryption" -date: 2022-05-28T11:51:41+08:00 -author: "Lruihao" -authorLink: "https://lruihao.cn" -description: "Find out how to encrypt content in FixIt theme." -password: 1212 -message: "Password is 1212" - -resources: -- name: "featured-image" - src: "featured-image.png" - -tags: -- Encryption -categories: -- documentation - -menu: - main: - name: "Content Encryption" - title: "Find out how to encrypt content in FixIt theme." - parent: "documentation" - pre: "" ---- - -Find out how to encrypt content in FixIt theme. - - - -## Page Encryption - -### Frontmatter - -The FixIt theme provides two frontmatters for page encryption. - -* **password**: *[required]* password of encrypted page content -* **message**: *[optional]* encryption prompt - -For example, the frontmatters in this article are as follows: - -```yaml ---- -title: "Theme Documentation - Content Encryption" -date: 2022-05-28T11:51:41+08:00 -author: "Lruihao" -authorLink: "https://lruihao.cn" -description: "Find out how to encrypt content in FixIt theme." -password: 1212 -message: "Password is 1212" - -resources: -- name: "featured-image" - src: "featured-image.png" - -tags: -- Encryption -categories: -- documentation ---- -``` - - -{{< admonition info >}} - -1. After entering the correct password each time, the password hash value will be cached locally by the user, and the pages will be unlocked automatically when accessed again within one day -2. A "Encrypt again" button is provided at the end of the article. Click it to immediately forget the password and re encrypt the content -3. Encrypted pages have been hidden from search -4. The markdown output of encrypted pages has been disabled. To prevent password disclosure, **do not make encrypted pages public in any form** - -{{< /admonition >}} - -### Advanced use - -FixIt Dcryptor has two lifecycle hooks, see [Class FixItDecryptor API](#fixit-decryptor-api) - -For example, after unlocking the article, output the text: - -```go-html-template -{{}} -document.addEventListener('DOMContentLoaded', () => { - fixit.theme.decryptor.addEventListener('decrypted', function() { - console.log('after password decryption') - }) - if (window.localStorage.getItem(`fixit-decryptor/#${location.pathname}`)) { - console.log('after automatic decryption') - } -}); -{{}} -``` - -You can see the output in the console of the developer tool. - -{{< script >}} -document.addEventListener('DOMContentLoaded', () => { - fixit.decryptor.addEventListener('decrypted', function() { - console.log('after password decryption') - }) - if (window.localStorage.getItem(`fixit-decryptor/#${location.pathname}`)) { - console.log('after automatic decryption') - } -}); -{{< /script >}} - -## Partial Encryption {#partial-encryption} - -{{< version 0.2.15 >}} - -You can use `fixit-encryptor` shortcode to encrypt partial content. - -The `fixit-encryptor` shortcode has the following named parameters: - -* **password** *[required]* (**first** positional parameter) - - Password of the partial encrypted content. - -* **message** *[optional]* (**second** positional parameter) - - Placeholder of the decryptor input. - -Example `fixit-encryptor` input: - -```go-html-template -{{%/* fixit-encryptor "1212" "Password is 1212" */%}} -The `fixit-encryptor` shortcode was supported in version {{}}. -{{%/* /fixit-encryptor */%}} -Or -{{%/* fixit-encryptor password="1212" message="Password is 1212" */%}} -The `fixit-encryptor` shortcode was supported in version {{}}. -{{%/* /fixit-encryptor */%}} -``` - -The rendered output looks like this: - -{{% fixit-encryptor "1212" "Password is 1212" %}} -The `fixit-encryptor` shortcode was supported in version {{< version 0.2.15 >}}. -{{% /fixit-encryptor %}} - -## Summary - -Compared with encrypting content through script batch processing such as golang/python/javascript, FixIt theme built-in encryption has the following advantages and disadvantages: - -* **Advantages**: High usability, out of the box, without further batch processing -* **Disadvantages**: Low security, the encryption algorithm is limited by the `go-html-template` syntax - -> "The simplest password is enough to prevent 90% of people!" -> -> There is no trivial matter about privacy. Please do not upload important and private contents, and keep them properly! - -## Class FixItDecryptor API {#fixit-decryptor-api} - -FixIt decryptor for encrypted pages - -### new FixItDecryptor(options) - -#### Parameters: - -| Name | Type | Description | -| ------- | ------ | ------------------------------------------------------------ | -| options | Object | The options of FixItDecryptor([Properties](#properties)) | - -##### Properties: - -| Name | Type | Attributes | Default | Description | -| --------- | -------- | ---------- | ------- | --------------------------------------------------------- | -| decrypted | Function | \ | | [Lifecycle Hooks] handler after decrypting | -| reset | Function | \ | | [Lifecycle Hooks] handler after encrypting again | -| duration | Number | \ | 86400 | number of seconds to cache decryption statistics. unit: s | - -### Methods - -#### init() - -initialize FixIt decryptor - -#### initShortcodes() - -initialize fixit-encryptor shortcodes - -#### validateCache() - -validate the cached decryption statistics in localStorage - -#### addEventListener(event, listener) - -add event listener for FixIt Decryptor - -##### Parameters: - -| Name | Type | Description | -| -------- | -------- | ------------- | -| event | String | event name | -| listener | Function | event handler | - -#### removeEventListener(event, listener) - -remove event listener for FixIt Decryptor - -##### Parameters: - -| Name | Type | Description | -| -------- | -------- | ------------- | -| event | String | event name | -| listener | Function | event handler | - -### Events - -#### decrypted - -after decrypting - -#### reset - -after encrypting again \ No newline at end of file diff --git a/exampleSite/content/posts/theme-documentation-content-encryption/index.zh-cn.md b/exampleSite/content/posts/theme-documentation-content-encryption/index.zh-cn.md deleted file mode 100644 index c7f53d40..00000000 --- a/exampleSite/content/posts/theme-documentation-content-encryption/index.zh-cn.md +++ /dev/null @@ -1,145 +0,0 @@ ---- -title: "主题文档 - 内容加密" -date: 2022-05-28T11:51:41+08:00 -author: "Lruihao" -authorLink: "https://lruihao.cn" -description: "了解如何在 FixIt 主题中加密内容。" -password: 1212 -message: "密码是 1212" - -resources: -- name: "featured-image" - src: "featured-image.png" - -tags: -- Encryption -categories: -- documentation - -menu: - main: - name: "主题文档 - 内容加密" - title: "了解如何在 FixIt 主题中加密内容。" - parent: "documentation" - pre: "" ---- - -了解如何在 FixIt 主题中加密内容。 - - - -## 全文加密 - -### 前置参数 - -FixIt 主题提供了两个前置参数用于全文加密。 - -* **password**: *[必需]* 加密页面内容的密码 -* **message**: *[可选]* 加密提示信息 - -例如,本文的前置参数如下: - -```yaml -title: "主题文档 - 内容加密" -date: 2022-05-28T11:51:41+08:00 -author: "Lruihao" -authorLink: "https://lruihao.cn" -description: "了解如何在 FixIt 主题中加密内容。" -password: 1212 -message: "密码是 1212" - -resources: -- name: "featured-image" - src: "featured-image.png" - -tags: -- Encryption -categories: -- documentation -``` - -{{< admonition info >}} - -1. 每次输入正确密码后,会在用户本地缓存密码 hash 值,一天之内再次访问时,将自动解锁文章 -2. 文章最后提供有一个 “重新加密” 的按钮,点击即可立即忘记密码,并重新加密内容 -3. 加密文章已从搜索中隐藏 -4. 加密文章的 Markdown 输出已禁用,为了防止密码泄漏,**请勿将加密文章以任何形式公开** - -{{< /admonition >}} - -### 进阶使用 - -FixIt Dcryptor 有两个生命周期钩子函数,详见 [Class FixItDecryptor API](/theme-documentation-content-encryption/#fixit-decryptor-api) - -例如在解锁文章后,输出文本: - -```go-html-template -{{}} -document.addEventListener('DOMContentLoaded', () => { - fixit.theme.decryptor.addEventListener('decrypted', function() { - console.log('after password decryption') - }) - if (window.localStorage.getItem(`fixit-decryptor/#${location.pathname}`)) { - console.log('after automatic decryption') - } -}); -{{}} -``` - -您可以在开发人员工具的控制台中看到输出。 - -{{< script >}} -document.addEventListener('DOMContentLoaded', () => { - fixit.decryptor.addEventListener('decrypted', function() { - console.log('after password decryption') - }) - if (window.localStorage.getItem(`fixit-decryptor/#${location.pathname}`)) { - console.log('after automatic decryption') - } -}); -{{< /script >}} - -## 部分加密 {#partial-encryption} - -{{< version 0.2.15 >}} - -您可以使用 `fixit-encryptor` shortcode 来加密部分内容。 - -`fixit-encryptor` shortcode 具有以下命名参数: - -* **password** *[必选]*(**第一个**位置参数) - - 部分加密内容的密码。 - -* **message** *[可选]*(**第二个**位置参数) - - 解密输入框的提示信息。 - -一个 `fixit-encryptor` 示例: - -```go-html-template -{{%/* fixit-encryptor "1212" "密码是 1212" */%}} -`fixit-encryptor` shortcode 在版本 {{}} 得到支持。 -{{%/* /fixit-encryptor */%}} -Or -{{%/* fixit-encryptor password="1212" message="密码是 1212" */%}} -`fixit-encryptor` shortcode 在版本 {{}} 得到支持。 -{{%/* /fixit-encryptor */%}} -``` - -呈现的输出效果如下: - -{{% fixit-encryptor "1212" "密码是 1212" %}} -`fixit-encryptor` shortcode 在版本 {{< version 0.2.15 >}} 得到支持。 -{{% /fixit-encryptor %}} - -## 结语 - -相比于通过 Golang/Python/JavaScript 等以脚本批处理的方式加密内容,FixIt 主题内置加密具有以下优缺点: - -* **优点**:易用性高,开箱即用,无需进一步批处理 -* **缺点**:安全性低,加密算法受限于 `go-html-template` 语法 - -> “最简单的密码,就足以防住 90% 的人!” -> -> 隐私无小事,重要私密的内容请勿上传,各自妥善保管! diff --git a/exampleSite/content/posts/theme-documentation-content/featured-image.jpg b/exampleSite/content/posts/theme-documentation-content/featured-image.jpg deleted file mode 100644 index 37c49564..00000000 Binary files a/exampleSite/content/posts/theme-documentation-content/featured-image.jpg and /dev/null differ diff --git a/exampleSite/content/posts/theme-documentation-content/index.en.md b/exampleSite/content/posts/theme-documentation-content/index.en.md deleted file mode 100644 index 9945822e..00000000 --- a/exampleSite/content/posts/theme-documentation-content/index.en.md +++ /dev/null @@ -1,491 +0,0 @@ ---- -weight: 2 -title: "Theme Documentation - Content" -date: 2021-12-19T16:15:22+08:00 -draft: false -author: "Lruihao" -authorLink: "https://lruihao.cn" -description: "Find out how to create and organize your content quickly and intuitively in FixIt theme." -resources: -- name: "featured-image" - src: "featured-image.jpg" - -tags: ["content", "Markdown"] -categories: ["documentation"] - -lightgallery: true - -toc: - auto: false -math: - enable: true - -menu: - main: - name: "Content" - title: "Find out how to create and organize your content quickly and intuitively in FixIt theme." - parent: "documentation" - pre: "" ---- - -Find out how to create and organize your content quickly and intuitively in **FixIt** theme. - - - -## 1 Contents Organization {#contents-organization} - -A few suggestions to help you get a good looking site quickly: - -* Keep post pages in the `content/posts` directory, for example: `content/posts/my-first-post.md` -* Keep other pages in the `content` directory, for example: `content/about.md` -* Local resources organization - -{{< admonition note "Local Resource Reference" >}} -{{< version 0.2.10 >}} - -There are three ways to reference local resources such as **images** and **music**: - -1. Using [page resources](https://gohugo.io/content-management/page-resources/) in [page bundles](https://gohugo.io/content-management/page-bundles/). - You can reference page resources by the value for `Resources.GetMatch` or the filepath of the resource relative to the page directory directly. -2. Store resources in the **assets** directory, which is `/assets` by default. - The filepath of the resource to reference in the post is relative to the assets directory. -3. Store resources in the **static** directory, which is `/static` by default. - The filepath of the resource to reference in the post is relative to the static directory. - -The **priority** of references is also in the above order. - -There are many places in the theme where the above local resource references can be used, -such as **links**, **images**, `image` shortcode, `music` shortcode and some params in the **front matter**. - -Images in page resources or assets directory [processing](https://gohugo.io/content-management/image-processing/) -will be supported in the future. -It's really cool! :(fa-regular fa-grin-squint fa-fw): -{{< /admonition >}} - -## 2 Front Matter {#front-matter} - -**Hugo** allows you to add front matter in `yaml`, `toml` or `json` to your content files. - -{{< admonition >}} -**Not all** of the below front matters need to be set in each of your posts. -It is necessary only if the front matters and the `page` part in your [site configuration](../theme-documentation-basics#site-configuration) are inconsistent. -{{< /admonition >}} - -* **title**: the title for the content. -* **subtitle**: {{< version 0.2.0 >}} the subtitle for the content. -* **date**: the datetime assigned to this page, which is usually fetched from the `date` field in front matter, but this behaviour is configurabl in the [site configuration](../theme-documentation-basics#site-configuration). -* **lastmod**: the datetime at which the content was last modified. -* **draft**: if `true`, the content will not be rendered unless the `--buildDrafts`/`-D` flag is passed to the `hugo` command. -* **author**: the author for the content. -* **authorLink**: the link of the author. -* **authorEmail**: {{< version 0.2.14 >}} the of the author. -* **description**: the description for the content. -* **keywords**: the keywords for the content. -* **license**: the special lisence for this content. -* **images**: page images for Open Graph and Twitter Cards. - -* **tags**: the tags for the content. -* **categories**: the categories for the content. -* **featuredImage**: the featured image for the content. -* **featuredImagePreview**: the featured image for the content preview in the home page. - -* **hiddenFromHomePage**: if `true`, the content will not be shown in the home page. -* **hiddenFromSearch**: {{< version 0.2.0 >}} if `true`, the content will not be shown in the search results. -* **twemoji**: {{< version 0.2.0 >}} if `true`, the content will enable the twemoji. -* **lightgallery**: if `true`, images in the content will be shown as the gallery. -* **ruby**: {{< version 0.2.0 >}} if `true`, the content will enable the [ruby extended syntax](#ruby). -* **fraction**: {{< version 0.2.0 >}} if `true`, the content will enable the [fraction extended syntax](#fraction). -* **fontawesome**: {{< version 0.2.0 >}} if `true`, the content will enable the [Font Awesome extended syntax](#fontawesome). -* **linkToMarkdown**: if `true`, the footer of the content will be shown the link to the orignal Markdown file. -* **rssFullText**: {{< version 0.2.4 >}} if `true`, the full text content will be shown in RSS. -* **pageStyle**: {{< version 0.2.13 >}} Detail see [Page Style](../theme-documentation-basics#page-style) -* **gravatarForce**: {{< version 0.2.14 >}} Gravatar is force-used as the author's avatar. - -* **toc**: {{< version 0.2.9 changed >}} the same as the `params.page.toc` part in the [site configuration](../theme-documentation-basics#site-configuration). -* **expirationReminder**: {{< version 0.2.13 >}} the same as the `params.page.expirationReminder` part in the [site configuration](../theme-documentation-basics#site-configuration). -* **code**: {{< version 0.2.0 >}} the same as the `params.page.code` part in the [site configuration](../theme-documentation-basics#site-configuration). -* **edit**: {{< version 0.2.14 >}} the same as the `params.page.edit` part in the [site configuration](../theme-documentation-basics#site-configuration). -* **math**: {{< version 0.2.0 changed >}} the same as the `params.page.math` part in the [site configuration](../theme-documentation-basics#site-configuration). -* **mapbox**: {{< version 0.2.0 >}} the same as the `params.page.mapbox` part in the [site configuration](../theme-documentation-basics#site-configuration). -* **share**: the same as the `params.page.share` part in the [site configuration](../theme-documentation-basics#site-configuration). -* **comment**: {{< version 0.2.0 changed >}} the same as the `params.page.comment` part in the [site configuration](../theme-documentation-basics#site-configuration). -* **library**: {{< version 0.2.7 >}} the same as the `params.page.library` part in the [site configuration](../theme-documentation-basics#site-configuration). -* **seo**: {{< version 0.2.10 >}} the same as the `params.page.seo` part in the [site configuration](../theme-documentation-basics#site-configuration). -* **type**: the rendering template of page, see [templates](#tamplates) for details. -* **menu**: see [Add content to Menu](../theme-documentation-basics#content-to-menu) - -* **password**: {{< version 0.2.15 >}} password of encrypted page content, see [Theme Documentation - Content Encryption](../theme-documentation-content-encryption/) -* **message**: {{< version 0.2.15 >}} encryption prompt, see [Theme Documentation - Content Encryption](../theme-documentation-content-encryption/) - -* **repost**: {{< version 0.2.15 >}} the same as the `params.page.repost` part in the [site configuration](../theme-documentation-basics#site-configuration). - -{{< admonition tip >}} -{{< version 0.2.10 >}} - -**featuredImage** and **featuredImagePreview** support the complete usage of [local resource references](#contents-organization). - -If the page resource with `name: featured-image` or `name: featured-image-preview` is set in the front matter, -it is not necessary to set the parameter `featuredImage` or `featuredImagePreview`: - -```yaml -resources: -- name: featured-image - src: featured-image.jpg -- name: featured-image-preview - src: featured-image-preview.jpg -``` - -{{< version 0.2.12 >}} - -Some [archetypes](https://gohugo.io/content-management/archetypes/) are embedded in the **FixIt** theme, which will take effect when creating new content with the following commands, and the front matter will be automatically brought in. - -```bash -hugo new posts/foo.md -hugo new --kind post-bundle posts/bar/ -``` -{{< /admonition >}} - -Here is a front matter example: - -```yaml ---- -title: "My First Post" -subtitle: "" -date: 2020-03-04T15:58:26+08:00 -lastmod: 2020-03-04T15:58:26+08:00 -draft: true -author: "" -authorLink: "" -authorEmail: "" -description: "" -keywords: "" -license: "" -images: [] - -tags: [] -categories: [] -featuredImage: "" -featuredImagePreview: "" - -hiddenFromHomePage: false -hiddenFromSearch: false -twemoji: false -lightgallery: true -ruby: true -fraction: true -fontawesome: true -linkToMarkdown: true -rssFullText: false -pageStyle: "normal" -gravatarForce: false - -toc: - enable: true - auto: true -expirationReminder: - enable: false - # ... -code: - copy: true - # ... -edit: - enable: false - # ... -math: - enable: true - # ... -mapbox: - accessToken: "" - # ... -share: - enable: true - # ... -comment: - enable: true - # ... -library: - css: - # someCSS = "some.css" - # located in "assets/" - # Or - # someCSS = "https://cdn.example.com/some.css" - js: - # someJS = "some.js" - # located in "assets/" - # Or - # someJS = "https://cdn.example.com/some.js" -seo: - images: [] - # ... ---- -``` - -## 3 Tamplates {#tamplates} - -Generally, you don't need to set the **type** parameter, because Hugo and fixit will help you choose. However, the **FixIt** theme provides some special templates for users to use. - -### Friends - -{{< version 0.2.12 >}} - -Set `type: "friends"` in the front matter and create data file named `friends.yml` in the `yourSite/data/` directory, whose content format is as follows: - -```yml -# Friend/Site info of one -- nickname: friend's name - avatar: friend's avatar - url: site link - description: description of friend/site -``` - -{{< admonition tip >}} - -You can use the following command to quickly create a friends page: - -```bash -hugo new friends/index.md -``` - -{{< /admonition >}} - -### Offline - -{{< version 0.2.12 >}} See [PWA Support](/pwa-support/) for details. - -Set `type: "offline"` in the front matter and set `enablePWA` in `config.toml`: -```toml -[params] - # enable PWA - enablePWA = true -``` -{{< admonition tip >}} - -You can use the following command to quickly create a offline page: - -```bash -hugo new offline/index.md -``` - -{{< /admonition >}} - -## 4 Content Summaries - -**FixIt** theme uses the summary of the content to display abstract information in the home page. Hugo can generate summaries of your content. - -![Summary Preview](summary.png "Summary Preview") - -### Automatic Summary Splitting - -By default, Hugo automatically takes the first 70 words of your content as its summary. - -You may customize the summary length by setting `summaryLength` in the [site configuration](../theme-documentation-basics#site-configuration). - -If you are creating content in a [CJK]^(Chinese/Japanese/Korean) language and want to use Hugo’s automatic summary splitting, set `hasCJKLanguage` to `true` in your [site configuration](../theme-documentation-basics#site-configuration). - -### Manual Summary Splitting - -Alternatively, you may add the `` summary divider where you want to split the article. - -Content that comes before the summary divider will be used as that content’s summary. - -{{< admonition >}} -Be careful to enter `` exactly; i.e., all lowercase and with no whitespace. -{{< /admonition >}} - -### Front Matter Summary - -You might want your summary to be something other than the text that starts the article. In this case you can provide a separate summary in the `summary` variable of the article front matter. - -### Use Description as Summary - -You might want your description in the `description` variable of the article front matter as the summary. - -You may add the `` summary divider at the start of the article. Keep content that comes before the summary divider empty. Then **FixIt** theme will use your description as the summary. - -### Priority Order of Summary Selection - -Because there are multiple ways in which a summary can be specified it is useful to understand the order. It is as follows: - -1. If there is a `` summary divider present in the article but no content is before the divider, the description will be used as the summary. -2. If there is a `` summary divider present in the article the text up to the divider will be provided as per the manual summary split method. -3. If there is a summary variable in the article front matter the value of the variable will be provided as per the front matter summary method. -4. The text at the start of the article will be provided as per the automatic summary split method. - -{{< admonition >}} -It is not recommended to include rich text block elements in the summary, which will cause typographic errors. Such as code blocks, pictures, tables, etc. -{{< /admonition >}} - -## 5 Basic Markdown Syntax - -This part is shown in the [basic markdown syntax page](../basic-markdown-syntax/). - -## 6 Extended Markdown Syntax {#extended-markdown-syntax} - -**FixIt** theme has some extended syntax elements for you to write articles. - -### Emoji Support - -This part is shown in the [emoji support page](../emoji-support/). - -### Mathematical Formula - -**FixIt** theme supports mathematical formulas based on [$ \KaTeX $](https://katex.org/). - -Set the property `enable = true` under `[params.math]` in your [site configuration](../theme-documentation-basics#site-configuration) -and the property `math: true` of the article front matter to enable the automatic rendering of mathematical formulas. - -{{< admonition tip >}} -Here is a list of [$ \TeX $ functions supported by $ \KaTeX $](https://katex.org/docs/supported.html). -{{< /admonition >}} - -#### Block Formula - -The default block delimiters are `$$`/`$$` and `\\[`/`\\]`: - -```markdown -$$ c = \pm\sqrt{a^2 + b^2} $$ - -\\[ f(x)=\int_{-\infty}^{\infty} \hat{f}(\xi) e^{2 \pi i \xi x} d \xi \\] -``` - -The rendered output looks like this: - -$$ c = \pm\sqrt{a^2 + b^2} $$ - -\\[ f(x)=\int_{-\infty}^{\infty} \hat{f}(\xi) e^{2 \pi i \xi x} d \xi \\] - -#### Inline Formula - -The default inline delimiters are `$`/`$` and `\\(`/`\\)`: - -```markdown -$ c = \pm\sqrt{a^2 + b^2} $ and \\( f(x)=\int_{-\infty}^{\infty} \hat{f}(\xi) e^{2 \pi i \xi x} d \xi \\) -``` - -The rendered output looks like this: - -$ c = \pm\sqrt{a^2 + b^2} $ and \\( f(x)=\int_{-\infty}^{\infty} \hat{f}(\xi) e^{2 \pi i \xi x} d \xi \\) - -{{< admonition tip >}} -You can add more block and inline delimiters in your [site configuration](../theme-documentation-basics#site-configuration). -{{< /admonition >}} - -#### Copy-tex - -**[Copy-tex](https://github.com/Khan/KaTeX/tree/master/contrib/copy-tex)** is an extension for **$ \KaTeX $**. - -By the extension, when selecting and copying $ \KaTeX $ rendered elements, copies their $ \LaTeX $ source to the clipboard. - -Set the property `copyTex = true` under `[params.math]` in your [site configuration](../theme-documentation-basics#site-configuration) to enable Copy-tex. - -Select and copy the formula rendered in the previous section, and you can find that the copied content is the LaTeX source code. - -#### mhchem - -**[mhchem](https://github.com/Khan/KaTeX/tree/master/contrib/mhchem)** is an extension for **$ \KaTeX $**. - -By the extension, you can write beautiful chemical equations easily in the article. - -Set the property `mhchem = true` under `[params.math]` in your [site configuration](../theme-documentation-basics#site-configuration) to enable mhchem. - -```markdown -$$ \ce{CO2 + C -> 2 CO} $$ - -$$ \ce{Hg^2+ ->[I-] HgI2 ->[I-] [Hg^{II}I4]^2-} $$ -``` - -The rendered output looks like this: - -$$ \ce{CO2 + C -> 2 CO} $$ - -$$ \ce{Hg^2+ ->[I-] HgI2 ->[I-] [Hg^{II}I4]^2-} $$ - -### Ruby Annotation {#ruby} - -An extended Markdown syntax for **ruby annotation** is supported in **FixIt** theme: - -```markdown -[Hugo]{?^}(An open-source static site generator) -``` - -The rendered output looks like this: - -[Hugo]^(An open-source static site generator) - -### Fraction {#fraction} - -{{< version 0.2.0 >}} - -An extended Markdown syntax for **fraction** is supported in **FixIt** theme: - -```markdown -[Light]{?/}[Dark] - -[99]{?/}[100] -``` - -The rendered output looks like this: - -[Light]/[Dark] - -[90]/[100] - -### Font Awesome {#fontawesome} - -**FixIt** theme uses [Font Awesome](https://fontawesome.com/) as the icon library. -You can easily use these icons in your articles. - -Get the `class` of icons you wanted from the [Font Awesome website](https://fontawesome.com/icons?d=gallery). - -```markdown -Gone camping! {?:}(fa-solid fa-campground fa-fw): Be back soon. - -That is so funny! {?:}(fa-regular fa-grin-tears): -``` - -The rendered output looks like this: - -Gone camping! :(fa-solid fa-campground fa-fw): Be back soon. - -That is so funny! :(fa-regular fa-grin-tears): - -### Escape character {#escape-character} - -In some special cases (when writing this theme documentation :(fa-regular fa-grin-squint-tears):), -your content will conflict with basic or extended Markdown syntax, and it is inevitable. - -The escape character syntax can help you build the content you wanted: - -```markdown -{{??}X} -> X -``` - -For example, two `:` will enable emoji syntax, which is not the behavior you want. The escape character syntax is like this: - -```markdown -{{??}:}joy: -``` - -The rendered output looks like this: - -**{?:}joy{?:}** instead of **:joy:** - -{{< admonition tip >}} -This is related to **[an issue for Hugo](https://github.com/gohugoio/hugo/issues/4978)**, which has not been resolved. -{{< /admonition >}} - -Another example is: - -```markdown -[link{{??}]}(#escape-character) -``` - -The rendered output looks like this: - -**[link{?]}(#escape-character)** instead of **[link](#escape-character)**. - ---- - -{{< admonition quote "Thanks" >}} -_Thanks to the original author [Dillon](https://dillonzq.com) for preparing and revising the content before version `v0.2.10` in this documentation._ -{{< /admonition >}} \ No newline at end of file diff --git a/exampleSite/content/posts/theme-documentation-content/index.zh-cn.md b/exampleSite/content/posts/theme-documentation-content/index.zh-cn.md deleted file mode 100644 index 9c36038b..00000000 --- a/exampleSite/content/posts/theme-documentation-content/index.zh-cn.md +++ /dev/null @@ -1,490 +0,0 @@ ---- -weight: 2 -title: "主题文档 - 内容" -date: 2021-12-19T16:15:22+08:00 -draft: false -author: "Lruihao" -authorLink: "https://lruihao.cn" -description: "了解如何在 FixIt 主题中快速,直观地创建和组织内容。" -resources: -- name: "featured-image" - src: "featured-image.jpg" - -tags: ["content", "Markdown"] -categories: ["documentation"] - -lightgallery: true - -toc: - auto: false -math: - enable: true - -menu: - main: - title: "了解如何在 FixIt 主题中快速,直观地创建和组织内容。" - parent: "documentation" - pre: "" ---- - -了解如何在 **FixIt** 主题中快速,直观地创建和组织内容。 - - - -## 1 内容组织 {#contents-organization} - -以下是一些方便你清晰管理和生成文章的目录结构建议: - -* 保持博客文章存放在 `content/posts` 目录,例如:`content/posts/我的第一篇文章。md` -* 保持简单的静态页面存放在 `content` 目录,例如:`content/about.md` -* 本地资源组织 - -{{< admonition note "本地资源引用" >}} -{{< version 0.2.10 >}} - -有三种方法来引用**图片**和**音乐**等本地资源: - -1. 使用 [页面包](https://gohugo.io/content-management/page-bundles/) 中的 [页面资源](https://gohugo.io/content-management/page-resources/). - 你可以使用适用于 `Resources.GetMatch` 的值或者直接使用相对于当前页面目录的文件路径来引用页面资源。 -2. 将本地资源放在 **assets** 目录中,默认路径是 `/assets`. - 引用资源的文件路径是相对于 assets 目录的。 -3. 将本地资源放在 **static** 目录中,默认路径是 `/static`. - 引用资源的文件路径是相对于 static 目录的。 - -引用的**优先级**符合以上的顺序。 - -在这个主题中的很多地方可以使用上面的本地资源引用, -例如 **链接**, **图片**, `image` shortcode, `music` shortcode 和**前置参数**中的部分参数。 - -页面资源或者 **assets** 目录中的 [图片处理](https://gohugo.io/content-management/image-processing/) 会在未来的版本中得到支持。 -非常酷的功能!:(fa-regular fa-grin-squint fa-fw): -{{< /admonition >}} - -## 2 前置参数 {#front-matter} - -**Hugo** 允许你在文章内容前面添加 `yaml`, `toml` 或者 `json` 格式的前置参数。 - -{{< admonition >}} -**不是所有**的以下前置参数都必须在你的每篇文章中设置。 -只有在文章的参数和你的 [网站设置](../theme-documentation-basics#site-configuration) 中的 `page` 部分不一致时才有必要这么做。 -{{< /admonition >}} - -* **title**: 文章标题 -* **subtitle**: {{< version 0.2.0 >}} 文章副标题 -* **date**: 这篇文章创建的日期时间它通常是从文章的前置参数中的 `date` 字段获取的,但是也可以在 [网站配置](../theme-documentation-basics#site-configuration) 中设置 -* **lastmod**: 上次修改内容的日期时间 -* **draft**: 如果设为 `true`, 除非 `hugo` 命令使用了 `--buildDrafts`/`-D` 参数,这篇文章不会被渲染 -* **author**: 文章作者 -* **authorLink**: 文章作者的链接 -* **authorEmail**: {{< version 0.2.14 >}} 文章作者的邮箱 -* **description**: 文章内容的描述 -* **keywords**: 文章内容的关键词 -* **license**: 这篇文章特殊的许可 -* **images**: 页面图片,用于 Open Graph 和 Twitter Cards. - -* **tags**: 文章的标签 -* **categories**: 文章所属的类别 -* **featuredImage**: 文章的特色图片 -* **featuredImagePreview**: 用在主页预览的文章特色图片 - -* **hiddenFromHomePage**: 如果设为 `true`, 这篇文章将不会显示在主页上 -* **hiddenFromSearch**: {{< version 0.2.0 >}} 如果设为 `true`, 这篇文章将不会显示在搜索结果中 -* **twemoji**: {{< version 0.2.0 >}} 如果设为 `true`, 这篇文章会使用 twemoji -* **lightgallery**: 如果设为 `true`, 文章中的图片将可以按照画廊形式呈现 -* **ruby**: {{< version 0.2.0 >}} 如果设为 `true`, 这篇文章会使用 [上标注释扩展语法](#ruby) -* **fraction**: {{< version 0.2.0 >}} 如果设为 `true`, 这篇文章会使用 [分数扩展语法](#fraction) -* **fontawesome**: {{< version 0.2.0 >}} 如果设为 `true`, 这篇文章会使用 [Font Awesome 扩展语法](#fontawesome) -* **linkToMarkdown**: 如果设为 `true`, 内容的页脚将显示指向原始 Markdown 文件的链接 -* **rssFullText**: {{< version 0.2.4 >}} 如果设为 `true`, 在 RSS 中将会显示全文内容 -* **pageStyle**: {{< version 0.2.13 >}} 页面样式,详见 [页面宽度](../theme-documentation-basics#page-style) -* **gravatarForce**: {{< version 0.2.14 >}} 强制使用 Gravatar 作为作者头像 - -* **toc**: {{< version 0.2.9 changed >}} 和 [网站配置](../theme-documentation-basics#site-configuration) 中的 `params.page.toc` 部分相同 -* **expirationReminder**: {{< version 0.2.13 >}} 和 [网站配置](../theme-documentation-basics#site-configuration) 中的 `params.page.expirationReminder` 部分相同 -* **code**: {{< version 0.2.0 >}} 和 [网站配置](../theme-documentation-basics#site-configuration) 中的 `params.page.code` 部分相同 -* **edit**: {{< version 0.2.14 >}} 和 [网站配置](../theme-documentation-basics#site-configuration) 中的 `params.page.edit` 部分相同 -* **math**: {{< version 0.2.0 changed >}} 和 [网站配置](../theme-documentation-basics#site-configuration) 中的 `params.page.math` 部分相同 -* **mapbox**: {{< version 0.2.0 >}} 和 [网站配置](../theme-documentation-basics#site-configuration) 中的 `params.page.mapbox` 部分相同 -* **share**: 和 [网站配置](../theme-documentation-basics#site-configuration) 中的 `params.page.share` 部分相同 -* **comment**: {{< version 0.2.0 changed >}} 和 [网站配置](../theme-documentation-basics#site-configuration) 中的 `params.page.comment` 部分相同 -* **library**: {{< version 0.2.7 >}} 和 [网站配置](../theme-documentation-basics#site-configuration) 中的 `params.page.library` 部分相同 -* **seo**: {{< version 0.2.10 >}} 和 [网站配置](../theme-documentation-basics#site-configuration) 中的 `params.page.seo` 部分相同 -* **type**: 页面渲染模板,详见 [页面模板](#tamplates) -* **menu**: 详见 [添加内容到菜单](../theme-documentation-basics#content-to-menu) - -* **password**: {{< version 0.2.15 >}} 加密页面内容的密码,详见 [主题文档 - 内容加密](../theme-documentation-content-encryption/) -* **message**: {{< version 0.2.15 >}} 加密提示信息,详见 [主题文档 - 内容加密](../theme-documentation-content-encryption/) - -* **repost**: {{< version 0.2.15 >}} 和 [网站配置](../theme-documentation-basics#site-configuration) 中的 `params.page.repost` 部分相同 - -{{< admonition tip >}} -{{< version 0.2.10 >}} - -**featuredImage** 和 **featuredImagePreview** 支持 [本地资源引用](#contents-organization) 的完整用法。 - -如果带有在前置参数中设置了 `name: featured-image` 或 `name: featured-image-preview` 属性的页面资源, -没有必要在设置 `featuredImage` 或 `featuredImagePreview`: - -```yaml -resources: -- name: featured-image - src: featured-image.jpg -- name: featured-image-preview - src: featured-image-preview.jpg -``` - -{{< version 0.2.12 >}} - -**FixIt** 主题内嵌了一些 [原型](https://gohugo.io/content-management/archetypes/),在使用以下命令创建新内容时生效,会自动带入常用的前置参数: - -```bash -hugo new posts/foo.md -hugo new --kind post-bundle posts/bar/ -``` -{{< /admonition >}} - -这是一个前置参数例子: - -```yaml ---- -title: "我的第一篇文章" -subtitle: "" -date: 2020-03-04T15:58:26+08:00 -lastmod: 2020-03-04T15:58:26+08:00 -draft: true -author: "" -authorLink: "" -authorEmail: "" -description: "" -keywords: "" -license: "" -images: [] - -tags: [] -categories: [] -featuredImage: "" -featuredImagePreview: "" - -hiddenFromHomePage: false -hiddenFromSearch: false -twemoji: false -lightgallery: true -ruby: true -fraction: true -fontawesome: true -linkToMarkdown: true -rssFullText: false -pageStyle: "normal" -gravatarForce: false - -toc: - enable: true - auto: true -expirationReminder: - enable: false - # ... -code: - copy: true - # ... -edit: - enable: false - # ... -math: - enable: true - # ... -mapbox: - accessToken: "" - # ... -share: - enable: true - # ... -comment: - enable: true - # ... -library: - css: - # someCSS = "some.css" - # 位于 "assets/" - # 或者 - # someCSS = "https://cdn.example.com/some.css" - js: - # someJS = "some.js" - # 位于 "assets/" - # 或者 - # someJS = "https://cdn.example.com/some.js" -seo: - images: [] - # ... ---- -``` - -## 3 页面模板 {#tamplates} - -一般情况,你不需要设置 **type** 参数,因为 **Hugo** 和 **FixIt** 会帮你选择。但是 **FixIt** 主题提供了一些特殊的模板给用户使用。 - -### 友情链接 - -{{< version 0.2.12 >}} - -在前置参数中设置 `type: "friends"`,并在 `yourSite/data/` 目录下创建 `friends.yml`,其内容格式如下: - -```yml -# 朋友/站点信息例子 -- nickname: 朋友名字 - avatar: 朋友头像 - url: 站点链接 - description: 对朋友或其站点的说明 -``` - -{{< admonition tip >}} - -你可以使用以下命令快速创建友情链接页面: - -```bash -hugo new friends/index.md -``` - -{{< /admonition >}} - -### 离线页面 - -{{< version 0.2.12 >}} 详见 [PWA 支持](/zh-cn/pwa-support/) - -在前置参数中设置 `type: "offline"`,并在 `config.toml` 中开启 `enablePWA`: -```toml -[params] - # enable PWA - # 开启 PWA 支持 - enablePWA = true -``` -{{< admonition tip >}} - -你可以使用以下命令快速创建离线页面: - -```bash -hugo new offline/index.md -``` - -{{< /admonition >}} - -## 4 内容摘要 - -**FixIt** 主题使用内容摘要在主页中显示大致文章信息。Hugo 支持生成文章的摘要。 - -![文章摘要预览](summary.zh-cn.png "文章摘要预览") - -### 自动摘要拆分 - -默认情况下,Hugo 自动将内容的前 70 个单词作为摘要。 - -你可以通过在 [网站配置](../theme-documentation-basics#site-configuration) 中设置 `summaryLength` 来自定义摘要长度。 - -如果您要使用 [CJK]^(中文/日语/韩语) 语言创建内容,并且想使用 Hugo 的自动摘要拆分功能,请在 [网站配置](../theme-documentation-basics#site-configuration) 中将 `hasCJKLanguage` 设置为 `true`. - -### 手动摘要拆分 - -另外,你也可以添加 `` 摘要分割符来拆分文章生成摘要。 - -摘要分隔符之前的内容将用作该文章的摘要。 - -{{< admonition >}} -请小心输入`` ; 即全部为小写且没有空格。 -{{< /admonition >}} - -### 前置参数摘要 - -你可能希望摘要不是文章开头的文字。在这种情况下,你可以在文章前置参数的 `summary` 变量中设置单独的摘要。 - -### 使用文章描述作为摘要 - -你可能希望将文章前置参数中的 `description` 变量的内容作为摘要。 - -你仍然需要在文章开头添加 `` 摘要分割符。将摘要分隔符之前的内容保留为空。然后 **FixIt** 主题会将你的文章描述作为摘要。 - -### 摘要选择的优先级顺序 - -由于可以通过多种方式指定摘要,因此了解顺序很有用。如下: - -1. 如果文章中有 `` 摘要分隔符,但分隔符之前没有内容,则使用描述作为摘要。 -2. 如果文章中有 `` 摘要分隔符,则将按照手动摘要拆分的方法获得摘要。 -3. 如果文章前置参数中有摘要变量,那么将以该值作为摘要。 -4. 按照自动摘要拆分方法。 - -{{< admonition >}} -不建议在摘要内容中包含富文本块元素,这会导致渲染错误。例如代码块,图片,表格等。 -{{< /admonition >}} - -## 5 Markdown 基本语法 - -这部分内容在 [Markdown 基本语法页面](../basic-markdown-syntax/) 中介绍。 - -## 6 Markdown 扩展语法 {#extended-markdown-syntax} - -**FixIt** 主题提供了一些扩展的语法便于你撰写文章。 - -### Emoji 支持 - -这部分内容在 [Emoji 支持页面](../emoji-support/) 中介绍。 - -### 数学公式 - -**FixIt** 基于 [$ \KaTeX $](https://katex.org/) 提供数学公式的支持。 - -在你的 [网站配置](../theme-documentation-basics#site-configuration) 中的 `[params.math]` 下面设置属性 `enable = true`, -并在文章的前置参数中设置属性 `math: true`来启用数学公式的自动渲染。 - -{{< admonition tip >}} -有一份 [$ \KaTeX $ 中支持的 $ \TeX $ 函数](https://katex.org/docs/supported.html) 清单。 -{{< /admonition >}} - -#### 公式块 - -默认的公式块分割符是 `$$`/`$$` 和 `\\[`/`\\]`: - -```markdown -$$ c = \pm\sqrt{a^2 + b^2} $$ - -\\[ f(x)=\int_{-\infty}^{\infty} \hat{f}(\xi) e^{2 \pi i \xi x} d \xi \\] -``` - -呈现的输出效果如下: - -$$ c = \pm\sqrt{a^2 + b^2} $$ - -\\[ f(x)=\int_{-\infty}^{\infty} \hat{f}(\xi) e^{2 \pi i \xi x} d \xi \\] - -#### 行内公式 - -默认的行内公式分割符是 `$`/`$` 和 `\\(`/`\\)`: - -```markdown -$ c = \pm\sqrt{a^2 + b^2} $ 和 \\( f(x)=\int_{-\infty}^{\infty} \hat{f}(\xi) e^{2 \pi i \xi x} d \xi \\) -``` - -呈现的输出效果如下: - -$ c = \pm\sqrt{a^2 + b^2} $ 和 \\( f(x)=\int_{-\infty}^{\infty} \hat{f}(\xi) e^{2 \pi i \xi x} d \xi \\) - -{{< admonition tip >}} -你可以在 [网站配置](../theme-documentation-basics#site-configuration) 中自定义公式块和行内公式的分割符。 -{{< /admonition >}} - -#### Copy-tex - -**[Copy-tex](https://github.com/Khan/KaTeX/tree/master/contrib/copy-tex)** 是一个 **$ \KaTeX $** 的插件。 - -通过这个扩展,在选择并复制 $ \KaTeX $ 渲染的公式时,会将其 $ \LaTeX $ 源代码复制到剪贴板。 - -在你的 [网站配置](../theme-documentation-basics#site-configuration) 中的 `[params.math]` 下面设置属性 `copyTex = true` 来启用 Copy-tex. - -选择并复制上一节中渲染的公式,可以发现复制的内容为 LaTeX 源代码。 - -#### mhchem - -**[mhchem](https://github.com/Khan/KaTeX/tree/master/contrib/mhchem)** 是一个 **$ \KaTeX $** 的插件。 - -通过这个扩展,你可以在文章中轻松编写漂亮的化学方程式。 - -在你的 [网站配置](../theme-documentation-basics#site-configuration) 中的 `[params.math]` 下面设置属性 `mhchem = true` 来启用 mhchem. - -```markdown -$$ \ce{CO2 + C -> 2 CO} $$ - -$$ \ce{Hg^2+ ->[I-] HgI2 ->[I-] [Hg^{II}I4]^2-} $$ -``` - -呈现的输出效果如下: - -$$ \ce{CO2 + C -> 2 CO} $$ - -$$ \ce{Hg^2+ ->[I-] HgI2 ->[I-] [Hg^{II}I4]^2-} $$ - -### 字符注音或者注释 {#ruby} - -**FixIt** 主题支持一种 **字符注音或者注释** Markdown 扩展语法: - -```markdown -[Hugo]{?^}(一个开源的静态网站生成工具) -``` - -呈现的输出效果如下: - -[Hugo]^(一个开源的静态网站生成工具) - -### 分数 {#fraction} - -{{< version 0.2.0 >}} - -**FixIt** 主题支持一种 **分数** Markdown 扩展语法: - -```markdown -[浅色]{?/}[深色] - -[99]{?/}[100] -``` - -呈现的输出效果如下: - -[浅色]/[深色] - -[90]/[100] - -### Font Awesome {#fontawesome} - -**FixIt** 主题使用 [Font Awesome](https://fontawesome.com/) 作为图标库。 -你同样可以在文章中轻松使用这些图标。 - -从 [Font Awesome 网站](https://fontawesome.com/icons?d=gallery) 上获取所需的图标 `class`. - -```markdown -去露营啦!{?:}(fa-solid fa-campground fa-fw): 很快就回来。 - -真开心!{?:}(fa-regular fa-grin-tears): -``` - -呈现的输出效果如下: - -去露营啦!:(fa-solid fa-campground fa-fw): 很快就回来。 - -真开心!:(fa-regular fa-grin-tears): - -### 转义字符 {#escape-character} - -在某些特殊情况下 (编写这个主题文档时 :(fa-regular fa-grin-squint-tears):), -你的文章内容会与 Markdown 的基本或者扩展语法冲突,并且无法避免。 - -转义字符语法可以帮助你渲染出想要的内容: - -```markdown -{{??}X} -> X -``` - -例如,两个 `:` 会启用 emoji 语法。但有时候这不是你想要的结果。可以像这样使用转义字符语法: - -```markdown -{{??}:}joy: -``` - -呈现的输出效果如下: - -**{?:}joy{?:}** 而不是 **:joy:** - -{{< admonition tip >}} -这个方法可以间接解决一个还未解决的 **[Hugo 的 issue](https://github.com/gohugoio/hugo/issues/4978)**. -{{< /admonition >}} - -另一个例子是: - -```markdown -[link{{??}]}(#escape-character) -``` - -呈现的输出效果如下: - -**[link{?]}(#escape-character)** 而不是 **[link](#escape-character)**. - ---- - -{{< admonition quote "感谢" >}} -_本文档中 `v0.2.10` 版本之前的内容,感谢原作者 [Dillon](https://dillonzq.com) 编写修订。_ -{{< /admonition >}} \ No newline at end of file diff --git a/exampleSite/content/posts/theme-documentation-content/summary.png b/exampleSite/content/posts/theme-documentation-content/summary.png deleted file mode 100644 index a67c0153..00000000 Binary files a/exampleSite/content/posts/theme-documentation-content/summary.png and /dev/null differ diff --git a/exampleSite/content/posts/theme-documentation-content/summary.zh-cn.png b/exampleSite/content/posts/theme-documentation-content/summary.zh-cn.png deleted file mode 100644 index b1abd752..00000000 Binary files a/exampleSite/content/posts/theme-documentation-content/summary.zh-cn.png and /dev/null differ diff --git a/exampleSite/content/posts/theme-documentation-extended-shortcodes/featured-image-preview.jpg b/exampleSite/content/posts/theme-documentation-extended-shortcodes/featured-image-preview.jpg deleted file mode 100644 index d8274762..00000000 Binary files a/exampleSite/content/posts/theme-documentation-extended-shortcodes/featured-image-preview.jpg and /dev/null differ diff --git a/exampleSite/content/posts/theme-documentation-extended-shortcodes/featured-image.jpg b/exampleSite/content/posts/theme-documentation-extended-shortcodes/featured-image.jpg deleted file mode 100644 index 7cba1823..00000000 Binary files a/exampleSite/content/posts/theme-documentation-extended-shortcodes/featured-image.jpg and /dev/null differ diff --git a/exampleSite/content/posts/theme-documentation-extended-shortcodes/index.en.md b/exampleSite/content/posts/theme-documentation-extended-shortcodes/index.en.md deleted file mode 100644 index 52ba9a26..00000000 --- a/exampleSite/content/posts/theme-documentation-extended-shortcodes/index.en.md +++ /dev/null @@ -1,447 +0,0 @@ ---- -weight: 4 -title: "Theme Documentation - Extended Shortcodes" -date: 2021-12-19T16:15:22+08:00 -draft: false -author: "Lruihao" -authorLink: "https://lruihao.cn" -description: "FixIt theme provides multiple shortcodes on top of built-in ones in Hugo." -resources: -- name: "featured-image" - src: "featured-image.jpg" -- name: "featured-image-preview" - src: "featured-image-preview.jpg" - -tags: ["shortcodes"] -categories: ["documentation"] - -lightgallery: true - -menu: - main: - name: "Extended Shortcodes" - title: "FixIt theme provides multiple shortcodes on top of built-in ones in Hugo." - parent: "documentation" - pre: "" ---- - -**FixIt** theme provides multiple shortcodes on top of built-in ones in Hugo. - - - -## 1 style - -{{< version 0.2.0 changed >}} - -{{< admonition >}} -Hugo **extended** version is necessary for `style` shortcode. -{{< /admonition >}} - -`style` is a shortcode to insert custom style in your post. - -The `style` shortcode has two positional parameters. - -The **first** one is the custom style content, -which supports nesting syntax in [:(fa-brands fa-sass fa-fw): SASS](https://sass-lang.com/documentation/style-rules/declarations#nesting) -and `&` referring to this parent HTML element. - -And the **second** one is the tag name of the HTML element wrapping the content you want to change style, and whose default value is `div`. - -Example `style` input: - -```go-html-template -{{}} -This is a **right-aligned** paragraph. -{{}} -``` - -The rendered output looks like this: - -{{< style "text-align:right; strong{color:#00b1ff;}" >}} -This is a **right-aligned** paragraph. -{{< /style >}} - -## 2 link - -{{< version 0.2.0 >}} - -`link` shortcode is an alternative to [Markdown link syntax](../basic-markdown-syntax#links). `link` shortcode can provide some other features and can be used in code blocks. - -{{< version 0.2.10 >}} The complete usage of [local resource references](../theme-documentation-content#contents-organization) is supported. - -The `link` shortcode has the following named parameters: - -* **href** *[required]* (**first** positional parameter) - - Destination of the link. - -* **content** *[optional]* (**second** positional parameter) - - Content of the link, default value is the value of **href** parameter. - - *Markdown or HTML format is supported.* - -* **title** *[optional]* (**third** positional parameter) - - `title` attribute of the HTML `a` tag, which will be shown when hovering on the link. - -* **card** *[optional]* (**fourth** positional parameter) {{< version 0.2.12 >}} - - 是否显示为卡片式链接,默认值 `false`。 - -* **download** *[optional]* {{< version 0.2.12 >}} - - `optional` attribute of the HTML `a` tag. - -* **class** *[optional]* - - `class` attribute of the HTML `a` tag. - -* **rel** *[optional]* - - Additional `rel` attributes of the HTML `a` tag. - -* **external-icon** *[optional]* {{< version 0.2.14 >}} - - whether to add external Icon for external links automatically - -Example `link` input: - -```go-html-template -{{}} -Or -{{}} - -{{}} -Or -{{}} - -{{}} -Or -{{}} -``` - -The rendered output looks like this: - -* {{< link "https://assemble.io" >}} -* {{< link "mailto:contact@revolunet.com" >}} -* {{< link "https://assemble.io" Assemble >}} - -Example `link` input with a title: - -```go-html-template -{{}} -Or -{{}} -``` - -The rendered output looks like this (hover over the link, there should be a tooltip): - -{{< link "https://github.com/upstage/" Upstage "Visit Upstage!" >}} - -Example `link` input for card type: - -```go-html-template -{{}} -Or -{{}} -``` - -The rendered output looks like this: - -{{< link "https://github.com/Lruihao/FixIt" "FixIt Theme" "source of FixIt Theme" true >}} - -Example `link` input with download attribute: - -```go-html-template -{{}} - -{{}} -``` - -The rendered output looks like this: - -{{< link href="/music/Wavelength.mp3" content="Wavelength.mp3" title="Download Wavelength.mp3" download="Wavelength.mp3" >}} - -{{< link href="/music/Wavelength.mp3" content="Wavelength.mp3" title="Download Wavelength.mp3" download="Wavelength.mp3" card=true >}} - -## 3 image {#image} - -{{< version 0.2.0 changed >}} - -`image` shortcode is an alternative to [`figure` shortcode](../theme-documentation-built-in-shortcodes#figure). `image` shortcode can take full advantage of the dependent libraries of [lazysizes](https://github.com/aFarkas/lazysizes) and [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js). - -{{< version 0.2.10 >}} The complete usage of [local resource references](../theme-documentation-content#contents-organization) is supported. - -The `image` shortcode has the following named parameters: - -* **src** *[required]* (**first** positional parameter) - - URL of the image to be displayed. - -* **alt** *[optional]* (**second** positional parameter) - - Alternate text for the image if the image cannot be displayed, default value is the value of **src** parameter. - - *Markdown or HTML format is supported.* - -* **caption** *[optional]* (**third** positional parameter) - - Image caption. - - *Markdown or HTML format is supported.* - -* **title** *[optional]* - - Image title that will be shown when hovering on the image. - -* **class** *[optional]* - - `class` attribute of the HTML `figure` tag. - -* **src_s** *[optional]* - - URL of the image thumbnail, used for lightgallery, default value is the value of **src** parameter. - -* **src_l** *[optional]* - - URL of the HD image, used for lightgallery, default value is the value of **src** parameter. - -* **height** *[optional]* - - `height` attribute of the image. - -* **width** *[optional]* - - `width` attribute of the image. - -* **linked** *[optional]* - - Whether the image needs to be hyperlinked, default value is `true`. - -* **rel** *[optional]* - - Additional `rel` attributes of the HTML `a` tag, if **linked** parameter is set to `true`. - -Example `image` input: - -```go-html-template -{{}} -``` - -The rendered output looks like this: - -{{< image src="/images/lighthouse.jpg" caption="Lighthouse (`image`)" src_s="/images/lighthouse-small.jpg" src_l="/images/lighthouse-large.jpg" >}} - -## 4 admonition - -The `admonition` shortcode supports **12** types of banners to help you put notice in your page. - -*Markdown or HTML format in the content is supported.* - -{{< admonition >}} -A **note** banner -{{< /admonition >}} - -{{< admonition abstract >}} -An **abstract** banner -{{< /admonition >}} - -{{< admonition info >}} -A **info** banner -{{< /admonition >}} - -{{< admonition tip >}} -A **tip** banner -{{< /admonition >}} - -{{< admonition success >}} -A **success** banner -{{< /admonition >}} - -{{< admonition question >}} -A **question** banner -{{< /admonition >}} - -{{< admonition warning >}} -A **warning** banner -{{< /admonition >}} - -{{< admonition failure >}} -A **failure** banner -{{< /admonition >}} - -{{< admonition danger >}} -A **danger** banner -{{< /admonition >}} - -{{< admonition bug >}} -A **bug** banner -{{< /admonition >}} - -{{< admonition example >}} -An **example** banner -{{< /admonition >}} - -{{< admonition quote >}} -A **quote** banner -{{< /admonition >}} - -The `admonition` shortcode has the following named parameters: - -* **type** *[optional]* (**first** positional parameter) - - Type of the `admonition` banner, default value is `note`. - -* **title** *[optional]* (**second** positional parameter) - - Title of the `admonition` banner, default value is the value of **type** parameter. (markdown support) {{< version 0.2.14 changed >}} - -* **open** *[optional]* (**third** positional parameter) {{< version 0.2.0 changed >}} - - Whether the content will be expandable by default, default value is `true`. - -Example `admonition` input: - -```go-html-template -{{}} -A **tip** banner -{{}} -Or -{{}} -A **tip** banner -{{}} -``` - -The rendered output looks like this: - -{{< admonition tip "This is a tip" false >}} -A **tip** banner -{{< /admonition >}} - -## 5 mermaid - -The `mermaid` shortcode supports diagrams in Hugo with [Mermaid](https://mermaidjs.github.io/) library. - -The full documentation is provided in [Extended Shortcode - mermaid](../extended-shortcode-mermaid/). - -## 6 echarts - -The `echarts` shortcode supports data visualization in Hugo with [ECharts](https://echarts.apache.org/) library. - -The full documentation is provided in [Extended Shortcode - echarts](../extended-shortcode-echarts/). - -## 7 mapbox - -The `mapbox` shortcode supports interactive maps in Hugo with [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js) library. - -The full documentation is provided in [Extended Shortcode - mapbox](../extended-shortcode-mapbox/). - -## 8 music - -The `music` shortcode embeds a responsive music player based on [APlayer](https://github.com/MoePlayer/APlayer) and [MetingJS](https://github.com/metowolf/MetingJS) library. - -The full documentation is provided in [Extended Shortcode - music](../extended-shortcode-music/). - -## 9 bilibili - -The `bilibili` shortcode embeds a responsive video player for bilibili videos. - -The full documentation is provided in [Extended Shortcode - bilibili](../extended-shortcode-bilibili/). - -## 10 typeit - -The `typeit` shortcode provides typing animation based on [TypeIt](https://typeitjs.com/). - -The full documentation is provided in [Extended Shortcode - typeit](../extended-shortcode-typeit/). - -## 11 script - -{{< version 0.2.8 >}} - -`script` is a shortcode to insert custom **:(fa-brands fa-js fa-fw): Javascript** in your post. - -{{< admonition >}} -The script content can be guaranteed to be executed in order after all third-party libraries are loaded. So you are free to use third-party libraries. -{{< /admonition >}} - -Example `script` input: - -```go-html-template -{{}} -console.log('Hello FixIt!'); -{{}} -``` - -You can see the output in the console of the developer tool. - -{{< script >}} -console.log('Hello FixIt!'); -{{< /script >}} - -## 12 details - -{{< version 0.2.13 >}} {{< version 0.2.14 changed >}} - -`details` is a shortcode to insert **:(fa-brands fa-html5 fa-fw): HTML5 tag** details and summary in your post. - -The `details` shortcode has only one parameter: - -- **summary** *[optional]* (**first** positional parameter) - - summary of details. (markdown support) - -Example `details` input: - -```go-html-template -{{}} -*All pages and graphics on this web site are the property of FixIt.* -{{}} -Or -{{}} -*All pages and graphics on this web site are the property of FixIt.* -{{}} -``` - -The rendered output looks like this: - -{{< details "**Copyright** 2022." >}} -*All pages and graphics on this web site are the property of FixIt.* -{{< /details >}} - -## 13 center-quote - -{{< version 0.2.13 >}} {{< version 0.2.14 changed >}} - -`center-quote` is a shortcode to insert centered text blockquote tag in your post. - -Example `center-quote` input: - -```go-html-template -{{%/* center-quote */%}} -**hello** *world* -this is a center-quote shortcode example. -{{%/* /center-quote */%}} -``` - -The rendered output looks like this: - -{{% center-quote %}} -**hello** *world* -this is a center-quote shortcode example. -{{% /center-quote %}} - - -## 14 fixit-encryptor - -{{< version 0.2.15 >}} - -You can use `fixit-encryptor` shortcode to encrypt partial content. - -The full documentation is provided in [Theme Documentation - Content Encryption](../theme-documentation-content-encryption/#partial-encryption). - ---- - -{{< admonition quote "Thanks" >}} -_Thanks to the original author [Dillon](https://dillonzq.com) for preparing and revising the content before version `v0.2.10` in this documentation._ -{{< /admonition >}} \ No newline at end of file diff --git a/exampleSite/content/posts/theme-documentation-extended-shortcodes/index.zh-cn.md b/exampleSite/content/posts/theme-documentation-extended-shortcodes/index.zh-cn.md deleted file mode 100644 index 6280e926..00000000 --- a/exampleSite/content/posts/theme-documentation-extended-shortcodes/index.zh-cn.md +++ /dev/null @@ -1,445 +0,0 @@ ---- -weight: 4 -title: "主题文档 - 扩展 Shortcodes" -date: 2021-12-19T16:15:22+08:00 -draft: false -author: "Lruihao" -authorLink: "https://lruihao.cn" -description: "FixIt 主题在 Hugo 内置的 shortcode 的基础上提供多个扩展的 shortcode" -resources: -- name: "featured-image" - src: "featured-image.jpg" -- name: "featured-image-preview" - src: "featured-image-preview.jpg" - -tags: ["shortcodes"] -categories: ["documentation"] - -lightgallery: true - -menu: - main: - title: "FixIt 主题在 Hugo 内置的 shortcode 的基础上提供多个扩展的 shortcode" - parent: "documentation" - pre: "" ---- - -**FixIt** 主题在 Hugo 内置的 shortcode 的基础上提供多个扩展的 shortcode. - - - -## 1 style - -{{< version 0.2.0 changed >}} - -{{< admonition >}} -Hugo **extended** 版本对于 `style` shortcode 是必需的。 -{{< /admonition >}} - -`style` shortcode 用来在你的文章中插入自定义样式。 - -`style` shortcode 有两个位置参数。 - -第一个参数是自定义样式的内容。它支持 [:(fa-brands fa-sass fa-fw): SASS](https://sass-lang.com/documentation/style-rules/declarations#nesting) 中的嵌套语法, -并且 `&` 指代这个父元素。 - -第二个参数是包裹你要更改样式的内容的 HTML 标签,默认值是 `div`。 - -一个 `style` 示例: - -```go-html-template -{{}} -This is a **right-aligned** paragraph. -{{}} -``` - -呈现的输出效果如下: - -{{< style "text-align:right; strong{color:#00b1ff;}" >}} -This is a **right-aligned** paragraph. -{{< /style >}} - -## 2 link - -{{< version 0.2.0 >}} - -`link` shortcode 是 [Markdown 链接语法](../basic-markdown-syntax#links) 的替代。 -`link` shortcode 可以提供一些其它的功能并且可以在代码块中使用。 - -{{< version 0.2.10 >}} 支持 [本地资源引用](../theme-documentation-content#contents-organization) 的完整用法。 - -`link` shortcode 有以下命名参数: - -* **href** *[必需]*(**第一个**位置参数) - - 链接的目标。 - -* **content** *[可选]*(**第二个**位置参数) - - 链接的内容,默认值是 **href** 参数的值。 - - *支持 Markdown 或者 HTML 格式。* - -* **title** *[可选]*(**第三个**位置参数) - - HTML `a` 标签 的 `title` 属性,当悬停在链接上会显示的提示。 - -* **card** *[可选]*(**第四个**位置参数){{< version 0.2.12 >}} - - 是否显示为卡片式链接,默认值 `false`。 - -* **download** *[可选]* {{< version 0.2.12 >}} - - HTML `a` 标签 的 `download` 属性。 - -* **class** *[可选]* - - HTML `a` 标签 的 `class` 属性。 - -* **rel** *[可选]* - - HTML `a` 标签 的 `rel` 补充属性。 - -* **external-icon** *[可选]* {{< version 0.2.14 >}} - - 是否自动显示外链图标 - -一个 `link` 示例: - -```go-html-template -{{}} -或者 -{{}} - -{{}} -或者 -{{}} - -{{}} -或者 -{{}} -``` - -呈现的输出效果如下: - -* {{< link "https://assemble.io" >}} -* {{< link "mailto:contact@revolunet.com" >}} -* {{< link "https://assemble.io" Assemble >}} - -一个带有标题的 `link` 示例: - -```go-html-template -{{}} -或者 -{{}} -``` - -呈现的输出效果如下 (将鼠标悬停在链接上,会有一行提示): - -{{< link "https://github.com/upstage/" Upstage "Visit Upstage!" >}} - -一个卡片式 `link` 示例: - -```go-html-template -{{}} -或者 -{{}} -``` - -呈现的输出效果如下: - -{{< link "https://github.com/Lruihao/FixIt" "FixIt Theme" "source of FixIt Theme" true >}} - -一个可下载的 `link` 示例: - -```go-html-template -{{}} - -{{}} -``` - -呈现的输出效果如下: - -{{< link href="/music/Wavelength.mp3" content="Wavelength.mp3" title="Download Wavelength.mp3" download="Wavelength.mp3" >}} - -{{< link href="/music/Wavelength.mp3" content="Wavelength.mp3" title="Download Wavelength.mp3" download="Wavelength.mp3" card=true >}} - -## 3 image {#image} - -{{< version 0.2.0 changed >}} - -`image` shortcode 是 [`figure` shortcode](../theme-documentation-built-in-shortcodes#figure) 的替代。`image` shortcode 可以充分利用 [lazysizes](https://github.com/aFarkas/lazysizes) 和 [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js) 两个依赖库。 - -{{< version 0.2.10 >}} 支持 [本地资源引用](../theme-documentation-content#contents-organization) 的完整用法。 - -`image` shortcode 有以下命名参数: - -* **src** *[必需]*(**第一个**位置参数) - - 图片的 URL. - -* **alt** *[可选]*(**第二个**位置参数) - - 图片无法显示时的替代文本,默认值是 **src** 参数的值。 - - *支持 Markdown 或者 HTML 格式。* - -* **caption** *[可选]*(**第三个**位置参数) - - 图片标题。 - - *支持 Markdown 或者 HTML 格式。* - -* **title** *[可选]* - - 当悬停在图片上会显示的提示。 - -* **class** *[可选]* - - HTML `figure` 标签的 `class` 属性。 - -* **src_s** *[可选]* - - 图片缩略图的 URL, 用在画廊模式中,默认值是 **src** 参数的值。 - -* **src_l** *[可选]* - - 高清图片的 URL, 用在画廊模式中,默认值是 **src** 参数的值。 - -* **height** *[可选]* - - 图片的 `height` 属性。 - -* **width** *[可选]* - - 图片的 `width` 属性。 - -* **linked** *[可选]* - - 图片是否需要被链接,默认值是 `true`。 - -* **rel** *[可选]* - - HTML `a` 标签 的 `rel` 补充属性,仅在 **linked** 属性设置成 `true` 时有效。 - -一个 `image` 示例: - -```go-html-template -{{}} -``` - -呈现的输出效果如下: - -{{< image src="/images/lighthouse.jpg" caption="Lighthouse (`image`)" src_s="/images/lighthouse-small.jpg" src_l="/images/lighthouse-large.jpg" >}} - -## 4 admonition - -`admonition` shortcode 支持 **12** 种 帮助你在页面中插入提示的横幅。 - -*支持 Markdown 或者 HTML 格式。* - -{{< admonition >}} -一个 **注意** 横幅 -{{< /admonition >}} - -{{< admonition abstract >}} -一个 **摘要** 横幅 -{{< /admonition >}} - -{{< admonition info >}} -一个 **信息** 横幅 -{{< /admonition >}} - -{{< admonition tip >}} -一个 **技巧** 横幅 -{{< /admonition >}} - -{{< admonition success >}} -一个 **成功** 横幅 -{{< /admonition >}} - -{{< admonition question >}} -一个 **问题** 横幅 -{{< /admonition >}} - -{{< admonition warning >}} -一个 **警告** 横幅 -{{< /admonition >}} - -{{< admonition failure >}} -一个 **失败** 横幅 -{{< /admonition >}} - -{{< admonition danger >}} -一个 **危险** 横幅 -{{< /admonition >}} - -{{< admonition bug >}} -一个 **Bug** 横幅 -{{< /admonition >}} - -{{< admonition example >}} -一个 **示例** 横幅 -{{< /admonition >}} - -{{< admonition quote >}} -一个 **引用** 横幅 -{{< /admonition >}} - -`admonition` shortcode 有以下命名参数: - -* **type** *[必需]*(**第一个**位置参数) - - `admonition` 横幅的类型,默认值是 `note`。 - -* **title** *[可选]*(**第二个**位置参数) - - `admonition` 横幅的标题,默认值是 **type** 参数的值。(支持 markdown){{< version 0.2.14 changed >}} - -* **open** *[可选]*(**第三个**位置参数) {{< version 0.2.0 changed >}} - - 横幅内容是否默认展开,默认值是 `true`。 - -一个 `admonition` 示例: - -```go-html-template -{{}} -一个 **技巧** 横幅 -{{}} -或者 -{{}} -一个 **技巧** 横幅 -{{}} -``` - -呈现的输出效果如下: - -{{< admonition tip "This is a tip" false >}} -一个 **技巧** 横幅 -{{< /admonition >}} - -## 5 mermaid - -`mermaid` shortcode 使用 [Mermaid](https://mermaidjs.github.io/) 库提供绘制图表和流程图的功能。 - -完整文档请查看页面 [扩展 Shortcode - mermaid](../extended-shortcode-mermaid/)。 - -## 6 echarts - -`echarts` shortcode 使用 [ECharts](https://echarts.apache.org/) 库提供数据可视化的功能。 - -完整文档请查看页面 [扩展 Shortcode - echarts](../extended-shortcode-echarts/)。 - -## 7 mapbox - -`mapbox` shortcode 使用 [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js) 库提供互动式地图的功能。 - -完整文档请查看页面 [扩展 Shortcode - mapbox](../extended-shortcode-mapbox/)。 - -## 8 music - -`music` shortcode 基于 [APlayer](https://github.com/MoePlayer/APlayer) 和 [MetingJS](https://github.com/metowolf/MetingJS) 库提供了一个内嵌的响应式音乐播放器。 - -完整文档请查看页面 [扩展 Shortcode - music](../extended-shortcode-music/)。 - -## 9 bilibili - -`bilibili` shortcode 提供了一个内嵌的用来播放 bilibili 视频的响应式播放器。 - -完整文档请查看页面 [扩展 Shortcode - bilibili](../extended-shortcode-bilibili/)。 - -## 10 typeit - -`typeit` shortcode 基于 [TypeIt](https://typeitjs.com/) 提供了打字动画。 - -完整文档请查看页面 [扩展 Shortcode - typeit](../extended-shortcode-typeit/)。 - -## 11 script - -{{< version 0.2.8 >}} - -`script` shortcode 用来在你的文章中插入 **:(fa-brands fa-js fa-fw): Javascript** 脚本。 - -{{< admonition >}} -脚本内容可以保证在所有的第三方库加载之后按顺序执行。 -所以你可以自由地使用第三方库。 -{{< /admonition >}} - -一个 `script` 示例: - -```go-html-template -{{}} -console.log('Hello FixIt!'); -{{}} -``` - -你可以在开发者工具的控制台中看到输出。 - -{{< script >}} -console.log('Hello FixIt!'); -{{< /script >}} - -## 12 details - -{{< version 0.2.13 >}} {{< version 0.2.14 changed >}} - -`details` shortcode 用来在你的文章中插入 **:(fa-brands fa-html5 fa-fw): HTML5 标签** details 和 summary。 - -`details` shortcode 只有一个参数: -- **summary** *[可选]* (**第一个**位置参数) - - summary 标签的内容(支持 markdown) - -一个 `details` 示例: - -```go-html-template -{{}} -*All pages and graphics on this web site are the property of FixIt.* -{{}} -或者 -{{}} -*All pages and graphics on this web site are the property of FixIt.* -{{}} -``` - -呈现的输出效果如下: - -{{< details "**Copyright** 2022." >}} -*All pages and graphics on this web site are the property of FixIt.* -{{< /details >}} - -## 13 center-quote - -{{< version 0.2.13 >}} {{< version 0.2.14 changed >}} - -`center-quote` shortcode 用来在你的文章中插入文本居中的 blockquote 标签。 - -一个 `center-quote` 示例: - -```go-html-template -{{%/* center-quote */%}} -**hello** *world* -this is a center-quote shortcode example. -{{%/* /center-quote */%}} -``` - -呈现的输出效果如下: - -{{% center-quote %}} -**hello** *world* -this is a center-quote shortcode example. -{{% /center-quote %}} - -## 14 fixit-encryptor - -{{< version 0.2.15 >}} - -您可以使用 `fixit-encryptor` shortcode 来加密部分内容。 - -完整文档请查看页面 [主题文档 - 内容加密](../theme-documentation-content-encryption/#partial-encryption)。 - ---- - -{{< admonition quote "感谢" >}} -_本文档中 `v0.2.10` 版本之前的内容,感谢原作者 [Dillon](https://dillonzq.com) 编写修订。_ -{{< /admonition >}} \ No newline at end of file diff --git a/exampleSite/content/tags/configuration/_index.zh-cn.md b/exampleSite/content/tags/configuration/_index.zh-cn.md deleted file mode 100644 index 83cf3d53..00000000 --- a/exampleSite/content/tags/configuration/_index.zh-cn.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -title: "配置" ---- diff --git a/exampleSite/content/tags/content/_index.zh-cn.md b/exampleSite/content/tags/content/_index.zh-cn.md deleted file mode 100644 index 80b3bf9b..00000000 --- a/exampleSite/content/tags/content/_index.zh-cn.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -title: "内容" ---- diff --git a/exampleSite/content/tags/encryption/_index.zh-cn.md b/exampleSite/content/tags/encryption/_index.zh-cn.md deleted file mode 100644 index 7f02d8df..00000000 --- a/exampleSite/content/tags/encryption/_index.zh-cn.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -title: "加密" ---- diff --git a/exampleSite/content/tags/installation/_index.zh-cn.md b/exampleSite/content/tags/installation/_index.zh-cn.md deleted file mode 100644 index 74bb1b6b..00000000 --- a/exampleSite/content/tags/installation/_index.zh-cn.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -title: "安装" ---- diff --git a/exampleSite/content/tags/print/_index.zh-cn.md b/exampleSite/content/tags/print/_index.zh-cn.md deleted file mode 100644 index ebb3f1be..00000000 --- a/exampleSite/content/tags/print/_index.zh-cn.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -title: "打印" ---- diff --git a/exampleSite/content/tags/test/_index.zh-cn.md b/exampleSite/content/tags/test/_index.zh-cn.md deleted file mode 100644 index bde973bc..00000000 --- a/exampleSite/content/tags/test/_index.zh-cn.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -title: "测试" ---- diff --git a/exampleSite/content/tests/_index.en.md b/exampleSite/content/tests/_index.en.md deleted file mode 100644 index 448fa9b4..00000000 --- a/exampleSite/content/tests/_index.en.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -title: Tests ---- \ No newline at end of file diff --git a/exampleSite/content/tests/_index.zh-cn.md b/exampleSite/content/tests/_index.zh-cn.md deleted file mode 100644 index dbb29c5d..00000000 --- a/exampleSite/content/tests/_index.zh-cn.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -title: 测试 ---- \ No newline at end of file diff --git a/exampleSite/content/tests/encryption/index.en.md b/exampleSite/content/tests/encryption/index.en.md deleted file mode 100644 index 15ced925..00000000 --- a/exampleSite/content/tests/encryption/index.en.md +++ /dev/null @@ -1,275 +0,0 @@ ---- -title: "Encrypt Test" -date: 2022-05-21T22:31:22+08:00 -description: "Test for encrypting content" -type: 'posts' -draft: true -password: 1212 -message: Password is 1212 - -lightgallery: true - -math: - enable: true - -twemoji: true - -tags: -- Test -- Encryption -categories: -- Test - -hiddenFromHomePage: true - -menu: - main: - title: "Test for encrypting content" - parent: "tests" - pre: "" ---- - -I was shy, so I hid. - - - -![Hugo Theme FixIt](/images/Apple-Devices-Preview.png "Hugo Theme FixIt") - -## Encrypted Content - -### twemoji - -Coffee ☕ - -Gone camping! :tent: Be back soon. - -That is so funny! :joy: - -### ruby -[Hugo]^(An open-source static site generator) - -### math -$$ \ce{CO2 + C -> 2 CO} $$ - -$$ \ce{Hg^2+ ->[I-] HgI2 ->[I-] [Hg^{II}I4]^2-} $$ - -## Shortcodes in Encrypted Content - -### 1 style - -{{< style "text-align:right; strong{color:#00b1ff;}" >}} -This is a **right-aligned** paragraph. -{{< /style >}} - -### 2 link - -{{< link "https://github.com/upstage/" Upstage "Visit Upstage!" >}} - -{{< link "https://github.com/Lruihao/FixIt" "FixIt Theme" "source of FixIt Theme" true >}} - -{{< link href="/music/Wavelength.mp3" content="Wavelength.mp3" title="Download Wavelength.mp3" download="Wavelength.mp3" >}} - -{{< link href="/music/Wavelength.mp3" content="Wavelength.mp3" title="Download Wavelength.mp3" download="Wavelength.mp3" card=true >}} - -### 3 image - -{{< image src="/images/lighthouse.jpg" caption="Lighthouse (`image`)" src_s="/images/lighthouse-small.jpg" src_l="/images/lighthouse-large.jpg" >}} - -### 4 admonition - -{{< admonition tip "This is a tip" false >}} -A **tip** banner -{{< /admonition >}} - -### 5 mermaid - -{{< mermaid >}} -graph LR; - A[Hard edge] -->|Link text| B(Round edge) - B --> C{Decision} - C -->|One| D[Result one] - C -->|Two| E[Result two] -{{< /mermaid >}} - -### 6 echarts - -{{< echarts >}} -title: - text: Summary Line Chart - top: 2% - left: center -tooltip: - trigger: axis -legend: - data: - - Email Marketing - - Affiliate Advertising - - Video Advertising - - Direct View - - Search Engine - top: 10% -grid: - left: 5% - right: 5% - bottom: 5% - top: 20% - containLabel: true -toolbox: - feature: - saveAsImage: - title: Save as Image -xAxis: - type: category - boundaryGap: false - data: - - Monday - - Tuesday - - Wednesday - - Thursday - - Friday - - Saturday - - Sunday -yAxis: - type: value -series: - - name: Email Marketing - type: line - stack: Total - data: - - 120 - - 132 - - 101 - - 134 - - 90 - - 230 - - 210 - - name: Affiliate Advertising - type: line - stack: Total - data: - - 220 - - 182 - - 191 - - 234 - - 290 - - 330 - - 310 - - name: Video Advertising - type: line - stack: Total - data: - - 150 - - 232 - - 201 - - 154 - - 190 - - 330 - - 410 - - name: Direct View - type: line - stack: Total - data: - - 320 - - 332 - - 301 - - 334 - - 390 - - 330 - - 320 - - name: Search Engine - type: line - stack: Total - data: - - 820 - - 932 - - 901 - - 934 - - 1290 - - 1330 - - 1320 -{{< /echarts >}} - -### 7 mapbox - -{{< mapbox 113.953277 22.559102 11 >}} - -### 8 music - -{{< music url="/music/Wavelength.mp3" name=Wavelength artist=oldmanyoung cover="/images/Wavelength.jpg" >}} - -### 9 bilibili - -{{< bilibili BV1Sx411T7QQ >}} - -### 10 typeit - -{{< typeit code=javascript >}} -console.log('before decrypting'); - -document.addEventListener('DOMContentLoaded', () => { - fixit.decryptor.addEventListener('decrypted', function() { - console.log('after decrypting') - }) -}); -{{< /typeit >}} - -### 11 script - -```go-html-template -{{}} -console.log('before decrypting'); - -document.addEventListener('DOMContentLoaded', () => { - fixit.theme.decryptor.addEventListener('decrypted', function() { - console.log('after decrypting') - }) -}); -{{}} -``` - -You can see the output in the console of the developer tool. - -{{< script >}} -console.log('before decrypting'); - -document.addEventListener('DOMContentLoaded', () => { - fixit.decryptor.addEventListener('decrypted', function() { - console.log('after decrypting') - }) -}); -{{< /script >}} - -### 12 details - -{{< details "**Copyright** 2022." >}} -*All pages and graphics on this web site are the property of FixIt.* -{{< /details >}} - -### 13 center-quote - -{{% center-quote %}} -**hello** *world* -this is a center-quote shortcode example. -{{% /center-quote %}} - - -### fixit-encryptor - -All the following shortcodes passwords are `1212`. - -{{% fixit-encryptor "1212" %}} -This is a `fixit-encryptor` shortcode example. -{{% /fixit-encryptor %}} - -{{% fixit-encryptor "1212" %}} - -**hello** -{{% fixit-encryptor "1212" %}} -*world* - -{{< admonition >}} -The `fixit-encryptor` shortcode was supported in version {{}}. -{{< /admonition >}} -{{% /fixit-encryptor %}} - -{{% /fixit-encryptor %}} \ No newline at end of file diff --git a/exampleSite/content/tests/encryption/index.zh-cn.md b/exampleSite/content/tests/encryption/index.zh-cn.md deleted file mode 100644 index b313dc33..00000000 --- a/exampleSite/content/tests/encryption/index.zh-cn.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: "文章加密测试" -date: 2022-05-28T00:24:22+08:00 -description: "文章加密测试" -type: 'posts' -draft: true -password: 1212 -message: 密码是 1212 - -lightgallery: true - -math: - enable: true - -tags: -- Test -- Encryption -categories: -- Test - -hiddenFromHomePage: true - -menu: - main: - title: "文章加密测试" - parent: "tests" - pre: "" ---- - -我很害羞,所以我藏起来了哈哈。 - - - -## 内容加密解密测试 - -### emoji - -咖啡 ☕ - -去露营啦!:tent: 很快就回来。 - -真开心!:joy: - -### 盘古之白(中文排版) - -``` -當你凝視著bug,bug也凝視著你 - -不能信任那些Terminal或Editor用白底的人 -``` - -當你凝視著bug,bug也凝視著你 - -不能信任那些Terminal或Editor用白底的人 diff --git a/exampleSite/content/tests/fontawesome/index.en.md b/exampleSite/content/tests/fontawesome/index.en.md deleted file mode 100644 index 5c736847..00000000 --- a/exampleSite/content/tests/fontawesome/index.en.md +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: "Font Awesome Test" -date: 2022-04-19T10:15:22+08:00 -description: "Test for rendering Font Awesome icons" -type: 'posts' -draft: true - -tags: -- Test -- content -- Font Awesome -categories: -- Test - -hiddenFromHomePage: true - -menu: - main: - title: "Test for rendering Font Awesome icons" - parent: "tests" - pre: "" ---- - -## Size - -:(fa-solid fa-camera fa-xs): -:(fa-solid fa-camera fa-sm): -:(fa-solid fa-camera fa-lg): -:(fa-solid fa-camera fa-2x): -:(fa-solid fa-camera fa-3x): -:(fa-solid fa-camera fa-5x): -:(fa-solid fa-camera fa-7x): -:(fa-solid fa-camera fa-10x): - -## Fixed width - -:(fa-solid fa-skating fa-fw fa-2x): Skating -:(fa-solid fa-skiing fa-fw fa-2x): Skiing -:(fa-solid fa-skiing-nordic fa-fw fa-2x): Nordic Skiing - -## List icon - -:(fa-regular fa-check-square): Eat a hamburger -:(fa-regular fa-square): Get a girlfriend - -:(fa-regular fa-check-circle): Go to beach -:(fa-regular fa-circle): Go to Tibet - -## Rotate - -:(fa-solid fa-snowboarding): -:(fa-solid fa-snowboarding fa-rotate-90): -:(fa-solid fa-snowboarding fa-rotate-180): -:(fa-solid fa-snowboarding fa-rotate-270): - -## Flip - -:(fa-solid fa-snowboarding): -:(fa-solid fa-snowboarding fa-flip-horizontal): -:(fa-solid fa-snowboarding fa-flip-vertical): -:(fa-solid fa-snowboarding fa-flip-both): - - -## Animation - -:(fa-solid fa-spinner): -:(fa-solid fa-spinner fa-spin): -:(fa-solid fa-spinner fa-pulse): -:(fa-solid fa-circle-notch fa-spin): -:(fa-solid fa-circle-notch fa-pulse): -:(fa-solid fa-sync fa-spin): -:(fa-solid fa-sync fa-pulse): -:(fa-solid fa-cog fa-spin): -:(fa-solid fa-cog fa-pulse): - - -## Float - -:(fa-solid fa-quote-left fa-pull-left): - -
hey guys!
- -:(fa-solid fa-quote-right fa-pull-right): - -## Border - -:(fa-brands fa-apple fa-border fa-fw fa-10x): \ No newline at end of file diff --git a/exampleSite/content/tests/highlight/index.en.md b/exampleSite/content/tests/highlight/index.en.md deleted file mode 100644 index f6988249..00000000 --- a/exampleSite/content/tests/highlight/index.en.md +++ /dev/null @@ -1,179 +0,0 @@ ---- -title: "Highlight Test" -date: 2022-02-27T18:45:22+08:00 -description: "Test for code highlight feature" -type: 'posts' -draft: true - -tags: -- Test -- content -- highlight -categories: -- Test - -hiddenFromHomePage: true - -menu: - main: - title: "Test for code highlight feature" - parent: "tests" - pre: "" ---- - -`inline code` -```markdown -1. first -2. second - -> bq - -**blod** *italic* - ---- -+++ -*** -``` - -```java -/** - * @author John Smith - */ -package l2f.gameserver.model; - -public abstract strictfp class L2Char extends L2Object { - public static final Short ERROR = 0x0001; - - public void moveTo(int x, int y, int z) { - _ai = null; - log("Should not be called"); - if (1 > 5) { // wtf!? - return; - } - } -} - -``` - -```go -package main - -import "fmt" - -func main() { - ch := make(chan float64) - ch <- 1.0e10 // magic number - x, ok := <- ch - defer fmt.Println(`exitting now\`) - go println(len("hello world!")) - return -} -``` - -```scss -pre { - margin: 0; - padding: .25rem 0 .25rem .5rem; - overflow: auto; - @include tab-size(4); - - background: $code-background-color; - - [theme=dark] & { - background: $code-background-color-dark; - } - - code { - padding: 0; - } - - img { - min-height: 1em; - max-height: 1.2em; - vertical-align: text-bottom; - } -} -``` - -```diff -- theme = "LoveIt" -+ theme = "FixIt" -! enhancements and fixes -``` - -```javascript -function $initHighlight(block, cls) { - try { - if (cls.search(/\bno\-highlight\b/) != -1) - return process(block, true, 0x0F) + - ` class="${cls}"`; - } catch (e) { - /* handle exception */ - } - for (var i = 0 / 2; i < classes.length; i++) { - if (checkCondition(classes[i]) === undefined) - console.log('undefined'); - } - - return ( -
- {block} -
- ) -} - -export $initHighlight; -``` - -```html - -Title - - - - - - -

Title

- - -``` - -```yaml -# - nickname: 标题 -# avatar: 头像 -# url: 站点 -# description: 描述 -- nickname: Lruihao - avatar: https://gravatar.loli.net/avatar/3f985efb5907ca52944a3cd7edd51606?d=wavatar&v=1.3.10 - url: https://lruihao.cn - description: 不怕萬人阻擋,只怕自己投降 -``` - -```html -

Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus. Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad.

-``` - -

Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus. Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad.

- -{{< highlight javascript "linenos=table,hl_lines=6-9,linenostart=287" >}} -/** - * 把字符串的文件後綴轉成數組 - * @param {String} str 待轉化字符串 - * @returns {Array|null} 轉化后的數組 - */ -var _str2Array = (str) => { - if (typeof (str) !== String && !Array.isArray(str)) { - return null; - } - if (!Array.isArray(str)) { - return str.split(','); - } -}; -{{< /highlight >}} - ---- - -{{< gist spf13 7896402 >}} diff --git a/exampleSite/content/tests/markdown/index.zh-cn.md b/exampleSite/content/tests/markdown/index.zh-cn.md deleted file mode 100644 index 8dafa8ca..00000000 --- a/exampleSite/content/tests/markdown/index.zh-cn.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: "Markdown 测试" -date: 2022-04-20T17:50:22+08:00 -description: "Test for Markdown rendering" -type: 'posts' -draft: true - -tags: -- Test -- content -- Markdown -categories: -- Test - -hiddenFromHomePage: true - -menu: - main: - title: "Test for Markdown rendering" - parent: "tests" - pre: "" ---- - -## line break -`FixIt is a clean, elegant but advanced blog theme for Hugo developed by Lruihao. It is based on the original LoveIt Theme, LeaveIt Theme and KeepIt Theme.` - -`FixIt 是一个由 Lruihao 开发的简洁、优雅且高效的 Hugo 博客主题。它的原型基于 LoveIt 主题,LeaveIt 主题 和 KeepIt 主题。` - -## table - -| 表达式 | 说明 | -| :----------------------- | :------------------------------------------------------------ | -| `0 0/5 * * * ?` | 每隔 5 分钟执行一次 | -| `10 0/5 * * * ?` | 每隔 5 分钟执行一次,每次执行都在分钟开始的 10 秒,例如 10:00:10、10:05:10 等等。 | -| `0 30 10-13 ? * WED,FRI` | 每周三和每周五的 10:30、11:30、12:30、13:30 执行。 | -| `0 0/30 8-9 5,20 * ?` | 每个月的 5 号和 20 号的 8 点和 10 点之间每隔 30 分钟执行一次,也就是 8:00、8:30、9:00 和 9:30。 | -| `0 15 10 ? * *` | 每天上午 10:15 执行任务 | -| `0 15 10 * * ?` | 每天上午 10:15 执行任务 | -| `0 0 12 * * ?` | 每天中午 12:00 执行任务 | -| `0 0 10,14,16 * * ?` | 每天上午 10:00 点、下午 14:00 以及下午 16:00 执行任务 | -| `0 0/30 9-17 * * ?` | 每天上午 09:00 到下午 17:00 时间段内每隔半小时执行任务 | -| `0 * 14 * * ?` | 每天下午 14:00 到下午 14:59 时间段内每隔 1 分钟执行任务 | -| `0 0-5 14 * * ?` | 每天下午 14:00 到下午 14:05 时间段内每隔 1 分钟执行任务 | -| `0 0/5 14 * * ?` | 每天下午 14:00 到下午 14:55 时间段内每隔 5 分钟执行任务 | -| `0 0/5 14,18 * * ?` | 每天下午 14:00 到下午 14:55、下午 18:00 到下午 18:55 时间段内每隔 5 分钟执行任务 | -| `0 0 12 ? * WED` | 每个星期三中午 12:00 执行任务 | -| `0 15 10 15 * ?` | 每月 15 日上午 10:15 执行任务 | -| `0 15 10 L * ?` | 每月最后一日上午 10:15 执行任务 | -| `0 15 10 ? * 6L` | 每月最后一个星期六上午 10:15 执行任务 | -| `0 15 10 ? * 6#3` | 每月第三个星期六上午 10:15 执行任务 | -| `0 10,44 14 ? 3 WED` | 每年 3 月的每个星期三下午 14:10 和 14:44 执行任务 | \ No newline at end of file diff --git a/exampleSite/content/tests/print-article/index.zh-cn.md b/exampleSite/content/tests/print-article/index.zh-cn.md deleted file mode 100644 index 84dc25f7..00000000 --- a/exampleSite/content/tests/print-article/index.zh-cn.md +++ /dev/null @@ -1,430 +0,0 @@ ---- -title: "重新认识 JavaScript" -subtitle: "学习 JavaScript 新特性" -date: 2022-05-01T10:59:36+08:00 -description: "这是一篇测试 FixIt 主题在打印视图表现的测试文章" -type: 'posts' -draft: true - -tags: -- Test -- print -- JavaScript -- ES6 -categories: -- Test - -hiddenFromHomePage: true - -code: - maxShownLines: 30 - -menu: - main: - name: "打印测试" - title: "这是一篇测试 FixIt 主题在打印视图表现的测试文章" - parent: "tests" - pre: "" ---- - - - -{{< admonition tip "前言" >}} - -前端框架轮替变化越来越快,JavaScript 也在不断地升级迭代,越来越多的新特性让我们的代码写起来变得简洁有趣。 - -每隔一段时间就该重新认识一下 JS,这篇文章会介绍 6 种新特性,一起研究一下吧。 - -{{< /admonition >}} - - - -## 数组方法 some, every, find, filter - -> 共同点:这几个方法都不会改变原始数组。 - -**[some](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/some)** - -`some()` 方法测试数组中是不是至少有 1 个元素通过了被提供的函数测试,它返回一个布尔值。 - -数组中有至少一个元素通过回调函数的测试就会返回 `true`,所有元素都没有通过回调函数的测试返回值才会为 `false`。 - -``` -arr.some(callback(element[, index[, array]])[, thisArg]) -``` - -```js -[2, 5, 8, 1, 4].some(x => x > 10); // false -[12, 5, 8, 1, 4].some(x => x > 10); // true -``` - -{{< admonition tip >}} - -`some()` 不会对空数组进行检测,空数组返回 `false` - -{{< /admonition >}} - -**[every](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/every)** - -> 助记:`every()` 和 `some()` 功能相反 - -`every()` 方法测试一个数组内的所有元素是否都能通过某个指定函数的测试,它返回一个布尔值。 - - - -*在这个位置使用 `page-break-before` 进行了强制分页* - - -
- -如果回调函数的每一次返回都为 [truthy](https://developer.mozilla.org/zh-CN/docs/Glossary/Truthy) 值,返回 `true` ,否则返回 `false`。 - -``` -arr.every(callback(element[, index[, array]])[, thisArg]) -``` - -```js -[12, 5, 8, 130, 44].every(x => x >= 10); // false -[12, 54, 18, 130, 44].every(x => x >= 10); // true -``` - -{{< admonition tip >}} - -`every()` 不会对空数组进行检测,空数组返回 `true` - -{{< /admonition >}} - -**[Find](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/find)** - -> 助记:功能和 `some()` 类似,`some()` 返回布尔值,`find()` 返回**找到**的元素 - - `find()` 方法返回数组中满足提供的测试函数的第一个元素的值,否则返回 [`undefined`](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/undefined)。 - -``` -arr.find(callback[, thisArg]) -``` - -```js -const array1 = [5, 12, 8, 130, 44]; - -const found = array1.find(element => element > 10); - -console.log(found); -// expected output: 12 -``` - -{{< admonition quote >}} - -另请参见 [`findIndex()`](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex) 方法,它返回数组中找到的元素的索引,而不是其值。 - -如果你需要找到一个元素的位置或者一个元素是否存在于数组中,使用 [`Array.prototype.indexOf()`](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf) 或 [`Array.prototype.includes()`](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/includes)。 - -{{< /admonition >}} - -**[filter](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)** - -> 助记:如字面意思,它是一个筛子,会筛选出满足条件的元素 - -`filter()` 方法创建一个新数组,其包含通过所提供函数实现的测试的所有元素。 - - - -*在这个位置使用 `page-break-after` 进行了强制分页* - - -
- -返回值是一个新的、由通过测试的元素组成的数组,如果没有任何数组元素通过测试,则返回空数组。 - -``` -var newArray = arr.filter(callback(element[, index[, array]])[, thisArg]) -``` - -```js -const words = ['spray', 'limit', 'elite', 'exuberant', 'destruction', 'present']; - -const result = words.filter(word => word.length > 6); - -console.log(result); -// expected output: Array ["exuberant", "destruction", "present"] -``` - -## 使用 `Object.hasOwn` 替代 `in` 操作符 - -有时,我们想知道对象上是否存在某个属性,一般会使用 `in` 操作符或 `obj.hasOwnProperty`,但它们都有各自的缺陷。 - -**in** - -如果指定的属性位于对象或其原型链中,`in` 运算符将返回 `true`。 - -```javascript -const Person = function (age) { - this.age = age -} -Person.prototype.name = 'fatfish' - -const p1 = new Person(24) -console.log('age' in p1) // true -console.log('name' in p1) // true 注意这里 -``` - -**obj.hasOwnProperty** - -`hasOwnProperty` 方法会返回一个布尔值,表示对象**自身属性**中是否具有对应的值(原型链上的属性不会读取)。 - -```javascript -const Person = function (age) { - this.age = age -} -Person.prototype.name = 'fatfish' - -const p1 = new Person(24) -console.log(p1.hasOwnProperty('age')) // true -console.log(p1.hasOwnProperty('name')) // fasle 注意这里 -``` - - - -*在这个位置使用 `page-break-after` 进行了强制分页* - - -
- -`obj.hasOwnProperty` 已经可以过滤掉原型链上的属性,但在某些情况下,它还是不安全。 - -```javascript -Object.create(null).hasOwnProperty('name') -// Uncaught TypeError: Object.create(...).hasOwnProperty is not a function -``` - -**Object.hasOwn** - -别急,我们可以使用 `Object.hasOwn` 来避免这两个问题,这比 `obj.hasOwnProperty` 方法更加方便、安全。 - -```javascript -let object = { age: 24 } -Object.hasOwn(object, 'age') // true - -let object3 = Object.create(null) -Object.hasOwn(object3, 'age') // false -``` - -## 使用 "#" 声明私有属性 - -以前,我们一般用 `_` 表示私有属性,但它并不靠谱,还是会被外部修改。 - -```javascript -class Person { - constructor (name) { - this._money = 1 - this.name = name - } - get money () { - return this._money - } - set money (money) { - this._money = money - } - showMoney () { - console.log(this._money) - } -} -const p1 = new Person('fatfish') -console.log(p1.money) // 1 -console.log(p1._money) // 1 -p1._money = 2 // 依旧可以从外部修改_money 属性,所以这种做法并不安全 -console.log(p1.money) // 2 -console.log(p1._money) // 2 -``` - - - -*在这个位置使用 `page-break-after` 进行了强制分页* - - -
- -**使用 `#` 实现真正私有属性** - -```javascript -class Person { - #money=1 - constructor (name) { - this.name = name - } - get money () { - return this.#money - } - set money (money) { - this.#money = money - } - showMoney () { - console.log(this.#money) - } -} -const p1 = new Person('fatfish') -console.log(p1.money) // 1 -// p1.#money = 2 // 没法从外部直接修改 -p1.money = 2 -console.log(p1.money) // 2 -console.log(p1.#money) // Uncaught SyntaxError: Private field '#money' must be declared in an enclosing class -``` - -## 有用的数字分隔符 - -可以使用 `_` 分隔数字,当然也可以用于计算 - -```javascript -// ✅ 更加易于阅读 -const newSixBillion = 6000_000_000 -// ❌ 难以阅读 -const originSixBillion = 6000000000 - -console.log(newSixBillion === originSixBillion) -// expected output: true -``` - -```javascript -const sum = 1000 + 6000_000_000 -// expected output: 6000001000 -``` - -{{< admonition tip >}} - -另外,我们写时间时,`24*60*60*1000` 的可读性也是远大于 `86400000` 的。 - -{{< /admonition >}} - - - -*在这个位置使用 `page-break-after` 进行了强制分页* - - -
- -## "?.", "??", "??=" 的使用 - -**可选链 ?.** - -以前我们为了简化 `if else`,通常会写出这样的代码 - -```js -const obj = null -console.log(obj && obj.name) - -const $title = document.querySelector('.title') -const title = $title ? title.innerText : undefined -``` - -使用 `?.` 简化 `&&` 和三元运算符 - -```js -const obj = null -console.log(obj?.name) - -const $title = document.querySelector('.title') -const title = $title?.innerText -``` - -**空值合并运算符 ??** - -之前给变量赋默认值时,我们一般会用 `||` 来写,比如 - -```js -let foo = 1 -let bar = foo || 2 -console.log(bar) // 1 - -let foo = 0 -let bar = foo || 2 -console.log(bar) // 2 注意这里 -``` - -所以,`||` 有时候并不是很安全,所以我们不得不加判断 - -```js -let foo = 0 -let bar = foo !== undefined ? foo : 2 -console.log(bar) // 0 -``` - - - -*在这个位置使用 `page-break-after` 进行了强制分页* - - -
- -现在使用 `??` 可以使代码更加优雅 - -```js -let foo = 1 -let bar = foo ?? 2 -console.log(bar) // 1 - -let foo = 0 -let bar = foo ?? 2 -console.log(bar) // 0 -``` - -**空值赋值运算符 ??=** - -```js -let foo = 0 -foo ??= 2 -console.log(foo) // 0 - -let foo = 1 -foo ??= 2 -console.log(foo) // 1 -``` - -很好理解,这里的 `foo ??= 2` 等价于 `foo = foo ?? 2` - - - -*在这个位置使用 `page-break-after` 进行了强制分页* - - -
- -## 使用 BigInt 支持大数计算 - -JS 中超过 `Number.MAX_SAFE_INTEGER` 的数字计算将是不安全的。 - -**Example:** - -```javascript -Math.pow(2, 53) === Math.pow(2, 53) + 1 // true -// Math.pow(2, 53) => 9007199254740992 -// Math.pow(2, 53) + 1 => 9007199254740992 -``` - -使用 `BigInt` 完全可以避免这个问题 - -```javascript -BigInt(Math.pow(2, 53)) === BigInt(Math.pow(2, 53)) + BigInt(1) // false -// BigInt(Math.pow(2, 53)) => 9007199254740992n -// BigInt(Math.pow(2, 53)) + BigInt(1) => 9007199254740993n -``` - -要创建一个 BigInt,可以在一个整数的末尾添加字符`n`,或者调用函数 `BigInt()`。 - -```js -let foo = BigInt(1) // 1n -let bar = BigInt(2) // 2n -console.log(foo > bar) // false - -console.log(1n > 2n) // false -``` - -*学无止境,与未来的自己共勉* \ No newline at end of file diff --git a/exampleSite/content/tests/shortcodes/index.en.md b/exampleSite/content/tests/shortcodes/index.en.md deleted file mode 100644 index 67b9c1a0..00000000 --- a/exampleSite/content/tests/shortcodes/index.en.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: "Shortcodes Test" -date: 2022-03-07T22:31:22+08:00 -description: "Test for shortcodes usages" -type: 'posts' -draft: true - -tags: -- Test -- shortcodes -categories: -- Test - -hiddenFromHomePage: true - -menu: - main: - title: "Test for shortcodes usages" - parent: "tests" - pre: "" ---- - -normal content - -> normal blockquote content - -## Shortcodes without Markdown - -{{< center-quote >}} -**hello** *world* -this is a center-quote shortcode example. -{{< /center-quote >}} - -## Shortcodes with Markdown - -{{% center-quote %}} -**hello** *world* -this is a center-quote shortcode example. -{{% /center-quote %}} - -{{< details "**Copyright** 2022. [Lruihao](https://lruihao.cn/)" >}} -*All pages and graphics on this web site are the property of [FixIt](/).* -{{< /details >}} - -{{< admonition type=tip title="*This is a tip*" open=false >}} -A **tip** banner -{{< /admonition >}} - -## Shortcodes with raw string parameters - -{{< details `Copyright 2022. Lruihao` >}} -*All pages and graphics on this web site are the property of [FixIt](/).* -{{< /details >}} - -## Nested Shortcodes - -{{< version 0.2.0 changed >}} {{< link "https://katex.org/" KaTeX >}} mathematical formulas (https://katex.org) - -``` -{{< version 0.2.0 changed >}} {{< link "https://katex.org/" KaTeX >}} mathematical formulas (https://katex.org) -``` diff --git a/exampleSite/data/friends.yml b/exampleSite/data/friends.yml deleted file mode 100644 index a42c45d9..00000000 --- a/exampleSite/data/friends.yml +++ /dev/null @@ -1,20 +0,0 @@ -# Friend/Site info of one 朋友/站点信息例子 -# - nickname: friend's name 朋友名字 -# avatar: friend's avatar 朋友头像 -# url: site link 站点链接 -# description: description of friend/site 对朋友或其站点的说明 - -- nickname: Lruihao - avatar: https://lruihao.cn/images/avatar.jpg - url: https://lruihao.cn - description: Share programming experience and learning experience. - -- nickname: hiifong - avatar: https://52at.ml/images/avatar.jpg - url: https://52at.ml - description: hiifong's blog,share anything!!! - -- nickname: new site - avatar: - url: https://github.com/Lruihao/FixIt/pulls - description: Create a pull request to add a new site. diff --git a/exampleSite/static/_redirects b/exampleSite/static/_redirects deleted file mode 100644 index 46b08555..00000000 --- a/exampleSite/static/_redirects +++ /dev/null @@ -1 +0,0 @@ -/zh-cn/* /zh-cn/404.html 404 \ No newline at end of file diff --git a/exampleSite/static/android-chrome-192x192.png b/exampleSite/static/android-chrome-192x192.png deleted file mode 100644 index 87ba30b8..00000000 Binary files a/exampleSite/static/android-chrome-192x192.png and /dev/null differ diff --git a/exampleSite/static/android-chrome-512x512.png b/exampleSite/static/android-chrome-512x512.png deleted file mode 100644 index 3e52be3b..00000000 Binary files a/exampleSite/static/android-chrome-512x512.png and /dev/null differ diff --git a/exampleSite/static/apple-touch-icon.png b/exampleSite/static/apple-touch-icon.png deleted file mode 100644 index 26f95ea8..00000000 Binary files a/exampleSite/static/apple-touch-icon.png and /dev/null differ diff --git a/exampleSite/static/browserconfig.xml b/exampleSite/static/browserconfig.xml deleted file mode 100644 index a47e5a5b..00000000 --- a/exampleSite/static/browserconfig.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - #2d89ef - - - diff --git a/exampleSite/static/favicon-16x16.png b/exampleSite/static/favicon-16x16.png deleted file mode 100644 index 0594fcf0..00000000 Binary files a/exampleSite/static/favicon-16x16.png and /dev/null differ diff --git a/exampleSite/static/favicon-32x32.png b/exampleSite/static/favicon-32x32.png deleted file mode 100644 index 1d3f09af..00000000 Binary files a/exampleSite/static/favicon-32x32.png and /dev/null differ diff --git a/exampleSite/static/favicon.ico b/exampleSite/static/favicon.ico deleted file mode 100644 index 52540216..00000000 Binary files a/exampleSite/static/favicon.ico and /dev/null differ diff --git a/exampleSite/static/mstile-150x150.png b/exampleSite/static/mstile-150x150.png deleted file mode 100644 index 0332bbea..00000000 Binary files a/exampleSite/static/mstile-150x150.png and /dev/null differ diff --git a/exampleSite/static/safari-pinned-tab.svg b/exampleSite/static/safari-pinned-tab.svg deleted file mode 100644 index 05faebc3..00000000 --- a/exampleSite/static/safari-pinned-tab.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - -Created by potrace 1.11, written by Peter Selinger 2001-2013 - - - - - diff --git a/exampleSite/static/site.webmanifest b/exampleSite/static/site.webmanifest deleted file mode 100644 index 36f8486b..00000000 --- a/exampleSite/static/site.webmanifest +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "FixIt Theme Documentation", - "short_name": "FixIt Docs", - "start_url": "/", - "description": "A Clean, Elegant but Advanced Hugo Theme", - "theme_color": "#ffffff", - "background_color": "#ffffff", - "display": "standalone", - "icons": [ - { - "src": "/apple-touch-icon.png", - "sizes": "180x180", - "type": "image/png", - "purpose": "any maskable" - }, - { - "src": "/android-chrome-192x192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "/android-chrome-512x512.png", - "sizes": "512x512", - "type": "image/png" - } - ] -} diff --git a/package.json b/package.json index 0ed94543..04ce9ee0 100644 --- a/package.json +++ b/package.json @@ -19,10 +19,10 @@ "scripts": { "preinstall": "npx npm-force-resolutions", "babel": "npx babel src/js/theme.js --out-file assets/js/theme.min.js --source-maps --no-comments && npx babel src/js/service-worker.js --out-file static/service-worker.min.js --source-maps --no-comments", - "build": "npm run babel && hugo -v --source=exampleSite --themesDir ../.. --gc --minify", + "build": "npm run babel && hugo -v --source=docs --gc --minify", "build-lunr-segmentit": "browserify src/lib/lunr.segmentit.js -o assets/lib/lunr/lunr.segmentit.js -t babelify --presets @babel/preset-env --presets minify", - "server": "hugo server --source=exampleSite --themesDir ../.. -D --disableFastRender --navigateToChanged --ignoreCache", - "server:production": "hugo server --source=exampleSite --themesDir ../.. -D --disableFastRender --navigateToChanged --ignoreCache -e production", + "server": "hugo server --source=docs -D --disableFastRender --navigateToChanged --ignoreCache", + "server:production": "hugo server --source=docs -D --disableFastRender --navigateToChanged --ignoreCache -e production", "start": "npm run babel && npm run server", "start:production": "npm run babel && npm run server:production", "algolia": "atomic-algolia"