Merge branch 'dev' into patch-1

This commit is contained in:
James Panther
2025-02-24 12:04:19 +11:00
committed by GitHub
37 changed files with 754 additions and 247 deletions
+24 -2
View File
@@ -6,6 +6,28 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
## [Unreleased]
### Added
- New `gist` shortcode as the built-in Hugo version has been deprecated
- New icon for `kofi` ([#976](https://github.com/jpanther/congo/pull/976))
- Privacy and Services params in bundled `config.toml` to provide sensible defaults for built-in Hugo shortcodes
### Changed
- Reduced file sizes of default favicons ([#983](https://github.com/jpanther/congo/pull/983))
- Upgrade to KaTeX v0.16.21 ([#977](https://github.com/jpanther/congo/pull/977), [#1016](https://github.com/jpanther/congo/pull/1016))
- Upgrade to Tailwind v3.4.17 ([#979](https://github.com/jpanther/congo/pull/979))
- Upgrade to Typography v0.5.16 ([#991](https://github.com/jpanther/congo/pull/991))
- Upgrade to ChartJS v4.4.8 ([#1019](https://github.com/jpanther/congo/pull/1019))
- Upgrade to FuseJS v7.1.0 ([#1020](https://github.com/jpanther/congo/pull/1020))
### Fixed
- Incorrect links generated for translated content when site is in multi-host mode ([#990](https://github.com/jpanther/congo/pull/990))
- Vendor script includes do not use the `fingerprintAlgorithm` site parameter ([#1015](https://github.com/jpanther/congo/issues/1015))
- Minor documentation errors and omissions ([#985](https://github.com/jpanther/congo/pull/985), [#1005](https://github.com/jpanther/congo/pull/1005), [#1007](https://github.com/jpanther/congo/pull/1007), [#1012](https://github.com/jpanther/congo/pull/1012))
- References to deprecated `twitter` shortcodes and replaced them with `x`
## [2.10.0] - 2024-12-06
### Changed
@@ -153,7 +175,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### Fixed
- Links with non-whitespace characters preceeding them are prefixed with a space ([#695](https://github.com/jpanther/congo/issues/695))
- Links with non-whitespace characters preceding them are prefixed with a space ([#695](https://github.com/jpanther/congo/issues/695))
## [2.7.3] - 2023-10-31
@@ -356,7 +378,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Appearance switcher missing `aria-label` ([#438](https://github.com/jpanther/congo/pull/438))
- Article links missing `alt` text and `aria-label` ([#439](https://github.com/jpanther/congo/pull/439))
- Line height in article tag list would cause overlap when wrapping to a new line ([#444](https://github.com/jpanther/congo/pull/444))
- Figure shortcode would not apply `class` or `href` attribtues in some cases
- Figure shortcode would not apply `class` or `href` attributes in some cases
- Charts displaying with incorrect theme colours
## [2.4.2] - 2022-11-22
+1 -1
View File
@@ -108,7 +108,7 @@
--tw-contain-style: ;
}
/*! tailwindcss v3.4.16 | MIT License | https://tailwindcss.com */
/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com */
/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
+5
View File
@@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 210 163">
<path fill="currentColor" d="M 99.323037,0 C 75.692286,0 55.690161,0.22962659 39.552314,2.2817066 18.189571,5.0198856 0.0058582,21.429791 0.0058582,51.752622 H 0 C 0,82.526702 1.5886005,105.55639 13.862933,126.2988 27.726878,150.00843 50.909023,163 80.910715,163 h 7.271206 c 36.816709,0 56.817459,-19.60603 66.817379,-35.10693 4.31967,-6.84294 7.49858,-13.67675 9.54395,-20.51969 C 190.68123,105.09908 210,83.441497 210,56.993692 V 53.346879 C 210,24.847294 191.36645,5.0126335 159.31828,1.823406 145.68247,0.45752539 136.13973,0 99.323037,0 Z m 0.529138,16.559507 c 36.822685,0 44.549845,0.458968 57.501885,1.596215 22.95895,2.731661 36.1393,13.905 36.1393,35.10498 v 3.419622 c 0,18.925785 -15.68314,33.739868 -33.86656,33.739868 h -8.18109 l -1.36286,5.699376 c -1.81744,8.894622 -5.22519,15.958422 -9.089,22.343092 -7.95456,12.5347 -22.27511,26.89868 -51.820044,26.89868 h -7.042762 c -22.502994,0 -42.276444,-7.75131 -53.182896,-28.04247 C 19.403777,99.765282 17.5864,80.845596 17.5864,51.437296 h -0.0059 c 0,-19.147799 7.503844,-29.857903 26.364956,-32.596082 13.407885,-2.05208 31.136474,-2.281707 55.906668,-2.281707 z" />
<path fill="currentColor" d="m 150.92027,67.709311 c 0,2.738179 2.04537,4.790359 5.68126,4.790359 11.59044,0 17.95549,-6.613606 17.95549,-17.553487 0,-10.93988 -6.36505,-17.782019 -17.95549,-17.782019 -3.63589,0 -5.68126,2.05188 -5.68126,4.790059 v 25.761606 z" />
<path fill="currentColor" d="m 39.328624,66.345235 c 0,13.449427 7.498798,25.075607 17.043369,34.198865 6.365147,6.15503 16.365777,12.54071 23.180686,16.64407 2.045572,1.13815 4.091344,1.82405 6.365546,1.82405 2.729163,0 4.996467,-0.6859 6.820907,-1.82405 6.820913,-4.10336 16.814848,-10.48904 22.952958,-16.64407 9.772,-9.117241 17.2707,-20.743121 17.2707,-34.198865 0,-14.592892 -10.90565,-27.584652 -26.58784,-27.584652 -9.316144,0 -15.68219,4.789958 -20.456725,11.397247 -4.319974,-6.613506 -10.906752,-11.397247 -20.229691,-11.397247 -15.909717,0 -26.366408,12.99176 -26.366408,27.584652" />
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

File diff suppressed because one or more lines are too long
+3 -3
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("katex")):"function"==typeof define&&define.amd?define(["katex"],t):"object"==typeof exports?exports.renderMathInElement=t(require("katex")):e.renderMathInElement=t(e.katex)}("undefined"!=typeof self?self:this,(function(e){return function(){"use strict";var t={771:function(t){t.exports=e}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var o={};return function(){r.d(o,{default:function(){return d}});var e=r(771),t=r.n(e);const n=function(e,t,n){let r=n,o=0;const i=e.length;for(;r<t.length;){const n=t[r];if(o<=0&&t.slice(r,r+i)===e)return r;"\\"===n?r++:"{"===n?o++:"}"===n&&o--,r++}return-1},i=/^\\begin{/;var a=function(e,t){let r;const o=[],a=new RegExp("("+t.map((e=>e.left.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"))).join("|")+")");for(;r=e.search(a),-1!==r;){r>0&&(o.push({type:"text",data:e.slice(0,r)}),e=e.slice(r));const a=t.findIndex((t=>e.startsWith(t.left)));if(r=n(t[a].right,e,t[a].left.length),-1===r)break;const l=e.slice(0,r+t[a].right.length),s=i.test(l)?l:e.slice(t[a].left.length,r);o.push({type:"math",data:s,rawData:l,display:t[a].display}),e=e.slice(r+t[a].right.length)}return""!==e&&o.push({type:"text",data:e}),o};const l=function(e,n){const r=a(e,n.delimiters);if(1===r.length&&"text"===r[0].type)return null;const o=document.createDocumentFragment();for(let e=0;e<r.length;e++)if("text"===r[e].type)o.appendChild(document.createTextNode(r[e].data));else{const i=document.createElement("span");let a=r[e].data;n.displayMode=r[e].display;try{n.preProcess&&(a=n.preProcess(a)),t().render(a,i,n)}catch(i){if(!(i instanceof t().ParseError))throw i;n.errorCallback("KaTeX auto-render: Failed to parse `"+r[e].data+"` with ",i),o.appendChild(document.createTextNode(r[e].rawData));continue}o.appendChild(i)}return o},s=function(e,t){for(let n=0;n<e.childNodes.length;n++){const r=e.childNodes[n];if(3===r.nodeType){let o=r.textContent,i=r.nextSibling,a=0;for(;i&&i.nodeType===Node.TEXT_NODE;)o+=i.textContent,i=i.nextSibling,a++;const s=l(o,t);if(s){for(let e=0;e<a;e++)r.nextSibling.remove();n+=s.childNodes.length-1,e.replaceChild(s,r)}else n+=a}else if(1===r.nodeType){const e=" "+r.className+" ";-1===t.ignoredTags.indexOf(r.nodeName.toLowerCase())&&t.ignoredClasses.every((t=>-1===e.indexOf(" "+t+" ")))&&s(r,t)}}};var d=function(e,t){if(!e)throw new Error("No element provided to render");const n={};for(const e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);n.delimiters=n.delimiters||[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}],n.ignoredTags=n.ignoredTags||["script","noscript","style","textarea","pre","code","option"],n.ignoredClasses=n.ignoredClasses||[],n.errorCallback=n.errorCallback||console.error,n.macros=n.macros||{},s(e,n)}}(),o=o.default}()}));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("katex")):"function"==typeof define&&define.amd?define(["katex"],t):"object"==typeof exports?exports.renderMathInElement=t(require("katex")):e.renderMathInElement=t(e.katex)}("undefined"!=typeof self?self:this,(function(e){return function(){"use strict";var t={757:function(t){t.exports=e}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var o={};r.d(o,{default:function(){return p}});var i=r(757),a=r.n(i);const l=function(e,t,n){let r=n,o=0;const i=e.length;for(;r<t.length;){const n=t[r];if(o<=0&&t.slice(r,r+i)===e)return r;"\\"===n?r++:"{"===n?o++:"}"===n&&o--,r++}return-1},s=/^\\begin{/;var d=function(e,t){let n;const r=[],o=new RegExp("("+t.map((e=>e.left.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"))).join("|")+")");for(;n=e.search(o),-1!==n;){n>0&&(r.push({type:"text",data:e.slice(0,n)}),e=e.slice(n));const o=t.findIndex((t=>e.startsWith(t.left)));if(n=l(t[o].right,e,t[o].left.length),-1===n)break;const i=e.slice(0,n+t[o].right.length),a=s.test(i)?i:e.slice(t[o].left.length,n);r.push({type:"math",data:a,rawData:i,display:t[o].display}),e=e.slice(n+t[o].right.length)}return""!==e&&r.push({type:"text",data:e}),r};const c=function(e,t){const n=d(e,t.delimiters);if(1===n.length&&"text"===n[0].type)return null;const r=document.createDocumentFragment();for(let e=0;e<n.length;e++)if("text"===n[e].type)r.appendChild(document.createTextNode(n[e].data));else{const o=document.createElement("span");let i=n[e].data;t.displayMode=n[e].display;try{t.preProcess&&(i=t.preProcess(i)),a().render(i,o,t)}catch(o){if(!(o instanceof a().ParseError))throw o;t.errorCallback("KaTeX auto-render: Failed to parse `"+n[e].data+"` with ",o),r.appendChild(document.createTextNode(n[e].rawData));continue}r.appendChild(o)}return r},f=function(e,t){for(let n=0;n<e.childNodes.length;n++){const r=e.childNodes[n];if(3===r.nodeType){let o=r.textContent,i=r.nextSibling,a=0;for(;i&&i.nodeType===Node.TEXT_NODE;)o+=i.textContent,i=i.nextSibling,a++;const l=c(o,t);if(l){for(let e=0;e<a;e++)r.nextSibling.remove();n+=l.childNodes.length-1,e.replaceChild(l,r)}else n+=a}else if(1===r.nodeType){const e=" "+r.className+" ";-1===t.ignoredTags.indexOf(r.nodeName.toLowerCase())&&t.ignoredClasses.every((t=>-1===e.indexOf(" "+t+" ")))&&f(r,t)}}};var p=function(e,t){if(!e)throw new Error("No element provided to render");const n={};for(const e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);n.delimiters=n.delimiters||[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}],n.ignoredTags=n.ignoredTags||["script","noscript","style","textarea","pre","code","option"],n.ignoredClasses=n.ignoredClasses||[],n.errorCallback=n.errorCallback||console.error,n.macros=n.macros||{},f(e,n)};return o=o.default}()}));
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+12
View File
@@ -13,3 +13,15 @@ summaryLength = 0
[outputs]
home = ["HTML", "RSS", "JSON"]
[privacy]
[privacy.vimeo]
enableDNT = true
[privacy.x]
enableDNT = true
[privacy.youTube]
privacyEnhanced = true
[services]
[services.x]
disableInlineCSS = true
+1
View File
@@ -38,6 +38,7 @@ title = "Congo"
# { instagram = "https://instagram.com/username" },
# { keybase = "https://keybase.io/username" },
# { kickstarter = "https://www.kickstarter.com/profile/username" },
# { kofi = "https://ko-fi.com/username" },
# { lastfm = "https://lastfm.com/user/username" },
# { linkedin = "https://linkedin.com/in/username" },
# { mastodon = "https://mastodon.instance/@username" },
+12
View File
@@ -13,3 +13,15 @@ summaryLength = 0
[outputs]
home = ["HTML", "RSS", "JSON"]
[privacy]
[privacy.vimeo]
enableDNT = true
[privacy.x]
enableDNT = true
[privacy.youTube]
privacyEnhanced = true
[services]
[services.x]
disableInlineCSS = true
@@ -35,7 +35,7 @@ Hugoの標準的な設定変数はテーマ全体を通して尊重されます
|`baseURL`|_Not set_|ウェブサイトのルートへのURL。|
|`defaultContentLanguage`|`"en"`|この値はテーマコンポーネントとコンテンツのデフォルト言語を決定します。サポートされる言語コードについては、下記の[言語と国際化](#言語と国際化)セクションを参照してください。|
|`enableRobotsTXT`|`true`|有効にすると、サイトルートに `robots.txt` ファイルが作成され、検索エンジンがサイト全体をクロールできるようになります。あらかじめ用意されている `robots.txt` を利用したい場合は、`false` に設定して `static` ディレクトリにファイルを置いてください。完全にコントロールしたい場合は、[カスタムレイアウト]({{< ref "content-examples" >}})を指定してこのファイルを生成することができます。|
|`paginate`|`10`|記事一覧の各ページに掲載される記事の数。|
|`pagination.pagerSize`|`10`|記事一覧の各ページに掲載される記事の数。|
|`summaryLength`|`0`|記事の要約が[フロントマター]({{< ref "front-matter" >}})で提供されていない場合に、記事の要約を生成するために使われる単語の数。デフォルト値 `0` は最初の文章を使用します。この値は要約が非表示の場合には影響しません。|
|`outputs.home`|`["HTML", "RSS", "JSON"]`|生成される出力フォーマット。Congoでは、すべてのテーマコンポーネントが正しく動作するために、HTML、RSS、JSONが必要です。|
|`permalinks`|_Not set_|パーマリンクの設定は[Hugo docs](https://gohugo.io/content-management/urls/#permalinks)を参照してください。|
+16 -4
View File
@@ -25,8 +25,8 @@ By default, the alert is presented with an exclaimation triangle icon. To change
**Warning!** This action is destructive!
{{</* /alert */>}}
{{</* alert "twitter" */>}}
Don't forget to [follow me](https://twitter.com/jpanther) on Twitter.
{{</* alert "x-twitter" */>}}
Don't forget to [follow me](https://x.com/jpanther) on X.
{{</* /alert */>}}
```
@@ -34,8 +34,8 @@ Don't forget to [follow me](https://twitter.com/jpanther) on Twitter.
**Warning!** This action is destructive!
{{< /alert >}}
&nbsp;
{{< alert "twitter" >}}
Don't forget to [follow me](https://twitter.com/jpanther) on Twitter.
{{< alert "x-twitter" >}}
Don't forget to [follow me](https://x.com/jpanther) on X.
{{< /alert >}}
## Badge
@@ -155,6 +155,18 @@ Congo also supports automatic conversion of images included using standard Markd
{{< figure src="abstract.jpg" alt="Abstract purple artwork" caption="Photo by [Jr Korpa](https://unsplash.com/@jrkorpa) on [Unsplash](https://unsplash.com/)" >}}
## Gist
The `gist` shortcode can be used to embed a GitHub Gist. It requires two unnamed parameters: the username and ID of the Gist.
**Example:**
```md
{{</* jpanther 26292111fe1eb8e31c60f6dbfef9df28 */>}}
```
{{< gist jpanther 26292111fe1eb8e31c60f6dbfef9df28 >}}
## Icon
`icon` outputs an SVG icon and takes the icon name as its only parameter. The icon is scaled to match the current text size.
@@ -125,9 +125,11 @@ config.toml`ファイルには、Hugoの基本設定値のみが含まれるよ
defaultContentLanguage = "en"
enableRobotsTXT = true
paginate = 10
summaryLength = 0
[pagination]
pagerSize = 10
[outputs]
home = ["HTML", "RSS", "JSON"]
```
@@ -125,9 +125,11 @@ If you're using a language other than English, provide a `defaultContentLanguage
defaultContentLanguage = "en"
enableRobotsTXT = true
paginate = 10
summaryLength = 0
[pagination]
pagerSize = 10
[outputs]
home = ["HTML", "RSS", "JSON"]
```
@@ -46,6 +46,7 @@ Die vollständige Liste der integrierten Icons und ihre entsprechenden Namen fin
| instagram | {{< icon instagram >}} |
| keybase | {{< icon keybase >}} |
| kickstarter | {{< icon kickstarter >}} |
| kofi | {{< icon kofi >}} |
| lastfm | {{< icon lastfm >}} |
| lightbulb | {{< icon lightbulb >}} |
| line | {{< icon line >}} |
@@ -46,6 +46,7 @@ La lista completa de íconos incorporados y sus nombres correspondientes se pued
| instagram | {{< icon instagram >}} |
| keybase | {{< icon keybase >}} |
| kickstarter | {{< icon kickstarter >}} |
| kofi | {{< icon kofi >}} |
| lastfm | {{< icon lastfm >}} |
| lightbulb | {{< icon lightbulb >}} |
| line | {{< icon line >}} |
@@ -46,6 +46,7 @@ Congo は[FontAwesome 6](https://fontawesome.com/icons)のアイコンをサポ
| instagram | {{< icon instagram >}} |
| keybase | {{< icon keybase >}} |
| kickstarter | {{< icon kickstarter >}} |
| kofi | {{< icon kofi >}} |
| lastfm | {{< icon lastfm >}} |
| lightbulb | {{< icon lightbulb >}} |
| line | {{< icon line >}} |
@@ -46,6 +46,7 @@ The full list of built-in icons and their corresponding names can referenced bel
| instagram | {{< icon instagram >}} |
| keybase | {{< icon keybase >}} |
| kickstarter | {{< icon kickstarter >}} |
| kofi | {{< icon kofi >}} |
| lastfm | {{< icon lastfm >}} |
| lightbulb | {{< icon lightbulb >}} |
| line | {{< icon line >}} |
@@ -16,20 +16,6 @@ Hier ist ein Beispiel des mitgelieferten `youtube`-Shortcodes.
{{< youtube ZJthWmvUzzc >}}
## Twitter
Dieses Beispiel verwendet den Shortcode `twitter_simple`, um einen Tweet anzuzeigen. Er benötigt zwei benannte Parameter `user` und `id`.
{{< twitter_simple user="DesignReviewed" id="1085870671291310081" >}}
Alternativ kann der Shortcode `tweet` verwendet werden, um eine vollständig formatierte Twitter-Kachel einzubetten.
## Gist
Der Shortcode `gist` kann verwendet werden, um einen Gist von GitHub einzubetten. Er erfordert zwei unbenannte Parameter: den Benutzernamen und die ID des Gist.
{{< gist jpanther a873e1219ffeaa80a926bbe8255f348e >}}
## Vimeo
Der Shortcode `vimeo_simple` bettet ein Video von Vimeo ein.
@@ -16,20 +16,6 @@ A continuación, se muestra un ejemplo que utiliza el shortcut integrado `youtub
{{< youtube ZJthWmvUzzc >}}
## Twitter
Este ejemplo usa el shortcode `twitter_simple` para generar un Tweet. Requiere dos parámetros por nombre: `usuario` e `id`.
{{< twitter_simple user="DesignReviewed" id="1085870671291310081" >}}
Alternativamente, el shortcut `tweet` se puede usar para incrustar una tarjeta completa de Twitter.
## Gist
El shortcode `gist` se puede usar para incrustar un GitHub Gist. Requiere dos parámetros por posición: el nombre de usuario y el ID del Gist.
{{< gist jpanther a873e1219ffeaa80a926bbe8255f348e >}}
## Vimeo
El shortcode `vimeo_simple` insertará un video de Vimeo.
@@ -16,20 +16,6 @@ Hugoには、リッチコンテンツのためのいくつかの[組み込みシ
{{< youtube ZJthWmvUzzc >}}
## Twitter
この例では `twitter_simple` ショートコードを使っています。 `user``id` の2つの名前付きパラメーターが必要です。
{{< twitter_simple user="DesignReviewed" id="1085870671291310081" >}}
`tweet` ショートコードを使えば、完全にマークアップされたTwitterカードを埋め込むこともできます。
## Gist
`gist` ショートコードを使うと、GitHubのGistを埋め込むことができます。ユーザー名とGistのIDというパラメーターが必要です。
{{< gist jpanther a873e1219ffeaa80a926bbe8255f348e >}}
## Vimeo
`vimeo_simple` ショートコードでVimeoの動画を埋め込むことができます。
@@ -12,26 +12,24 @@ Hugo ships with several [built-in shortcodes](https://gohugo.io/content-manageme
## YouTube
Below is an example using the built-in `youtube` shortcode.
Below is an example using the built-in `youtube` shortcode. It requires only the video ID.
{{< youtube ZJthWmvUzzc >}}
## Twitter
## X (formerly 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.
## Instagram
## Gist
The `instagram` shortcode will embed an Instagram post. It requires only the post ID.
The `gist` shortcode can be used to embed a GitHub Gist. It requires two unnamed parameters: the username and ID of the Gist.
{{< gist jpanther a873e1219ffeaa80a926bbe8255f348e >}}
{{< instagram CxOWiQNP2MO >}}
## Vimeo
The `vimeo_simple` shortcode will embed a Vimeo video.
The `vimeo` shortcode will embed a Vimeo video. It requires only the video ID.
{{< vimeo_simple 48912912 >}}
{{< vimeo 48912912 >}}
@@ -16,20 +16,6 @@ Hugo包含了多个[内置短代码](https://gohugo.io/content-management/shortc
{{< youtube ZJthWmvUzzc >}}
## Twitter
这个例子使用了 `twitter_simple` 短代码来输出一条推文。它需要两个命名参数 `user``id`
{{< twitter_simple user="DesignReviewed" id="1085870671291310081" >}}
或者,可以使用 `tweet` 短代码来嵌入一个完全标记的Twitter卡片。
## Gist
`gist` 短代码可以用于嵌入GitHub Gist。它需要两个未命名参数:Gist的用户名和ID。
{{< gist jpanther a873e1219ffeaa80a926bbe8255f348e >}}
## Vimeo
`vimeo_simple` 短代码将嵌入Vimeo视频。
+3 -1
View File
@@ -70,7 +70,7 @@ The list below is just a handful of the websites that are built using the Congo
| [kylecapehart.com](https://kylecapehart.com/) | Personal Site and Blog |
| [hosni.info](https://hosni.info/) | Personal site and Tech Blog |
| [mattstrayer.com](https://www.mattstrayer.com/) | Personal Site and Blog |
| [noamlerner.com](https://www.noamlerner.com/) | Personal blog (English/Hebrew) |
| [noamlerner.com](https://noamlerner.com/) | Personal blog (English/Hebrew) |
| [jneidel.com](https://jneidel.com) | Personal site and blog |
| [clementfouque.com](https://clementfouque.com) | Personal Site and Tech Blog |
| [victoryuan.com](https://victoryuan.com) | Personal Site and blog |
@@ -80,6 +80,8 @@ The list below is just a handful of the websites that are built using the Congo
| [blog.ny4.dev](https://blog.ny4.dev) | Personal site and blog (en/zh) |
| [socrabytes.github.io](https://socrabytes.github.io) | Personal site and Tech Blog |
| [montenegrodanielfelipe.com](https://montenegrodanielfelipe.com) | Personal Site and Blog |
| [euangelos.linardos.gr](https://euangelos.linardos.gr) | Personal Site and Blog |
| [joshquinlan.co.uk](https://joshquinlan.co.uk) | Personal & Professional Site |
| [Rwhither's Blog](https://blog.sky123.top) | Personal site and blog |
**Congo user?** To add your site to this list, [submit a pull request](https://github.com/jpanther/congo/blob/dev/exampleSite/content/users/index.md).
+2 -2
View File
@@ -35,7 +35,7 @@
<div class="flex flex-grow">
{{ if eq $pageLang .Lang }}
<a
href="{{ $translation.RelPermalink }}"
href="{{ cond hugo.IsMultihost $translation.Permalink $translation.RelPermalink }}"
class="flex w-full items-center justify-between bg-primary-100 px-2 py-1 dark:bg-primary-900"
>{{ .LanguageName }}<span
class="ms-2 w-6 text-primary-600 dark:text-primary-400"
@@ -44,7 +44,7 @@
>
{{ else }}
<a
href="{{ $translation.RelPermalink }}"
href="{{ cond hugo.IsMultihost $translation.Permalink $translation.RelPermalink }}"
class="w-full py-1 pe-10 ps-2 decoration-primary-500 hover:underline hover:decoration-2 hover:underline-offset-2"
>{{ .LanguageName }}</a
>
+6 -5
View File
@@ -1,9 +1,10 @@
{{ $algorithm := .Site.Params.fingerprintAlgorithm | default "sha256" }}
{{/* Mermaid */}}
{{ if .Page.HasShortcode "mermaid" }}
{{ $mermaidLib := resources.Get "lib/mermaid/mermaid.min.js" }}
{{ $mermaidConfig := resources.Get "js/mermaid.js" }}
{{ $mermaidConfig := $mermaidConfig | resources.Minify }}
{{ $mermaidJS := slice $mermaidLib $mermaidConfig | resources.Concat "js/mermaid.bundle.js" | resources.Fingerprint "sha512" }}
{{ $mermaidJS := slice $mermaidLib $mermaidConfig | resources.Concat "js/mermaid.bundle.js" | resources.Fingerprint $algorithm }}
<script
defer
type="text/javascript"
@@ -16,7 +17,7 @@
{{ $chartLib := resources.Get "lib/chart/chart.umd.js" }}
{{ $chartConfig := resources.Get "js/chart.js" }}
{{ $chartConfig := $chartConfig | resources.Minify }}
{{ $chartJS := slice $chartLib $chartConfig | resources.Concat "js/chart.bundle.js" | resources.Fingerprint "sha512" }}
{{ $chartJS := slice $chartLib $chartConfig | resources.Concat "js/chart.bundle.js" | resources.Fingerprint $algorithm }}
<script
defer
type="text/javascript"
@@ -27,7 +28,7 @@
{{/* Katex */}}
{{ if .Page.HasShortcode "katex" }}
{{ $katexCSS := resources.Get "lib/katex/katex.min.css" }}
{{ $katexCSS := $katexCSS | resources.Fingerprint "sha512" }}
{{ $katexCSS := $katexCSS | resources.Fingerprint $algorithm }}
<link
type="text/css"
rel="stylesheet"
@@ -35,14 +36,14 @@
integrity="{{ $katexCSS.Data.Integrity }}"
/>
{{ $katexJS := resources.Get "lib/katex/katex.min.js" }}
{{ $katexJS := $katexJS | resources.Fingerprint "sha512" }}
{{ $katexJS := $katexJS | resources.Fingerprint $algorithm }}
<script
defer
src="{{ $katexJS.RelPermalink }}"
integrity="{{ $katexJS.Data.Integrity }}"
></script>
{{ $katexRenderJS := resources.Get "lib/katex/auto-render.min.js" }}
{{ $katexRenderJS := $katexRenderJS | resources.Fingerprint "sha512" }}
{{ $katexRenderJS := $katexRenderJS | resources.Fingerprint $algorithm }}
<script
defer
src="{{ $katexRenderJS.RelPermalink }}"
+1
View File
@@ -0,0 +1 @@
<script src="https://gist.github.com/{{ index .Params 0 }}/{{ index .Params 1 }}.js{{if len .Params | eq 3 }}?file={{ index .Params 2 }}{{end}}"></script>
+628 -140
View File
File diff suppressed because it is too large Load Diff
+8 -8
View File
@@ -30,18 +30,18 @@
},
"homepage": "https://github.com/jpanther/congo#readme",
"devDependencies": {
"@tailwindcss/typography": "^0.5.15",
"chart.js": "^4.4.7",
"fuse.js": "^7.0.0",
"jsdom": "^25.0.1",
"katex": "^0.16.11",
"@tailwindcss/typography": "^0.5.16",
"chart.js": "^4.4.8",
"fuse.js": "^7.1.0",
"jsdom": "^26.0.0",
"katex": "^0.16.21",
"mermaid": "^11.4.1",
"prettier": "^3.4.2",
"prettier-plugin-go-template": "^0.0.15",
"prettier-plugin-tailwindcss": "^0.6.9",
"prettier-plugin-tailwindcss": "^0.6.11",
"quicklink": "^2.3.0",
"rimraf": "^6.0.1",
"tailwindcss": "^3.4.16",
"tailwindcss": "^3.4.17",
"vendor-copy": "^3.0.1"
},
"vendorCopy": [],
@@ -80,6 +80,6 @@
}
],
"dependencies": {
"@fortawesome/fontawesome-free": "^6.7.1"
"@fortawesome/fontawesome-free": "^6.7.2"
}
}
+5 -4
View File
@@ -1,4 +1,4 @@
#!bin/bash
#!/bin/bash
# get current branch
branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,')
@@ -13,7 +13,7 @@ npm run build
if [ $branch = "dev" ]; then
# check current branch is clean
if output=$(git status --porcelain) && [ -z "$output" ]; then
# get the version number
echo "Enter the release version (eg. 1.2.0):"
read version
@@ -23,6 +23,7 @@ if [ $branch = "dev" ]; then
# update package version
jq --arg version "$version" '.version=$version' package.json > package.tmp && mv package.tmp package.json
sed -i "" -e "1s/^\(\/\*! Congo \)v[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}/\1v$version/" assets/css/main.css
npm install --package-lock-only
# update changelog
chan release $version || exit
@@ -59,10 +60,10 @@ if [ $branch = "dev" ]; then
git checkout dev
else
else
echo "ERROR: There are unstaged changes in development!"
echo "Clean the working directory and try again."
fi
else
else
echo "ERROR: Releases can only be published from the dev branch!"
fi
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 708 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 559 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 229 B

After

Width:  |  Height:  |  Size: 105 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 307 B

After

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB