diff options
author | Dillon <dillonzq@outlook.com> | 2020-05-13 14:29:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-13 14:29:37 +0300 |
commit | 39159a9a6d374396229d418ccabb45dbec49f1f6 (patch) | |
tree | 90489b014fc5b7ddd35f48f9332d94e90cf424c7 /exampleSite | |
parent | 762a7e538d291e0ede8ca4d64b2fcf12ec5d8e9c (diff) |
feat(CDN): replace CDN config with CDN data file (#353)
Diffstat (limited to 'exampleSite')
4 files changed, 85 insertions, 277 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index f590e6d..2301fa7 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -876,12 +876,16 @@ enableEmoji = true highlight = true enableQQ = false serverURLs = "" - # emoji config file name, default is "google.yml" + # emoji data file name, default is "google.yml" # ("apple.yml", "google.yml", "facebook.yml", "twitter.yml") - # located in "assets/data/emoji/" directory, where you can put your config file - # emoji 配置文件名称, 默认是 "facebook.yml" + # located in "themes/LoveIt/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") - # 位于 "assets/data/emoji/" 目录, 你可以在此存放你自己的配置文件 + # 位于 "themes/LoveIt/assets/data/emoji/" 目录 + # 可以在你的项目下相同路径存放你自己的数据文件: + # "assets/data/emoji/" emoji = "" # Facebook comment config (https://developers.facebook.com/docs/plugins/comments) # Facebook 评论系统设置 (https://developers.facebook.com/docs/plugins/comments) @@ -982,70 +986,20 @@ enableEmoji = true # 自行托管追踪器时的主机路径 server = "" - # CSS and JS Files CDN - # CSS 和 JS 文件的 CDN 设置 + # CDN config for third-party library files + # 第三方库文件的 CDN 设置 [params.cdn] - # normalize.css@8.0.1 https://github.com/necolas/normalize.css - normalizeCSS = "" - # fontawesome-free@5.13.0 https://fontawesome.com/ - fontawesomeFreeCSS = "" - # simple-icons@2.9.0 https://github.com/simple-icons/simple-icons - # ("https://cdn.jsdelivr.net/npm/simple-icons@v2/icons/") - simpleIconsPrefix = "" - # animate.css@3.7.2 https://github.com/daneden/animate.css - animateCSS = "" - # smooth-scroll@16.1.3 https://github.com/cferdinandi/smooth-scroll - smoothScrollJS = "" - # autocomplete.js@0.37.1 https://github.com/algolia/autocomplete.js - autocompleteJS = "" - # lunr.js@2.3.8 https://lunrjs.com/ - lunrJS = "" - # algoliasearch@4.2.0 https://github.com/algolia/algoliasearch-client-javascript - algoliasearchJS = "" - # lazysizes@5.2.0 https://github.com/aFarkas/lazysizes - lazysizesJS = "" - # object-fit-images@3.2.4 https://github.com/fregante/object-fit-images - objectFitImagesJS = "" - # twemoji@12.1.5 https://github.com/twitter/twemoji - twemojiJS = "" - # lightgallery.js@1.1.3 https://github.com/sachinchoolur/lightgallery.js - # lg-thumbnail.js@1.1.0 https://github.com/sachinchoolur/lg-thumbnail.js - # lg-zoom.js@1.0.1 https://github.com/sachinchoolur/lg-zoom.js - lightgalleryCSS = "" - lightgalleryJS = "" - lightgalleryThumbnailJS = "" - lightgalleryZoomJS = "" - # clipboard.js@2.0.6 https://github.com/zenorocha/clipboard.js - clipboardJS = "" - # sharer.js@0.4.0 https://github.com/ellisonleao/sharer.js - sharerJS = "" - # typeit@7.0.4 https://github.com/alexmacarthur/typeit - typeitJS = "" - # katex@0.11.1 https://katex.org/ - katexCSS = "" - katexJS = "" - katexAutoRenderJS = "" - katexCopyTexCSS = "" - katexCopyTexJS = "" - katexMhchemJS = "" - # mermaid@8.5.0 https://github.com/knsv/mermaid - mermaidJS = "" - # echarts@4.7.0 https://echarts.apache.org/ - echartsJS = "" - echartsMacaronsJS = "" - # mapbox-gl@1.10.0 https://docs.mapbox.com/mapbox-gl-js - mapboxGLCSS = "" - mapboxGLJS = "" - # aplayer@1.10.1 https://github.com/MoePlayer/APlayer - aplayerCSS = "" - aplayerJS = "" - # meting@2.0.1 https://github.com/metowolf/MetingJS - metingJS = "" - # gitalk@1.6.2 https://github.com/gitalk/gitalk - gitalkCSS = "" - gitalkJS = "" - # valine@1.4.14 https://valine.js.org/ - valineJS = "" + # CDN data file name, disabled by default + # ("jsdelivr.yml") + # located in "themes/LoveIt/assets/data/cdn/" directory + # you can store your own data files in the same path under your project: + # "assets/data/cdn/" + # CDN 数据文件名称, 默认不启用 + # ("jsdelivr.yml") + # 位于 "themes/LoveIt/assets/data/cdn/" 目录 + # 可以在你的项目下相同路径存放你自己的数据文件: + # "assets/data/cdn/" + data = "jsdelivr.yml" # Markup related configuration in Hugo # Hugo 解析文档的配置 diff --git a/exampleSite/content/posts/theme-documentation-basics/index.en.md b/exampleSite/content/posts/theme-documentation-basics/index.en.md index 04eea63..be36c32 100644 --- a/exampleSite/content/posts/theme-documentation-basics/index.en.md +++ b/exampleSite/content/posts/theme-documentation-basics/index.en.md @@ -516,9 +516,11 @@ Please open the code block below to view the complete sample configuration :(far highlight = true enableQQ = false serverURLs = "" - # {{< version 0.2.6 >}} emoji config file name, default is "facebook.yml" + # {{< version 0.2.6 >}} emoji data file name, default is "google.yml" # ("apple.yml", "google.yml", "facebook.yml", "twitter.yml") - # located in "assets/data/emoji/" directory, where you can put your config file + # located in "themes/LoveIt/assets/data/emoji/" directory + # you can store your own data files in the same path under your project: + # "assets/data/emoji/" emoji = "" # {{< link "https://developers.facebook.com/docs/plugins/comments" "Facebook comment" >}} config [params.page.comment.facebook] @@ -602,69 +604,14 @@ Please open the code block below to view the complete sample configuration :(far # server url for your tracker if you're self hosting server = "" - # CSS and JS Files CDN config + # {{< version 0.2.7 changed >}} CDN config for third-party library files [params.cdn] - # {{< version 0.2.0 >}} {{< link "https://github.com/necolas/normalize.css" "normalize.css" >}}@8.0.1 - normalizeCSS = "" - # {{< link "https://fontawesome.com/" "fontawesome-free" >}}@5.13.0 - fontawesomeFreeCSS = "" - # {{< version 0.2.0 >}} {{< link "https://github.com/simple-icons/simple-icons" "simple-icons" >}}@2.9.0 - # ("https://cdn.jsdelivr.net/npm/simple-icons@v2/icons/") - simpleIconsPrefix = "" - # animate.css@3.7.2 https://github.com/daneden/animate.css - animateCSS = "" - # {{< link "https://github.com/cferdinandi/smooth-scroll" "smooth-scroll" >}}@16.1.3 - smoothScrollJS = "" - # {{< version 0.2.0 >}} {{< link "https://github.com/algolia/autocomplete.js" "autocomplete.js" >}}@0.37.1 - autocompleteJS = "" - # {{< version 0.2.0 >}} {{< link "https://lunrjs.com/" "lunr.js" >}}@2.3.8 - lunrJS = "" - # {{< version 0.2.0 >}} {{< link "https://github.com/algolia/algoliasearch-client-javascript" "algoliasearch" >}}@4.2.0 - algoliasearchJS = "" - # {{< link "https://github.com/aFarkas/lazysizes" "lazysizes" >}}@5.2.0 - lazysizesJS = "" - # {{< version 0.2.3 >}} {{< link "https://github.com/fregante/object-fit-images" "object-fit-images" >}}@3.2.4 - objectFitImagesJS = "" - # {{< version 0.2.0 >}} {{< link "https://github.com/twitter/twemoji" "twemoji" >}}@12.1.5 - twemojiJS = "" - # {{< link "https://github.com/sachinchoolur/lightgallery.js" "lightgallery.js" >}}@1.1.3 - # {{< link "https://github.com/sachinchoolur/lg-thumbnail.js" "lg-thumbnail.js" >}}@1.1.0 - # {{< link "https://github.com/sachinchoolur/lg-zoom.js" "lg-zoom.js" >}}@1.0.1 - lightgalleryCSS = "" - lightgalleryJS = "" - lightgalleryThumbnailJS = "" - lightgalleryZoomJS = "" - # {{< version 0.2.0 >}} {{< link "https://github.com/zenorocha/clipboard.js" "clipboard.js" >}}@2.0.6 - clipboardJS = "" - # {{< link "https://github.com/ellisonleao/sharer.js" "sharer.js" >}}@0.4.0 - sharerJS = "" - # {{< link "https://github.com/alexmacarthur/typeit" "typeit" >}}@7.0.4 - typeitJS = "" - # {{< link "https://github.com/KaTeX/KaTeX" "katex" >}}@0.11.1 - katexCSS = "" - katexJS = "" - katexAutoRenderJS = "" - katexCopyTexCSS = "" - katexCopyTexJS = "" - katexMhchemJS = "" - # {{< link "https://github.com/knsv/mermaid" "mermaid" >}}@8.5.0 - mermaidJS = "" - # {{< link "https://echarts.apache.org/" "echarts" >}}@4.7.0 - echartsJS = "" - echartsMacaronsJS = "" - # {{< version 0.2.0 >}} {{< link "https://docs.mapbox.com/mapbox-gl-js" mapbox-gl >}}@1.10.0 - mapboxGLCSS = "" - mapboxGLJS = "" - # {{< link "https://github.com/MoePlayer/APlayer" "aplayer" >}}@1.10.1 - aplayerCSS = "" - aplayerJS = "" - # {{< link "https://github.com/metowolf/MetingJS" "meting" >}}@2.0.1 - metingJS = "" - # {{< link "https://github.com/gitalk/gitalk" "gitalk" >}}@1.6.2 - gitalkCSS = "" - gitalkJS = "" - # {{< link "https://valine.js.org/" "valine" >}}@1.4.14 - valineJS = "" + # CDN data file name, disabled by default + # ("jsdelivr.yml") + # located in "themes/LoveIt/assets/data/cdn/" directory + # you can store your own data files in the same path under your project: + # "assets/data/cdn/" + data = "" # Markup related config in Hugo [markup] @@ -757,13 +704,17 @@ You could enable these features with `hugo serve -e production`. {{< /admonition >}} {{< admonition tip "Tips about CDN Configuration" >}} -Full HTML tags or URLs are supported for CDN configuration: +{{< version 0.2.7 changed >}} ```toml -smoothScrollJS = '<script src="https://cdn.jsdelivr.net/npm/smooth-scroll@16.1.3/dist/smooth-scroll.min.js" integrity="sha256-vP+F+14A1ogChQs5Osd5LJl/ci9TbzjiZjjEbcqOXrY=" crossorigin="anonymous"></script>' -# Or -smoothScrollJS = 'https://cdn.jsdelivr.net/npm/smooth-scroll@16/dist/smooth-scroll.min.js' -``` +[params.cdn] + # CDN data file name, disabled by default + # ("jsdelivr.yml") + data = "" +```` + +The default CDN data file is located in `themes/LoveIt/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" >}} @@ -793,7 +744,7 @@ Or You can set more options through a dict: title = "Mastodon" ``` -The default configuration of all supported social links is located in `themes/LoveIt/assets/data/social.yaml`, +The default data of all supported social links is located in `themes/LoveIt/assets/data/social.yaml`, which is you can refer to. {{< /admonition >}} diff --git a/exampleSite/content/posts/theme-documentation-basics/index.fr.md b/exampleSite/content/posts/theme-documentation-basics/index.fr.md index 27b3175..7537ee5 100644 --- a/exampleSite/content/posts/theme-documentation-basics/index.fr.md +++ b/exampleSite/content/posts/theme-documentation-basics/index.fr.md @@ -521,9 +521,11 @@ Please open the code block below to view the complete sample configuration :(far highlight = true enableQQ = false serverURLs = "" - # {{< version 0.2.6 >}} emoji config file name, default is "facebook.yml" + # {{< version 0.2.6 >}} emoji data file name, default is "google.yml" # ("apple.yml", "google.yml", "facebook.yml", "twitter.yml") - # located in "assets/data/emoji/" directory, where you can put your config file + # located in "themes/LoveIt/assets/data/emoji/" directory + # you can store your own data files in the same path under your project: + # "assets/data/emoji/" emoji = "" # {{< link "https://developers.facebook.com/docs/plugins/comments" "Facebook comment" >}} config [params.page.comment.facebook] @@ -607,69 +609,14 @@ Please open the code block below to view the complete sample configuration :(far # server url for your tracker if you're self hosting server = "" - # CSS and JS Files CDN config + # {{< version 0.2.7 changed >}} CDN config for third-party library files [params.cdn] - # {{< version 0.2.0 >}} {{< link "https://github.com/necolas/normalize.css" "normalize.css" >}}@8.0.1 - normalizeCSS = "" - # {{< link "https://fontawesome.com/" "fontawesome-free" >}}@5.13.0 - fontawesomeFreeCSS = "" - # {{< version 0.2.0 >}} {{< link "https://github.com/simple-icons/simple-icons" "simple-icons" >}}@2.9.0 - # ("https://cdn.jsdelivr.net/npm/simple-icons@v2/icons/") - simpleIconsPrefix = "" - # animate.css@3.7.2 https://github.com/daneden/animate.css - animateCSS = "" - # {{< link "https://github.com/cferdinandi/smooth-scroll" "smooth-scroll" >}}@16.1.3 - smoothScrollJS = "" - # {{< version 0.2.0 >}} {{< link "https://github.com/algolia/autocomplete.js" "autocomplete.js" >}}@0.37.1 - autocompleteJS = "" - # {{< version 0.2.0 >}} {{< link "https://lunrjs.com/" "lunr.js" >}}@2.3.8 - lunrJS = "" - # {{< version 0.2.0 >}} {{< link "https://github.com/algolia/algoliasearch-client-javascript" "algoliasearch" >}}@4.2.0 - algoliasearchJS = "" - # {{< link "https://github.com/aFarkas/lazysizes" "lazysizes" >}}@5.2.0 - lazysizesJS = "" - # {{< version 0.2.3 >}} {{< link "https://github.com/fregante/object-fit-images" "object-fit-images" >}}@3.2.4 - objectFitImagesJS = "" - # {{< version 0.2.0 >}} {{< link "https://github.com/twitter/twemoji" "twemoji" >}}@12.1.5 - twemojiJS = "" - # {{< link "https://github.com/sachinchoolur/lightgallery.js" "lightgallery.js" >}}@1.1.3 - # {{< link "https://github.com/sachinchoolur/lg-thumbnail.js" "lg-thumbnail.js" >}}@1.1.0 - # {{< link "https://github.com/sachinchoolur/lg-zoom.js" "lg-zoom.js" >}}@1.0.1 - lightgalleryCSS = "" - lightgalleryJS = "" - lightgalleryThumbnailJS = "" - lightgalleryZoomJS = "" - # {{< version 0.2.0 >}} {{< link "https://github.com/zenorocha/clipboard.js" "clipboard.js" >}}@2.0.6 - clipboardJS = "" - # {{< link "https://github.com/ellisonleao/sharer.js" "sharer.js" >}}@0.4.0 - sharerJS = "" - # {{< link "https://github.com/alexmacarthur/typeit" "typeit" >}}@7.0.4 - typeitJS = "" - # {{< link "https://github.com/KaTeX/KaTeX" "katex" >}}@0.11.1 - katexCSS = "" - katexJS = "" - katexAutoRenderJS = "" - katexCopyTexCSS = "" - katexCopyTexJS = "" - katexMhchemJS = "" - # {{< link "https://github.com/knsv/mermaid" "mermaid" >}}@8.5.0 - mermaidJS = "" - # {{< link "https://echarts.apache.org/" "echarts" >}}@4.7.0 - echartsJS = "" - echartsMacaronsJS = "" - # {{< version 0.2.0 >}} {{< link "https://docs.mapbox.com/mapbox-gl-js" mapbox-gl >}}@1.10.0 - mapboxGLCSS = "" - mapboxGLJS = "" - # {{< link "https://github.com/MoePlayer/APlayer" "aplayer" >}}@1.10.1 - aplayerCSS = "" - aplayerJS = "" - # {{< link "https://github.com/metowolf/MetingJS" "meting" >}}@2.0.1 - metingJS = "" - # {{< link "https://github.com/gitalk/gitalk" "gitalk" >}}@1.6.2 - gitalkCSS = "" - gitalkJS = "" - # {{< link "https://valine.js.org/" "valine" >}}@1.4.14 - valineJS = "" + # CDN data file name, disabled by default + # ("jsdelivr.yml") + # located in "themes/LoveIt/assets/data/cdn/" directory + # you can store your own data files in the same path under your project: + # "assets/data/cdn/" + data = "" # Markup related config in Hugo [markup] @@ -762,13 +709,17 @@ You could enable these features with `hugo serve -e production`. {{< /admonition >}} {{< admonition tip "Tips about CDN Configuration" >}} -Full HTML tags or URLs are supported for CDN configuration: +{{< version 0.2.7 changed >}} ```toml -smoothScrollJS = '<script src="https://cdn.jsdelivr.net/npm/smooth-scroll@16.1.3/dist/smooth-scroll.min.js" integrity="sha256-vP+F+14A1ogChQs5Osd5LJl/ci9TbzjiZjjEbcqOXrY=" crossorigin="anonymous"></script>' -# Or -smoothScrollJS = 'https://cdn.jsdelivr.net/npm/smooth-scroll@16/dist/smooth-scroll.min.js' -``` +[params.cdn] + # CDN data file name, disabled by default + # ("jsdelivr.yml") + data = "" +```` + +The default CDN data file is located in `themes/LoveIt/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" >}} @@ -798,7 +749,7 @@ Or You can set more options through a dict: title = "Mastodon" ``` -The default configuration of all supported social links is located in `themes/LoveIt/assets/data/social.yaml`, +The default data of all supported social links is located in `themes/LoveIt/assets/data/social.yaml`, which is you can refer to. {{< /admonition >}} @@ -864,6 +815,7 @@ In `config/css/_custom.scss`, you can add some css style code to customize the s | Italian | `it` | `it` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): | | Spanish | `es` | `es` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): | | German | `de` | `de` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): | +| German | `de` | `de` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): | | Serbian | `sr` | `sr` | :(far fa-square fa-fw): | :(far fa-square fa-fw): | | Russian | `ru` | `ru` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): | | Romanian | `ro` | `ro` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): | diff --git a/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md b/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md index 98d7bc9..e24afc3 100644 --- a/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md +++ b/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md @@ -519,9 +519,11 @@ hugo highlight = true enableQQ = false serverURLs = "" - # {{< version 0.2.6 >}} emoji 配置文件名称, 默认是 "facebook.yml" + # {{< version 0.2.6 >}} emoji 数据文件名称, 默认是 "google.yml" # ("apple.yml", "google.yml", "facebook.yml", "twitter.yml") - # 位于 "assets/data/emoji/" 目录, 你可以在此存放你自己的配置文件 + # 位于 "themes/LoveIt/assets/data/emoji/" 目录 + # 可以在你的项目下相同路径存放你自己的数据文件: + # "assets/data/emoji/" emoji = "" # {{< link "https://developers.facebook.com/docs/plugins/comments" "Facebook 评论系统" >}}设置 [params.page.comment.facebook] @@ -605,69 +607,14 @@ hugo # 自行托管追踪器时的主机路径 server = "" - # CSS 和 JS 文件的 CDN 设置 + # {{< version 0.2.7 changed >}} 第三方库文件的 CDN 设置 [params.cdn] - # {{< version 0.2.0 >}} {{< link "https://github.com/necolas/normalize.css" "normalize.css" >}}@8.0.1 - normalizeCSS = "" - # {{< link "https://fontawesome.com/" "fontawesome-free" >}}@5.13.0 - fontawesomeFreeCSS = "" - # {{< version 0.2.0 >}} {{< link "https://github.com/simple-icons/simple-icons" "simple-icons" >}}@2.9.0 - # ("https://cdn.jsdelivr.net/npm/simple-icons@v2/icons/") - simpleIconsPrefix = "" - # animate.css@3.7.2 https://github.com/daneden/animate.css - animateCSS = "" - # {{< link "https://github.com/cferdinandi/smooth-scroll" "smooth-scroll" >}}@16.1.3 - smoothScrollJS = "" - # {{< version 0.2.0 >}} {{< link "https://github.com/algolia/autocomplete.js" "autocomplete.js" >}}@0.37.1 - autocompleteJS = "" - # {{< version 0.2.0 >}} {{< link "https://lunrjs.com/" "lunr.js" >}}@2.3.8 - lunrJS = "" - # {{< version 0.2.0 >}} {{< link "https://github.com/algolia/algoliasearch-client-javascript" "algoliasearch" >}}@4.2.0 - algoliasearchJS = "" - # {{< link "https://github.com/aFarkas/lazysizes" "lazysizes" >}}@5.2.0 - lazysizesJS = "" - # {{< version 0.2.3 >}} {{< link "https://github.com/fregante/object-fit-images" "object-fit-images" >}}@3.2.4 - objectFitImagesJS = "" - # {{< version 0.2.0 >}} {{< link "https://github.com/twitter/twemoji" "twemoji" >}}@12.1.5 - twemojiJS = "" - # {{< link "https://github.com/sachinchoolur/lightgallery.js" "lightgallery.js" >}}@1.1.3 - # {{< link "https://github.com/sachinchoolur/lg-thumbnail.js" "lg-thumbnail.js" >}}@1.1.0 - # {{< link "https://github.com/sachinchoolur/lg-zoom.js" "lg-zoom.js" >}}@1.0.1 - lightgalleryCSS = "" - lightgalleryJS = "" - lightgalleryThumbnailJS = "" - lightgalleryZoomJS = "" - # {{< version 0.2.0 >}} {{< link "https://github.com/zenorocha/clipboard.js" "clipboard.js" >}}@2.0.6 - clipboardJS = "" - # {{< link "https://github.com/ellisonleao/sharer.js" "sharer.js" >}}@0.4.0 - sharerJS = "" - # {{< link "https://github.com/alexmacarthur/typeit" "typeit" >}}@7.0.4 - typeitJS = "" - # {{< link "https://github.com/KaTeX/KaTeX" "katex" >}}@0.11.1 - katexCSS = "" - katexJS = "" - katexAutoRenderJS = "" - katexCopyTexCSS = "" - katexCopyTexJS = "" - katexMhchemJS = "" - # {{< link "https://github.com/knsv/mermaid" "mermaid" >}}@8.5.0 - mermaidJS = "" - # {{< link "https://echarts.apache.org/" "echarts" >}}@4.7.0 - echartsJS = "" - echartsMacaronsJS = "" - # {{< version 0.2.0 >}} {{< link "https://docs.mapbox.com/mapbox-gl-js" mapbox-gl >}}@1.10.0 - mapboxGLCSS = "" - mapboxGLJS = "" - # {{< link "https://github.com/MoePlayer/APlayer" "aplayer" >}}@1.10.1 - aplayerCSS = "" - aplayerJS = "" - # {{< link "https://github.com/metowolf/MetingJS" "meting" >}}@2.0.1 - metingJS = "" - # {{< link "https://github.com/gitalk/gitalk" "gitalk" >}}@1.6.2 - gitalkCSS = "" - gitalkJS = "" - # {{< link "https://valine.js.org/" "valine" >}}@1.4.14 - valineJS = "" + # CDN 数据文件名称, 默认不启用 + # ("jsdelivr.yml") + # 位于 "themes/LoveIt/assets/data/cdn/" 目录 + # 可以在你的项目下相同路径存放你自己的数据文件: + # "assets/data/cdn/" + data = "" # Hugo 解析文档的配置 [markup] @@ -761,13 +708,17 @@ hugo {{< /admonition >}} {{< admonition tip "关于 CDN 配置的技巧" >}} -在 CDN 的配置中, 完整的 HTML 标签和 URL 都是支持的: +{{< version 0.2.7 changed >}} ```toml -smoothScrollJS = '<script src="https://cdn.jsdelivr.net/npm/smooth-scroll@16.1.3/dist/smooth-scroll.min.js" integrity="sha256-vP+F+14A1ogChQs5Osd5LJl/ci9TbzjiZjjEbcqOXrY=" crossorigin="anonymous"></script>' -# 或者 -smoothScrollJS = 'https://cdn.jsdelivr.net/npm/smooth-scroll@16/dist/smooth-scroll.min.js' -``` +[params.cdn] + # CDN 数据文件名称, 默认不启用 + # ("jsdelivr.yml") + data = "" +```` + +默认的 CDN 数据文件位于 `themes/LoveIt/assets/data/cdn/` 目录. +可以在你的项目下相同路径存放你自己的数据文件: `assets/data/cdn/`. {{< /admonition >}} {{< admonition tip "关于社交链接配置的技巧" >}} @@ -797,7 +748,7 @@ smoothScrollJS = 'https://cdn.jsdelivr.net/npm/smooth-scroll@16/dist/smooth-scro title = "Mastodon" ``` -所有支持的社交链接的默认配置位于 `themes/LoveIt/assets/data/social.yaml`. +所有支持的社交链接的默认数据位于 `themes/LoveIt/assets/data/social.yaml`. 你可以参考它来配置你的社交链接. {{< /admonition >}} |