From a9e6215540352427a5ed4a89d853c2f9a8ff52fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Sun, 13 Nov 2022 19:39:55 +0000 Subject: [PATCH] implemented global widget for buymeacoffee --- README.md | 1 + config/_default/params.toml | 7 + exampleSite/config/_default/params.toml | 7 + .../content/docs/configuration/index.md | 161 +++++++++--------- layouts/_default/baseof.html | 96 +++++------ package.json | 2 +- 6 files changed, 142 insertions(+), 132 deletions(-) diff --git a/README.md b/README.md index 627cf157..530b3d5f 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ Blowfish is designed to be a powerful, lightweight theme for [Hugo](https://gohu - Flexible with any content types, taxonomies and menus - Multilingual content support inlcuding support for RTL languages - Ability to link to posts on third-party websites +- Buymeacoffee integration - Client-side site search powered by Fuse.js - Diagrams and visualisations using Mermaid - Charts using Chart.js diff --git a/config/_default/params.toml b/config/_default/params.toml index fc42e266..bad1d72c 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -94,6 +94,13 @@ enableCodeCopy = true # site = "ABC12345" # domain = "llama.yoursite.com" +[buymeacoffee] + # identifier = "" + # globalWidget = true + # globalWidgetMessage = "Hello" + # globalWidgetColor = "#FFDD00" + # globalWidgetPosition = "Right" + [verification] # google = "" # bing = "" diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index a5fce2cb..e4c5d919 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -94,6 +94,13 @@ mainSections = ["docs"] # site = "ABC12345" # domain = "llama.yoursite.com" +[buymeacoffee] + identifier = "nunocoracao" + globalWidget = true + globalWidgetMessage = "Thank you for visiting." + globalWidgetColor = "#FFDD00" + globalWidgetPosition = "Right" + [verification] # google = "" # bing = "" diff --git a/exampleSite/content/docs/configuration/index.md b/exampleSite/content/docs/configuration/index.md index fcf64db6..c0834902 100644 --- a/exampleSite/content/docs/configuration/index.md +++ b/exampleSite/content/docs/configuration/index.md @@ -124,84 +124,89 @@ Blowfish provides a large number of configuration parameters that control how th Many of the article defaults here can be overridden on a per article basis by specifying it in the front matter. Refer to the [Front Matter]({{< ref "front-matter" >}}) section for further details. -| Name | Default | Description | -| ------------------------------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `colorScheme` | `"blowfish"` | The theme colour scheme to use. Valid values are `blowfish` (default), `avocado`, `ocean`, `fire` and `slate`. Refer to the [Colour Schemes]({{< ref "getting-started#colour-schemes" >}}) section for more details. | -| `defaultAppearance` | `"light"` | The default theme appearance, either `light` or `dark`. | -| `autoSwitchAppearance` | `true` | Whether the theme appearance automatically switches based upon the visitor's operating system preference. Set to `false` to force the site to always use the `defaultAppearance`. | -| `enableSearch` | `false` | Whether site search is enabled. Set to `true` to enable search functionality. Note that the search feature depends on the `outputs.home` setting in the [site configuration](#site-configuration) being set correctly. | -| `enableCodeCopy` | `false` | Whether copy-to-clipboard buttons are enabled for `` blocks. The `highlight.noClasses` parameter must be set to `false` for code copy to function correctly. Read more about [other configuration files](#other-configuration-files) below. | -| `logo` | _Not set_ | The relative path to the site logo file within the `assets/` folder. The logo file should be provided at 2x resolution and supports any image dimensions. | -| `mainSections` | _Not set_ | The sections that should be displayed in the recent articles list. If not provided the section with the greatest number of articles is used. | -| `showViews` | _Not set_ | Whether or not articles and list views are displayed. This requires firebase integrations to be enabled, look below. | -| `showLikes` | _Not set_ | Whether or not articles and list likes are displayed. This requires firebase integrations to be enabled, look below. | -| `robots` | _Not set_ | String that indicates how robots should handle your site. If set, it will be output in the page head. Refer to [Google's docs](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives) for valid values. | -| `disableImageZoom` | `false` | Disables image zoom feature across all the images in the site. | -| `header.layout` | `"basic"` | Defines the header for the entire site, supported values are `basic` and `fixed`. | -| `footer.showMenu` | `true` | Show/hide the footer menu, which can be configured in the `[[footer]]` section of the `config/_default/menus.en.toml` file. | -| `footer.showCopyright` | `true` | Whether or not to show the copyright string in the site footer. Note that the string itself can be customised using the `copyright` parameter in the [languages configuration](#language-and-i18n). | -| `footer.showThemeAttribution` | `true` | Whether or not to show the "powered by" theme attribution in the site footer. If you choose to disable this message, please consider attributing the theme somewhere else on your site (for example, on your about page). | -| `footer.showAppearanceSwitcher` | `false` | Whether or not to show the appearance switcher in the site footer. The browser's local storage is used to persist the visitor's preference. | -| `footer.showScrollToTop` | `true` | When set to `true` the scroll to top arrow is displayed. | -| `homepage.layout` | `"profile"` | The layout of the homepage. Valid values are `page`, `profile`, `hero`, `card`, `background`, or `custom`. When set to `custom`, you must provide your own layout by creating a `/layouts/partials/home/custom.html` file. Refer to the [Homepage Layout]({{< ref "homepage-layout" >}}) section for more details. | -| `homepage.homepageImage` | _Not set_ | Image to be used in `hero` and `card` layouts. Refer to the [Homepage Layout]({{< ref "homepage-layout" >}}) section for more details. | -| `homepage.showRecent` | `false` | Whether or not to display the recent articles list on the homepage. | -| `homepage.showRecentItems` | 5 | How many articles to display if showRecent is true. If variable is set to 0 or if it isn't defined the system will default to 5 articles. | -| `homepage.showMoreLink` | 'false' | Wether or not to display a show more link at the end of your posts that takes the user to a predefined place. | -| `homepage.showMoreLinkDest` | '/posts' | The destination of the show more button. | -| `homepage.cardView` | `false` | Display recent articles as a gallery of cards. | -| `homepage.cardViewScreenWidth` | `false` | Enhance the width of the recent articles card gallery to take the full width available. | -| `homepage.layoutBackgroundBlur` | `false` | Makes the background image in the homepage layout blur with the scroll | -| `article.showDate` | `true` | Whether or not article dates are displayed. | -| `article.showViews` | `false` | Whether or not article views are displayed. This requires firebase integrations to be enabled, look below. | -| `article.showLikes` | `false` | Whether or not article likes are displayed. This requires firebase integrations to be enabled, look below. | -| `article.showDateUpdated` | `false` | Whether or not the dates articles were updated are displayed. | -| `article.showAuthor` | `true` | Whether or not the author box is displayed in the article footer. | -| `article.showHero` | `false` | Whether the thumbnail image will be shown as a hero image within each article page. | -| `article.heroStyle` | _Not set_ | Style to display the hero image, valid options are: `basic`, `big`, `background`. | -| `article.layoutBackgroundBlur` | `false` | Makes the background image in the background article heroStyle blur with the scroll | -| `article.showBreadcrumbs` | `false` | Whether or not breadcrumbs are displayed in the article header. | -| `article.showDraftLabel` | `true` | Whether or not the draft indicator is shown next to articles when site is built with `--buildDrafts`. | -| `article.showEdit` | `false` | Whether or not the link to edit the article content should be displayed. | -| `article.editURL` | _Not set_ | When `article.showEdit` is active, the URL for the edit link. | -| `article.editAppendPath` | `true` | When `article.showEdit` is active, whether or not the path to the current article should be appended to the URL set at `article.editURL`. | -| `article.seriesOpened` | `false` | Whether or not the series module will be displayed open by default or not. | -| `article.showHeadingAnchors` | `true` | Whether or not heading anchor links are displayed alongside headings within articles. | -| `article.showPagination` | `true` | Whether or not the next/previous article links are displayed in the article footer. | -| `article.invertPagination` | `false` | Whether or not to flip the direction of the next/previous article links. | -| `article.showReadingTime` | `true` | Whether or not article reading times are displayed. | -| `article.showTableOfContents` | `false` | Whether or not the table of contents is displayed on articles. | -| `article.showTaxonomies` | `false` | Whether or not the taxonomies related to this article are displayed. | -| `article.showAuthorsBadges` | `false` | Whether the `authors` taxonomies are are displayed in the article or list header. This requires the setup of `multiple authors` and the `authors` taxonomy. Check [this page]({{< ref "multi-author" >}}) for more details on how to configure that feature. | -| `article.showWordCount` | `false` | Whether or not article word counts are displayed. | -| `article.showComments` | `false` | Whether or not the [comments partial]({{< ref "partials#comments" >}}) is included after the article footer. | -| `article.sharingLinks` | _Not set_ | Which sharing links to display at the end of each article. When not provided, or set to `false` no links will be displayed. | -| `list.showHero` | `false` | Whether the thumbnail image will be shown as a hero image within each list page. | -| `list.heroStyle` | _Not set_ | Style to display the hero image, valid options are: `basic`, `big`, `background`. | -| `list.showBreadcrumbs` | `false` | Whether or not breadcrumbs are displayed in the header on list pages. | -| `list.showTableOfContents` | `false` | Whether or not the table of contents is displayed on list pages. | -| `list.showSummary` | `false` | Whether or not article summaries are displayed on list pages. If a summary is not provided in the [front matter]({{< ref "front-matter" >}}), one will be auto generated using the `summaryLength` parameter in the [site configuration](#site-configuration). | -| `list.showViews` | `false` | Whether or not list views are displayed. This requires firebase integrations to be enabled, look below. | -| `list.showLikes` | `false` | Whether or not list likes are displayed. This requires firebase integrations to be enabled, look below. | -| `list.showCards` | `false` | Whether or not each article is displayed as a card or as simple inline text. | -| `list.groupByYear` | `true` | Whether or not articles are grouped by year on list pages. | -| `list.cardView` | `false` | Display lists as a gallery of cards. | -| `list.cardViewScreenWidth` | `false` | Enhance the width of card galleries in lists to take the full width available. | -| `sitemap.excludedKinds` | `["taxonomy", "term"]` | Kinds of content that should be excluded from the generated `/sitemap.xml` file. Refer to the [Hugo docs](https://gohugo.io/templates/section-templates/#page-kinds) for acceptable values. | -| `taxonomy.showTermCount` | `true` | Whether or not the number of articles within a taxonomy term is displayed on the taxonomy listing. | -| `firebase.apiKey` | _Not set_ | Firebase apiKey, required to integrate against Firebase. Check [this page]({{< ref "firebase-views" >}}) for a guide on how to integrate Firebase into Blowfish | -| `firebase.authDomain` | _Not set_ | Firebase authDomain, required to integrate against Firebase. Check [this page]({{< ref "firebase-views" >}}) for a guide on how to integrate Firebase into Blowfish | -| `firebase.projectId` | _Not set_ | Firebase projectId, required to integrate against Firebase. Check [this page]({{< ref "firebase-views" >}}) for a guide on how to integrate Firebase into Blowfish | -| `firebase.storageBucket` | _Not set_ | Firebase storageBucket, required to integrate against Firebase. Check [this page]({{< ref "firebase-views" >}}) for a guide on how to integrate Firebase into Blowfish | -| `firebase.messagingSenderId` | _Not set_ | Firebase messagingSenderId, required to integrate against Firebase. Check [this page]({{< ref "firebase-views" >}}) for a guide on how to integrate Firebase into Blowfish | -| `firebase.appId` | _Not set_ | Firebase appId, required to integrate against Firebase. Check [this page]({{< ref "firebase-views" >}}) for a guide on how to integrate Firebase into Blowfish | -| `firebase.measurementId` | _Not set_ | Firebase measurementId, required to integrate against Firebase. Check [this page]({{< ref "firebase-views" >}}) for a guide on how to integrate Firebase into Blowfish | -| `fathomAnalytics.site` | _Not set_ | The site code generated by Fathom Analytics for the website. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details. | -| `fathomAnalytics.domain` | _Not set_ | If using a custom domain with Fathom Analytics, provide it here to serve `script.js` from the custom domain. | -| `verification.google` | _Not set_ | The site verification string provided by Google to be included in the site metadata. | -| `verification.bing` | _Not set_ | The site verification string provided by Bing to be included in the site metadata. | -| `verification.pinterest` | _Not set_ | The site verification string provided by Pinterest to be included in the site metadata. | -| `verification.yandex` | _Not set_ | The site verification string provided by Yandex to be included in the site metadata. | +| Name | Default | Description | +| ----------------------------------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `colorScheme` | `"blowfish"` | The theme colour scheme to use. Valid values are `blowfish` (default), `avocado`, `ocean`, `fire` and `slate`. Refer to the [Colour Schemes]({{< ref "getting-started#colour-schemes" >}}) section for more details. | +| `defaultAppearance` | `"light"` | The default theme appearance, either `light` or `dark`. | +| `autoSwitchAppearance` | `true` | Whether the theme appearance automatically switches based upon the visitor's operating system preference. Set to `false` to force the site to always use the `defaultAppearance`. | +| `enableSearch` | `false` | Whether site search is enabled. Set to `true` to enable search functionality. Note that the search feature depends on the `outputs.home` setting in the [site configuration](#site-configuration) being set correctly. | +| `enableCodeCopy` | `false` | Whether copy-to-clipboard buttons are enabled for `` blocks. The `highlight.noClasses` parameter must be set to `false` for code copy to function correctly. Read more about [other configuration files](#other-configuration-files) below. | +| `logo` | _Not set_ | The relative path to the site logo file within the `assets/` folder. The logo file should be provided at 2x resolution and supports any image dimensions. | +| `mainSections` | _Not set_ | The sections that should be displayed in the recent articles list. If not provided the section with the greatest number of articles is used. | +| `showViews` | _Not set_ | Whether or not articles and list views are displayed. This requires firebase integrations to be enabled, look below. | +| `showLikes` | _Not set_ | Whether or not articles and list likes are displayed. This requires firebase integrations to be enabled, look below. | +| `robots` | _Not set_ | String that indicates how robots should handle your site. If set, it will be output in the page head. Refer to [Google's docs](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives) for valid values. | +| `disableImageZoom` | `false` | Disables image zoom feature across all the images in the site. | +| `header.layout` | `"basic"` | Defines the header for the entire site, supported values are `basic` and `fixed`. | +| `footer.showMenu` | `true` | Show/hide the footer menu, which can be configured in the `[[footer]]` section of the `config/_default/menus.en.toml` file. | +| `footer.showCopyright` | `true` | Whether or not to show the copyright string in the site footer. Note that the string itself can be customised using the `copyright` parameter in the [languages configuration](#language-and-i18n). | +| `footer.showThemeAttribution` | `true` | Whether or not to show the "powered by" theme attribution in the site footer. If you choose to disable this message, please consider attributing the theme somewhere else on your site (for example, on your about page). | +| `footer.showAppearanceSwitcher` | `false` | Whether or not to show the appearance switcher in the site footer. The browser's local storage is used to persist the visitor's preference. | +| `footer.showScrollToTop` | `true` | When set to `true` the scroll to top arrow is displayed. | +| `homepage.layout` | `"profile"` | The layout of the homepage. Valid values are `page`, `profile`, `hero`, `card`, `background`, or `custom`. When set to `custom`, you must provide your own layout by creating a `/layouts/partials/home/custom.html` file. Refer to the [Homepage Layout]({{< ref "homepage-layout" >}}) section for more details. | +| `homepage.homepageImage` | _Not set_ | Image to be used in `hero` and `card` layouts. Refer to the [Homepage Layout]({{< ref "homepage-layout" >}}) section for more details. | +| `homepage.showRecent` | `false` | Whether or not to display the recent articles list on the homepage. | +| `homepage.showRecentItems` | 5 | How many articles to display if showRecent is true. If variable is set to 0 or if it isn't defined the system will default to 5 articles. | +| `homepage.showMoreLink` | 'false' | Wether or not to display a show more link at the end of your posts that takes the user to a predefined place. | +| `homepage.showMoreLinkDest` | '/posts' | The destination of the show more button. | +| `homepage.cardView` | `false` | Display recent articles as a gallery of cards. | +| `homepage.cardViewScreenWidth` | `false` | Enhance the width of the recent articles card gallery to take the full width available. | +| `homepage.layoutBackgroundBlur` | `false` | Makes the background image in the homepage layout blur with the scroll | +| `article.showDate` | `true` | Whether or not article dates are displayed. | +| `article.showViews` | `false` | Whether or not article views are displayed. This requires firebase integrations to be enabled, look below. | +| `article.showLikes` | `false` | Whether or not article likes are displayed. This requires firebase integrations to be enabled, look below. | +| `article.showDateUpdated` | `false` | Whether or not the dates articles were updated are displayed. | +| `article.showAuthor` | `true` | Whether or not the author box is displayed in the article footer. | +| `article.showHero` | `false` | Whether the thumbnail image will be shown as a hero image within each article page. | +| `article.heroStyle` | _Not set_ | Style to display the hero image, valid options are: `basic`, `big`, `background`. | +| `article.layoutBackgroundBlur` | `false` | Makes the background image in the background article heroStyle blur with the scroll | +| `article.showBreadcrumbs` | `false` | Whether or not breadcrumbs are displayed in the article header. | +| `article.showDraftLabel` | `true` | Whether or not the draft indicator is shown next to articles when site is built with `--buildDrafts`. | +| `article.showEdit` | `false` | Whether or not the link to edit the article content should be displayed. | +| `article.editURL` | _Not set_ | When `article.showEdit` is active, the URL for the edit link. | +| `article.editAppendPath` | `true` | When `article.showEdit` is active, whether or not the path to the current article should be appended to the URL set at `article.editURL`. | +| `article.seriesOpened` | `false` | Whether or not the series module will be displayed open by default or not. | +| `article.showHeadingAnchors` | `true` | Whether or not heading anchor links are displayed alongside headings within articles. | +| `article.showPagination` | `true` | Whether or not the next/previous article links are displayed in the article footer. | +| `article.invertPagination` | `false` | Whether or not to flip the direction of the next/previous article links. | +| `article.showReadingTime` | `true` | Whether or not article reading times are displayed. | +| `article.showTableOfContents` | `false` | Whether or not the table of contents is displayed on articles. | +| `article.showTaxonomies` | `false` | Whether or not the taxonomies related to this article are displayed. | +| `article.showAuthorsBadges` | `false` | Whether the `authors` taxonomies are are displayed in the article or list header. This requires the setup of `multiple authors` and the `authors` taxonomy. Check [this page]({{< ref "multi-author" >}}) for more details on how to configure that feature. | +| `article.showWordCount` | `false` | Whether or not article word counts are displayed. | +| `article.showComments` | `false` | Whether or not the [comments partial]({{< ref "partials#comments" >}}) is included after the article footer. | +| `article.sharingLinks` | _Not set_ | Which sharing links to display at the end of each article. When not provided, or set to `false` no links will be displayed. | +| `list.showHero` | `false` | Whether the thumbnail image will be shown as a hero image within each list page. | +| `list.heroStyle` | _Not set_ | Style to display the hero image, valid options are: `basic`, `big`, `background`. | +| `list.showBreadcrumbs` | `false` | Whether or not breadcrumbs are displayed in the header on list pages. | +| `list.showTableOfContents` | `false` | Whether or not the table of contents is displayed on list pages. | +| `list.showSummary` | `false` | Whether or not article summaries are displayed on list pages. If a summary is not provided in the [front matter]({{< ref "front-matter" >}}), one will be auto generated using the `summaryLength` parameter in the [site configuration](#site-configuration). | +| `list.showViews` | `false` | Whether or not list views are displayed. This requires firebase integrations to be enabled, look below. | +| `list.showLikes` | `false` | Whether or not list likes are displayed. This requires firebase integrations to be enabled, look below. | +| `list.showCards` | `false` | Whether or not each article is displayed as a card or as simple inline text. | +| `list.groupByYear` | `true` | Whether or not articles are grouped by year on list pages. | +| `list.cardView` | `false` | Display lists as a gallery of cards. | +| `list.cardViewScreenWidth` | `false` | Enhance the width of card galleries in lists to take the full width available. | +| `sitemap.excludedKinds` | `["taxonomy", "term"]` | Kinds of content that should be excluded from the generated `/sitemap.xml` file. Refer to the [Hugo docs](https://gohugo.io/templates/section-templates/#page-kinds) for acceptable values. | +| `taxonomy.showTermCount` | `true` | Whether or not the number of articles within a taxonomy term is displayed on the taxonomy listing. | +| `firebase.apiKey` | _Not set_ | Firebase apiKey, required to integrate against Firebase. Check [this page]({{< ref "firebase-views" >}}) for a guide on how to integrate Firebase into Blowfish. | +| `firebase.authDomain` | _Not set_ | Firebase authDomain, required to integrate against Firebase. Check [this page]({{< ref "firebase-views" >}}) for a guide on how to integrate Firebase into Blowfish. | +| `firebase.projectId` | _Not set_ | Firebase projectId, required to integrate against Firebase. Check [this page]({{< ref "firebase-views" >}}) for a guide on how to integrate Firebase into Blowfish. | +| `firebase.storageBucket` | _Not set_ | Firebase storageBucket, required to integrate against Firebase. Check [this page]({{< ref "firebase-views" >}}) for a guide on how to integrate Firebase into Blowfish. | +| `firebase.messagingSenderId` | _Not set_ | Firebase messagingSenderId, required to integrate against Firebase. Check [this page]({{< ref "firebase-views" >}}) for a guide on how to integrate Firebase into Blowfish. | +| `firebase.appId` | _Not set_ | Firebase appId, required to integrate against Firebase. Check [this page]({{< ref "firebase-views" >}}) for a guide on how to integrate Firebase into Blowfish. | +| `firebase.measurementId` | _Not set_ | Firebase measurementId, required to integrate against Firebase. Check [this page]({{< ref "firebase-views" >}}) for a guide on how to integrate Firebase into Blowfish. | +| `fathomAnalytics.site` | _Not set_ | The site code generated by Fathom Analytics for the website. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details. | +| `fathomAnalytics.domain` | _Not set_ | If using a custom domain with Fathom Analytics, provide it here to serve `script.js` from the custom domain. | +| `buymeacoffee.identifier` | _Not set_ | The identifier to the target buymeacoffee account. | +| `buymeacoffee.globalWidget` | _Not set_ | Activate the global buymeacoffee widget. | +| `buymeacoffee.globalWidgetMessage` | _Not set_ | Message what will be displayed the first time a new user lands on the site. | +| `buymeacoffee.globalWidgetColor` | _Not set_ | Widget color in hex format. | +| `buymeacoffee.globalWidgetPosition` | _Not set_ | Position of the widget, i.e. "Left" or "Right" | +| `verification.google` | _Not set_ | The site verification string provided by Google to be included in the site metadata. | +| `verification.bing` | _Not set_ | The site verification string provided by Bing to be included in the site metadata. | +| `verification.pinterest` | _Not set_ | The site verification string provided by Pinterest to be included in the site metadata. | +| `verification.yandex` | _Not set_ | The site verification string provided by Yandex to be included in the site metadata. | ## Other configuration files diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 7fc925a8..7ed024cb 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,59 +1,49 @@ {{- partial "partials/functions/warnings.html" .Site -}} - - {{- partial "head.html" . -}} - - - {{ $header := print "partials/header/" .Site.Params.header.layout ".html" }} - {{ if templates.Exists $header }} - {{ partial $header . }} - {{ else }} - {{ partial "partials/header/basic.html" . }} - {{ end }} -
-
- {{ block "main" . }}{{ end }} - {{ if and (.Site.Params.footer.showScrollToTop | default true) (gt .WordCount 200) }} - - {{ end }} -
- {{- partial "footer.html" . -}} - {{ if .Site.Params.enableSearch | default false }} - {{- partial "search.html" . -}} + {{- end }}" class="scroll-smooth" data-default-appearance="{{ .Site.Params.defaultAppearance | default " light" }}" + data-auto-appearance="{{ .Site.Params.autoSwitchAppearance | default " true" }}"> +{{- partial "head.html" . -}} + + + + {{ $header := print "partials/header/" .Site.Params.header.layout ".html" }} + {{ if templates.Exists $header }} + {{ partial $header . }} + {{ else }} + {{ partial "partials/header/basic.html" . }} + {{ end }} +
+
+ {{ block "main" . }}{{ end }} + {{ if and (.Site.Params.footer.showScrollToTop | default true) (gt .WordCount 200) }} + {{ end }} -
- - + + {{- partial "footer.html" . -}} + {{ if .Site.Params.enableSearch | default false }} + {{- partial "search.html" . -}} + {{ end }} +
+ +{{ if .Site.Params.buymeacoffee.globalWidget | default false }} + +{{ end }} + \ No newline at end of file diff --git a/package.json b/package.json index 9494b8c4..7b6cc31d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hugo-blowfish-theme", - "version": "2.11.0", + "version": "2.12.0", "description": "Blowfish theme for Hugo", "scripts": { "preinstall": "rimraf assets/vendor",