diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index 817ee1e9..1b785b05 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -1344,6 +1344,9 @@ body.zen-mode-enable { .shrink-0 { flex-shrink: 0; } + .flex-grow { + flex-grow: 1; + } .grow { flex-grow: 1; } @@ -1507,8 +1510,8 @@ body.zen-mode-enable { .overflow-visible { overflow: visible; } - .overflow-y-scroll { - overflow-y: scroll; + .overflow-y-auto { + overflow-y: auto; } .overscroll-contain { overscroll-behavior: contain; @@ -3478,6 +3481,9 @@ body a, body button { transition-timing-function: var(--tw-ease, var(--default-transition-timing-function)); transition-duration: var(--tw-duration, var(--default-transition-duration)); } +button, [role="button"] { + cursor: pointer; +} .icon svg { height: 1em; width: 1em; @@ -3534,6 +3540,14 @@ body a, body button { .prose div.min-w-0.max-w-prose>*:first-child { margin-top: calc(var(--spacing) * 3); } +#TableOfContents { + max-width: 25vw; +} +#TOCView { + max-height: calc(100vh - 150px); + min-height: 0; + overflow-x: hidden; +} .toc ul, .toc li { list-style-type: none; padding-inline: calc(var(--spacing) * 0); @@ -3579,6 +3593,10 @@ body a, body button { z-index: 10; width: calc(var(--spacing) * 20); cursor: pointer; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; border-top-right-radius: var(--radius-md); border-bottom-left-radius: var(--radius-md); background-color: rgba(var(--color-neutral-200), 1); @@ -3610,6 +3628,10 @@ body a, body button { .katex-display { overflow: auto hidden; } +.katex-display { + padding-right: 2px; + width: calc(100% - 2px); +} table { display: block; overflow: auto; @@ -3635,6 +3657,9 @@ a { color: rgba(var(--color-neutral-200), 1); } } +.prose-invert .highlight pre > code { + background-color: unset; +} .chroma .lntd, .chroma .lntd pre { margin: calc(var(--spacing) * 0); --tw-border-style: none; @@ -3844,6 +3869,9 @@ pre { height: 0px; visibility: hidden; } +[id^="fn"], [id^="fnref"] { + scroll-margin-top: 145px; +} @screen sm { .thumbnail { min-width: 100%; diff --git a/assets/css/main.css b/assets/css/main.css index d03c0015..4efb1790 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -10,6 +10,11 @@ body button { @apply transition-colors; } +button, +[role="button"] { + cursor: pointer; +} + /* Scale SVG icons to text size */ .icon svg { @apply h-[1em] w-[1em]; @@ -59,6 +64,16 @@ body button { } /* Table of Contents */ +#TableOfContents { + max-width: 25vw; +} + +#TOCView { + max-height: calc(100vh - 150px); + min-height: 0; + overflow-x: hidden; +} + .toc ul, .toc li { @apply px-0 leading-snug list-none; @@ -90,7 +105,9 @@ body button { } .copy-button { - @apply absolute top-0 right-0 z-10 invisible w-20 py-1 font-mono text-sm cursor-pointer opacity-90 bg-neutral-200 whitespace-nowrap rounded-bl-md rounded-tr-md text-neutral-700 dark:bg-neutral-600 dark:text-neutral-200; + @apply absolute top-0 right-0 z-10 invisible w-20 py-1 font-mono text-sm cursor-pointer + opacity-90 bg-neutral-200 whitespace-nowrap rounded-bl-md rounded-tr-md text-neutral-700 + dark:bg-neutral-600 dark:text-neutral-200 overflow-hidden truncate; } .copy-button:hover, @@ -107,6 +124,12 @@ body button { /* Fix long KaTeX equations on mobile (see https://katex.org/docs/issues.html#css-customization) */ .katex-display { overflow: auto hidden } +/* Fix katex overflow https://github.com/nunocoracao/blowfish/issues/2138 */ +.katex-display { + padding-right: 2px; + width: calc(100% - 2px); +} + /* Fix long tables breaking out of article on mobile */ table { display: block; @@ -132,6 +155,10 @@ a { @apply static rounded-md text-neutral-700 bg-neutral-50 dark:bg-neutral-700 dark:text-neutral-200; } +.prose-invert .highlight pre > code { + background-color: unset; +} + /* LineTableTD */ .chroma .lntd, .chroma .lntd pre { @@ -424,6 +451,11 @@ pre { visibility: hidden; } +/* Offset scroll position to avoid header overlap */ +[id^="fn"], [id^="fnref"] { + scroll-margin-top: 145px; +} + @screen sm { .thumbnail { min-width: 100%; diff --git a/assets/icons/peertube.svg b/assets/icons/peertube.svg new file mode 100644 index 00000000..5d6db0bc --- /dev/null +++ b/assets/icons/peertube.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/pixelfed.svg b/assets/icons/pixelfed.svg new file mode 100644 index 00000000..969f26ad --- /dev/null +++ b/assets/icons/pixelfed.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/js/search.js b/assets/js/search.js index 593d95de..dd77b121 100644 --- a/assets/js/search.js +++ b/assets/js/search.js @@ -25,7 +25,14 @@ modal.addEventListener("click", function (event) { document.addEventListener("keydown", function (event) { // Forward slash to open search wrapper if (event.key == "/") { - if (!searchVisible) { + const active = document.activeElement + const tag = active.tagName + const isInputField = + tag === "INPUT" || + tag === "TEXTAREA" || + active.isContentEditable + + if (!searchVisible && !isInputField) { event.preventDefault(); displaySearch(); } diff --git a/assets/js/zen-mode.js b/assets/js/zen-mode.js index bd6d5ee0..d2c38992 100644 --- a/assets/js/zen-mode.js +++ b/assets/js/zen-mode.js @@ -1,6 +1,7 @@ function _toogleZenMode(zendModeButton) { // Nodes selection const body = document.querySelector('body'); + const footer = document.querySelector('footer'); const tocRight = document.querySelector('.toc-right'); const tocInside = document.querySelector('.toc-inside'); const articleContent = document.querySelector('.article-content'); @@ -20,9 +21,11 @@ function _toogleZenMode(zendModeButton) { articleContent.classList.toggle('max-w-fit'); articleContent.classList.toggle('max-w-prose'); - // Change width of article title + // Change width of article title and footer header.classList.toggle('max-w-full'); header.classList.toggle('max-w-prose'); + footer.classList.toggle('max-w-full'); + footer.classList.toggle('max-w-prose'); // Read i18n title from data-attributes const titleI18nDisable = zendModeButton.getAttribute('data-title-i18n-disable'); diff --git a/config.toml b/config.toml index e3c7bd62..d52ad7d9 100644 --- a/config.toml +++ b/config.toml @@ -1,5 +1,5 @@ [module] [module.hugoVersion] extended = true -min = "0.87.0" -max = "0.147.1" \ No newline at end of file +min = "0.137.0" +max = "0.147.5" \ No newline at end of file diff --git a/config/_default/hugo.toml b/config/_default/hugo.toml index 85d63a1a..6100a56c 100644 --- a/config/_default/hugo.toml +++ b/config/_default/hugo.toml @@ -67,3 +67,12 @@ enableEmoji = true name = 'fragmentrefs' type = 'fragments' weight = 10 + +[markup] + [markup.goldmark] + [markup.goldmark.extensions] + [markup.goldmark.extensions.passthrough] + enable = true + [markup.goldmark.extensions.passthrough.delimiters] + block = [['\[', '\]'], ['$$', '$$']] + inline = [['\(', '\)']] diff --git a/config/_default/params.toml b/config/_default/params.toml index 0803aea5..4ade93d2 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -23,6 +23,7 @@ disableTextInHeader = false # defaultBackgroundImage = "IMAGE.jpg" # used as default for background images # defaultFeaturedImage = "IMAGE.jpg" # used as default for featured images in all articles +# defaultSocialImage = "/android-chrome-512x512.png" # used as default for social media sharing (Open Graph and Twitter) # highlightCurrentMenuArea = true # smartTOC = true @@ -77,7 +78,8 @@ forgejoDefaultServer = "https://v8.next.forgejo.org" showTableOfContents = false # showRelatedContent = false # relatedContentLimit = 3 - showTaxonomies = false + showTaxonomies = false # use showTaxonomies OR showCategoryOnly, not both + showCategoryOnly = false # use showTaxonomies OR showCategoryOnly, not both showAuthorsBadges = false showWordCount = true # sharingLinks = [ "linkedin", "twitter", "bluesky", "mastodon", "reddit", "pinterest", "facebook", "email", "whatsapp", "telegram"] @@ -164,4 +166,4 @@ forgejoDefaultServer = "https://v8.next.forgejo.org" [rssnext] # feedId = "" - # userId = "" \ No newline at end of file + # userId = "" diff --git a/exampleSite/config/_default/hugo.toml b/exampleSite/config/_default/hugo.toml index ab7e4623..dcbc6bf9 100644 --- a/exampleSite/config/_default/hugo.toml +++ b/exampleSite/config/_default/hugo.toml @@ -69,3 +69,12 @@ googleAnalytics = "G-PEDMYR1V0K" name = 'fragmentrefs' type = 'fragments' weight = 10 + +# Render only specific parts of the site for faster development. Use: hugo --renderSegments site_core +[segments] + [segments.site_core] + [[segments.site_core.includes]] + path = '{/,/docs,/docs/**,/samples,/samples/**}' + [segments.en_only] + [[segments.en_only.includes]] + lang = 'en' diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index 8069e6b7..d7b0e913 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -23,6 +23,7 @@ disableTextInHeader = false defaultBackgroundImage = "/img/background.svg" defaultFeaturedImage = "/img/featured.svg" +defaultSocialImage = "/img/blowfish.jpg" highlightCurrentMenuArea = true smartTOC = true @@ -48,6 +49,7 @@ smartTOCHideUnfocusedChildren = false cardView = true cardViewScreenWidth = false layoutBackgroundBlur = true # only used when layout equals background + disableHeroImageFilter = false # only used when layout equals hero [article] showDate = false diff --git a/exampleSite/config/development/hugo.toml b/exampleSite/config/development/hugo.toml new file mode 100644 index 00000000..786a900d --- /dev/null +++ b/exampleSite/config/development/hugo.toml @@ -0,0 +1,5 @@ +# Development configuration. Disable this by running: hugo server -e production +# https://gohugo.io/quick-reference/glossary/#environment + +# Exclude folders containing large numbers of images +ignoreFiles = ['content/guides', 'content/users'] \ No newline at end of file diff --git a/exampleSite/content/_index.it.md b/exampleSite/content/_index.it.md index 0f29ec25..7b61b87f 100755 --- a/exampleSite/content/_index.it.md +++ b/exampleSite/content/_index.it.md @@ -18,7 +18,7 @@ description: "Questa pagina è stata creata utilizzando il tema Blowfish per Hug -```node +```shell npx blowfish-tools ``` diff --git a/exampleSite/content/_index.ja.md b/exampleSite/content/_index.ja.md index e70f3ca7..c55cba9f 100755 --- a/exampleSite/content/_index.ja.md +++ b/exampleSite/content/_index.ja.md @@ -20,7 +20,7 @@ description: "このページは Hugo の Blowfish テーマを利用して構 -```node +```shell npx blowfish-tools ``` diff --git a/exampleSite/content/_index.md b/exampleSite/content/_index.md index 1cf8992f..ab606415 100755 --- a/exampleSite/content/_index.md +++ b/exampleSite/content/_index.md @@ -20,7 +20,7 @@ description: "This page was built using the Blowfish theme for Hugo." -```node +```shell npx blowfish-tools ``` diff --git a/exampleSite/content/_index.zh-cn.md b/exampleSite/content/_index.zh-cn.md index 67faf25b..ac289b26 100644 --- a/exampleSite/content/_index.zh-cn.md +++ b/exampleSite/content/_index.zh-cn.md @@ -20,7 +20,7 @@ description: "此页面是使用 Hugo 的 Blowfish 主题搭建的" -```node +```shell npx blowfish-tools ``` diff --git a/exampleSite/content/docs/configuration/index.it.md b/exampleSite/content/docs/configuration/index.it.md index 4da3babd..62be66b6 100644 --- a/exampleSite/content/docs/configuration/index.it.md +++ b/exampleSite/content/docs/configuration/index.it.md @@ -44,7 +44,7 @@ Tieni presente che i nomi delle variabili forniti in questa tabella utilizzano i | ------------------------ | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `theme` | `"blowfish"` | Quando si utilizzano i moduli Hugo, questo valore di configurazione deve essere rimosso. Per tutti gli altri tipi di installazione, questo deve essere impostato su "blowfish" affinché il tema funzioni. | | `baseURL` | _Not set_ | The URL to the root of the website. | -| `defaultContentLanguage` | `"en"` | This value determines the default language of theme components and content. Refer to the [language and i18n](#language-and-i18n) section below for supported language codes. | +| `defaultContentLanguage` | `"en"` | This value determines the default language of theme components and content. Refer to the [language and i18n](#lingua-e-i18n) section below for supported language codes. | | `enableRobotsTXT` | `true` | Se abilitato, verrà creato un file "robots.txt" nella radice del sito che consentirà ai motori di ricerca di eseguire la scansione dell'intero sito. Se preferisci fornire il tuo file `robots.txt` predefinito, impostalo su `false` e ​​posiziona il file nella directory `static`. Per un controllo completo, puoi fornire un [layout personalizzato]({{< ref "content-examples#custom-layouts" >}}) per generare questo file. | | `pagination.pagerSize` | `10` | Il numero di articoli elencati in ciascuna pagina dell'elenco degli articoli. | | `summaryLength` | `0` | Il numero di parole utilizzate per generare il riepilogo dell'articolo quando non ne viene fornita una nella [front matter]({{< ref "front-matter" >}}). Un valore pari a "0" utilizzerà la prima frase. Questo valore non ha effetto quando i riepiloghi sono nascosti. | @@ -106,7 +106,7 @@ Per essere il più flessibili possibile, è necessario creare un file di configu Il file predefinito può essere utilizzato come modello per creare lingue aggiuntive o rinominato se desideri creare il tuo sito web in una lingua diversa dall'inglese. Basta nominare il file utilizzando il formato "lingue.[language-code].toml". {{< alert >}} -**Nota:** assicurati che il parametro `defaultContentLanguage` nella [configurazione del sito](#site-configuration) corrisponda al codice della lingua nel nome del file di configurazione della lingua. +**Nota:** assicurati che il parametro `defaultContentLanguage` nella [configurazione del sito](#configurazioni-del-sito) corrisponda al codice della lingua nel nome del file di configurazione della lingua. {{< /alert >}} #### Globale @@ -170,7 +170,7 @@ Many of the article defaults here can be overridden on a per article basis by sp | `colorScheme` | `"blowfish"` | The theme colour scheme to use. Valid values are `blowfish` (default), `avocado`, `fire`, `ocean`, `forest`, `princess`, `neon`, `bloody`, `terminal`, `marvel`, `noir`, `autumn`, `congo`, 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. | +| `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](#configurazioni-del-sito) 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. | | `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. | @@ -181,6 +181,7 @@ Many of the article defaults here can be overridden on a per article basis by sp | `disableTextInHeader` | `false` | Disables text in header, useful for logo based headers. | | `defaultBackgroundImage` | _Not set_ | Default background image for both `background` homepage layout and `background` hero style | | `defaultFeaturedImage` | _Not set_ | Default background image for all `featured` images across articles, will be overridden by a local `featured` image. | +| `defaultSocialImage` | _Not set_ | Default image for social media sharing (Open Graph and Twitter). Will be overridden by a local `feature` image if available. | | `highlightCurrentMenuArea` | _Not set_ | Marks menu entries in the main menu when selected | | `smartTOC` | _Not set_ | Activate smart Table of Contents, items in view will be highlighted. | | `smartTOCHideUnfocusedChildren` | _Not set_ | When smart Table of Contents is turned on, this will hide deeper levels of the table when they are not in focus. | @@ -196,7 +197,7 @@ Many of the article defaults here can be overridden on a per article basis by sp | Name | Default | Description | | ------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `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.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](#lingua-e-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. | @@ -214,6 +215,7 @@ Many of the article defaults here can be overridden on a per article basis by sp | `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 | +| `homepage.disableHeroImageFilter` | `false` | Whether to apply an image filter on the homepage background. | ### Article @@ -260,7 +262,7 @@ Many of the article defaults here can be overridden on a per article basis by sp | `list.layoutBackgroundBlur` | `true` | Makes the background image in the background list heroStyle blur with the scroll | | `list.layoutBackgroundHeaderSpace` | `true` | Add space between the header and the body. | | `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.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](#configurazioni-del-sito). | | `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. | diff --git a/exampleSite/content/docs/configuration/index.ja.md b/exampleSite/content/docs/configuration/index.ja.md index 0630f6f4..f73a5897 100644 --- a/exampleSite/content/docs/configuration/index.ja.md +++ b/exampleSite/content/docs/configuration/index.ja.md @@ -181,6 +181,7 @@ Blowfish は、テーマの機能を制御する多数の設定パラメータ | `disableTextInHeader` | `false` | ヘッダーのテキストを無効にします。ロゴベースのヘッダーに役立ちます。 | | `defaultBackgroundImage` | _未設定_ | `background` ホームページレイアウトと `background` ヒーロースタイルの両方のデフォルトの背景画像です。 | | `defaultFeaturedImage` | _未設定_ | 記事全体のすべての `featured` 画像のデフォルトの背景画像です。ローカルの `featured` 画像によってオーバーライドされます。 | +| `defaultSocialImage` | _未設定_ | ソーシャルメディア共有(Open Graph と Twitter)用のデフォルト画像。ローカルの `featured` 画像によってオーバーライドされます。 | | `highlightCurrentMenuArea` | _未設定_ | メインメニューのメニュー項目が選択されているときにマークを付けます。 | | `smartTOC` | _未設定_ | スマート目次をアクティブにします。表示されている項目が強調表示されます。 | | `smartTOCHideUnfocusedChildren` | _未設定_ | スマート目次がオンになっている場合、フォーカスされていないときに、テーブルのより深いレベルが非表示になります。 | @@ -214,6 +215,7 @@ Blowfish は、テーマの機能を制御する多数の設定パラメータ | `homepage.cardView` | `false` | 最近の記事をカードのギャラリーとして表示します。 | | `homepage.cardViewScreenWidth` | `false` | 最近の記事カードギャラリーの幅を拡張して、利用可能な幅全体を使用します。 | | `homepage.layoutBackgroundBlur` | `false` | ホームページレイアウトの背景画像をスクロールに合わせてぼかします。 | +| `homepage.disableHeroImageFilter` | `false` | ホームページの背景画像にフィルターを適用するかどうか。 | ### 記事(Article) @@ -260,7 +262,7 @@ Blowfish は、テーマの機能を制御する多数の設定パラメータ | `list.layoutBackgroundBlur` | `true` | `background` リストの heroStyle の背景画像をスクロールでぼかします。 | | `list.layoutBackgroundHeaderSpace` | `true` | ヘッダーと本文の間にスペースを追加します。 | | `list.showTableOfContents` | `false` | リストページに目次を表示するかどうか。 | -| `list.showSummary` | `false` | リストページに記事の要約を表示するかどうか。[フロントマター]({{< ref "front-matter" >}}) で要約が提供されていない場合、[サイト設定](#site-configuration) の `summaryLength` パラメータを使用して自動的に生成されます。 | +| `list.showSummary` | `false` | リストページに記事の要約を表示するかどうか。[フロントマター]({{< ref "front-matter" >}}) で要約が提供されていない場合、[サイト設定](#サイト設定) の `summaryLength` パラメータを使用して自動的に生成されます。 | | `list.showViews` | `false` | リストの閲覧数を表示するかどうか。これを有効にするには、Firebase の統合を有効にする必要があります。以下をご覧ください。 | | `list.showLikes` | `false` | リストのいいね数を表示するかどうか。これを有効にするには、Firebase の統合を有効にする必要があります。以下をご覧ください。 | | `list.showCards` | `false` | 各記事をカードとして表示するか、シンプルなインラインテキストとして表示するかどうか。 | diff --git a/exampleSite/content/docs/configuration/index.md b/exampleSite/content/docs/configuration/index.md index 6cc76234..13107896 100644 --- a/exampleSite/content/docs/configuration/index.md +++ b/exampleSite/content/docs/configuration/index.md @@ -187,6 +187,7 @@ Many of the article defaults here can be overridden on a per article basis by sp | `disableTextInHeader` | `false` | Disables text in header, useful for logo based headers. | | `defaultBackgroundImage` | _Not set_ | Default background image for both `background` homepage layout and `background` hero style | | `defaultFeaturedImage` | _Not set_ | Default background image for all `featured` images across articles, will be overridden by a local `featured` image. | +| `defaultSocialImage` | _Not set_ | Default image for social media sharing (Open Graph and Twitter). Will be overridden by a local `feature` image. | | `highlightCurrentMenuArea` | _Not set_ | Marks menu entries in the main menu when selected | | `smartTOC` | _Not set_ | Activate smart Table of Contents, items in view will be highlighted. | | `smartTOCHideUnfocusedChildren` | _Not set_ | When smart Table of Contents is turned on, this will hide deeper levels of the table when they are not in focus. | @@ -220,6 +221,7 @@ Many of the article defaults here can be overridden on a per article basis by sp | `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 | +| `homepage.disableHeroImageFilter` | `false` | Whether to apply an image filter on the homepage background. | ### Article diff --git a/exampleSite/content/docs/configuration/index.zh-cn.md b/exampleSite/content/docs/configuration/index.zh-cn.md index 12510ba5..5fccb1f6 100644 --- a/exampleSite/content/docs/configuration/index.zh-cn.md +++ b/exampleSite/content/docs/configuration/index.zh-cn.md @@ -43,7 +43,7 @@ Blowfish 主题支持了 Hugo 框架中定义的所有标准配置变量。但 | ------------------------ | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `theme` | `"blowfish"` | 当你使用 Hugo 模块安装时,应该移除这个配置项。但对 Git 子模块或本地文件复制的安装方式,必须将其设置为 blowfish 才能正常工作。 | | `baseURL` | 无 | 网站 URL 根地址。 | -| `defaultContentLanguage` | `"en"` | 这个值决定了主题中组件和内容所使用的默认语言。 参考 [语言和 i18n](#language-and-i18n) 部分来了解 blowfish 支持的所有语言代码。 | +| `defaultContentLanguage` | `"en"` | 这个值决定了主题中组件和内容所使用的默认语言。 参考 [语言和 i18n](#语言和i18n) 部分来了解 blowfish 支持的所有语言代码。 | | `enableRobotsTXT` | `true` | 当开启这个值,`robots.txt` 文件将会被创建在站点根目录, 这将允许搜索引擎抓取整个网站。如果你想要自己提供 `robots.txt`,那么设置这个值为 `false` 并把你的文件放置到 `static` 目录下。 为了实现完全控制,你可以需要提供一个 [自定义布局]({{< ref "content-examples#custom-layouts" >}}) 来生成此文件。 | | `pagination.pagerSize` | `10` | 定义文章列表中,每页展示的文章数量。 | | `summaryLength` | `0` | 当[扉页参数]({{< ref "front-matter" >}}) 中没有提供文章摘要时,此参数定义了自动生成文章摘要的单词数量。如果值为`0`,则默认使用第一句话作为摘要。当摘要被隐藏,这个值没有任何效果。 | @@ -104,7 +104,7 @@ Blowfish 主题目前默认支持了以下语言: 默认的文件可以用来作为创建其他语言的一个模板,如果你希望用英语以外的语言撰写网站,也可以对其重命名。只需要格式遵循 `languages.[language-code].toml` 的命名即可。 {{< alert >}} -**注意:** 保证 [网站设置](#site-configuration) 中的 `defaultContentLanguage`参数和你提供的语言配置文件相匹配。 +**注意:** 保证 [网站设置](#网站配置) 中的 `defaultContentLanguage`参数和你提供的语言配置文件相匹配。 {{< /alert >}} #### 全局 @@ -170,8 +170,8 @@ Blowfish 提供了大量控制主题功能的配置参数,下面的表格中 | `colorScheme` | `"blowfish"` | 主题使用的颜色方案。合法的值有: `blowfish` (默认)、`avocado`、`fire`、`ocean`、`forest`、`princess`、`neon`、`bloody`、`terminal`、`marvel`、`noir`、`autumn`、`congo` 和 `slate`。 具体参考[颜色方案]({{< ref "getting-started#colour-schemes" >}})以获取更多信息。 | | `defaultAppearance` | `"light"` | 默认的主题外观,可以是 `light` 或者 `dark`。 | | `autoSwitchAppearance` | `true` | 主题外观是否根据访问者操作系统的偏好自动切换。设置为 `false` 会强制网站始终使用 `defaultAppearance`。 | -| `enableSearch` | `false` | 是否开启网站的搜索功能,设为 `true` 即为启用。注意,搜索功能依赖于[站点设置](#site-configuration)中的 `outputs.home` 设置,请确保此值配置正确。 | -| `enableCodeCopy` | `false` | 是否可以将``代码块复制到剪贴板。想要使用代码复制功能,需要将 `highlight.noClasses` 参数设置为 `false`。 阅读 [其他配置文件](#other-configuration-files) 以获取更多信息。 | +| `enableSearch` | `false` | 是否开启网站的搜索功能,设为 `true` 即为启用。注意,搜索功能依赖于[站点设置](#网站配置)中的 `outputs.home` 设置,请确保此值配置正确。 | +| `enableCodeCopy` | `false` | 是否可以将``代码块复制到剪贴板。想要使用代码复制功能,需要将 `highlight.noClasses` 参数设置为 `false`。 阅读 [其他配置文件](#其他配置文件) 以获取更多信息。 | | `replyByEmail` | `false` | 是否在发布后启用“通过邮件回复”的链接。如果使用,则必须设置 `config/_default/languages.en.toml` 中的 `params.author.email` 参数。 | | `forgejoDefaultServer` | _Not set_ | 短代码 `forgejo` 的默认 `server` 参数。 | | `giteaDefaultServer` | _Not set_ | 短代码 `gitea` 的默认 `server` 参数。 | @@ -185,6 +185,7 @@ Blowfish 提供了大量控制主题功能的配置参数,下面的表格中 | `disableTextInHeader` | `false` | 禁用文本类型的标题,对基于 logo 的标题很有用。 | | `defaultBackgroundImage` | 无 | 设置默认背景图,用于 `background` 和 `hero` 布局下的主页。 | | `defaultFeaturedImage` | 无 | 设置默认背景图片,用于所有文章的`featured`图片,可以通过文章目录中的 `featured` 图片替换。 | +| `defaultSocialImage` | 无 | 社交媒体分享(Open Graph 和 Twitter)使用的默认图片,可以通过文章目录中的 `featured` 图片替换。 | | `highlightCurrentMenuArea` | 无 | 当菜单被选择时,标记主菜单中的菜单项。 | | `smartTOC` | 无 | 开启智能目录,视图中的项目将会被高亮显示。 | | `smartTOCHideUnfocusedChildren` | 无 | 当开启智能目录,如果目录级别不再被聚焦时,将会隐藏更深层次的目录。 | @@ -200,7 +201,7 @@ Blowfish 提供了大量控制主题功能的配置参数,下面的表格中 | 名称 | 默认值 | 描述 | | ------------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------- | | `footer.showMenu` | `true` | 显示/隐藏页面底部菜单,该菜单可以在 `config/_default/menus.en.toml` 文件中的 `[[footer]]` 部分进行配置。 | -| `footer.showCopyright` | `true` | 是否在底部显示 copyright 版权信息。请注意,如果你想定制,可以在[语言配置](#language-and-i18n)中使用 `copyright` 参数。 | +| `footer.showCopyright` | `true` | 是否在底部显示 copyright 版权信息。请注意,如果你想定制,可以在[语言配置](#语言和i18n)中使用 `copyright` 参数。 | | `footer.showThemeAttribution` | `true` | 是否在网站底部中显示"powered by" 的主题归属信息。如果禁用此参数,请考虑在你网站的其他位置设置主题归属信息,例如在关于页面。 | | `footer.showAppearanceSwitcher` | `false` | 是否在也页面底部显示外观切换器。浏览器的本地存储会缓存访问者的偏好设置。 | | `footer.showScrollToTop` | `true` | 当设置为 `true` 时,显示返回顶部的箭头按钮。 | @@ -218,6 +219,7 @@ Blowfish 提供了大量控制主题功能的配置参数,下面的表格中 | `homepage.cardView` | `false` | 将列表展示为卡片容器。 | | `homepage.cardViewScreenWidth` | `false` | 增强列表中卡片的宽度,使其可以占据可用的全部宽度。 | | `homepage.layoutBackgroundBlur` | `false` | 向下滚动主页时,是否模糊背景图。 | +| `homepage.disableHeroImageFilter` | `false` | 主页背景是否套用图片滤镜。 | ### 文章页 @@ -245,7 +247,7 @@ Blowfish 提供了大量控制主题功能的配置参数,下面的表格中 | `article.invertPagination` | `false` | 是否翻转下一篇/上一篇文章链接的方向。 | | `article.showReadingTime` | `true` | 是否展示文章的阅读时间。如果你的语言包含 CJK 语言,需要在 `config.toml` 中开启 `hasCJKLanguage` 参数。 | | `article.showTableOfContents` | `false` | 是否展示文章的目录。 | -| `article.showRelatedContent` | `false` | 为文章显示相关内容。如果你想要启用此功能,请检查 `config.toml` 文件并复制所有 *related* 相关的参数,如果你想自定义,也可以对 `config.toml` 添加额外配置。更多内容请参考 [Hugo 文档](https://gohugo.io/content-management/related/) 中关于 *related* 的内容。 | +| `article.showRelatedContent` | `false` | 为文章显示相关内容。如果你想要启用此功能,请检查 `config.toml` 文件并复制所有 _related_ 相关的参数,如果你想自定义,也可以对 `config.toml` 添加额外配置。更多内容请参考 [Hugo 文档](https://gohugo.io/content-management/related/) 中关于 _related_ 的内容。 | | `article.relatedContentLimit` | `3` | 如果启用`showRelatedContent`,则限制显示相关文章的数量。 | | `article.showTaxonomies` | `false` | 是否显示文章的分类或标签信息。 | | `article.showAuthorsBadges` | `false` | 是否在文章或列表中显示 `authors` 分类。这需要开启多个作者 `multiple authors` 和 `authors` 分类法。 请阅读 [这个网页]({{< ref "multi-author" >}}) 来获取更多内容。 | @@ -264,7 +266,7 @@ Blowfish 提供了大量控制主题功能的配置参数,下面的表格中 | `list.layoutBackgroundBlur` | `true` | 向下滚动列表页时,是否模糊背景图。 | | `list.layoutBackgroundHeaderSpace` | `true` | 在标题和正文之间添加空白区域间隔。 | | `list.showTableOfContents` | `false` | 是否展示目录。 | -| `list.showSummary` | `false` | 是否在列表页显示文章摘要。如果在[扉页参数]({{< ref "front-matter" >}})中没有提供摘要,那么将会使用[站点配置](#site-configuration) 中的 `summaryLength` 参数自动生成一个。 | +| `list.showSummary` | `false` | 是否在列表页显示文章摘要。如果在[扉页参数]({{< ref "front-matter" >}})中没有提供摘要,那么将会使用[站点配置](#网站配置) 中的 `summaryLength` 参数自动生成一个。 | | `list.showViews` | `false` | 是否显示文章阅读量。这需要集成 firebase ,具体可以看下面。 | | `list.showLikes` | `false` | 是否显示文章点赞量。这需要集成 firebase ,具体可以看下面。 | | `list.showCards` | `false` | 是否将每个文章显示为卡片或简单的内联文本。 | @@ -372,8 +374,7 @@ Blowfish 提供了大量控制主题功能的配置参数,下面的表格中 | `rssnext.feedId` | _Not set_ | [RSSNext/Follow](https://follow.is) 提供的 `feeId`,这将被自动添加在 `rss.xml` 中以便完成订阅源所有权验证,证明该源属于你自己。 | | `rssnext.userId` | _Not set_ | [RSSNext/Follow](https://follow.is) 提供的 `userId`,这将被自动添加在 `rss.xml` 中以便完成订阅源所有权验证,证明该源属于你自己 | - -## 别的配置文件 +## 其他配置文件 Blowfish 主题还包括 `markup.toml` 配置文件。这个文件包含了一些重要参数,来确保 Hugo 正确配置以生成使用 Blowfish 创建的网站。 diff --git a/exampleSite/content/docs/content-examples/index.zh-cn.md b/exampleSite/content/docs/content-examples/index.zh-cn.md index 343db7f2..7308e3b2 100644 --- a/exampleSite/content/docs/content-examples/index.zh-cn.md +++ b/exampleSite/content/docs/content-examples/index.zh-cn.md @@ -128,7 +128,7 @@ animals: ["lion", "cat"] 这个列表页会列举出所有包含在这个分类中的术语。在上面的例子中,`/animals/` 页面会包含 "lion" 和 "cat" 的链接,以此将访问者导向至具体的术语页。 -术语页将会列举出包含这个术语的所有页面。这些术语页面本质上和[列表页面](#list-pages)相同,并且以类似的方式运作。 +术语页将会列举出包含这个术语的所有页面。这些术语页面本质上和[列表页面](#列表页)相同,并且以类似的方式运作。 如果你想在分类页面中添加自定义的内容,只需要对应文件夹的目录中创建 `_index.md` 文件即可。 diff --git a/exampleSite/content/docs/firebase-views/index.it.md b/exampleSite/content/docs/firebase-views/index.it.md index 254056b8..34a93a4b 100644 --- a/exampleSite/content/docs/firebase-views/index.it.md +++ b/exampleSite/content/docs/firebase-views/index.it.md @@ -16,7 +16,7 @@ In order to be able to support dynamic data across your website we've added the 3. Select analytics location 4. Setup firebase in Blowfish by getting the variables for your project and setting them inside `params.toml` file. More details can be found in }}">this page. You can find an example of the file Firebase will provide below, notice the parameters within the FirebaseConfig object. -``` +```js // Import the functions you need from the SDKs you need import { initializeApp } from "firebase/app"; import { getAnalytics } from "firebase/analytics"; @@ -41,7 +41,7 @@ const analytics = getAnalytics(app); ``` 5. Setup Firestore - Select Build and open Firestore. Create a new database and choose to start in production mode. Select server location and wait. Once that is started you need to configure the rules. Just copy and paste the file below and press publish. -``` +```txt rules_version = '2'; service cloud.firestore { match /databases/{database}/documents { diff --git a/exampleSite/content/docs/firebase-views/index.ja.md b/exampleSite/content/docs/firebase-views/index.ja.md index 16fc008c..d348b339 100644 --- a/exampleSite/content/docs/firebase-views/index.ja.md +++ b/exampleSite/content/docs/firebase-views/index.ja.md @@ -16,7 +16,7 @@ series_order: 15 3. 分析ロケーションを選択します 4. プロジェクトの変数を取得し、`params.toml` ファイル内で設定して、Blowfish で Firebase を設定します。詳細は、}}">このページをご覧ください。Firebase が提供するファイルの例を以下に示します。FirebaseConfig オブジェクト内のパラメータに注意してください。 -``` +```js // 必要な SDK から必要な関数をインポートします import { initializeApp } from "firebase/app"; import { getAnalytics } from "firebase/analytics"; @@ -41,7 +41,7 @@ const analytics = getAnalytics(app); ``` 5. Firestore を設定する - 「ビルド」を選択して Firestore を開きます。新しいデータベースを作成し、本番モードで開始することを選択します。サーバーの場所を選択して待ちます。開始したら、ルールを設定する必要があります。以下のファイルをコピーして貼り付け、「公開」をクリックします。 -``` +```txt rules_version = '2'; service cloud.firestore { match /databases/{database}/documents { diff --git a/exampleSite/content/docs/firebase-views/index.md b/exampleSite/content/docs/firebase-views/index.md index 254056b8..34a93a4b 100644 --- a/exampleSite/content/docs/firebase-views/index.md +++ b/exampleSite/content/docs/firebase-views/index.md @@ -16,7 +16,7 @@ In order to be able to support dynamic data across your website we've added the 3. Select analytics location 4. Setup firebase in Blowfish by getting the variables for your project and setting them inside `params.toml` file. More details can be found in }}">this page. You can find an example of the file Firebase will provide below, notice the parameters within the FirebaseConfig object. -``` +```js // Import the functions you need from the SDKs you need import { initializeApp } from "firebase/app"; import { getAnalytics } from "firebase/analytics"; @@ -41,7 +41,7 @@ const analytics = getAnalytics(app); ``` 5. Setup Firestore - Select Build and open Firestore. Create a new database and choose to start in production mode. Select server location and wait. Once that is started you need to configure the rules. Just copy and paste the file below and press publish. -``` +```txt rules_version = '2'; service cloud.firestore { match /databases/{database}/documents { diff --git a/exampleSite/content/docs/firebase-views/index.zh-cn.md b/exampleSite/content/docs/firebase-views/index.zh-cn.md index 0b3754ea..f563366a 100644 --- a/exampleSite/content/docs/firebase-views/index.zh-cn.md +++ b/exampleSite/content/docs/firebase-views/index.zh-cn.md @@ -16,7 +16,7 @@ series_order: 15 3. 选择分析位置 4. Blowfish 是通过 `params.toml` 配置文件中的 firebase 相关参数,来和 firebase 集成的,更多的细节内容可以参考 }}">这个页面。你可以在下面找到集成 firebase 的文件示例,请注意 FirebaseConfig 对象内的参数。 -``` +```js // 从你需要的 SDK 中导入所需的函数 import { initializeApp } from "firebase/app"; import { getAnalytics } from "firebase/analytics"; @@ -41,7 +41,7 @@ const analytics = getAnalytics(app); ``` 5. 设置 Firestore - 选择 Build 并打开 Firestore. 创建一个数据库,并在生产环境中启动。选择服务器位置然后等待其部署完成。启动之后你需要配置规则。只需要复制并粘贴下面的内容,然后点击发布即可。 -``` +```txt rules_version = '2'; service cloud.firestore { match /databases/{database}/documents { diff --git a/exampleSite/content/docs/homepage-layout/index.it.md b/exampleSite/content/docs/homepage-layout/index.it.md index b6d62a51..3ed9d608 100644 --- a/exampleSite/content/docs/homepage-layout/index.it.md +++ b/exampleSite/content/docs/homepage-layout/index.it.md @@ -11,13 +11,13 @@ series_order: 5 Blowfish fornisce un layout della home page completamente flessibile. Sono disponibili due modelli principali tra cui scegliere con impostazioni aggiuntive per adattare il design. In alternativa, puoi anche fornire il tuo modello e avere il controllo completo sul contenuto della home page. -Il layout della home page è controllato dall'impostazione `homepage.layout` nel file di configurazione `params.toml`. Inoltre, tutti i layout hanno la possibilità di includere un elenco di [articoli recenti](#recent-articles). +Il layout della home page è controllato dall'impostazione `homepage.layout` nel file di configurazione `params.toml`. Inoltre, tutti i layout hanno la possibilità di includere un elenco di [articoli recenti](#articoli-recenti). ## Profile layout Il layout predefinito è quello del profilo, ideale per i siti web e i blog personali. Mette i dettagli dell'autore in primo piano, fornendo un'immagine e i link ai profili sociali. - +{{< figure src="img/home-profile.png" class="thumbnailshadow" >}} Le informazioni sull'autore sono fornite nel file di configurazione delle lingue. Fare riferimento alle sezioni [Guida introduttiva]({{< ref "getting-started" >}}) e [Configurazione della lingua]({{< ref "configuration##language-and-i18n" >}}) per i dettagli sui parametri. @@ -28,7 +28,7 @@ Per abilitare il layout del profilo, impostare `homepage.layout = “profile”` ## Page layout Il layout di pagina è semplicemente una normale pagina di contenuto che visualizza il contenuto Markdown. È ottimo per i siti web statici e offre una grande flessibilità. - +{{< figure src="img/home-page.png" class="thumbnailshadow" >}} Per abilitare il layout di pagina, impostare `homepage.layout = “page”` nel file di configurazione `params.toml`. @@ -36,7 +36,7 @@ Per abilitare il layout di pagina, impostare `homepage.layout = “page”` nel Il layout hero riunisce le idee dei layout profilo e scheda. Questo non solo mostra le informazioni sull'autore del sito, ma carica anche il markdown sotto di esso. - +{{< figure src="img/home-hero.png" class="thumbnailshadow" >}} Per abilitare il layout Hero, impostare `homepage.layout = “hero”` e `homepage.homepageImage` nel file di configurazione `params.toml`. @@ -44,7 +44,7 @@ Per abilitare il layout Hero, impostare `homepage.layout = “hero”` e `homepa Il layout di sfondo è una versione più fluida del layout Hero. Come nel layout Hero, anche in questo caso vengono visualizzate le informazioni sull'autore del sito e viene caricato il markdown sotto di esso. - +{{< figure src="img/home-background.png" class="thumbnailshadow" >}} Per abilitare il layout di sfondo, impostare `homepage.layout = “background”` e `homepage.homepageImage` nel file di configurazione `params.toml`. @@ -52,7 +52,7 @@ Per abilitare il layout di sfondo, impostare `homepage.layout = “background” Il layout delle schede è un'estensione del layout di pagina. Offre lo stesso livello di flessibilità, visualizzando anche i contenuti markdown e aggiungendo un'immagine per visualizzare i contenuti visivi. - +{{< figure src="img/home-card.png" class="thumbnailshadow" >}} Per abilitare il layout a scheda, impostare `homepage.layout = “card”` e `homepage.homepageImage` nel file di configurazione `params.toml`. @@ -65,7 +65,7 @@ Per abilitare il layout personalizzato, impostare `homepage.layout = “custom Con il valore di configurazione impostato, creare un nuovo file `custom.html` e collocarlo in `layouts/partials/home/custom.html`. Ora tutto ciò che è contenuto nel file `custom.html` sarà collocato nell'area dei contenuti della homepage del sito. È possibile utilizzare qualsiasi funzione HTML, Tailwind o Hugo per definire il layout. -Per includere [articoli recenti](#recent-articles) nel layout personalizzato, utilizzare il partial `recent-articles/main.html`. +Per includere [articoli recenti](#articoli-recenti) nel layout personalizzato, utilizzare il partial `recent-articles/main.html`. Ad esempio, la [homepage]({{< ref "/" >}}) di questo sito utilizza il layout personalizzato per consentire di passare dal layout del profilo a quello della pagina. Visitare il [repo GitHub](https://github.com/nunocoracao/blowfish/blob/main/exampleSite/layouts/partials/home/custom.html) per vedere come funziona. @@ -73,7 +73,7 @@ Ad esempio, la [homepage]({{< ref "/" >}}) di questo sito utilizza il layout per Tutti i layout delle homepage hanno la possibilità di visualizzare gli articoli recenti sotto il contenuto della pagina principale. Per attivarla, è sufficiente impostare l'opzione `homepage.showRecent` a `true` nel file di configurazione `params.toml`. - +{{< figure src="img/home-list.png" class="thumbnailshadow" >}} Gli articoli elencati in questa sezione sono derivati dall'impostazione `mainSections`, che consente di utilizzare i tipi di contenuto del sito web. Per esempio, se si hanno sezioni di contenuto per _post_ e _progetti_, si può impostare questa impostazione su `[“post”, “progetti”]` e tutti gli articoli di queste due sezioni saranno utilizzati per popolare l'elenco dei recenti. Il tema si aspetta che questa impostazione sia un array, quindi se si utilizza una sola sezione per tutti i contenuti, è necessario impostarla di conseguenza: `[“blog”]`. diff --git a/exampleSite/content/docs/homepage-layout/index.ja.md b/exampleSite/content/docs/homepage-layout/index.ja.md index cb4eee20..e0f2ae91 100644 --- a/exampleSite/content/docs/homepage-layout/index.ja.md +++ b/exampleSite/content/docs/homepage-layout/index.ja.md @@ -17,7 +17,7 @@ Blowfish は完全に柔軟なホームページレイアウトを提供しま デフォルトのレイアウトはプロフィールレイアウトで、個人ウェブサイトやブログに最適です。画像とソーシャルプロファイルへのリンクを提供することで、著者の詳細を前面に押し出します。 - +{{< figure src="img/home-profile.png" class="thumbnailshadow" >}} 著者情報は、言語設定ファイルで提供されます。パラメータの詳細については、[始める]({{< ref "getting-started" >}})と[言語設定]({{< ref "configuration#言語と-i18n" >}})セクションを参照してください。 @@ -29,7 +29,7 @@ Blowfish は完全に柔軟なホームページレイアウトを提供しま ページレイアウトは、Markdown コンテンツを表示する通常のコンテンツページです。静的ウェブサイトに最適で、高い柔軟性を提供します。 - +{{< figure src="img/home-page.png" class="thumbnailshadow" >}} ページレイアウトを有効にするには、`params.toml` 設定ファイルで `homepage.layout = "page"` を設定します。 @@ -37,7 +37,7 @@ Blowfish は完全に柔軟なホームページレイアウトを提供しま ヒーローレイアウトは、プロフィールレイアウトとカードレイアウトのアイデアを組み合わせたものです。これは、サイトの著者に関する情報を表示するだけでなく、その下に Markdown をロードします。 - +{{< figure src="img/home-hero.png" class="thumbnailshadow" >}} ヒーローレイアウトを有効にするには、`params.toml` 設定ファイルで `homepage.layout = "hero"` と `homepage.homepageImage` を設定します。 @@ -45,7 +45,7 @@ Blowfish は完全に柔軟なホームページレイアウトを提供しま 背景レイアウトは、ヒーローレイアウトをより滑らかにしたバージョンです。ヒーローレイアウトと同様に、サイトの著者に関する情報を表示し、その下に Markdown をロードします。 - +{{< figure src="img/home-background.png" class="thumbnailshadow" >}} 背景レイアウトを有効にするには、`params.toml` 設定ファイルで `homepage.layout = "background"` と `homepage.homepageImage` を設定します。 @@ -53,7 +53,7 @@ Blowfish は完全に柔軟なホームページレイアウトを提供しま カードレイアウトは、ページレイアウトの拡張版です。Markdown コンテンツも表示することで同じレベルの柔軟性を提供し、ビジュアルコンテンツを表示するためのカード画像も追加します。 - +{{< figure src="img/home-card.png" class="thumbnailshadow" >}} カードレイアウトを有効にするには、`params.toml` 設定ファイルで `homepage.layout = "card"` と `homepage.homepageImage` を設定します。 @@ -73,7 +73,7 @@ Blowfish は完全に柔軟なホームページレイアウトを提供しま すべてのホームページレイアウトには、メインページコンテンツの下に最新記事を表示するオプションがあります。これを有効にするには、`params.toml` 設定ファイルで `homepage.showRecent` 設定を `true` に設定するだけです。 - +{{< figure src="img/home-list.png" class="thumbnailshadow" >}} このセクションにリストされている記事は、`mainSections` 設定から派生したもので、ウェブサイトで使用しているコンテンツタイプを指定できます。たとえば、_posts_ と _projects_ のコンテンツセクションがある場合、この設定を `["posts", "projects"]` に設定すると、これら2つのセクションのすべての記事が最新リストに表示されます。テーマはこの設定を配列として想定しているため、すべてのコンテンツに1つのセクションのみを使用する場合は、それに応じて設定する必要があります: `["blog"]`。 diff --git a/exampleSite/content/docs/homepage-layout/index.md b/exampleSite/content/docs/homepage-layout/index.md index 14ea10b8..dc371558 100644 --- a/exampleSite/content/docs/homepage-layout/index.md +++ b/exampleSite/content/docs/homepage-layout/index.md @@ -17,7 +17,7 @@ The layout of the homepage is controlled by the `homepage.layout` setting in the The default layout is the profile layout, which is great for personal websites and blogs. It puts the author's details front and centre by providing an image and links to social profiles. - +{{< figure src="img/home-profile.png" class="thumbnailshadow" >}} The author information is provided in the languages configuration file. Refer to the [Getting Started]({{< ref "getting-started" >}}) and [Language Configuration]({{< ref "configuration##language-and-i18n" >}}) sections for parameter details. @@ -29,7 +29,7 @@ To enable the Profile layout, set `homepage.layout = "profile"` in the `params.t The page layout is simply a normal content page that displays your Markdown content. It's great for static websites and provides a lot of flexibility. - +{{< figure src="img/home-page.png" class="thumbnailshadow" >}} To enable the Page layout, set `homepage.layout = "page"` in the `params.toml` configuration file. @@ -37,7 +37,7 @@ To enable the Page layout, set `homepage.layout = "page"` in the `params.toml` c The hero layout brings together ideas from the profile and card layouts. This one not only displays information on the author of the site but it also loads your markdown beneath it. - +{{< figure src="img/home-hero.png" class="thumbnailshadow" >}} To enable the Hero layout, set `homepage.layout = "hero"` and `homepage.homepageImage` in the `params.toml` configuration file. @@ -45,7 +45,7 @@ To enable the Hero layout, set `homepage.layout = "hero"` and `homepage.homepage The background layout is a more smooth version of the hero layout. As in the Hero layout, this one also displays both information on the author of the site and loads your markdown beneath it. - +{{< figure src="img/home-background.png" class="thumbnailshadow" >}} To enable the Background layout, set `homepage.layout = "background"` and `homepage.homepageImage` in the `params.toml` configuration file. @@ -53,7 +53,7 @@ To enable the Background layout, set `homepage.layout = "background"` and `homep The card layout is an extension of the page layout. It provides the same level of flexibility by also displaying your markdown content and adds a card image to display visual content. - +{{< figure src="img/home-card.png" class="thumbnailshadow" >}} To enable the Card layout, set `homepage.layout = "card"` and `homepage.homepageImage` in the `params.toml` configuration file. @@ -74,7 +74,7 @@ As an example, the [homepage]({{< ref "/" >}}) on this site uses the custom layo All homepage layouts have the option of displaying recent articles below the main page content. To enable this, simply set the `homepage.showRecent` setting to `true` in the `params.toml` configuration file. - +{{< figure src="img/home-list.png" class="thumbnailshadow" >}} The articles listed in this section are derived from the `mainSections` setting which allows for whatever content types you are using on your website. For instance, if you had content sections for _posts_ and _projects_ you could set this setting to `["posts", "projects"]` and all the articles in these two sections would be used to populate the recent list. The theme expects this setting to be an array so if you only use one section for all your content, you should set this accordingly: `["blog"]`. diff --git a/exampleSite/content/docs/homepage-layout/index.zh-cn.md b/exampleSite/content/docs/homepage-layout/index.zh-cn.md index 0601ba81..c7bb5370 100644 --- a/exampleSite/content/docs/homepage-layout/index.zh-cn.md +++ b/exampleSite/content/docs/homepage-layout/index.zh-cn.md @@ -11,13 +11,13 @@ series_order: 5 Blowfish 提供了一个完全灵活的主页布局。你可以选择两种主要模板,并提供了额外的参数来帮助调整设计。当然,你也可以提供自己的模板,完全控制主页的内容。 -主页布局由 `params.toml` 配置文件中的 `homepage.layout` 参数来控制的。此外所有布局都默认包括 [最近文章](#recent-articles)。 +主页布局由 `params.toml` 配置文件中的 `homepage.layout` 参数来控制的。此外所有布局都默认包括 [最近文章](#最近文章)。 ## 个人资料布局 (profile) 默认的布局是 profile 布局,这非常适合个人网站和博客。它将作者的详细信息置于中心位置,并附带了头像和社交平台的链接。 - +{{< figure src="img/home-profile.png" class="thumbnailshadow" >}} 作者信息是在语言配置文件中提供的。具体的参数详情,请参考[快速入门]({{< ref "getting-started" >}})和[语言配置]({{< ref "configuration##language-and-i18n" >}})的内容。 @@ -29,7 +29,7 @@ Blowfish 提供了一个完全灵活的主页布局。你可以选择两种主 页面布局只会简单的显示你的 Markdown 内容,这种方式非常适合静态网站,并提供了很多灵活性。 - +{{< figure src="img/home-page.png" class="thumbnailshadow" >}} 如果想要启用 page 布局,请在 `params.toml` 配置文件中设置 `homepage.layout = "page"`。 @@ -37,7 +37,7 @@ Blowfish 提供了一个完全灵活的主页布局。你可以选择两种主 英雄布局(hero)组合了个人资料布局(profile)和卡片布局(card)。它不仅显示了网站作者的个人信息,还在个人资料下方加载了你的 markdown 内容。 - +{{< figure src="img/home-hero.png" class="thumbnailshadow" >}} 如果想要启用 hero 布局,请在 `params.toml` 配置文件中设置 `homepage.layout = "hero"`。 @@ -45,7 +45,7 @@ Blowfish 提供了一个完全灵活的主页布局。你可以选择两种主 背景布局(background)相对于英雄布局(hero)更叫平滑。和英雄布局(hero)类似,它也显示了网站作者的信息,并在其下方加载 markdown 内容。 - +{{< figure src="img/home-background.png" class="thumbnailshadow" >}} 如果想要启用 background 布局,请在 `params.toml` 配置文件中设置 `homepage.layout = "background"` 和 `homepage.homepageImage` 。 @@ -53,7 +53,7 @@ Blowfish 提供了一个完全灵活的主页布局。你可以选择两种主 卡片模板(card)是在页面布局上的扩展,它同样提供了灵活性。在显示了你的 markdown 内容的同时,展示了一个卡片组件中的图像。 - +{{< figure src="img/home-card.png" class="thumbnailshadow" >}} 如果想要启用 card 布局,请在 `params.toml` 配置文件中设置 `homepage.layout = "card"` 和 `homepage.homepageImage` 。 @@ -65,7 +65,7 @@ Blowfish 提供了一个完全灵活的主页布局。你可以选择两种主 配置好参数后,在 `layouts/partials/home` 目录下创建一个 `custom.html` 文件。 `custom.html` 文件中定义的任何内容都会被放置在网站主页的内容区域。你可以使用 HTML、Tailwind 或 Hugo 模板函数来定义你的布局。 -如果你想在自定义布局上添加 [最近文章](#recent-articles),请使用 `recent-articles/main.html` 中的内容。 +如果你想在自定义布局上添加 [最近文章](#最近文章),请使用 `recent-articles/main.html` 中的内容。 如果你想在网站[主页]({{< ref "/" >}})使用自定义布局来实现在个人资料和页面布局之间的切换。这里的[GitHub 仓库](https://github.com/nunocoracao/blowfish/blob/main/exampleSite/layouts/partials/home/custom.html)有一个例子可以参考。 @@ -73,7 +73,7 @@ Blowfish 提供了一个完全灵活的主页布局。你可以选择两种主 所有的主页布局都可以在主要内容下方显示最近文章。如果想要启用此功能,只需要在 `params.toml` 配置文件中将 `homepage.showRecent` 参数设置为 `true` 即可。 - +{{< figure src="img/home-list.png" class="thumbnailshadow" >}} 这部分会列举出你在 `mainSections` 参数中设置的文章列表,此参数允许你使用网站上的任何内容类型。例如,如果你想在最新文章中展示 _posts_ 和 _projects_ 内容中的文章,你可以将此值设置为 `["posts", "projects"]`,这两个部分中的所有文章都会填充到最近文章列表中。Blowfish 主题期望这个参数是一个数组,如果你只想设置一个部分的所有文章,你可以设置为 `["blog"]` 即可。 diff --git a/exampleSite/content/docs/installation/index.it.md b/exampleSite/content/docs/installation/index.it.md index 56aaa055..5f8a3945 100644 --- a/exampleSite/content/docs/installation/index.it.md +++ b/exampleSite/content/docs/installation/index.it.md @@ -11,7 +11,7 @@ series_order: 2 Segui semplicemente la procedura standard [Avvio Rapido](https://gohugo.io/getting-started/quick-start/) di Hugo per iniziare subito. -Sono riportate le istruzioni dettagliate per l'installazione. Sono disponibili anche le istruzioni per [aggiornare il tema](#installazione-aggiornamenti). +Sono riportate le istruzioni dettagliate per l'installazione. Sono disponibili anche le istruzioni per [aggiornare il tema](#installazione-degli-aggiornamenti). ## Installazione @@ -66,9 +66,9 @@ La cartella del progetto può essere chiamata come si vuole, ma le istruzioni ch Esistono diversi modi per installare il tema Blowfish nel proprio sito web Hugo. Dal più facile al più difficile da installare e mantenere, sono: -- [Git submodule](#install-using-git) (recommended) -- [Hugo module](#install-using-hugo) -- [Copia manuale dei file](#install-manually) +- [Git submodule](#installazione-usando-git) (recommended) +- [Hugo module](#installazione-usando-hugo) +- [Copia manuale dei file](#installazione-manuale) Se non sei sicuro, scegli il metodo Git submodule. @@ -84,7 +84,7 @@ git init git submodule add -b main https://github.com/nunocoracao/blowfish.git themes/blowfish ``` -poi continua a [impostare i file di configurazione del tema](#set-up-theme-configuration-files). +poi continua a [impostare i file di configurazione del tema](#imposta-i-file-di-configurazione-del-tema). #### Installazione usando Hugo @@ -115,7 +115,7 @@ Per questo metodo utilizzerai Hugo per gestire i tuoi temi. Hugo utilizza **Go** ``` 4. Avvia il tuo server utilizzando `hugo server` e il tema verrà scaricato automaticamente. -5. Continua con [impostare i file di configurazione del tema](#set-up-theme-configuration-files). +5. Continua con [impostare i file di configurazione del tema](#imposta-i-file-di-configurazione-del-tema). #### Installazione manuale 1. Scarica l'ultima versione del codice sorgente del tema. @@ -124,7 +124,7 @@ Per questo metodo utilizzerai Hugo per gestire i tuoi temi. Hugo utilizza **Go** "blowfish" e "themes/" 2. Estrai l'archivio, rinomina la cartella in `blowfish` spostala nella directory `themes/` all'interno della cartella principale del tuo progetto Hugo. -3. Continua con [impostare i file di configurazione del tema](#set-up-theme-configuration-files). +3. Continua con [impostare i file di configurazione del tema](#imposta-i-file-di-configurazione-del-tema). #### Imposta i file di configurazione del tema @@ -167,9 +167,9 @@ Di tanto in tanto verranno pubblicate [nuove versioni](https://github.com/nunoco Il modo in cui procedere dipenderà dal metodo di installazione scelto al momento dell'installazione originale del tema. Le istruzioni per ciascun metodo sono disponibili di seguito. -- [Git submodule](#update-using-git) -- [Hugo module](#update-using-hugo) -- [Copia manuale del file](#aggiornamento-manuale) +- [Git submodule](#aggiornamento-utilizzando-git) +- [Hugo module](#aggiornamento-utilizzando-hugo) +- [Copia manuale del file](#aggiornamenti-manuali) ### Aggiornamento utilizzando Git diff --git a/exampleSite/content/docs/installation/index.zh-cn.md b/exampleSite/content/docs/installation/index.zh-cn.md index 8cf1c663..b2503469 100644 --- a/exampleSite/content/docs/installation/index.zh-cn.md +++ b/exampleSite/content/docs/installation/index.zh-cn.md @@ -11,7 +11,7 @@ series_order: 2 如果想快速上手,可以按照标准的 Hugo [快速启动](https://gohugo.io/getting-started/quick-start/) 文档。 -更详细的安装如下,[更新主题](#installing-updates)的教程也可以看此文档。 +更详细的安装如下,[更新主题](#更新主题)的教程也可以看此文档。 ## 前言 @@ -66,9 +66,9 @@ blowfish-tools new mynewsite 有多种方法可以将 Blowfish 主题安装在 Hugo 站点中。下面我们由易到难逐一介绍: -- [使用 Git 子模块安装](#install-using-git) (推荐) -- [使用 Hugo 模块安装](#install-using-hugo) -- [手动文件复制](#install-manually) +- [使用 Git 子模块安装](#使用-git-子模块安装) (推荐) +- [使用 Hugo 模块安装](#使用-hugo-模板安装) +- [手动文件复制](#手动复制文件) 如果你不确定用哪一个,请直接选择 Git 子模块的方式。 @@ -84,7 +84,7 @@ git init git submodule add -b main https://github.com/nunocoracao/blowfish.git themes/blowfish ``` -然后 [设置主题的配置文件](#set-up-theme-configuration-files)。 +然后 [设置主题的配置文件](#手动复制文件)。 #### 使用 Hugo 模板安装 @@ -115,7 +115,7 @@ git submodule add -b main https://github.com/nunocoracao/blowfish.git themes/blo ``` 4. 使用`hugo server` 命令后,主题将会自动下载。 -5. 然后 [设置主题的配置文件](#set-up-theme-configuration-files). +5. 然后 [设置主题的配置文件](#手动复制文件). #### 手动复制文件 @@ -124,7 +124,7 @@ git submodule add -b main https://github.com/nunocoracao/blowfish.git themes/blo {{< button href="https://github.com/nunocoracao/blowfish/releases/latest" target="_blank" >}}从 Github 下载{{< /button >}} 2. 解压缩, 并将文件夹重命名为 `blowfish`,将其移动到你的 Hugo 项目根目录下的 `themes/` 目录中。 -3. 然后 [设置主题的配置文件](#set-up-theme-configuration-files). +3. 然后 [设置主题的配置文件](#手动复制文件). #### 设置主题的配置文件 @@ -167,11 +167,11 @@ config/_default/ 如何更新主题取决于最初安装主题时选择的安装方式,具体如下: -- [使用 Git 子模块安装](#update-using-git) -- [使用 Hugo 模块安装](#update-using-hugo) -- [手动文件复制](#update-manually) +- [使用 Git 子模块安装](#使用-git-更新) +- [使用 Hugo 模块安装](#使用-hugo-更新) +- [手动文件复制](#手动更新) -### 利用 git 更新 +### 使用 git 更新 Git 子模块的方式,可以使用 `git` 命令更新。只需执行以下命令,最新版的主题将会下载到你的本地仓库中: diff --git a/exampleSite/content/docs/shortcodes/index.it.md b/exampleSite/content/docs/shortcodes/index.it.md index ef969f10..c42e7bce 100644 --- a/exampleSite/content/docs/shortcodes/index.it.md +++ b/exampleSite/content/docs/shortcodes/index.it.md @@ -18,7 +18,7 @@ In addition to all the [default Hugo shortcodes](https://gohugo.io/content-manag | Parameter | Description | | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `icon` | **Optional.** the icon to display on the left side.
**Default:** `exclaimation triangle icon` (Check out the [icon shortcode](#icon) for more details on using icons.) | +| `icon` | **Optional.** the icon to display on the left side.
**Default:** `triangle-exclamation` (Check out the [icon shortcode](#icon) for more details on using icons.) | | `iconColor` | **Optional.** the color for the icon in basic CSS style.
Can be either hex values (`#FFFFFF`) or color names (`white`)
By default chosen based on the current color theme . | | `cardColor` | **Optional.** the color for the card background in basic CSS style.
Can be either hex values (`#FFFFFF`) or color names (`white`)
By default chosen based on the current color theme . | | `textColor` | **Optional.** the color for the text in basic CSS style.
Can be either hex values (`#FFFFFF`) or color names (`white`)
By default chosen based on the current color theme . | @@ -286,6 +286,26 @@ Blowfish also supports automatic conversion of images included using standard Ma


+## Forgejo Card + +`forgejo` allows you to quickly link a Forgejo repository via the forgejo API, providing real-time updates on stats such as stars and forks. + + +| Parameter | Description | +| --------- | ----------------------------------------------------- | +| `repo` | [String] forgejo repo in the format of `username/repo`| +| `server` | [String] server URL like `https://v8.next.forgejo.org`| + + +**Example 1:** + +```md +{{}} +``` +{{< forgejo server="https://v8.next.forgejo.org" repo="forgejo/forgejo" >}} + +


+ ## Gallery `gallery` allows you to showcase multiple images at once, in a responsive manner with more varied and interesting layouts. @@ -361,7 +381,6 @@ In order to add images to the gallery, use `img` tags for each image and add `cl {{}} ```` -{{< gist "octocat" "6cad326836d38bd3a7ae" >}} **Example 2: Embed specific file from Gist** @@ -369,7 +388,25 @@ In order to add images to the gallery, use `img` tags for each image and add `cl {{}} ``` -{{< gist "rauchg" "2052694" "README.md" >}} +


+ +## Gitea Card + +`gitea` allows you to quickly link a Gitea repository via the gitea API, providing real-time updates on stats such as stars and forks. + + +| Parameter | Description | +| --------- | ----------------------------------------------------- | +| `repo` | [String] gitea repo in the format of `username/repo` | +| `server` | [String] server URL like `https://git.fsfe.org` | + + +**Example 1:** + +```md +{{}} +``` +{{< gitea server="https://git.fsfe.org" repo="FSFE/fsfe-website" >}}


@@ -706,7 +743,7 @@ With other shortcodes {{< timeline >}} {{< timelineItem icon="github" header="header" badge="badge test" subheader="subheader" >}} -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus non magna ex. Donec sollicitudin ut lorem quis lobortis. Nam ac ipsum libero. Sed a ex eget ipsum tincidunt venenatis quis sed nisl. Pellentesque sed urna vel odio consequat tincidunt id ut purus. Nam sollicitudin est sed dui interdum rhoncus. +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus non magna ex. Donec sollicitudin ut lorem quis lobortis. Nam ac ipsum libero. Sed a ex eget ipsum tincidunt venenatis quis sed nisl. Pellentesque sed urna vel odio consequat tincidunt id ut purus. Nam sollicitudin est sed dui interdum rhoncus. {{}} diff --git a/exampleSite/content/docs/shortcodes/index.md b/exampleSite/content/docs/shortcodes/index.md index a67bacf7..9c7d1d9f 100644 --- a/exampleSite/content/docs/shortcodes/index.md +++ b/exampleSite/content/docs/shortcodes/index.md @@ -418,9 +418,10 @@ In order to add images to the gallery, use `img` tags for each image and add `cl `github` allows you to quickly link a github repository, all while showing and updating in realtime stats about it, such as the number of stars and forks it has. -| Parameter | Description | -| --------- | ----------------------------------------------------- | -| `repo` | [String] github repo in the format of `username/repo` | +| Parameter | Description | +|-----------------|---------------------------------------------------------------| +| `repo` | [String] github repo in the format of `username/repo` | +| `showThumbnail` | **Optional** [boolean] display a thumbnail for the repository | **Example 1:** diff --git a/exampleSite/content/docs/shortcodes/index.zh-cn.md b/exampleSite/content/docs/shortcodes/index.zh-cn.md index a73e03ef..14139e20 100644 --- a/exampleSite/content/docs/shortcodes/index.zh-cn.md +++ b/exampleSite/content/docs/shortcodes/index.zh-cn.md @@ -18,7 +18,7 @@ series_order: 8 | 参数 | 功能 | | ----------- | -------------------------------------------------------------------------------------------------------------------------------- | -| `icon` | **可选** 显示在左侧的图标。
**默认:** `exclaimation triangle icon` (查看[图标简码](#icon),了解有关使用图标的更多详细信息。) | +| `icon` | **可选** 显示在左侧的图标。
**默认:** `exclaimation triangle icon` (查看[图标简码](#图标),了解有关使用图标的更多详细信息。) | | `iconColor` | **可选** 基本 CSS 样式中图标的颜色。
可以是十六进制值 (`#FFFFFF`) 或颜色名称 (`white`)
默认情况下由当前配色方案决定。 | | `cardColor` | **可选** 基本 CSS 样式中卡片背景的颜色。
可以是十六进制值 (`#FFFFFF`) 或颜色名称 (`white`)
默认情况下由当前配色方案决定。 | | `textColor` | **可选** 基本 CSS 样式中文本的颜色。
可以是十六进制值 (`#FFFFFF`) 或颜色名称 (`white`)
默认情况下由当前配色方案决定。 | @@ -362,7 +362,6 @@ Blowfish 还支持使用标准 Markdown 语法自动转换图像。只需使用 {{}} ``` -{{< gist "octocat" "6cad326836d38bd3a7ae" >}} **示例 2:嵌入 Gist 中的特定文件** @@ -370,7 +369,27 @@ Blowfish 还支持使用标准 Markdown 语法自动转换图像。只需使用 {{}} ``` -{{< gist "rauchg" "2052694" "README.md" >}} +


+ + +## Gitea 卡片 + +`gitea` 允许你通过 gitea API 快速链接一个 Gitea 仓库,提供诸如 stars 和 forks 等统计数据的实时更新。 + + +| 参数 | 描述 | +| -------- | --------------------------------------- | +| `repo` | \[字符串] 以 `用户名/仓库名` 格式表示的 gitea 仓库 | +| `server` | \[字符串] 服务器 URL,如 `https://git.fsfe.org` | + + +**示例 1:** + +```md +{{}} +``` + +{{< gitea server="https://git.fsfe.org" repo="FSFE/fsfe-website" >}}


@@ -707,17 +726,17 @@ With other shortcodes {{< timelineItem icon="github" header="header" badge="badge test" subheader="subheader" >}} Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus non magna ex. Donec sollicitudin ut lorem quis lobortis. Nam ac ipsum libero. Sed a ex eget ipsum tincidunt venenatis quis sed nisl. Pellentesque sed urna vel odio consequat tincidunt id ut purus. Nam sollicitudin est sed dui interdum rhoncus. -{{}} +{{< /timelineItem >}} -{{< timelineItem icon="code" header="Another Awesome Header" badge="date - present" subheader="Awesome Subheader">}} +{{< timelineItem icon="code" header="Another Awesome Header" badge="date - present" subheader="Awesome Subheader" >}} With html code
  • Coffee
  • Tea
  • Milk
-{{}} +{{< /timelineItem >}} {{< timelineItem icon="star" header="Shortcodes" badge="AWESOME" >}} With other shortcodes @@ -730,12 +749,13 @@ With other shortcodes {{< /gallery >}} +{{< /timelineItem >}} + {{< timelineItem icon="code" header="Another Awesome Header">}} {{< github repo="nunocoracao/blowfish" >}} -{{}} -{{}} +{{< /timelineItem >}} -{{}} +{{< /timeline >}}


diff --git a/exampleSite/content/docs/welcome/index.it.md b/exampleSite/content/docs/welcome/index.it.md index 9abd448b..7578cf62 100644 --- a/exampleSite/content/docs/welcome/index.it.md +++ b/exampleSite/content/docs/welcome/index.it.md @@ -24,7 +24,7 @@ Tailwind CSS è il cuore di Blowfish e questa versione contiene l'ultima [Tailwi Blowfish è ora multilingue! Una funzionalità molto richiesta. Se pubblichi i tuoi contenuti in più lingue, il sito verrà realizzato con tutte le traduzioni disponibili. -
:gb: :de: :fr: :es: :cn: :brazil: :tr: :bangladesh:
+
🇬🇧 🇩🇪 🇫🇷 🇪🇸 🇨🇳 🇧🇷 🇹🇷 🇧🇩
Grazie ai contributi della community, Blowfish è già stato tradotto in [trenta lingue](https://github.com/nunocoracao/blowfish/tree/main/i18n) e altre verranno aggiunte nel tempo. A proposito, le [richieste pull](https://github.com/nunocoracao/blowfish/pulls) per nuove lingue sono sempre benvenute! @@ -38,7 +38,7 @@ RTL è controllato in base alla lingua, quindi puoi mescolare e abbinare sia il Un grande cambiamento in Blowfish 2.0 è l'aggiunta del ridimensionamento automatico delle immagini. Utilizzando la potenza di Hugo Pipes, le immagini nei contenuti Markdown vengono ora ridimensionate automaticamente in diverse dimensioni di output. Questi vengono poi presentati utilizzando gli attributi HTML "srcset" che consentono di offrire dimensioni di file ottimizzate ai visitatori del tuo sito. -![](image-resizing.png) +![Image with alternate text](image-resizing.png) ```html @@ -46,8 +46,7 @@ Un grande cambiamento in Blowfish 2.0 è l'aggiunta del ridimensionamento automa srcset=" /image_320x0_resize_q75_box.jpg 320w, /image_635x0_resize_q75_box.jpg 635w, - /image_1024x0_resize_q75_box.jpg 1024w, - /image_1270x0_resize_q75_box.jpg 2x" + /image_1024x0_resize_q75_box.jpg 1024w" src="/image_635x0_resize_q75_box.jpg" alt="My image" /> diff --git a/exampleSite/content/docs/welcome/index.ja.md b/exampleSite/content/docs/welcome/index.ja.md index 6847143d..b00c14cd 100644 --- a/exampleSite/content/docs/welcome/index.ja.md +++ b/exampleSite/content/docs/welcome/index.ja.md @@ -38,7 +38,7 @@ RTL は言語ごとに制御されるため、プロジェクト内で RTL と L Blowfish 2.0 の大きな変更点は、自動画像リサイズ機能の追加です。Hugo Pipes の力を使って、Markdown コンテンツ内の画像が自動的に異なる出力サイズにスケーリングされるようになりました。これらは HTML の `srcset` 属性を使用して表示され、最適化されたファイルサイズをサイト訪問者に提供できます。 -![](image-resizing.png) +![Image with alternate text](image-resizing.png) ```html @@ -46,8 +46,7 @@ Blowfish 2.0 の大きな変更点は、自動画像リサイズ機能の追加 srcset=" /image_320x0_resize_q75_box.jpg 320w, /image_635x0_resize_q75_box.jpg 635w, - /image_1024x0_resize_q75_box.jpg 1024w, - /image_1270x0_resize_q75_box.jpg 2x" + /image_1024x0_resize_q75_box.jpg 1024w" src="/image_635x0_resize_q75_box.jpg" alt="私の画像" /> diff --git a/exampleSite/content/docs/welcome/index.md b/exampleSite/content/docs/welcome/index.md index e6e7d17e..eb2b5ff9 100644 --- a/exampleSite/content/docs/welcome/index.md +++ b/exampleSite/content/docs/welcome/index.md @@ -38,7 +38,7 @@ RTL is controlled on a per-language basis so you can mix and match both RTL and A big change in Blowfish 2.0 is the addition of automatic image resizing. Using the power of Hugo Pipes, images in Markdown content are now automatically scaled to different output sizes. These are then presented using HTML `srcset` attributes enabling optimised file sizes to be served to your site visitors. -![](image-resizing.png) +![Image with alternate text](image-resizing.png) ```html @@ -46,8 +46,7 @@ A big change in Blowfish 2.0 is the addition of automatic image resizing. Using srcset=" /image_320x0_resize_q75_box.jpg 320w, /image_635x0_resize_q75_box.jpg 635w, - /image_1024x0_resize_q75_box.jpg 1024w, - /image_1270x0_resize_q75_box.jpg 2x" + /image_1024x0_resize_q75_box.jpg 1024w" src="/image_635x0_resize_q75_box.jpg" alt="My image" /> diff --git a/exampleSite/content/docs/welcome/index.zh-cn.md b/exampleSite/content/docs/welcome/index.zh-cn.md index 83341749..ebc45a3a 100644 --- a/exampleSite/content/docs/welcome/index.zh-cn.md +++ b/exampleSite/content/docs/welcome/index.zh-cn.md @@ -27,7 +27,7 @@ Tailwind CSS 带来了性能优化,并提供了一些出色的新的 CSS 特 这是一个高频需求,Blowfish 现在支持多语言! 如果你使用多语言发布你的内容,网站将会构建包含所有可用翻译的版本。 -
:gb: :de: :fr: :es: :cn: :brazil: :tr: :bangladesh:
+
🇬🇧 🇩🇪 🇫🇷 🇪🇸 🇨🇳 🇧🇷 🇹🇷 🇧🇩
感谢社区的贡献,目前 Blowfish 已经翻译成三十种语言,并且随着时间的推移还会支持更多。 顺便一提,欢迎你为支持新语言提交 [PR](https://github.com/nunocoracao/blowfish/pulls)。 @@ -43,7 +43,7 @@ RTL 是基于单独语言控制的,所以你可以在项目中通过支持多 Blowfish 2.0版本的重大变化是增加了自动调整图片大小的功能。基于 Hugo Pipes 提供的能力,实现了 Markdown 中的图片自动缩放到不同尺寸的功能。同时 Blowfish 2.0 还支持了 HTML `srcset` 以实现响应式图像,这能够为访问者优化图片大小。 -![](image-resizing.png) +![Image with alternate text](image-resizing.png) ```html @@ -51,8 +51,7 @@ Blowfish 2.0版本的重大变化是增加了自动调整图片大小的功能 srcset=" /image_320x0_resize_q75_box.jpg 320w, /image_635x0_resize_q75_box.jpg 635w, - /image_1024x0_resize_q75_box.jpg 1024w, - /image_1270x0_resize_q75_box.jpg 2x" + /image_1024x0_resize_q75_box.jpg 1024w" src="/image_635x0_resize_q75_box.jpg" alt="My image" /> diff --git a/exampleSite/content/samples/icons/index.it.md b/exampleSite/content/samples/icons/index.it.md index a702a222..dd77f734 100644 --- a/exampleSite/content/samples/icons/index.it.md +++ b/exampleSite/content/samples/icons/index.it.md @@ -28,6 +28,7 @@ The full list of built-in icons and their corresponding names can referenced bel | check | {{< icon check >}} | | circle-info | {{< icon circle-info >}} | | code | {{< icon code>}} | +| codeberg | {{< icon codeberg >}} | | codepen | {{< icon codepen >}} | | comment | {{< icon comment >}} | | dev | {{< icon dev >}} | @@ -58,6 +59,7 @@ The full list of built-in icons and their corresponding names can referenced bel | heart | {{< icon heart >}} | | image | {{< icon image >}} | | instagram | {{< icon instagram >}} | +| itch-io | {{< icon itch-io >}} | | keybase | {{< icon keybase >}} | | kickstarter | {{< icon kickstarter >}} | | ko-fi | {{< icon ko-fi >}} | @@ -78,10 +80,12 @@ The full list of built-in icons and their corresponding names can referenced bel | orcid | {{< icon orcid >}} | | patreon | {{< icon patreon >}} | | paypal | {{< icon paypal >}} | +| peertube | {{< icon peertube >}} | | pencil | {{< icon pencil >}} | | pgpkey | {{< icon pgpkey >}} | | phone | {{< icon phone >}} | | pinterest | {{< icon pinterest >}} | +| pixelfed | {{< icon pixelfed >}} | | poo | {{< icon poo >}} | | reddit | {{< icon reddit >}} | | researchgate | {{< icon researchgate >}} | @@ -94,6 +98,7 @@ The full list of built-in icons and their corresponding names can referenced bel | slack | {{< icon slack >}} | | snapchat | {{< icon snapchat >}} | | soundcloud | {{< icon soundcloud >}} | +| spotify | {{< icon spotify >}} | | stack-overflow | {{< icon stack-overflow >}} | | star | {{< icon star >}} | | steam | {{< icon steam >}} | @@ -113,4 +118,4 @@ The full list of built-in icons and their corresponding names can referenced bel | x-twitter | {{< icon x-twitter >}} | | xing | {{< icon xing >}} | | xmark | {{< icon xmark >}} | -| youtube | {{< icon youtube >}} | +| youtube | {{< icon youtube >}} | \ No newline at end of file diff --git a/exampleSite/content/samples/icons/index.ja.md b/exampleSite/content/samples/icons/index.ja.md index ae1f4e38..092c99fb 100644 --- a/exampleSite/content/samples/icons/index.ja.md +++ b/exampleSite/content/samples/icons/index.ja.md @@ -28,6 +28,7 @@ Blowfish はいくつもの [FontAwesome 6](https://fontawesome.com/icons) の | check | {{< icon check >}} | | circle-info | {{< icon circle-info >}} | | code | {{< icon code>}} | +| codeberg | {{< icon codeberg >}} | | codepen | {{< icon codepen >}} | | comment | {{< icon comment >}} | | dev | {{< icon dev >}} | @@ -79,10 +80,12 @@ Blowfish はいくつもの [FontAwesome 6](https://fontawesome.com/icons) の | orcid | {{< icon orcid >}} | | patreon | {{< icon patreon >}} | | paypal | {{< icon paypal >}} | +| peertube | {{< icon peertube >}} | | pencil | {{< icon pencil >}} | | pgpkey | {{< icon pgpkey >}} | | phone | {{< icon phone >}} | | pinterest | {{< icon pinterest >}} | +| pixelfed | {{< icon pixelfed >}} | | poo | {{< icon poo >}} | | reddit | {{< icon reddit >}} | | researchgate | {{< icon researchgate >}} | @@ -115,5 +118,4 @@ Blowfish はいくつもの [FontAwesome 6](https://fontawesome.com/icons) の | x-twitter | {{< icon x-twitter >}} | | xing | {{< icon xing >}} | | xmark | {{< icon xmark >}} | -| youtube | {{< icon youtube >}} | -| codeberg | {{< icon codeberg >}} | +| youtube | {{< icon youtube >}} | \ No newline at end of file diff --git a/exampleSite/content/samples/icons/index.md b/exampleSite/content/samples/icons/index.md index a6990035..3c321b6f 100644 --- a/exampleSite/content/samples/icons/index.md +++ b/exampleSite/content/samples/icons/index.md @@ -28,6 +28,7 @@ The full list of built-in icons and their corresponding names can referenced bel | check | {{< icon check >}} | | circle-info | {{< icon circle-info >}} | | code | {{< icon code>}} | +| codeberg | {{< icon codeberg >}} | | codepen | {{< icon codepen >}} | | comment | {{< icon comment >}} | | dev | {{< icon dev >}} | @@ -79,10 +80,12 @@ The full list of built-in icons and their corresponding names can referenced bel | orcid | {{< icon orcid >}} | | patreon | {{< icon patreon >}} | | paypal | {{< icon paypal >}} | +| peertube | {{< icon peertube >}} | | pencil | {{< icon pencil >}} | | pgpkey | {{< icon pgpkey >}} | | phone | {{< icon phone >}} | | pinterest | {{< icon pinterest >}} | +| pixelfed | {{< icon pixelfed >}} | | poo | {{< icon poo >}} | | reddit | {{< icon reddit >}} | | researchgate | {{< icon researchgate >}} | @@ -115,5 +118,4 @@ The full list of built-in icons and their corresponding names can referenced bel | x-twitter | {{< icon x-twitter >}} | | xing | {{< icon xing >}} | | xmark | {{< icon xmark >}} | -| youtube | {{< icon youtube >}} | -| codeberg | {{< icon codeberg >}} | +| youtube | {{< icon youtube >}} | \ No newline at end of file diff --git a/exampleSite/content/samples/icons/index.zh-cn.md b/exampleSite/content/samples/icons/index.zh-cn.md index 6cb7bc38..273ca387 100644 --- a/exampleSite/content/samples/icons/index.zh-cn.md +++ b/exampleSite/content/samples/icons/index.zh-cn.md @@ -15,8 +15,8 @@ Blowfish 内置了许多 [FontAwesome 6](https://fontawesome.com/icons) 中的 下面是所有的内置图标及其名称。 -| 图标名称 | 预览 | -|----------------------|-----------------------------------| +| 图标名称 | 预览 | +| -------------------- | --------------------------------- | | amazon | {{< icon amazon >}} | | apple | {{< icon apple >}} | | bars | {{< icon bars >}} | @@ -28,6 +28,7 @@ Blowfish 内置了许多 [FontAwesome 6](https://fontawesome.com/icons) 中的 | check | {{< icon check >}} | | circle-info | {{< icon circle-info >}} | | code | {{< icon code>}} | +| codeberg | {{< icon codeberg >}} | | codepen | {{< icon codepen >}} | | comment | {{< icon comment >}} | | dev | {{< icon dev >}} | @@ -58,6 +59,7 @@ Blowfish 内置了许多 [FontAwesome 6](https://fontawesome.com/icons) 中的 | heart | {{< icon heart >}} | | image | {{< icon image >}} | | instagram | {{< icon instagram >}} | +| itch-io | {{< icon itch-io >}} | | keybase | {{< icon keybase >}} | | kickstarter | {{< icon kickstarter >}} | | ko-fi | {{< icon ko-fi >}} | @@ -78,10 +80,12 @@ Blowfish 内置了许多 [FontAwesome 6](https://fontawesome.com/icons) 中的 | orcid | {{< icon orcid >}} | | patreon | {{< icon patreon >}} | | paypal | {{< icon paypal >}} | +| peertube | {{< icon peertube >}} | | pencil | {{< icon pencil >}} | | pgpkey | {{< icon pgpkey >}} | | phone | {{< icon phone >}} | | pinterest | {{< icon pinterest >}} | +| pixelfed | {{< icon pixelfed >}} | | poo | {{< icon poo >}} | | reddit | {{< icon reddit >}} | | researchgate | {{< icon researchgate >}} | @@ -94,6 +98,7 @@ Blowfish 内置了许多 [FontAwesome 6](https://fontawesome.com/icons) 中的 | slack | {{< icon slack >}} | | snapchat | {{< icon snapchat >}} | | soundcloud | {{< icon soundcloud >}} | +| spotify | {{< icon spotify >}} | | stack-overflow | {{< icon stack-overflow >}} | | star | {{< icon star >}} | | steam | {{< icon steam >}} | @@ -113,4 +118,4 @@ Blowfish 内置了许多 [FontAwesome 6](https://fontawesome.com/icons) 中的 | x-twitter | {{< icon x-twitter >}} | | xing | {{< icon xing >}} | | xmark | {{< icon xmark >}} | -| youtube | {{< icon youtube >}} | +| youtube | {{< icon youtube >}} | \ No newline at end of file diff --git a/exampleSite/content/samples/rich-content/index.it.md b/exampleSite/content/samples/rich-content/index.it.md index d46b16d0..1f2c7ae9 100755 --- a/exampleSite/content/samples/rich-content/index.it.md +++ b/exampleSite/content/samples/rich-content/index.it.md @@ -17,9 +17,9 @@ Below is an example using the built-in `youtube` shortcode. ## Twitter -This example uses the `twitter_simple` shortcode to output a Tweet. It requires two named parameters `user` and `id`. +This example uses the `x` shortcode to output a Tweet. It requires two named parameters `user` and `id`. -{{< twitter_simple user="DesignReviewed" id="1085870671291310081" >}} +{{< x user="DesignReviewed" id="1085870671291310081" >}} Alternatively, the `tweet` shortcode can be used to embed a fully marked up Twitter card. diff --git a/exampleSite/content/samples/rich-content/index.ja.md b/exampleSite/content/samples/rich-content/index.ja.md index 9bffca8a..bf0dc571 100755 --- a/exampleSite/content/samples/rich-content/index.ja.md +++ b/exampleSite/content/samples/rich-content/index.ja.md @@ -17,9 +17,9 @@ Hugo には、リッチコンテンツのためのいくつかの[組み込み ## Twitter -この例はツイートを `twitter_simple` ショートコードを利用して出力しています。こちらは `user` と `id` の二つのパラメータを必須としています。 +この例はツイートを `x` ショートコードを利用して出力しています。こちらは `user` と `id` の二つのパラメータを必須としています。 -{{< twitter_simple user="DesignReviewed" id="1085870671291310081" >}} +{{< x user="DesignReviewed" id="1085870671291310081" >}} 代わりとして、 `tweet` ショートコードが完全にマークアップされた Twitter カードの埋め込みに利用できます、 diff --git a/exampleSite/content/samples/rich-content/index.md b/exampleSite/content/samples/rich-content/index.md index d46b16d0..1f2c7ae9 100755 --- a/exampleSite/content/samples/rich-content/index.md +++ b/exampleSite/content/samples/rich-content/index.md @@ -17,9 +17,9 @@ Below is an example using the built-in `youtube` shortcode. ## Twitter -This example uses the `twitter_simple` shortcode to output a Tweet. It requires two named parameters `user` and `id`. +This example uses the `x` shortcode to output a Tweet. It requires two named parameters `user` and `id`. -{{< twitter_simple user="DesignReviewed" id="1085870671291310081" >}} +{{< x user="DesignReviewed" id="1085870671291310081" >}} Alternatively, the `tweet` shortcode can be used to embed a fully marked up Twitter card. diff --git a/exampleSite/content/samples/rich-content/index.zh-cn.md b/exampleSite/content/samples/rich-content/index.zh-cn.md index f366759f..c80edddf 100755 --- a/exampleSite/content/samples/rich-content/index.zh-cn.md +++ b/exampleSite/content/samples/rich-content/index.zh-cn.md @@ -17,9 +17,9 @@ Hugo 附带了几个用于丰富内容的[内置简码](https://gohugo.io/conten ## Twitter -此示例使用 `twitter_simple` 简码来显示推文。它需要两个参数 `user` 和 `id` 。 +此示例使用 `x` 简码来显示推文。它需要两个参数 `user` 和 `id` 。 -{{< twitter_simple user="DesignReviewed" id="1085870671291310081" >}} +{{< x user="DesignReviewed" id="1085870671291310081" >}} 或者,`tweet` 简码可用于生成嵌入式的 Twitter 卡片。 diff --git a/exampleSite/content/users/users.json b/exampleSite/content/users/users.json index 21256e25..6d5655f3 100644 --- a/exampleSite/content/users/users.json +++ b/exampleSite/content/users/users.json @@ -889,5 +889,33 @@ "Personal Site", "Blog" ] + }, + { + "title": "FEEC/UNICAMP IA382 - Seminar in Computer Engineering", + "url": "https://feec-seminar-comp-eng.github.io/", + "source" : "https://github.com/feec-seminar-comp-eng/feec-seminar-comp-eng.github.io", + "tags" : [ + "Seminars", + "Class" + ] + }, + { + "title": "blog.francescopapini.com", + "url": "https://blog.francescopapini.com", + "source": "n/a", + "tags": [ + "Technology Blog", + "Personal Site", + "Blog" + ] + }, + { + "title": "Kyo's Garden", + "url": "https://heykyo.com", + "source": "n/a", + "tags": [ + "Personal Site", + "Blog" + ] } -] \ No newline at end of file +] diff --git a/i18n/gl.yaml b/i18n/gl.yaml index 2a29c14b..70499290 100644 --- a/i18n/gl.yaml +++ b/i18n/gl.yaml @@ -38,11 +38,11 @@ code: error: 404_title: "Páxina non atopada :confused:" - 404_error: "Error 404" + 404_error: "Erro 404" 404_description: "Parece que a páxina que solicitaches non existe." footer: - dark_appearance: "Cambiar a modo oscuro" + dark_appearance: "Cambiar a modo escuro" light_appearance: "Cambiar a modo claro" powered_by: "Desenvolvida con {{ .Hugo }} & {{ .Theme }}" @@ -66,6 +66,9 @@ sharing: pinterest: "Pinear en Pinterest" reddit: "Publicar en Reddit" twitter: "Tuitear en Twitter" + bluesky: "Publicar en Bluesky" + whatsapp: "Compartir vía WhatsApp" + telegram: "Compartir vía Telegram" shortcode: recent_articles: "Recente" diff --git a/layouts/_default/_markup/render-heading.html b/layouts/_default/_markup/render-heading.html index ccc83778..b4ab6314 100644 --- a/layouts/_default/_markup/render-heading.html +++ b/layouts/_default/_markup/render-heading.html @@ -1,12 +1,11 @@ -{{ $strAnchor := urlize .Anchor }} -{{ $replacedAnchor := replaceRE "%25" "" $strAnchor }} +{{ $anchor := anchorize .Anchor }} {{ .Text | safeHTML }} -
- {{ if.Page.Params.showHeadingAnchors | default (.Page.Site.Params.article.showHeadingAnchors | default true) }} +
+ {{ if .Page.Params.showHeadingAnchors | default (.Page.Site.Params.article.showHeadingAnchors | default true) }} # + style="text-decoration-line: none !important;" href="#{{ $anchor }}" aria-label="{{ i18n "article.anchor_label" }}"># {{ end }}
diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html index e3ec319c..74000b80 100644 --- a/layouts/_default/_markup/render-image.html +++ b/layouts/_default/_markup/render-image.html @@ -1,48 +1,50 @@ +{{ define "RenderImageSimple" -}} + {{ .alt }} +{{- end }} + +{{ define "RenderImageResponsive" -}} + {{ .alt }} +{{- end }} + +{{ define "RenderImageCaption" -}} + {{- with .caption }} +
{{ . | markdownify }}
+ {{- end }} +{{- end }} + {{- $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }} {{- $url := urls.Parse .Destination }} {{- $altText := .Text }} {{- $caption := .Title }} -{{- if findRE "^https?" $url.Scheme }} -
- {{ $altText }} - {{ with $caption }}
{{ . | markdownify }}
{{ end }} -
-{{- else }} - {{- $resource := "" }} - {{- if $.Page.Resources.GetMatch ($url.String) }} - {{- $resource = $.Page.Resources.GetMatch ($url.String) }} - {{- else if resources.GetMatch ($url.String) }} - {{- $resource = resources.Get ($url.String) }} - {{- end }} - {{- with $resource }} -
- {{- if or $disableImageOptimization (eq .MediaType.SubType "svg")}} - {{ $altText }} - {{- else }} - {{ $altText }} - {{- end }} - {{ with $caption }}
{{ . | markdownify }}
{{ end }} -
- {{- else }} -
- {{ $altText }} - {{ with $caption }}
{{ . | markdownify }}
{{ end }} -
- {{- end }} +{{- $isRemote := findRE "^https?" $url.Scheme }} +{{- $resource := "" }} + +{{- if not $isRemote }} + {{- $resource = or ($.Page.Resources.GetMatch $url.String) (resources.Get $url.String) }} {{- end }} + +
+ {{- if $isRemote }} + {{ template "RenderImageSimple" (dict "src" $url.String "alt" $altText) }} + {{- else if $resource }} + {{- $isSVG := eq $resource.MediaType.SubType "svg" }} + {{- $shouldOptimize := and (not $disableImageOptimization) (not $isSVG) }} + {{- if $shouldOptimize }} + {{ template "RenderImageResponsive" (dict "resource" $resource "alt" $altText) }} + {{- else }} + {{ template "RenderImageSimple" (dict "src" $resource.RelPermalink "alt" $altText) }} + {{- end }} + {{- else }} + {{ template "RenderImageSimple" (dict "src" $url.String "alt" $altText) }} + {{- end }} + + {{ template "RenderImageCaption" (dict "caption" $caption) }} +
diff --git a/layouts/partials/article-meta/basic.html b/layouts/partials/article-meta/basic.html index 6bf60596..307ca0a3 100644 --- a/layouts/partials/article-meta/basic.html +++ b/layouts/partials/article-meta/basic.html @@ -96,4 +96,15 @@ {{ end }} +{{/* Output only category */}} +{{ if .Params.showCategoryOnly | default (.Site.Params.article.showCategoryOnly | default false) }} +
+ {{ range (.GetTerms "categories") }} + + {{ partial "badge.html" .LinkTitle }} + +{{ end }} +
+{{ end }} + {{ end }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 46f47769..6f9a5f21 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -107,6 +107,14 @@ {{/* Social */}} {{ template "_internal/opengraph.html" . }} {{ template "_internal/twitter_cards.html" . }} + {{- /* Main page always uses this; fallback elsewhere if no feature image */ -}} + {{- /* See https://gohugo.io/templates/embedded/#open-graph */ -}} + {{ if not ($.Resources.GetMatch "*feature*") }} + {{ with .Site.Params.defaultSocialImage }} + + + {{ end }} + {{ end }} {{/* Schema */}} {{ partial "schema.html" . }} {{/* Me */}} @@ -128,6 +136,10 @@ {{ if templates.Exists "partials/extend-head.html" }} {{ partialCached "extend-head.html" .Site }} {{ end }} + {{/* Uncached extend head - e.g. {{ with .Page.HasShortcode "gallery" }} do something {{ end }} */}} + {{ if templates.Exists "partials/extend-head-uncached.html" }} + {{ partial "extend-head-uncached.html" . }} + {{ end }} {{/* Firebase */}} {{ with $.Site.Params.firebase }} diff --git a/layouts/partials/hero/thumbAndBackground.html b/layouts/partials/hero/thumbAndBackground.html index 5f974c4e..036ab514 100644 --- a/layouts/partials/hero/thumbAndBackground.html +++ b/layouts/partials/hero/thumbAndBackground.html @@ -2,7 +2,17 @@ {{- $images := .Resources.ByType "image" -}} {{- $background := $images.GetMatch "*background*" -}} -{{- if not $background }}{{ with .Site.Params.defaultBackgroundImage }}{{ $background = resources.Get . }}{{ end }}{{ end -}} + +{{- if not $background }} + {{ with .Site.Params.defaultBackgroundImage }} + {{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }} + {{ $background = resources.GetRemote . }} + {{ else }} + {{ $background = resources.Get . }} + {{ end }} + {{ end }} +{{ end -}} + {{- if not $background }}{{ $background = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} {{- if not $background }}{{ $background = $images.GetMatch "*feature*" }}{{ end -}} {{- $featured := $images.GetMatch "*feature*" -}} @@ -12,7 +22,17 @@ {{- if not $featured }}{{ $featured = resources.GetRemote $url }}{{ end -}} {{ end }} {{- if not $featured }}{{ $featured = $images.GetMatch "*background*" }}{{ end -}} -{{- if not $featured }}{{ with .Site.Params.defaultBackgroundImage }}{{ $featured = resources.Get . }}{{ end }}{{ end -}} + +{{- if not $featured }} + {{ with .Site.Params.defaultFeaturedImage }} + {{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }} + {{ $featured = resources.GetRemote . }} + {{ else }} + {{ $featured = resources.Get . }} + {{ end }} + {{ end }} +{{ end -}} + {{ $isParentList := eq (.Scratch.Get "scope") "list" }} {{ $shouldBlur := $.Params.layoutBackgroundBlur | default (or (and ($.Site.Params.article.layoutBackgroundBlur | default true) (not $isParentList)) diff --git a/layouts/partials/home/hero.html b/layouts/partials/home/hero.html index aa6ea0e2..735f8196 100644 --- a/layouts/partials/home/hero.html +++ b/layouts/partials/home/hero.html @@ -1,4 +1,5 @@ {{ $disableImageOptimization := .Site.Params.disableImageOptimization | default false }} +{{ $disableHeroImageFilter := .Site.Params.homepage.disableHeroImageFilter | default false }}
@@ -22,9 +23,15 @@ {{ end }} {{ if $homepageImage }} -
-
+ {{ if not $disableHeroImageFilter }} +
+
+ {{ else }} +
+
+ {{ end }} {{ end }}
@@ -43,22 +50,39 @@ alt="{{ $.Site.Params.Author.name | default " Author" }}" src="{{ $authorImage.RelPermalink }}" /> {{ end }} {{ end }} -

- {{ .Site.Params.Author.name | default .Site.Title }} -

- {{ with .Site.Params.Author.headline }} -

- {{ . | markdownify }} -

+ {{ if not $disableHeroImageFilter }} +

+ {{ .Site.Params.Author.name | default .Site.Title }} +

+ {{ with .Site.Params.Author.headline }} +

+ {{ . | markdownify }} +

+ {{ end }} + {{ else }} +

+ {{ .Site.Params.Author.name | default .Site.Title }} +

+ {{ with .Site.Params.Author.headline }} +

+ {{ . | markdownify }} +

+ {{ end }} {{ end }}
{{ with .Site.Params.Author.links }}
{{ range $links := . }} {{ range $name, $url := $links }} - {{ partial "icon.html" $name }} + {{ else }} + {{ partial + "icon.html" $name }} + {{ end }} {{ end }} {{ end }}
diff --git a/layouts/partials/toc.html b/layouts/partials/toc.html index 5f3ffa1f..f7d0acf7 100644 --- a/layouts/partials/toc.html +++ b/layouts/partials/toc.html @@ -1,5 +1,4 @@ -