41 KiB
title | weight | draft | description | slug | tags | series | series_order | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ã·ã§ãŒãã³ãŒã | 6 | false | Blowfish ã§äœ¿ãããã¹ãŠã®ã·ã§ãŒãã³ãŒã | shortcodes |
|
|
8 |
ããã©ã«ãã® Hugo ã·ã§ãŒãã³ãŒã ã«å ããŠãBlowfish ã¯æ©èœæ¡åŒµã®ããã«ããã€ãç¬èªã®ãã®ãè¿œå ããŠããŸãã
ã¢ã©ãŒã
alert
ã·ã§ãŒãã³ãŒãã䜿ããšãèšäºã®äžã«ã¹ã¿ã€ãªãã·ã¥ãªã¡ãã»ãŒãžããã¯ã¹ã衚瀺ã§ããŸããèªè
ã«èŠéããŠã»ãããªãéèŠãªæ
å ±ãç®ç«ãããã®ã«äŸ¿å©ã§ãã
ãã©ã¡ãŒã¿ | 説æ |
---|---|
icon |
ãªãã·ã§ã³ 巊端ã«è¡šç€ºããã¢ã€ã³ã³ã ããã©ã«ã: exclaimation triangle icon (ã¢ã€ã³ã³ã®äœ¿çšæ¹æ³ã®è©³çŽ°ã«ã€ããŠã¯ãã¢ã€ã³ã³ã·ã§ãŒãã³ãŒã ãã芧ãã ããã) |
iconColor |
ãªãã·ã§ã³ åºæ¬ç㪠CSS ã¹ã¿ã€ã«ã®ã¢ã€ã³ã³ã®è²ã HEXå€ ( #FFFFFF ) ãŸãã¯è²ã®åå (white ) ã®ããããã§æå®ã§ããŸããããã©ã«ãã§ã¯ãçŸåšã®ã«ã©ãŒããŒãã«åºã¥ããŠéžæãããŸãã |
cardColor |
ãªãã·ã§ã³ åºæ¬ç㪠CSS ã¹ã¿ã€ã«ã®ã«ãŒãã®èæ¯è²ã HEXå€ ( #FFFFFF ) ãŸãã¯è²ã®åå (white ) ã®ãããããæå®ã§ããŸããããã©ã«ãã§ã¯ãçŸåšã®ã«ã©ãŒããŒãã«åºã¥ããŠéžæãããŸãã |
textColor |
ãªãã·ã§ã³ åºæ¬ç㪠CSS ã¹ã¿ã€ã«ã®ããã¹ãã®è²ã HEXå€ ( #FFFFFF ) ãŸãã¯è²ã®åå (white ) ã®ãããããæå®ã§ããŸããããã©ã«ãã§ã¯ãçŸåšã®ã«ã©ãŒããŒãã«åºã¥ããŠéžæãããŸãã |
å ¥å㯠Markdown ã§èšè¿°ãããŠãããããèªç±ã«ãã©ãŒãããã§ããŸãã
äŸ 1: ãã©ã¡ãŒã¿ãªã
{{</* alert */>}}
**èŠå!** ãã®è¡çºã¯ç Žå£çã§ã!
{{</* /alert */>}}
{{< alert >}} èŠå! ãã®è¡çºã¯ç Žå£çã§ã! {{< /alert >}}
äŸ 2: ååãªããã©ã¡ãŒã¿
{{</* alert "twitter" */>}}
Twitter ã§ç§ã [ãã©ããŒ](https://twitter.com/nunocoracao)ããã®ãå¿ããªãã§ãã ããã
{{</* /alert */>}}
{{< alert "twitter" >}} Twitter ã§ç§ã ãã©ããŒããã®ãå¿ããªãã§ãã ããã {{< /alert >}}
äŸ 3: ååä»ããã©ã¡ãŒã¿
{{</* alert icon="fire" cardColor="#e63946" iconColor="#1d3557" textColor="#f1faee" */>}}
ããã¯ãšã©ãŒã§ã!
{{</* /alert */>}}
{{< alert icon="fire" cardColor="#e63946" iconColor="#1d3557" textColor="#f1faee" >}} ããã¯ãšã©ãŒã§ã! {{< /alert >}}
èšäº
Article
ã¯ã1ã€ã®èšäºã Markdown ãã¡ã€ã«ã«åã蟌ã¿ãŸããåã蟌ããã¡ã€ã«ãžã® link
ã¯ãåã蟌ããã¡ã€ã«ã® .RelPermalink
ã§ããå¿
èŠããããŸããã·ã§ãŒãã³ãŒãã¯ã芪ãåç
§ããŠããå Žåã¯äœã衚瀺ããªãããšã«æ³šæããŠãã ããã泚: Blowfish (/blowfish/ ãªã©) ã®ãããªãµããã©ã«ã㧠Web ãµã€ããå®è¡ããŠããå Žåã¯ããã®ãã¹ããªã³ã¯ã«å«ããŠãã ããã
ãã©ã¡ãŒã¿ | 説æ |
---|---|
link |
å¿
é ã¿ãŒã²ããèšäºãžã® .RelPermalink ã |
äŸ:
{{</* article link="/docs/welcome/" */>}}
{{< article link="/docs/welcome/" >}}
ãããž
badge
ã¯ãã¡ã¿ããŒã¿ã衚瀺ããã®ã«åœ¹ç«ã€ãã¹ã¿ã€ãªãã·ã¥ãªãããžãåºåããŸãã
äŸ:
{{</* badge */>}}
æ°ããèšäº!
{{</* /badge */>}}
{{< badge >}} æ°ããèšäº! {{< /badge >}}
ãã¿ã³
button
ã¯ãäž»èŠãªã¢ã¯ã·ã§ã³ã匷調ããããã«äœ¿çšã§ãããã¹ã¿ã€ãªãã·ã¥ãªãã¿ã³ã³ã³ããŒãã³ããåºåããŸãããªã³ã¯ã® URLãã¿ãŒã²ãããããã³é¢ä¿ãæå®ããããã«äœ¿çšã§ããã3 ã€ã®ãªãã·ã§ã³å€æ° href
ãtarget
ãrel
ããããŸãã
äŸ:
{{</* button href="#button" target="_self" */>}}
ã¢ã¯ã·ã§ã³ãåŒã³åºã
{{</* /button */>}}
{{< button href="#button" target="_self" >}} ã¢ã¯ã·ã§ã³ãåŒã³åºã {{< /button >}}
ã«ã«ãŒã»ã«
carousel
ã¯ãè€æ°ã®ç»åãã€ã³ã¿ã©ã¯ãã£ãã§é
åçã«è¡šç€ºããããã«äœ¿çšãããŸããããã«ããããŠãŒã¶ãŒã¯ç»å1æåã®çžŠæ¹åã®ã¹ããŒã¹ã®ã¿ã䜿ã£ãŠãè€æ°ã®ç»åãã¹ã©ã€ããããªãã衚瀺ã§ããŸãããã¹ãŠã®ç»åã¯ã芪ã³ã³ããŒãã³ãã®å¹
ãã£ã±ãã«è¡šç€ºããã16:9
ã21:9
ããŸã㯠32:9
ã®äºåã«æ±ºããããã¢ã¹ãã¯ãæ¯ã®ããããã䜿çšããŠè¡šç€ºãããŸãã
ãã©ã¡ãŒã¿ | 説æ |
---|---|
images |
å¿ é ç»ååãŸã㯠URL ã«äžèŽããæ£èŠè¡šçŸæååã |
aspectRatio |
ãªãã·ã§ã³ ã«ã«ãŒã»ã«ã®ã¢ã¹ãã¯ãæ¯ã16-9 ã21-9 ããŸã㯠32-9 ã®ãããããããã©ã«ãã§ã¯ 16-9 ã«èšå®ãããŠããŸãã |
interval |
ãªãã·ã§ã³ èªåã¹ã¯ããŒã«ã®ééãããªç§åäœã§æå®ããŸããããã©ã«ã㯠2000 (2ç§) ã§ãã |
äŸ 1: 16:9 ã®ã¢ã¹ãã¯ãæ¯ãšåé·ãªç»åã®ãªã¹ã
{{</* carousel images="{https://cdn.pixabay.com/photo/2016/12/11/12/02/mountains-1899264_960_720.jpg, gallery/03.jpg, gallery/01.jpg, gallery/02.jpg, gallery/04.jpg}" */>}}
{{< carousel images="{https://cdn.pixabay.com/photo/2016/12/11/12/02/mountains-1899264_960_720.jpg,gallery/03.jpg,gallery/01.jpg,gallery/02.jpg,gallery/04.jpg}" >}}
äŸ 2: 21:9 ã®ã¢ã¹ãã¯ãæ¯ãšæ£èŠè¡šçŸã«ããç»åã®ãªã¹ã
{{</* carousel images="gallery/*" aspectRatio="21-9" interval="2500" */>}}
{{< carousel images="gallery/*" aspectRatio="21-9" interval="2500" >}}
ãã£ãŒã
chart
㯠Chart.js ã©ã€ãã©ãªã䜿çšããŠãã·ã³ãã«ãªæ§é åããŒã¿ã䜿çšããŠèšäºã«ãã£ãŒããåã蟌ã¿ãŸããããŸããŸãªãã£ãŒãã¹ã¿ã€ã« ããµããŒãããŠããããã¹ãŠãã·ã§ãŒãã³ãŒãå
ããèšå®ã§ããŸããã·ã§ãŒãã³ãŒãã¿ã°ã®éã«ãã£ãŒããã©ã¡ãŒã¿ãæå®ããã ãã§ãChart.js ãæ®ãã®åŠçãè¡ããŸãã
æ§æãšãµããŒããããŠãããã£ãŒãã¿ã€ãã®è©³çŽ°ã«ã€ããŠã¯ãå ¬åŒ Chart.js ããã¥ã¡ã³ã ãåç §ããŠãã ããã
äŸ:
{{</* chart */>}}
type: 'bar',
data: {
labels: ['ããã', 'ãã«ãŒããªãŒ', 'ããã', 'ã©ã€ã ', 'ãªã¬ã³ãž'],
datasets: [{
label: '# æ祚æ°',
data: [12, 19, 3, 5, 3],
}]
}
{{</* /chart */>}}
{{< chart >}} type: 'bar', data: { labels: ['ããã', 'ãã«ãŒããªãŒ', 'ããã', 'ã©ã€ã ', 'ãªã¬ã³ãž'], datasets: [{ label: '# æ祚æ°', data: [12, 19, 3, 5, 3], }] } {{< /chart >}}
[ãã£ãŒãã®ãµã³ãã«]({{< ref "charts" >}}) ããŒãžã§ãChart.js ã®ä»ã®äŸãèŠãããšãã§ããŸãã
ã³ãŒãã€ã³ããŒã¿ãŒ
ãã®ã·ã§ãŒãã³ãŒãã¯ãã³ããŒã¢ã³ãããŒã¹ãããã«å€éšãœãŒã¹ããç°¡åã«ã³ãŒããã€ã³ããŒãããããã®ãã®ã§ãã
ãã©ã¡ãŒã¿ | 説æ |
---|---|
url |
å¿ é å€éšã§ãã¹ããããŠããã³ãŒããã¡ã€ã«ãžã® URLã |
type |
æ§æã®åŒ·èª¿è¡šç€ºã«äœ¿çšãããã³ãŒãã¿ã€ãã |
startLine |
ãªãã·ã§ã³ ã€ã³ããŒããéå§ããè¡çªå·ã |
endLine |
ãªãã·ã§ã³ ã€ã³ããŒããçµäºããè¡çªå·ã |
äŸ:
{{</* codeimporter url="https://raw.githubusercontent.com/nunocoracao/blowfish/main/layouts/shortcodes/mdimporter.html" type="go" */>}}
{{< codeimporter url="https://raw.githubusercontent.com/nunocoracao/blowfish/main/layouts/shortcodes/mdimporter.html" type="go" >}}
{{</* codeimporter url="https://raw.githubusercontent.com/nunocoracao/blowfish/main/config/_default/hugo.toml" type="toml" startLine="11" endLine="18" */>}}
{{< codeimporter url="https://raw.githubusercontent.com/nunocoracao/blowfish/main/config/_default/hugo.toml" type="toml" startLine="11" endLine="18">}}
Codeberg ã«ãŒã
codeberg
ã䜿çšãããšãCodeberg API ãä»ã㊠Codeberg ãªããžããªããã°ãããªã³ã¯ã§ããã¹ã¿ãŒããã©ãŒã¯ãªã©ã®çµ±èšã«é¢ãããªã¢ã«ã¿ã€ã ã®æŽæ°ãæäŸã§ããŸãã
ãã©ã¡ãŒã¿ | 説æ |
---|---|
repo |
[æåå] username/repo 圢åŒã® Codeberg ãªããžã㪠|
äŸ 1:
{{</* codeberg repo="forgejo/forgejo" */>}}
{{< codeberg repo="forgejo/forgejo" >}}
Figure
Blowfish ã«ã¯ãã³ã³ãã³ãã«ç»åãè¿œå ããããã® figure
ã·ã§ãŒãã³ãŒããå«ãŸããŠããŸãããã®ã·ã§ãŒãã³ãŒãã¯ãè¿œå ã®ããã©ãŒãã³ã¹äžã®å©ç¹ãæäŸããããã«ãåºæ¬ã® Hugo æ©èœã眮ãæããŸãã
æäŸãããç»åãããŒãžãªãœãŒã¹ã§ããå ŽåãHugo Pipes ã䜿çšããŠæé©åãããããŸããŸãªããã€ã¹è§£å床ã«é©ããç»åãæäŸããããã«æ¡å€§çž®å°ãããŸããéçã¢ã»ãããŸãã¯å€éšç»åãžã® URL ãæäŸãããå ŽåãHugo ã«ããç»ååŠçãªãã«ãã®ãŸãŸå«ãŸããŸãã
figure
ã·ã§ãŒãã³ãŒãã¯ã6ã€ã®ãã©ã¡ãŒã¿ãåãä»ããŸãã
ãã©ã¡ãŒã¿ | 説æ |
---|---|
src |
å¿
é ç»åã®ããŒã«ã«ãã¹/ãã¡ã€ã«åãŸã㯠URLããã¹ãšãã¡ã€ã«åãæå®ãããšãããŒãã¯æ¬¡ã®åªå
é äœã䜿çšããŠç»åã®ç¹å®ãè©Šã¿ãŸãããŸããããŒãžã«ãã³ãã«ããã ããŒãžãªãœãŒã¹ ãšããŠã次㫠assets/ ãã£ã¬ã¯ããªå
ã®ã¢ã»ãããæåŸã« static/ ãã£ã¬ã¯ããªå
ã®éçç»åã |
alt |
ç»å㮠代æ¿ããã¹ãã |
caption |
ç»åã®äžã«è¡šç€ºãããç»åãã£ãã·ã§ã³ã® Markdownã |
class |
ç»åã«é©çšããè¿œå ã® CSS ã¯ã©ã¹ã |
href |
ç»åããªã³ã¯ãã URLã |
target |
href URL ã®ã¿ãŒã²ããå±æ§ã |
nozoom |
nozoom=true ã¯ãç»åã®ããºãŒã ãæ©èœãç¡å¹ã«ããŸããããã¯ãhref ãªã³ã¯ãšçµã¿åãããŠäœ¿çšââããã®ãæã圹ç«ã¡ãŸãã |
default |
Hugoã®ããã©ã«ãã® figure ã®åäœã«æ»ãããã®ç¹å¥ãªãã©ã¡ãŒã¿ãdefault=true ãæå®ããéåžžã® Hugo ã·ã§ãŒãã³ãŒãæ§æ ã䜿çšããŸãã |
Blowfish ããæšæºã® Markdown æ§æã䜿çšããŠå«ãŸããç»åã®èªåå€æããµããŒãããŠããŸãã次ã®åœ¢åŒã䜿çšããã ãã§ãããŒããåŠçããŠãããŸãã
![代æ¿ããã¹ã](image.jpg "ç»åãã£ãã·ã§ã³")
äŸ:
{{</* figure
src="abstract.jpg"
alt="æœè±¡çãªçŽ«ã®ã¢ãŒãã¯ãŒã¯"
caption="Photo by [Jr Korpa](https://unsplash.com/@jrkorpa) on [Unsplash](https://unsplash.com/)"
*/>}}
<!-- ãŸã㯠-->
![æœè±¡çãªçŽ«ã®ã¢ãŒãã¯ãŒã¯](abstract.jpg "Photo by [Jr Korpa](https://unsplash.com/@jrkorpa) on [Unsplash](https://unsplash.com/)")
{{< figure src="abstract.jpg" alt="æœè±¡çãªçŽ«ã®ã¢ãŒãã¯ãŒã¯" caption="Photo by Jr Korpa on Unsplash" >}}
Forgejo ã«ãŒã
forgejo
ã䜿çšãããšãforgejo API ãä»ã㊠Forgejo ãªããžããªããã°ãããªã³ã¯ã§ããã¹ã¿ãŒããã©ãŒã¯ãªã©ã®çµ±èšããªã¢ã«ã¿ã€ã ã§æŽæ°ã§ããŸãã
ãã©ã¡ãŒã¿ | 説æ |
---|---|
repo |
[æåå] username/repo 圢åŒã® forgejo ãªããžã㪠|
server |
[æåå] https://v8.next.forgejo.org ã®ãããªãµãŒã㌠URL |
äŸ 1:
{{</* forgejo server="https://v8.next.forgejo.org" repo="forgejo/forgejo" */>}}
{{< forgejo server="https://v8.next.forgejo.org" repo="forgejo/forgejo" >}}
ã®ã£ã©ãªãŒ
gallery
ã䜿çšãããšãè€æ°ã®ç»åãäžåºŠã«ãã¬ã¹ãã³ã·ããªæ¹æ³ã§ãããå€æ§ã§èå³æ·±ãã¬ã€ã¢ãŠãã§çŽ¹ä»ã§ããŸãã
ã®ã£ã©ãªãŒã«ç»åãè¿œå ããã«ã¯ãåç»åã« img
ã¿ã°ã䜿çšããã®ã£ã©ãªãŒãåç»åã®åå¹
ãèå¥ã§ããããã« class="grid-wXX"
ãè¿œå ããŸããããã©ã«ãã§äœ¿çšå¯èœãªå¹
㯠10% ããå§ãŸãã5% å»ã¿ã§æ倧 100% ãŸã§ã§ããããšãã°ãå¹
ã 65% ã«èšå®ããã«ã¯ãã¯ã©ã¹ã grid-w65
ã«èšå®ããŸããããã«ã3åã®ã®ã£ã©ãªãŒãæ§ç¯ããããã«ã33% ãš 66% ã®å¹
ã䜿çšã§ããŸãããŸããtailwind +ã®ã¬ã¹ãã³ã·ãã€ã³ãžã±ãŒã¿ãŒã掻çšããŠãã¬ã¹ãã³ã·ãã°ãªãããäœæããããšãã§ããŸãã
äŸ1: éåžžã®ã®ã£ã©ãªãŒ
{{</* gallery */>}}
<img src="gallery/01.jpg" class="grid-w33" />
<img src="gallery/02.jpg" class="grid-w33" />
<img src="gallery/03.jpg" class="grid-w33" />
<img src="gallery/04.jpg" class="grid-w33" />
<img src="gallery/05.jpg" class="grid-w33" />
<img src="gallery/06.jpg" class="grid-w33" />
<img src="gallery/07.jpg" class="grid-w33" />
{{</* /gallery */>}}
{{< gallery >}} {{< /gallery >}}
äŸ2: ã¬ã¹ãã³ã·ãã®ã£ã©ãªãŒ
{{</* gallery */>}}
<img src="gallery/01.jpg" class="grid-w50 md:grid-w33 xl:grid-w25" />
<img src="gallery/02.jpg" class="grid-w50 md:grid-w33 xl:grid-w25" />
<img src="gallery/03.jpg" class="grid-w50 md:grid-w33 xl:grid-w25" />
<img src="gallery/04.jpg" class="grid-w50 md:grid-w33 xl:grid-w25" />
<img src="gallery/05.jpg" class="grid-w50 md:grid-w33 xl:grid-w25" />
<img src="gallery/06.jpg" class="grid-w50 md:grid-w33 xl:grid-w25" />
<img src="gallery/07.jpg" class="grid-w50 md:grid-w33 xl:grid-w25" />
{{</* /gallery */>}}
{{< gallery >}} {{< /gallery >}}
Gitea ã«ãŒã
gitea
ã䜿çšãããšãgitea API ãä»ã㊠Gitea ãªããžããªããã°ãããªã³ã¯ã§ããã¹ã¿ãŒããã©ãŒã¯ãªã©ã®çµ±èšã«é¢ãããªã¢ã«ã¿ã€ã ã«æŽæ°ã§ããŸãã
ãã©ã¡ãŒã¿ | 説æ |
---|---|
repo |
[æåå] username/repo 圢åŒã® gitea ãªããžã㪠|
server |
[æåå] https://git.fsfe.org ã®ãããªãµãŒã㌠URL |
äŸ1:
{{</* gitea server="https://git.fsfe.org" repo="FSFE/fsfe-website" */>}}
{{< gitea server="https://git.fsfe.org" repo="FSFE/fsfe-website" >}}
GitHub ã«ãŒã
github
ã䜿çšãããšãgithub ãªããžããªããã°ãããªã³ã¯ã§ããã¹ã¿ãŒæ°ããã©ãŒã¯æ°ãªã©ã®çµ±èšæ
å ±ããªã¢ã«ã¿ã€ã ã§è¡šç€ºããã³æŽæ°ã§ããŸãã
ãã©ã¡ãŒã¿ | 説æ |
---|---|
repo |
[æåå] username/repo 圢åŒã® github ãªããžã㪠|
äŸ1:
{{</* github repo="nunocoracao/blowfish" */>}}
{{< github repo="nunocoracao/blowfish" >}}
GitLab ã«ãŒã
gitlab
ã䜿çšãããšãGitLab ãããžã§ã¯ã (ãªããžããªã® GitLab çšèª) ããã°ãããªã³ã¯ã§ããŸãã
ã¹ã¿ãŒæ°ããã©ãŒã¯æ°ãªã©ã®ãªã¢ã«ã¿ã€ã ã®çµ±èšæ
å ±ã衚瀺ããŸãã
github
ãšã¯ç°ãªãããããžã§ã¯ãã®äž»èŠãªããã°ã©ãã³ã°èšèªã衚瀺ããããšã¯ã§ããŸããã
æåŸã«ãapi/v4/projects/
ãšã³ããã€ã³ããå©çšå¯èœã§ããéããã«ã¹ã¿ã GitLab ã€ã³ã¹ã¿ã³ã¹ URL ãæå®ã§ããããããã®ã·ã§ãŒãã³ãŒãã¯ã»ãšãã©ã®ã»ã«ããã¹ã/ãšã³ã¿ãŒãã©ã€ãºãããã€ã¡ã³ããšäºææ§ããããŸãã
ãã©ã¡ãŒã¿ | 説æ |
---|---|
projectID |
[æåå] GitLab ã®æ°å€ ProjectID |
baseURL |
[æåå] ãªãã·ã§ã³ã® GitLab ã€ã³ã¹ã¿ã³ã¹ URLãããã©ã«ã㯠https://gitlab.com/ |
äŸ1:
{{</* gitlab projectID="278964" */>}}
{{< gitlab projectID="278964" >}}
ã¢ã€ã³ã³
icon
㯠SVG ã¢ã€ã³ã³ãåºåããã¢ã€ã³ã³åãå¯äžã®ãã©ã¡ãŒã¿ãšããŠåãåããŸããã¢ã€ã³ã³ã¯ãçŸåšã®ããã¹ããµã€ãºã«åãããŠã¹ã±ãŒãªã³ã°ãããŸãã
äŸ:
{{</* icon "github" */>}}
åºå: {{< icon "github" >}}
ã¢ã€ã³ã³ã¯ Hugo ãã€ãã©ã€ã³ã䜿çšããŠèšå®ããããããéåžžã«æè»ã§ããBlowfish ã«ã¯ããœãŒã·ã£ã«ããªã³ã¯ããã®ä»ã®ç®çã®ããã®çµã¿èŸŒã¿ã¢ã€ã³ã³ãå€æ°å«ãŸããŠããŸãããµããŒããããŠããã¢ã€ã³ã³ã®å®å šãªãªã¹ãã«ã€ããŠã¯ã[ã¢ã€ã³ã³ã®ãµã³ãã«]({{< ref "samples/icons" >}}) ããŒãžã確èªããŠãã ããã
ã«ã¹ã¿ã ã¢ã€ã³ã³ã¯ããããžã§ã¯ãã® assets/icons/
ãã£ã¬ã¯ããªã«ç¬èªã®ã¢ã€ã³ã³ã¢ã»ãããæäŸããããšã§è¿œå ã§ããŸãããã®åŸã.svg
æ¡åŒµåãªã㧠SVG ãã¡ã€ã«åã䜿çšããŠãã·ã§ãŒãã³ãŒãã§ã¢ã€ã³ã³ãåç
§ã§ããŸãã
ã¢ã€ã³ã³ã¯ã[ã¢ã€ã³ã³ããŒã·ã£ã«]({{< ref "partials#icon" >}}) ãåŒã³åºãããšã§ãããŒã·ã£ã«ã§ã䜿çšã§ããŸãã
KaTeX
katex
ã·ã§ãŒãã³ãŒãã䜿çšãããšãKaTeX ããã±ãŒãžã䜿çšããŠèšäºã®ã³ã³ãã³ãã«æ°åŒãè¿œå ã§ããŸããå©çšå¯èœãªæ§æã«ã€ããŠã¯ããµããŒããããŠãã TeX é¢æ° ã®ãªã³ã©ã€ã³ãªãã¡ã¬ã³ã¹ãåç
§ããŠãã ããã
èšäºã«æ°åŒãå«ããã«ã¯ãã³ã³ãã³ããå«ãã·ã§ãŒãã³ãŒããä»»æã®å Žæã«é 眮ããã ãã§ããèšäºããšã«1åã ãå«ããå¿ èŠããããKaTeX ã¯ãã®ããŒãžã®ããŒã¯ã¢ãããèªåçã«ã¬ã³ããªã³ã°ããŸããã€ã³ã©ã€ã³è¡šèšãšãããã¯è¡šèšã®äž¡æ¹ããµããŒããããŠããŸãã
ã€ã³ã©ã€ã³è¡šèšã¯ãåŒã \\(
ãš \\)
ããªãã¿ã§å²ãããšã§çæã§ããŸãããŸãããããã¯è¡šèšã¯ $$
ããªãã¿ã䜿çšããŠçæã§ããŸãã
äŸ:
{{</* katex */>}}
\\(f(a,b,c) = (a^2+b^2+c^2)^3\\)
{{< katex >}} \(f(a,b,c) = (a^2+b^2+c^2)^3\)
[æ°åŒè¡šèšã®ãµã³ãã«]({{< ref "mathematical-notation" >}}) ããŒãžã§ããã®ä»ã®äŸã確èªã§ããŸãã
ããŒã¯ãŒã
keyword
ã³ã³ããŒãã³ãã¯ãç¹å®ã®éèŠãªåèªããã¬ãŒãºãäŸãã°ãããã§ãã·ã§ãã«ã¹ãã«ãªã©ãèŠèŠçã«åŒ·èª¿è¡šç€ºããããã«äœ¿çšã§ããŸããkeywordList
ã·ã§ãŒãã³ãŒãã¯ãè€æ°ã® keyword
ã¢ã€ãã ãã°ã«ãŒãåããããã«äœ¿çšã§ããŸããåã¢ã€ãã ã«ã¯ã次ã®ããããã£ãèšå®ã§ããŸãã
ãã©ã¡ãŒã¿ | 説æ |
---|---|
icon |
ããŒã¯ãŒãã§äœ¿çšãããªãã·ã§ã³ã®ã¢ã€ã³ã³ |
å ¥å㯠Markdown ã§èšè¿°ãããŠãããããèªç±ã«ãã©ãŒãããã§ããŸãã
äŸ1 :
{{</* keyword */>}} *ã¹ãŒããŒ* ã¹ãã« {{</* /keyword */>}}
{{< keyword >}} ã¹ãŒã㌠ã¹ãã« {{< /keyword >}}
äŸ 2 :
{{</* keywordList */>}}
{{</* keyword icon="github" */>}} Lorem ipsum dolor. {{</* /keyword */>}}
{{</* keyword icon="code" */>}} **倧äºãª** ã¹ãã« {{</* /keyword */>}}
{{</* /keywordList */>}}
{{</* keyword */>}} *ã¹ã¿ã³ãã¢ãã³* ã¹ãã« {{</* /keyword */>}}
{{< keywordList >}} {{< keyword icon="github" >}} Lorem ipsum dolor {{< /keyword >}} {{< keyword icon="code" >}} 倧äºãª ã¹ãã« {{< /keyword >}} {{< /keywordList >}} {{< keyword >}} ã¹ã¿ã³ãã¢ãã³ ã¹ãã« {{< /keyword >}}
ãªãŒãæ
lead
ã¯ãèšäºã®åé ã匷調ããããã«äœ¿çšãããŸããå°å
¥éšåãã¹ã¿ã€ã«ããããéèŠãªæ
å ±ãåŒã³åºãããããããã«äœ¿çšã§ããŸããMarkdown ã³ã³ãã³ãã lead
ã·ã§ãŒãã³ãŒãã§å²ãã ãã§ãã
äŸ:
{{</* lead */>}}
ãã³ãã¯ãã£ã³ã¹ã
{{</* /lead */>}}
{{< lead >}} ãã³ãã¯ãã£ã³ã¹ã {{< /lead >}}
ãªã¹ã
List
ã¯ãæè¿ã®èšäºã®ãªã¹ãã衚瀺ããŸãããã®ã·ã§ãŒãã³ãŒãã«ã¯ããªã¹ããå¶éããããã®å¶éå€ãå¿
èŠã§ããããã«ãèšäºããã©ã¡ãŒã¿ã§ãã£ã«ã¿ãªã³ã°ããããã«ãwhere
ãš value
ããµããŒãããŠããŸãããã®ã·ã§ãŒãã³ãŒãã¯ããã®èŠªããŒãžã衚瀺ããŸããããå¶éå€ã«ã¯ã«ãŠã³ããããããšã«æ³šæããŠãã ããã
ãã©ã¡ãŒã¿ | 説æ |
---|---|
limit |
å¿ é 衚瀺ããæè¿ã®èšäºã®æ°ã |
title |
ãªãã·ã§ã³ã®ãªã¹ãã®ã¿ã€ãã«ãããã©ã«ã㯠Recent ã§ãã |
cardView |
ãªãã·ã§ã³ã®ã«ãŒããã¥ãŒããªã¹ãã«å¯ŸããŠæå¹åãããŸããããã©ã«ã㯠false ã§ãã |
where |
èšäºã®ã¯ãšãªã«äœ¿çšãããå€æ°ãäŸ: Type |
value |
where ã§å®çŸ©ããããã©ã¡ãŒã¿ã«äžèŽããå¿
èŠãããå€ãèšäºã®ã¯ãšãªã«äœ¿çšãããŸããäŸ: where == Type ã®å Žåãæå¹ãªå€ã¯ sample ã§ãã |
{{< alert >}}
where
ãš value
ã®å€ã¯ãã·ã§ãŒãã³ãŒãã®ã³ãŒãã§æ¬¡ã®ã¯ãšãª where .Site.RegularPages $where $value
ã§äœ¿çšãããŸãã䜿çšå¯èœãªãã©ã¡ãŒã¿ã®è©³çŽ°ã«ã€ããŠã¯ãHugo ããã¥ã¡ã³ã ã確èªããŠãã ããã
{{</ alert >}}
äŸ #1:
{{</* list limit=2 */>}}
{{< list limit=2 >}}
äŸ #2:
{{</* list title="ãµã³ãã«" cardView=true limit=6 where="Type" value="sample" */>}}
{{< list title="ãµã³ãã«" cardView=true limit=6 where="Type" value="sample">}}
LTR/RTL
ltr
ãš rtl
ã䜿çšãããšãããããã®ã³ã³ãã³ããæ··åšãããããšãã§ããŸããå€ãã® RTL èšèªãŠãŒã¶ãŒã¯ãã³ã³ãã³ãã®äžéšã LTR ã«å«ããããšèããŠããŸãããã®ã·ã§ãŒãã³ãŒãã䜿çšãããšããããè¡ãããšãã§ããHugo ã·ã§ãŒãã³ãŒã ã®æãå€åŽã®ãã€ã¢ã¡ãŒã¿ãŒãšã㊠%
ã掻çšããããšã§ãå
éšã®ããŒã¯ããŠã³ã¯éåžžã©ããã¬ã³ããªã³ã°ãããŸãã
äŸ:
- ãã㯠Markdown ã®ãªã¹ãã§ãã
- ããã©ã«ãã§ã¯ LTR æ¹åã§ãã
{{%/* rtl */%}}
- Ùذ٠اÙÙا؊Ù
Ø© ؚاÙÙغة اÙعرؚÙØ©
- Ù
٠اÙÙÙ
Ù٠اÙ٠اÙÙسار
{{%/* /rtl */%}}
- ãã㯠Markdown ã®ãªã¹ãã§ãã
- ããã©ã«ãã§ã¯ LTR æ¹åã§ãã {{% rtl %}}
- Ùذ٠اÙÙا؊٠ة ؚاÙÙغة اÙعرؚÙØ©
- ٠٠اÙÙÙ Ù٠اÙ٠اÙÙسار {{% /rtl %}}
Markdown ã€ã³ããŒã¿ãŒ
ãã®ã·ã§ãŒãã³ãŒãã䜿çšãããšãå€éšã®ãœãŒã¹ããããŒã¯ããŠã³ãã¡ã€ã«ãã€ã³ããŒãã§ããŸããããã¯ãã³ã³ãã³ããã³ããŒ&ããŒã¹ãããããšãªããä»ã®ãªããžããªã Web ãµã€ãããã³ã³ãã³ããå«ããã®ã«åœ¹ç«ã¡ãŸãã
ãã©ã¡ãŒã¿ | 説æ |
---|---|
url |
å¿ é å€éšã§ãã¹ããããŠãã Markdown ãã¡ã€ã«ãžã® URLã |
äŸ:
{{</* mdimporter url="https://raw.githubusercontent.com/nunocoracao/nunocoracao/master/README.md" */>}}
{{< mdimporter url="https://raw.githubusercontent.com/nunocoracao/nunocoracao/master/README.md" >}}
Mermaid
mermaid
ã䜿çšãããšãããã¹ãã䜿çšããŠè©³çŽ°ãªå³ãèŠèŠåãæç»ã§ããŸããå
éšã§ Mermaid ã䜿çšããããŸããŸãªå³ããã£ãŒãããã®ä»ã®åºå圢åŒããµããŒãããŠããŸãã
mermaid
ã·ã§ãŒãã³ãŒãå
ã« Mermaid æ§æãèšè¿°ããã ãã§ããã©ã°ã€ã³ãæ®ãã®åŠçãè¡ããŸãã
æ§æãšãµããŒããããŠããå³ã®çš®é¡ã®è©³çŽ°ã«ã€ããŠã¯ãå ¬åŒ Mermaid ããã¥ã¡ã³ã ãåç §ããŠãã ããã
äŸ:
{{</* mermaid */>}}
graph LR;
A[ã¬ã¢ã³]-->B[ã¬ã¢ããŒã];
B-->C[å©ç]
{{</* /mermaid */>}}
{{< mermaid >}} graph LR; A[ã¬ã¢ã³]-->B[ã¬ã¢ããŒã]; B-->C[å©ç] {{< /mermaid >}}
[å³ãšãããŒãã£ãŒãã®ãµã³ãã«]({{< ref "diagrams-flowcharts" >}}) ããŒãžã§ãMermaid ã®è¿œå ã®äŸãèŠãããšãã§ããŸãã
è²ã®èŠæ¬
swatches
ã¯ãã«ã©ãŒãã¬ãããªã©ã®ã«ã©ãŒèŠçŽ ã玹ä»ããããã«ãæ倧3ã€ã®ç°ãªãè²ã®ã»ãããåºåããŸãããã®ã·ã§ãŒãã³ãŒãã¯ãåè²ã® HEX
ã³ãŒããåãåããããããã®èŠèŠèŠçŽ ãäœæããŸãã
äŸ
{{</* swatches "#64748b" "#3b82f6" "#06b6d4" */>}}
åºå {{< swatches "#64748b" "#3b82f6" "#06b6d4" >}}
ã¿ã€ã ã©ã€ã³
timeline
ã¯ãããŸããŸãªãŠãŒã¹ã±ãŒã¹ (äŸ: è·åçµæŽããããžã§ã¯ãã®ææãªã©) ã§äœ¿çšã§ããèŠèŠçãªã¿ã€ã ã©ã€ã³ãäœæããŸããtimeline
ã·ã§ãŒãã³ãŒãã¯ãã¡ã€ã³ã¿ã€ã ã©ã€ã³å
ã®åã¢ã€ãã ãå®çŸ©ããããã« timelineItem
ãµãã·ã§ãŒãã³ãŒãã«äŸåããŠããŸããåã¢ã€ãã ã«ã¯ã次ã®ããããã£ãèšå®ã§ããŸãã
ãã©ã¡ãŒã¿ | 説æ |
---|---|
icon |
ã¿ã€ã ã©ã€ã³ã®ããžã¥ã¢ã«ã§äœ¿çšããã¢ã€ã³ã³ |
header |
åãšã³ããªã®ããããŒãŒ |
badge |
å³äžã®ãããžå ã«é 眮ããããã¹ã |
subheader |
ãšã³ããªã®ãµãããã㌠|
äŸ:
{{</* timeline */>}}
{{</* timelineItem icon="github" header="ããããŒ" badge="ãããžãã¹ã" 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="ãã1ã€ã®çŽ æŽãããããããŒ" badge="æ¥ä» - çŸåš" subheader="çŽ æŽããããµãããããŒ" */>}}
HTML ã³ãŒãä»ã
<ul>
<li>ã³ãŒããŒ</li>
<li>çŽ
è¶</li>
<li>çä¹³</li>
</ul>
{{</* /timelineItem */>}}
{{</* timelineItem icon="star" header="ã·ã§ãŒãã³ãŒã" badge="çŽ æŽããã" */>}}
ä»ã®ã·ã§ãŒãã³ãŒãä»ã
{{</* gallery */>}}
<img src="gallery/01.jpg" class="grid-w33" />
<img src="gallery/02.jpg" class="grid-w33" />
<img src="gallery/03.jpg" class="grid-w33" />
<img src="gallery/04.jpg" class="grid-w33" />
<img src="gallery/05.jpg" class="grid-w33" />
<img src="gallery/06.jpg" class="grid-w33" />
<img src="gallery/07.jpg" class="grid-w33" />
{{</* /gallery */>}}
{{</* /timelineItem */>}}
{{</* timelineItem icon="code" header="ãã1ã€ã®çŽ æŽãããããããŒ"*/>}}
{{</* github repo="nunocoracao/blowfish" */>}}
{{</* /timelineItem */>}}
{{</* /timeline */>}}
{{< timeline >}}
{{< timelineItem icon="github" header="ããããŒ" badge="ãããžãã¹ã" 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="ãã1ã€ã®çŽ æŽãããããããŒ" badge="æ¥ä» - çŸåš" subheader="çŽ æŽããããµãããããŒ">}} HTML ã³ãŒãä»ã
- ã³ãŒããŒ
- çŽ è¶
- çä¹³
{{< timelineItem icon="star" header="ã·ã§ãŒãã³ãŒã" badge="çŽ æŽããã" >}} ä»ã®ã·ã§ãŒãã³ãŒãä»ã {{< gallery >}} {{< /gallery >}} {{< /timelineItem >}} {{< timelineItem icon="code" header="ãã1ã€ã®çŽ æŽãããããããŒ">}} {{< github repo="nunocoracao/blowfish" >}} {{< /timelineItem >}} {{< /timeline >}}
TypeIt
TypeIt ã¯ããã®å°çäžã§æãçšéã®åºããã¿ã€ãã©ã€ã¿ãŒãšãã§ã¯ããäœæããããã® JavaScript ããŒã«ã§ããç°¡åãªèšå®ã§ãè¡ãåå²ããããçžäºã«åé€ããã³çœ®æãããããåäžãŸãã¯è€æ°ã®æååãå ¥åã§ããè€é㪠HTML ãå«ãæååãåŠçã§ããŸãã
Blowfish ã¯ãshortcode
ã䜿çšã㊠TypeIt æ©èœã®ãµãã»ãããå®è£
ããŠããŸããtypeit
ã·ã§ãŒãã³ãŒãå
ã«ããã¹ããèšè¿°ãã次ã®ãã©ã¡ãŒã¿ã䜿çšããŠãå¿
èŠãªåäœãèšå®ããŸãã
ãã©ã¡ãŒã¿ | 説æ |
---|---|
tag |
[æåå] æååã®ã¬ã³ããªã³ã°ã«äœ¿çšããã html ã¿ã°ã |
classList |
[æåå] html èŠçŽ ã«é©çšãã css ã¯ã©ã¹ã®ãªã¹ãã |
initialString |
[æåå] æžã蟌ãŸããŠè¡šç€ºããã眮ãæããããåææååã |
speed |
[æ°å€] åã¹ãããéã®ããªç§åäœã§æž¬å®ãããã¿ã€ãã³ã°é床ã |
lifeLike |
[ããŒã«å€] å®éã®äººéãè¡ã£ãŠãããã®ããã«ãã¿ã€ãã³ã°ã®ããŒã¹ãäžèŠåã«ããŸãã |
startDelay |
[æ°å€] ãã©ã°ã€ã³ãåæåãããŠããã¿ã€ãã³ã°ãéå§ãããŸã§ã®æéã |
breakLines |
[ããŒã«å€] è€æ°ã®æååãäºãã«äžã«å°å·ãããã (true)ãåé€ãããŠäºãã«çœ®ãæããããã (false)ã |
waitUntilVisible |
[ããŒã«å€] ã€ã³ã¹ã¿ã³ã¹ãããŒãããããšãã«éå§ããããã¿ãŒã²ããèŠçŽ ããã¥ãŒããŒãã«è¡šç€ºããããšãã«ã®ã¿éå§ãããã決å®ããŸããããã©ã«ã㯠true ã§ãã |
loop |
[ããŒã«å€] æååãå®äºåŸã«ç¶ç¶çã«ã«ãŒããããã©ããã |
äŸ1:
{{</* typeit */>}}
Lorem ipsum dolor sit amet
{{</* /typeit */>}}
{{< typeit >}} Lorem ipsum dolor sit amet {{< /typeit >}}
äŸ2:
{{</* typeit
tag=h1
lifeLike=true
*/>}}
Lorem ipsum dolor sit amet,
consectetur adipiscing elit.
{{</* /typeit */>}}
{{< typeit tag=h1 lifeLike=true
}} Lorem ipsum dolor sit amet, consectetur adipiscing elit. {{< /typeit >}}
äŸ 3:
{{</* typeit
tag=h3
speed=50
breakLines=false
loop=true
*/>}}
"æ£çŽèšã£ãŠã俺ã®ç¥ã£ããã£ã¡ããªãã" 颚ãšå
±ã«å»ã㬠(1939)
"ã€ã€ãšã¯èšãããªãã" ãŽãããã¡ãŒã¶ãŒ (1972)
"ãããç§ãã¡ããã«ã³ã¶ã¹ã«ããªãã¿ããã" ãªãºã®éæ³äœ¿ã (1939)
{{</* /typeit */>}}
{{< typeit tag=h3 speed=50 breakLines=false loop=true
}} "æ£çŽèšã£ãŠã俺ã®ç¥ã£ããã£ã¡ããªãã" 颚ãšå ±ã«å»ã㬠(1939) "ã€ã€ãšã¯èšãããªãã" ãŽãããã¡ãŒã¶ãŒ (1972) "ãããç§ãã¡ããã«ã³ã¶ã¹ã«ããªãã¿ããã" ãªãºã®éæ³äœ¿ã (1939) {{< /typeit >}}
Youtube Lite
lite-youtube-embed ã©ã€ãã©ãªã䜿çšã㊠YouTube åç»ãåã蟌ãããã®ã·ã§ãŒãã«ããããã®ã©ã€ãã©ãªã¯ãæšæºã® YouTube åã蟌ã¿ã®è»œéãªä»£æ¿æ段ã§ãããããé«éã§å¹ççã«ãªãããã«èšèšãããŠããŸãã
ãã©ã¡ãŒã¿ | 説æ |
---|---|
id |
[æåå] åã蟌ã YouTube åç»ã® IDã |
label |
[æåå] åç»ã®ã©ãã« |
params |
[æåå] åç»åçã®ããã®è¿œå ãã©ã¡ãŒã¿ |
äŸ1:
{{</* youtubeLite id="SgXhGb-7QbU" label="Blowfish-tools demo" */>}}
{{< youtubeLite id="SgXhGb-7QbU" label="Blowfish-tools demo" >}}
äŸ2:
以äžã«ç€ºãããã«ãparams
å€æ°ã« Youtube ã®ãã¹ãŠã® ãã¬ãŒã€ãŒãã©ã¡ãŒã¿ ã䜿çšã§ããŸãã
ãã®åç»ã¯130ç§ (2å10ç§) åŸã«éå§ãããŸãã
{{</* youtubeLite id="SgXhGb-7QbU" label="Blowfish-tools demo" params="start=130" */>}}
ãã®åç»ã«ã¯ UI ã³ã³ãããŒã«ããªãã130ç§åŸã«åçãéå§ããã10ç§åŸã«åæ¢ããŸãã
以äžã«ç€ºãããã«è€æ°ã®ãªãã·ã§ã³ãé£çµããã«ã¯ããããã®éã« &
æåãè¿œå ããå¿
èŠããããŸãã
{{</* youtubeLite id="SgXhGb-7QbU" label="Blowfish-tools demo" params="start=130&end=10&controls=0" */>}}
{{< youtubeLite id="SgXhGb-7QbU" label="Blowfish-tools demo" params="start=130&end=10&controls=0" >}}
詳现ã«ã€ããŠã¯ãyoutubeLite GitHub ãªããžã㪠ããã³ Youtube ã® ãã¬ãŒã€ãŒãã©ã¡ãŒã¿ ããŒãžãåç §ããŠãã ããã