From 285eb0f5e27f97b8eeddff251204bbdeed17564d Mon Sep 17 00:00:00 2001 From: Wang Chucheng Date: Thu, 22 Apr 2021 00:14:22 +0800 Subject: feat: recursive repoEditURL BREAKING CHANGES: Param 'repoURL' in params.yaml is deprecated. --- data/eureka.yaml | 2 +- exampleSite/config/_default/params.yaml | 14 +++++++------- layouts/docs/doc_list.html | 2 +- layouts/partials/components/post-edit.html | 2 +- layouts/partials/head.html | 19 ++++++++++++------- layouts/partials/widgets/about.html | 2 +- package.json | 2 +- 7 files changed, 24 insertions(+), 19 deletions(-) diff --git a/data/eureka.yaml b/data/eureka.yaml index 0f115e9..fb0a5d7 100644 --- a/data/eureka.yaml +++ b/data/eureka.yaml @@ -1 +1 @@ -version: 0.7.1-dev \ No newline at end of file +version: 0.8.0 \ No newline at end of file diff --git a/exampleSite/config/_default/params.yaml b/exampleSite/config/_default/params.yaml index 16e5093..d7053c9 100644 --- a/exampleSite/config/_default/params.yaml +++ b/exampleSite/config/_default/params.yaml @@ -57,13 +57,13 @@ comment: # # If self-hosting, please enter the url (e.g. https://commento.example.com) here. Otherwise leave empty. # url: - valine: - # Browse https://valine.js.org/configuration.html to see the options available. - # You can list the key and value you want as below. - # Because Hugo's config params are case-insensitive, you need to add `-` or `_` before the uppercase letters. - # For example, `appId` should be written as `app-Id` or other acceptable formats. - app-Id: - app-Key: + # valine: + # # Browse https://valine.js.org/en/configuration.html to see the options available. + # # You can list the key and value you want as below. + # # Because Hugo's config params are case-insensitive, you need to add `-` or `_` before the uppercase letters. + # # For example, `appId` should be written as `app-Id` or other acceptable formats. + # app-Id: + # app-Key: diagram: handler: mermaid diff --git a/layouts/docs/doc_list.html b/layouts/docs/doc_list.html index a349171..1f40d8d 100644 --- a/layouts/docs/doc_list.html +++ b/layouts/docs/doc_list.html @@ -1,6 +1,6 @@ {{/* Deprecation warning(v1.0.0) starts */}} {{ define "main" }} -{{ warnf "Value 'doc_list' of layout param in %q is deprecated and will be removed in Eureka v1.0.0. Use 'doc-list' instead." .File.Path }} +{{ warnf "Value 'doc_list' of layout param in %q is deprecated and will be removed in Eureka v1.0.0. Please use 'doc-list' instead." .File.Path }} {{ partial "components/doc-list" . }} {{ end }} {{/* Deprecation warning(v1.0.0) ends */}} \ No newline at end of file diff --git a/layouts/partials/components/post-edit.html b/layouts/partials/components/post-edit.html index 09cbec8..5a87dc6 100644 --- a/layouts/partials/components/post-edit.html +++ b/layouts/partials/components/post-edit.html @@ -21,7 +21,7 @@ {{/* Deprecation warning(v1.0.0) starts */}} {{- else if .Site.Params.repoURL }} - {{ warnf "Param 'repoURL' in params.yaml is deprecated and will be removed in Eureka v1.0.0. See https://www.wangchucheng.com/en/docs/hugo-eureka/customization/" }} + {{ warnf "Param 'repoURL' in params.yaml is deprecated and will be removed in Eureka v1.0.0. See https://www.wangchucheng.com/en/docs/hugo-eureka/customization/#params-config-file" }}
{{- $repoEditURL := path.Join .Site.Params.repoURL "/blob/master/" }} {{ $contentDir := cond .Site.IsMultiLingual .Site.Params.contentDir "/content/" }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index cc0b21f..a81c00c 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -82,13 +82,18 @@ {{- $enableMath := false }} {{- if .Site.Params.math.handler }} -{{- $bundles := partial "utils/get-bundles" . }} -{{- $enableMath = true }} -{{- range $bundles.Reverse }} -{{- if and (ne .Params.math nil) (ne .Params.math "") }} -{{- $enableMath = .Params.math }} -{{- end }} -{{- end }} + {{- $bundles := partial "utils/get-bundles" . }} + {{- $enableMath = true }} + {{- range $bundles.Reverse }} + {{- if and (ne .Params.enableMath nil) (ne .Params.enableMath "") }} + {{- $enableMath = .Params.enableMath }} + {{/* Deprecation warning(v1.0.0) starts */}} + {{- else if and (ne .Params.math nil) (ne .Params.math "") }} + {{ warnf "Param 'math' in %q is deprecated and will be removed in Eureka v1.0.0. Please use 'enableMath' instead." .File.Path }} + {{- $enableMath = .Params.math }} + {{/* Deprecation warning(v1.0.0) ends */}} + {{- end }} + {{- end }} {{- end }} {{ define "partials/camelize" }} diff --git a/layouts/partials/widgets/about.html b/layouts/partials/widgets/about.html index 184fccb..3c04d22 100644 --- a/layouts/partials/widgets/about.html +++ b/layouts/partials/widgets/about.html @@ -36,7 +36,7 @@ {{ range $brand }} {{/* Deprecation warning(v1.0.0) starts */}} {{ if .icon_pack }} - {{ warnf "Param 'icon_pack' in %q is deprecated and will be removed in Eureka v1.0.0. Use 'iconPack' instead." $.File.Path }} + {{ warnf "Param 'icon_pack' in %q is deprecated and will be removed in Eureka v1.0.0. Please use 'iconPack' instead." $.File.Path }} {{ end }} {{ $iconPack := .iconPack | default .icon_pack }} {{/* Deprecation warning(v1.0.0) ends */}} diff --git a/package.json b/package.json index b5e8ea8..6987d51 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hugo-eureka", - "version": "0.7.1-dev", + "version": "0.8.0", "description": "Eureka is a feature-rich and highly customizable Hugo theme.", "repository": "https://github.com/wangchucheng/hugo-eureka", "author": "C. Wang ", -- cgit v1.2.3