🔀 Merge branch 'v2' into dev

pull/100/head
James Panther 2022-02-03 11:40:03 +11:00
commit 1672e2e501
No known key found for this signature in database
GPG Key ID: D36F789E45745D17
112 changed files with 15770 additions and 3063 deletions

View File

@ -1,4 +1,5 @@
{ {
"goTemplateBracketSpacing": true,
"htmlWhitespaceSensitivity": "css", "htmlWhitespaceSensitivity": "css",
"printWidth": 100, "printWidth": 100,
"singleQuote": false, "singleQuote": false,

View File

@ -6,6 +6,34 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
## [Unreleased] ## [Unreleased]
### Added
- Multilingual support
- Right-to-left (RTL) language support
- Site search powered by Fuse.js
- Automatic Markdown image resizing and srcset generation
- Performance and Accessibility improvements to achieve perfect Lighthouse scores
- Tables of Contents on article pages
- Code copy buttons in article content
- Taxonomy and term listings now support Markdown content
- Taxonomies on article and list pages
- Article pagination direction can be inverted
- Author `headline` parameter
- Skip to content and Scroll to top links
- Archetype for generating links to external articles
### Changed
- ⚠️ Required Hugo version is now 0.87.0 or later
- ⚠️ Complete rewrite of dark mode to allow more flexibile configuration
- ⚠️ All theme images are now Hugo assets
- ⚠️ Overhauled `figure` shortcode which now resizes images
- Upgrade to Tailwind v3.0.18
- Inline Javascript moved to external files
- Improved JSON-LD structured data
- Breadcrumbs now fallback to section name when `title` is not provided
- Minor style and layout improvements
## [1.6.4] - 2022-01-24 ## [1.6.4] - 2022-01-24
### Added ### Added

View File

@ -1,6 +1,6 @@
# Congo # Congo
Congo is designed to be a simple, lightweight theme for [Hugo](https://gohugo.io). It's built using Tailwind CSS with a clean and minimalist design that prioritises to your content. Congo is designed to be a powerful, lightweight theme for [Hugo](https://gohugo.io). It's built using Tailwind CSS with a clean and minimalist design that prioritises to your content.
🌏 [Demo site](https://jpanther.github.io/congo/) 🌏 [Demo site](https://jpanther.github.io/congo/)
📑 [Theme documentation](https://jpanther.github.io/congo/docs/) 📑 [Theme documentation](https://jpanther.github.io/congo/docs/)
@ -11,28 +11,28 @@ Congo is designed to be a simple, lightweight theme for [Hugo](https://gohugo.io
## Features ## Features
- Built with Tailwind CSS JIT for minified stylesheets without any excess code - Fully responsive layout built with Tailwind CSS 3.0
- Fully responsive layout
- Multiple colour schemes (or fully customise your own) - Multiple colour schemes (or fully customise your own)
- Dark mode (forced on/off or auto-switching with user toggle) - Dark mode (forced on/off or auto-switching with user toggle)
- Highly customisable configuration - Highly customisable configuration
- Multiple homepage layouts - Multiple homepage layouts
- Flexible with any content types, taxonomies and menus - Flexible with any content types, taxonomies and menus
- Multilingual content support inlcuding support for RTL languages
- Ability to link to posts on third-party websites - Ability to link to posts on third-party websites
- Client-side site search powered by Fuse.js
- Diagrams and visualisations using Mermaid - Diagrams and visualisations using Mermaid
- Charts using Chart.js - Charts using Chart.js
- Mathematical notation using KaTeX - Mathematical notation using KaTeX
- SVG icons from FontAwesome 5 - SVG icons from FontAwesome 5
- Heading anchors, Buttons, Badges and more - Automatic image resizing using Hugo Pipes
- Heading anchors, Tables of Contents, Code copy, Buttons, Badges and more
- HTML and Emoji support in articles 🎉 - HTML and Emoji support in articles 🎉
- SEO friendly with links for sharing to social media - SEO friendly with links for sharing to social media
- RSS feeds
- Fathom Analytics and Google Analytics support - Fathom Analytics and Google Analytics support
- Favicons support - RSS feeds, Favicons and comments support
- Comments support
- Advanced customisation using simple Tailwind colour definitions and styles - Advanced customisation using simple Tailwind colour definitions and styles
- Fully documented - Optimised for performance and accessibility with perfect Lighthouse scores
- Regular updates with fixes and new features - Fully documented with regular updates
--- ---

View File

@ -0,0 +1,10 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
externalUrl: ""
summary: ""
showReadingTime: false
_build:
render: "false"
list: "local"
---

File diff suppressed because it is too large Load Diff

View File

@ -5,56 +5,85 @@
body a, body a,
body button { body button {
@apply transition; @apply transition-colors;
} }
/* Scale SVG icons to text size */ /* Scale SVG icons to text size */
.icon svg { .icon svg {
height: 1em; @apply h-[1em] w-[1em];
width: 1em;
} }
/* Heading anchors */ /* Search */
.prose .heading-anchor { #search-query::-webkit-search-cancel-button,
@apply absolute top-0 no-underline opacity-0; #search-query::-webkit-search-decoration,
width: 1.1em; #search-query::-webkit-search-results-button,
left: -1.1em; #search-query::-webkit-search-results-decoration {
} @apply hidden;
.prose .heading-anchor:hover {
@apply underline bg-transparent text-primary-600;
}
.prose .heading-anchor:hover,
.prose .heading-anchor:focus,
.prose h2:hover > .heading-anchor,
.prose h3:hover > .heading-anchor,
.prose h4:hover > .heading-anchor {
@apply opacity-100;
} }
/* Prose escape hatch */ /* RTL support */
.no-prose > p { .prose blockquote {
@apply mt-0 last:mb-0; @apply rtl:pr-4 rtl:border-l-0 rtl:border-r-4;
}
.prose ul > li,
.prose ol > li {
@apply rtl:pl-0 rtl:pr-2 rtl:mr-7;
}
.prose ol > li:before,
.prose ul > li:before {
@apply rtl:left-auto rtl:right-1;
}
.prose thead td:first-child,
.prose thead th:first-child {
@apply rtl:pr-0;
}
.prose thead td:last-child,
.prose thead th:last-child {
@apply rtl:pl-0;
} }
/* Article pagination */ /* Table of Contents */
.article-pagination a:hover .article-pagination-title { .toc ul,
@apply underline underline-primary-500; .toc li {
@apply px-0 leading-snug list-none;
}
.toc ul ul {
@apply ltr:pl-4 rtl:pr-4;
}
.toc a {
@apply font-normal text-neutral-700 dark:text-neutral-400;
}
.toc ul > li {
@apply rtl:mr-0;
} }
.article-pagination a:hover .article-pagination-direction { /* Code Copy */
@apply text-primary-700 dark:text-primary-400; .highlight-wrapper {
@apply block;
}
.highlight {
@apply relative z-0;
}
.highlight:hover > .copy-button {
@apply visible;
}
.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;
}
.copy-button:hover,
.copy-button:focus,
.copy-button:active,
.copy-button:active:hover {
@apply bg-primary-100 dark:bg-primary-600;
}
.copy-textarea {
@apply absolute opacity-5 -z-10;
} }
/* -- Chroma Highlight -- */ /* -- Chroma Highlight -- */
/* Background */ /* Background */
.prose .chroma { .prose .chroma {
@apply rounded-md text-neutral-700 bg-neutral-50 dark:bg-neutral-700 dark:text-neutral-200; @apply static rounded-md text-neutral-700 bg-neutral-50 dark:bg-neutral-700 dark:text-neutral-200;
}
/* Other */
.chroma .x {
}
/* Error */
.chroma .err {
} }
/* LineTableTD */ /* LineTableTD */
.chroma .lntd, .chroma .lntd,
@ -74,298 +103,178 @@ body button {
@apply p-0 m-0; @apply p-0 m-0;
} }
/* LineNumbersTable */ /* LineNumbersTable */
.chroma .lnt {
@apply text-neutral-600 dark:text-neutral-300;
margin-right: 0.4em;
padding: 0 0.4em 0 0.4em;
}
/* LineNumbers */ /* LineNumbers */
.chroma .lnt,
.chroma .ln { .chroma .ln {
@apply text-neutral-600 dark:text-neutral-300; @apply text-neutral-600 dark:text-neutral-300 mr-[0.4em] px-[0.4em] py-0;
margin-right: 0.4em;
padding: 0 0.4em 0 0.4em;
} }
/* Keyword */ /* Keyword */
.chroma .k { /* KeywordDeclaration */
/* KeywordNamespace */
/* KeywordPseudo */
/* KeywordReserved */
/* NameClass */
/* NameFunctionMagic */
/* NameNamespace */
/* NameVariableClass */
/* Operator */
.chroma .k,
.chroma .kd,
.chroma .kn,
.chroma .kp,
.chroma .kr,
.chroma .nc,
.chroma .fm,
.chroma .nn,
.chroma .vc,
.chroma .o {
@apply text-primary-600 dark:text-primary-300; @apply text-primary-600 dark:text-primary-300;
} }
/* KeywordConstant */ /* KeywordConstant */
.chroma .kc { .chroma .kc {
@apply font-semibold text-secondary-400 dark:text-secondary-500; @apply font-semibold text-secondary-400 dark:text-secondary-500;
} }
/* KeywordDeclaration */
.chroma .kd {
@apply text-primary-600 dark:text-primary-300;
}
/* KeywordNamespace */
.chroma .kn {
@apply text-primary-600 dark:text-primary-300;
}
/* KeywordPseudo */
.chroma .kp {
@apply text-primary-600 dark:text-primary-300;
}
/* KeywordReserved */
.chroma .kr {
@apply text-primary-600 dark:text-primary-300;
}
/* KeywordType */ /* KeywordType */
.chroma .kt { /* NameVariable */
/* NameVariableInstance */
/* NameVariableMagic */
/* LiteralNumber */
/* LiteralNumberBin */
/* LiteralNumberFloat */
/* LiteralNumberHex */
/* LiteralNumberInteger */
/* LiteralNumberIntegerLong */
/* LiteralNumberOct */
.chroma .kt,
.chroma .nv,
.chroma .vi,
.chroma .vm,
.chroma .m,
.chroma .mb,
.chroma .mf,
.chroma .mh,
.chroma .mi,
.chroma .il,
.chroma .mo {
@apply text-secondary-400 dark:text-secondary-600; @apply text-secondary-400 dark:text-secondary-600;
} }
/* Name */ /* Name */
.chroma .n { /* NameDecorator */
/* NameEntity */
/* NameLabel */
.chroma .n,
.chroma .nd,
.chroma .ni,
.chroma .nl {
@apply text-secondary-900 dark:text-secondary-200; @apply text-secondary-900 dark:text-secondary-200;
} }
/* NameAttribute */ /* NameAttribute */
.chroma .na {
@apply text-secondary-800 dark:text-secondary-300;
}
/* NameBuiltin */ /* NameBuiltin */
.chroma .nb {
@apply text-secondary-800 dark:text-secondary-300;
}
/* NameBuiltinPseudo */ /* NameBuiltinPseudo */
.chroma .bp { /* NameOther */
/* NameProperty */
/* NameTag */
.chroma .na,
.chroma .nb,
.chroma .bp,
.chroma .nx,
.chroma .py,
.chroma .nt {
@apply text-secondary-800 dark:text-secondary-300; @apply text-secondary-800 dark:text-secondary-300;
} }
/* NameClass */
.chroma .nc {
@apply text-primary-600 dark:text-primary-300;
}
/* NameConstant */ /* NameConstant */
.chroma .no {
@apply font-semibold text-secondary-400 dark:text-secondary-500;
}
/* NameDecorator */
.chroma .nd {
@apply text-secondary-900 dark:text-secondary-200;
}
/* NameEntity */
.chroma .ni {
@apply text-secondary-900 dark:text-secondary-200;
}
/* NameException */ /* NameException */
.chroma .ne { /* NameVariableGlobal */
.chroma .no,
.chroma .ne,
.chroma .vg {
@apply font-semibold text-secondary-400 dark:text-secondary-500; @apply font-semibold text-secondary-400 dark:text-secondary-500;
} }
/* NameFunction */ /* NameFunction */
.chroma .nf { .chroma .nf {
@apply text-secondary-600 dark:text-secondary-500; @apply text-secondary-600 dark:text-secondary-500;
} }
/* NameFunctionMagic */
.chroma .fm {
@apply text-primary-600 dark:text-primary-300;
}
/* NameLabel */
.chroma .nl {
@apply text-secondary-900 dark:text-secondary-200;
}
/* NameNamespace */
.chroma .nn {
@apply text-primary-600 dark:text-primary-300;
}
/* NameOther */
.chroma .nx {
@apply text-secondary-800 dark:text-secondary-300;
}
/* NameProperty */
.chroma .py {
color: #cebc3a;
}
/* NameTag */
.chroma .nt {
@apply text-secondary-800 dark:text-secondary-300;
}
/* NameVariable */
.chroma .nv {
@apply text-secondary-400 dark:text-secondary-600;
}
/* NameVariableClass */
.chroma .vc {
@apply text-primary-600 dark:text-primary-300;
}
/* NameVariableGlobal */
.chroma .vg {
@apply font-semibold text-secondary-400 dark:text-secondary-500;
}
/* NameVariableInstance */
.chroma .vi {
@apply text-secondary-400 dark:text-secondary-600;
}
/* NameVariableMagic */
.chroma .vm {
@apply text-secondary-400 dark:text-secondary-600;
}
/* Literal */ /* Literal */
.chroma .l {
@apply text-primary-800 dark:text-primary-400;
}
/* LiteralDate */ /* LiteralDate */
.chroma .ld {
@apply text-primary-800 dark:text-primary-400;
}
/* LiteralString */ /* LiteralString */
.chroma .s {
@apply text-primary-800 dark:text-primary-400;
}
/* LiteralStringAffix */ /* LiteralStringAffix */
.chroma .sa {
@apply text-primary-800 dark:text-primary-400;
}
/* LiteralStringBacktick */ /* LiteralStringBacktick */
.chroma .sb {
@apply text-primary-800 dark:text-primary-400;
}
/* LiteralStringChar */ /* LiteralStringChar */
.chroma .sc {
@apply text-primary-800 dark:text-primary-400;
}
/* LiteralStringDelimiter */ /* LiteralStringDelimiter */
.chroma .dl {
@apply text-primary-800 dark:text-primary-400;
}
/* LiteralStringDoc */ /* LiteralStringDoc */
.chroma .sd {
@apply text-primary-800 dark:text-primary-400;
}
/* LiteralStringDouble */ /* LiteralStringDouble */
.chroma .s2 { /* LiteralStringHeredoc */
/* LiteralStringInterpol */
/* LiteralStringOther */
/* LiteralStringSingle */
/* GenericInserted */
/* GenericOutput */
/* GenericPrompt */
.chroma .l,
.chroma .ld,
.chroma .s,
.chroma .sa,
.chroma .sb,
.chroma .sc,
.chroma .dl,
.chroma .sd,
.chroma .s2,
.chroma .sh,
.chroma .si,
.chroma .sx,
.chroma .s1,
.chroma .gi,
.chroma .go,
.chroma .gp {
@apply text-primary-800 dark:text-primary-400; @apply text-primary-800 dark:text-primary-400;
} }
/* LiteralStringEscape */ /* LiteralStringEscape */
.chroma .se { .chroma .se {
@apply font-semibold text-secondary-400 dark:text-secondary-500; @apply font-semibold text-secondary-400 dark:text-secondary-500;
} }
/* LiteralStringHeredoc */
.chroma .sh {
@apply text-primary-800 dark:text-primary-400;
}
/* LiteralStringInterpol */
.chroma .si {
@apply text-primary-800 dark:text-primary-400;
}
/* LiteralStringOther */
.chroma .sx {
@apply text-primary-800 dark:text-primary-400;
}
/* LiteralStringRegex */ /* LiteralStringRegex */
.chroma .sr {
@apply font-semibold text-primary-800 dark:text-primary-400;
}
/* LiteralStringSingle */
.chroma .s1 {
@apply text-primary-800 dark:text-primary-400;
}
/* LiteralStringSymbol */ /* LiteralStringSymbol */
.chroma .sr,
.chroma .ss { .chroma .ss {
@apply font-semibold text-primary-800 dark:text-primary-400; @apply font-semibold text-primary-800 dark:text-primary-400;
} }
/* LiteralNumber */
.chroma .m {
@apply text-secondary-400 dark:text-secondary-600;
}
/* LiteralNumberBin */
.chroma .mb {
@apply text-secondary-400 dark:text-secondary-600;
}
/* LiteralNumberFloat */
.chroma .mf {
@apply text-secondary-400 dark:text-secondary-600;
}
/* LiteralNumberHex */
.chroma .mh {
@apply text-secondary-400 dark:text-secondary-600;
}
/* LiteralNumberInteger */
.chroma .mi {
@apply text-secondary-400 dark:text-secondary-600;
}
/* LiteralNumberIntegerLong */
.chroma .il {
@apply text-secondary-400 dark:text-secondary-600;
}
/* LiteralNumberOct */
.chroma .mo {
@apply text-secondary-400 dark:text-secondary-600;
}
/* Operator */
.chroma .o {
@apply text-primary-600;
}
/* OperatorWord */ /* OperatorWord */
.chroma .ow { .chroma .ow {
@apply font-semibold text-primary-400 dark:text-primary-600; @apply font-semibold text-primary-400 dark:text-primary-600;
} }
/* Punctuation */
.chroma .p {
}
/* Comment */ /* Comment */
.chroma .c { /* CommentMultiline */
/* CommentSingle */
/* CommentSpecial */
/* CommentPreproc */
/* CommentPreprocFile */
.chroma .c,
.chroma .cm,
.chroma .c1,
.chroma .cs,
.chroma .cp,
.chroma .cpf {
@apply italic text-neutral-500 dark:text-neutral-400; @apply italic text-neutral-500 dark:text-neutral-400;
} }
/* CommentHashbang */ /* CommentHashbang */
.chroma .ch { .chroma .ch {
@apply italic font-semibold text-neutral-500 dark:text-neutral-400; @apply italic font-semibold text-neutral-500 dark:text-neutral-400;
} }
/* CommentMultiline */
.chroma .cm {
@apply italic text-neutral-500 dark:text-neutral-400;
}
/* CommentSingle */
.chroma .c1 {
@apply italic text-neutral-500 dark:text-neutral-400;
}
/* CommentSpecial */
.chroma .cs {
@apply italic text-neutral-500 dark:text-neutral-400;
}
/* CommentPreproc */
.chroma .cp {
@apply italic text-neutral-500 dark:text-neutral-400;
}
/* CommentPreprocFile */
.chroma .cpf {
@apply italic text-neutral-500 dark:text-neutral-400;
}
/* Generic */
.chroma .g {
}
/* GenericDeleted */
.chroma .gd {
}
/* GenericEmph */ /* GenericEmph */
.chroma .ge { .chroma .ge {
@apply italic; @apply italic;
} }
/* GenericError */
.chroma .gr {
}
/* GenericHeading */ /* GenericHeading */
.chroma .gh { .chroma .gh {
@apply font-semibold text-neutral-500; @apply font-semibold text-neutral-500;
} }
/* GenericInserted */
.chroma .gi {
@apply text-primary-800 dark:text-primary-400;
}
/* GenericOutput */
.chroma .go {
@apply text-primary-800 dark:text-primary-400;
}
/* GenericPrompt */
.chroma .gp {
@apply text-primary-800 dark:text-primary-400;
}
/* GenericStrong */ /* GenericStrong */
.chroma .gs { .chroma .gs {
@apply font-semibold; @apply font-semibold;
} }
/* GenericSubheading */ /* GenericSubheading */
.chroma .gu {
@apply text-neutral-500;
}
/* GenericTraceback */ /* GenericTraceback */
.chroma .gu,
.chroma .gt { .chroma .gt {
@apply text-neutral-500; @apply text-neutral-500;
} }
@ -373,8 +282,5 @@ body button {
.chroma .gl { .chroma .gl {
@apply underline; @apply underline;
} }
/* TextWhitespace */
.chroma .w {
}
@tailwind utilities; @tailwind utilities;

View File

@ -1,37 +1,37 @@
/* Avocado scheme */ /* Avocado scheme */
:root { :root {
--color-neutral: #fff; --color-neutral: 255, 255, 255;
/* Warm Gray */ /* Stone */
--color-neutral-50: #fafaf9; --color-neutral-50: 250, 250, 249;
--color-neutral-100: #f5f5f4; --color-neutral-100: 245, 245, 244;
--color-neutral-200: #e7e5e4; --color-neutral-200: 231, 229, 228;
--color-neutral-300: #d6d3d1; --color-neutral-300: 214, 211, 209;
--color-neutral-400: #a8a29e; --color-neutral-400: 168, 162, 158;
--color-neutral-500: #78716c; --color-neutral-500: 120, 113, 108;
--color-neutral-600: #57534e; --color-neutral-600: 87, 83, 78;
--color-neutral-700: #44403c; --color-neutral-700: 68, 64, 60;
--color-neutral-800: #292524; --color-neutral-800: 41, 37, 36;
--color-neutral-900: #1c1917; --color-neutral-900: 28, 25, 23;
/* Lime */ /* Lime */
--color-primary-50: #f7fee7; --color-primary-50: 247, 254, 231;
--color-primary-100: #ecfccb; --color-primary-100: 236, 252, 203;
--color-primary-200: #d9f99d; --color-primary-200: 217, 249, 157;
--color-primary-300: #bef264; --color-primary-300: 190, 242, 100;
--color-primary-400: #a3e635; --color-primary-400: 163, 230, 53;
--color-primary-500: #84cc16; --color-primary-500: 132, 204, 22;
--color-primary-600: #65a30d; --color-primary-600: 101, 163, 13;
--color-primary-700: #4d7c0f; --color-primary-700: 77, 124, 15;
--color-primary-800: #3f6212; --color-primary-800: 63, 98, 18;
--color-primary-900: #365314; --color-primary-900: 54, 83, 20;
/* Emerald */ /* Emerald */
--color-secondary-50: #ecfdf5; --color-secondary-50: 236, 253, 245;
--color-secondary-100: #d1fae5; --color-secondary-100: 209, 250, 229;
--color-secondary-200: #a7f3d0; --color-secondary-200: 167, 243, 208;
--color-secondary-300: #6ee7b7; --color-secondary-300: 110, 231, 183;
--color-secondary-400: #34d399; --color-secondary-400: 52, 211, 153;
--color-secondary-500: #10b981; --color-secondary-500: 16, 185, 129;
--color-secondary-600: #059669; --color-secondary-600: 5, 150, 105;
--color-secondary-700: #047857; --color-secondary-700: 4, 120, 87;
--color-secondary-800: #065f46; --color-secondary-800: 6, 95, 70;
--color-secondary-900: #064e3b; --color-secondary-900: 6, 78, 59;
} }

View File

@ -1,37 +1,37 @@
/* Congo scheme */ /* Congo scheme */
:root { :root {
--color-neutral: #fff; --color-neutral: 255, 255, 255;
/* Gray */ /* Gray */
--color-neutral-50: #fafafa; --color-neutral-50: 250, 250, 250;
--color-neutral-100: #f4f4f5; --color-neutral-100: 244, 244, 245;
--color-neutral-200: #e4e4e7; --color-neutral-200: 228, 228, 231;
--color-neutral-300: #d4d4d8; --color-neutral-300: 212, 212, 216;
--color-neutral-400: #a1a1aa; --color-neutral-400: 161, 161, 170;
--color-neutral-500: #71717a; --color-neutral-500: 113, 113, 122;
--color-neutral-600: #52525b; --color-neutral-600: 82, 82, 91;
--color-neutral-700: #3f3f46; --color-neutral-700: 63, 63, 70;
--color-neutral-800: #27272a; --color-neutral-800: 39, 39, 42;
--color-neutral-900: #18181b; --color-neutral-900: 24, 24, 27;
/* Violet */ /* Violet */
--color-primary-50: #f5f3ff; --color-primary-50: 245, 243, 255;
--color-primary-100: #ede9fe; --color-primary-100: 237, 233, 254;
--color-primary-200: #ddd6fe; --color-primary-200: 221, 214, 254;
--color-primary-300: #c4b5fd; --color-primary-300: 196, 181, 253;
--color-primary-400: #a78bfa; --color-primary-400: 167, 139, 250;
--color-primary-500: #8b5cf6; --color-primary-500: 139, 92, 246;
--color-primary-600: #7c3aed; --color-primary-600: 124, 58, 237;
--color-primary-700: #6d28d9; --color-primary-700: 109, 40, 217;
--color-primary-800: #5b21b6; --color-primary-800: 91, 33, 182;
--color-primary-900: #4c1d95; --color-primary-900: 76, 29, 149;
/* Fuchsia */ /* Fuchsia */
--color-secondary-50: #fdf4ff; --color-secondary-50: 253, 244, 255;
--color-secondary-100: #fae8ff; --color-secondary-100: 250, 232, 255;
--color-secondary-200: #f5d0fe; --color-secondary-200: 245, 208, 254;
--color-secondary-300: #f0abfc; --color-secondary-300: 240, 171, 252;
--color-secondary-400: #e879f9; --color-secondary-400: 232, 121, 249;
--color-secondary-500: #d946ef; --color-secondary-500: 217, 70, 239;
--color-secondary-600: #c026d3; --color-secondary-600: 192, 38, 211;
--color-secondary-700: #a21caf; --color-secondary-700: 162, 28, 175;
--color-secondary-800: #86198f; --color-secondary-800: 134, 25, 143;
--color-secondary-900: #701a75; --color-secondary-900: 112, 26, 117;
} }

View File

@ -1,37 +1,37 @@
/* Fire scheme */ /* Fire scheme */
:root { :root {
--color-neutral: #fff; --color-neutral: 255, 255, 255;
/* Warm Gray */ /* Stone */
--color-neutral-50: #fafaf9; --color-neutral-50: 250, 250, 249;
--color-neutral-100: #f5f5f4; --color-neutral-100: 245, 245, 244;
--color-neutral-200: #e7e5e4; --color-neutral-200: 231, 229, 228;
--color-neutral-300: #d6d3d1; --color-neutral-300: 214, 211, 209;
--color-neutral-400: #a8a29e; --color-neutral-400: 168, 162, 158;
--color-neutral-500: #78716c; --color-neutral-500: 120, 113, 108;
--color-neutral-600: #57534e; --color-neutral-600: 87, 83, 78;
--color-neutral-700: #44403c; --color-neutral-700: 68, 64, 60;
--color-neutral-800: #292524; --color-neutral-800: 41, 37, 36;
--color-neutral-900: #1c1917; --color-neutral-900: 28, 25, 23;
/* Orange */ /* Orange */
--color-primary-50: #fff7ed; --color-primary-50: 255, 247, 237;
--color-primary-100: #ffedd5; --color-primary-100: 255, 237, 213;
--color-primary-200: #fed7aa; --color-primary-200: 254, 215, 170;
--color-primary-300: #fdba74; --color-primary-300: 253, 186, 116;
--color-primary-400: #fb923c; --color-primary-400: 251, 146, 60;
--color-primary-500: #f97316; --color-primary-500: 249, 115, 22;
--color-primary-600: #ea580c; --color-primary-600: 234, 88, 12;
--color-primary-700: #c2410c; --color-primary-700: 194, 65, 12;
--color-primary-800: #9a3412; --color-primary-800: 154, 52, 18;
--color-primary-900: #7c2d12; --color-primary-900: 124, 45, 18;
/* Rose */ /* Rose */
--color-secondary-50: #fff1f2; --color-secondary-50: 255, 241, 242;
--color-secondary-100: #ffe4e6; --color-secondary-100: 255, 228, 230;
--color-secondary-200: #fecdd3; --color-secondary-200: 254, 205, 211;
--color-secondary-300: #fda4af; --color-secondary-300: 253, 164, 175;
--color-secondary-400: #fb7185; --color-secondary-400: 251, 113, 133;
--color-secondary-500: #f43f5e; --color-secondary-500: 244, 63, 94;
--color-secondary-600: #e11d48; --color-secondary-600: 225, 29, 72;
--color-secondary-700: #be123c; --color-secondary-700: 190, 18, 60;
--color-secondary-800: #9f1239; --color-secondary-800: 159, 18, 57;
--color-secondary-900: #881337; --color-secondary-900: 136, 19, 55;
} }

View File

@ -1,37 +1,37 @@
/* Ocean scheme */ /* Ocean scheme */
:root { :root {
--color-neutral: #fff; --color-neutral: 255, 255, 255;
/* Cool Gray */ /* Gray */
--color-neutral-50: #f8fafc; --color-neutral-50: 248, 250, 252;
--color-neutral-100: #f1f5f9; --color-neutral-100: 241, 245, 249;
--color-neutral-200: #e2e8f0; --color-neutral-200: 226, 232, 240;
--color-neutral-300: #cbd5e1; --color-neutral-300: 203, 213, 225;
--color-neutral-400: #94a3b8; --color-neutral-400: 148, 163, 184;
--color-neutral-500: #64748b; --color-neutral-500: 100, 116, 139;
--color-neutral-600: #475569; --color-neutral-600: 71, 85, 105;
--color-neutral-700: #334155; --color-neutral-700: 51, 65, 85;
--color-neutral-800: #1e293b; --color-neutral-800: 30, 41, 59;
--color-neutral-900: #0f172a; --color-neutral-900: 15, 23, 42;
/* Blue */ /* Blue */
--color-primary-50: #eff6ff; --color-primary-50: 239, 246, 255;
--color-primary-100: #dbeafe; --color-primary-100: 219, 234, 254;
--color-primary-200: #bfdbfe; --color-primary-200: 191, 219, 254;
--color-primary-300: #93c5fd; --color-primary-300: 147, 197, 253;
--color-primary-400: #60a5fa; --color-primary-400: 96, 165, 250;
--color-primary-500: #3b82f6; --color-primary-500: 59, 130, 246;
--color-primary-600: #2563eb; --color-primary-600: 37, 99, 235;
--color-primary-700: #1d4ed8; --color-primary-700: 29, 78, 216;
--color-primary-800: #1e40af; --color-primary-800: 30, 64, 175;
--color-primary-900: #1e3a8a; --color-primary-900: 30, 58, 138;
/* Cyan */ /* Cyan */
--color-secondary-50: #ecfeff; --color-secondary-50: 236, 254, 255;
--color-secondary-100: #cffafe; --color-secondary-100: 207, 250, 254;
--color-secondary-200: #a5f3fc; --color-secondary-200: 165, 243, 252;
--color-secondary-300: #67e8f9; --color-secondary-300: 103, 232, 249;
--color-secondary-400: #22d3ee; --color-secondary-400: 34, 211, 238;
--color-secondary-500: #06b6d4; --color-secondary-500: 6, 182, 212;
--color-secondary-600: #0891b2; --color-secondary-600: 8, 145, 178;
--color-secondary-700: #0e7490; --color-secondary-700: 14, 116, 144;
--color-secondary-800: #155e75; --color-secondary-800: 21, 94, 117;
--color-secondary-900: #164e63; --color-secondary-900: 22, 78, 99;
} }

View File

@ -1,37 +1,37 @@
/* Slate scheme */ /* Slate scheme */
:root { :root {
--color-neutral: #fff; --color-neutral: 255, 255, 255;
/* Cool Gray */ /* Gray */
--color-neutral-50: #F9FAFB; --color-neutral-50: 249, 250, 251;
--color-neutral-100: #F3F4F6; --color-neutral-100: 243, 244, 246;
--color-neutral-200: #E5E7EB; --color-neutral-200: 229, 231, 235;
--color-neutral-300: #D1D5DB; --color-neutral-300: 209, 213, 219;
--color-neutral-400: #9CA3AF; --color-neutral-400: 156, 163, 175;
--color-neutral-500: #6B7280; --color-neutral-500: 107, 114, 128;
--color-neutral-600: #4B5563; --color-neutral-600: 75, 85, 99;
--color-neutral-700: #374151; --color-neutral-700: 55, 65, 81;
--color-neutral-800: #1F2937; --color-neutral-800: 31, 41, 55;
--color-neutral-900: #111827; --color-neutral-900: 17, 24, 39;
/* Cool Gray */ /* Slate */
--color-primary-50: #F9FAFB; --color-primary-50: 248, 250, 252;
--color-primary-100: #F3F4F6; --color-primary-100: 241, 245, 249;
--color-primary-200: #E5E7EB; --color-primary-200: 226, 232, 240;
--color-primary-300: #D1D5DB; --color-primary-300: 203, 213, 225;
--color-primary-400: #9CA3AF; --color-primary-400: 148, 163, 184;
--color-primary-500: #6B7280; --color-primary-500: 100, 116, 139;
--color-primary-600: #4B5563; --color-primary-600: 71, 85, 105;
--color-primary-700: #374151; --color-primary-700: 51, 65, 85;
--color-primary-800: #1F2937; --color-primary-800: 30, 41, 59;
--color-primary-900: #111827; --color-primary-900: 15, 23, 42;
/* Cool Gray */ /* Gray */
--color-secondary-50: #F9FAFB; --color-secondary-50: 249, 250, 251;
--color-secondary-100: #F3F4F6; --color-secondary-100: 243, 244, 246;
--color-secondary-200: #E5E7EB; --color-secondary-200: 229, 231, 235;
--color-secondary-300: #D1D5DB; --color-secondary-300: 209, 213, 219;
--color-secondary-400: #9CA3AF; --color-secondary-400: 156, 163, 175;
--color-secondary-500: #6B7280; --color-secondary-500: 107, 114, 128;
--color-secondary-600: #4B5563; --color-secondary-600: 75, 85, 99;
--color-secondary-700: #374151; --color-secondary-700: 55, 65, 81;
--color-secondary-800: #1F2937; --color-secondary-800: 31, 41, 55;
--color-secondary-900: #111827; --color-secondary-900: 17, 24, 39;
} }

View File

@ -0,0 +1 @@
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="search" class="svg-inline--fa fa-search fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"></path></svg>

After

Width:  |  Height:  |  Size: 577 B

View File

@ -0,0 +1 @@
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="times" class="svg-inline--fa fa-times fa-w-11" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 352 512"><path fill="currentColor" d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"></path></svg>

After

Width:  |  Height:  |  Size: 645 B

View File

@ -0,0 +1,36 @@
const browserIsDark =
window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches;
const userPreference = localStorage.getItem("appearance");
const switcher = document.getElementById("appearance-switcher");
if (
(browserIsDark && userPreference === null) ||
(browserIsDark && userPreference === "dark") ||
userPreference === "dark"
) {
document.documentElement.classList.add("dark");
}
if (document.documentElement.getAttribute("data-auto-appearance") === "true") {
window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", (event) => {
if (event.matches) {
document.documentElement.classList.add("dark");
} else {
document.documentElement.classList.remove("dark");
}
});
}
window.addEventListener("DOMContentLoaded", (event) => {
switcher.addEventListener("click", () => {
document.documentElement.classList.toggle("dark");
localStorage.setItem(
"appearance",
document.documentElement.classList.contains("dark") ? "dark" : "light"
);
});
switcher.addEventListener("contextmenu", (event) => {
event.preventDefault();
localStorage.removeItem("appearance");
});
});

13
assets/js/chart.js 100644
View File

@ -0,0 +1,13 @@
function css(name) {
return "rgb(" + getComputedStyle(document.documentElement).getPropertyValue(name) + ")";
}
Chart.defaults.font.size = 14;
Chart.defaults.backgroundColor = css("--color-primary-300");
Chart.defaults.elements.point.borderColor = css("--color-primary-400");
Chart.defaults.elements.bar.borderColor = css("--color-primary-500");
Chart.defaults.elements.bar.borderWidth = 1;
Chart.defaults.elements.line.borderColor = css("--color-primary-400");
Chart.defaults.elements.arc.backgroundColor = css("--color-primary-200");
Chart.defaults.elements.arc.borderColor = css("--color-primary-500");
Chart.defaults.elements.arc.borderWidth = 1;

66
assets/js/code.js 100644
View File

@ -0,0 +1,66 @@
var scriptBundle = document.getElementById("script-bundle");
var copyText = scriptBundle ? scriptBundle.getAttribute("data-copy") : "Copy";
var copiedText = scriptBundle ? scriptBundle.getAttribute("data-copied") : "Copied";
function createCopyButton(highlightDiv) {
const button = document.createElement("button");
button.className = "copy-button";
button.type = "button";
button.ariaLabel = copyText;
button.innerText = copyText;
button.addEventListener("click", () => copyCodeToClipboard(button, highlightDiv));
addCopyButtonToDom(button, highlightDiv);
}
async function copyCodeToClipboard(button, highlightDiv) {
const codeToCopy = highlightDiv.querySelector(":last-child > .chroma > code").innerText;
try {
result = await navigator.permissions.query({ name: "clipboard-write" });
if (result.state == "granted" || result.state == "prompt") {
await navigator.clipboard.writeText(codeToCopy);
} else {
copyCodeBlockExecCommand(codeToCopy, highlightDiv);
}
} catch (_) {
copyCodeBlockExecCommand(codeToCopy, highlightDiv);
} finally {
codeWasCopied(button);
}
}
function copyCodeBlockExecCommand(codeToCopy, highlightDiv) {
const textArea = document.createElement("textArea");
textArea.contentEditable = "true";
textArea.readOnly = "false";
textArea.className = "copy-textarea";
textArea.value = codeToCopy;
highlightDiv.insertBefore(textArea, highlightDiv.firstChild);
const range = document.createRange();
range.selectNodeContents(textArea);
const sel = window.getSelection();
sel.removeAllRanges();
sel.addRange(range);
textArea.setSelectionRange(0, 999999);
document.execCommand("copy");
highlightDiv.removeChild(textArea);
}
function codeWasCopied(button) {
button.blur();
button.innerText = copiedText;
setTimeout(function () {
button.innerText = copyText;
}, 2000);
}
function addCopyButtonToDom(button, highlightDiv) {
highlightDiv.insertBefore(button, highlightDiv.firstChild);
const wrapper = document.createElement("div");
wrapper.className = "highlight-wrapper";
highlightDiv.parentNode.insertBefore(wrapper, highlightDiv);
wrapper.appendChild(highlightDiv);
}
window.addEventListener("DOMContentLoaded", (event) => {
document.querySelectorAll(".highlight").forEach((highlightDiv) => createCopyButton(highlightDiv));
});

View File

@ -0,0 +1,20 @@
function css(name) {
return "rgb(" + getComputedStyle(document.documentElement).getPropertyValue(name) + ")";
}
mermaid.initialize({
theme: "base",
themeVariables: {
background: css("--color-neutral"),
primaryColor: css("--color-primary-200"),
secondaryColor: css("--color-secondary-200"),
tertiaryColor: css("--color-neutral-100"),
primaryBorderColor: css("--color-primary-400"),
secondaryBorderColor: css("--color-secondary-400"),
tertiaryBorderColor: css("--color-neutral-400"),
lineColor: css("--color-neutral-600"),
fontFamily:
"ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif",
fontSize: "16px",
},
});

157
assets/js/search.js 100644
View File

@ -0,0 +1,157 @@
var fuse;
var showButton = document.getElementById("search-button");
var hideButton = document.getElementById("close-search-button");
var wrapper = document.getElementById("search-wrapper");
var modal = document.getElementById("search-modal");
var input = document.getElementById("search-query");
var output = document.getElementById("search-results");
var first = output.firstChild;
var last = output.lastChild;
var searchVisible = false;
var indexed = false;
var hasResults = false;
// Listen for events
showButton.addEventListener("click", displaySearch);
hideButton.addEventListener("click", hideSearch);
wrapper.addEventListener("click", hideSearch);
modal.addEventListener("click", function (event) {
event.stopPropagation();
event.stopImmediatePropagation();
return false;
});
document.addEventListener("keydown", function (event) {
// Forward slash to open search wrapper
if (event.key == "/") {
if (!searchVisible) {
event.preventDefault();
displaySearch();
}
}
// Esc to close search wrapper
if (event.key == "Escape") {
hideSearch();
}
// Down arrow to move down results list
if (event.key == "ArrowDown") {
if (searchVisible && hasResults) {
event.preventDefault();
if (document.activeElement == input) {
first.focus();
} else if (document.activeElement == last) {
last.focus();
} else {
document.activeElement.parentElement.nextSibling.firstElementChild.focus();
}
}
}
// Up arrow to move up results list
if (event.key == "ArrowUp") {
if (searchVisible && hasResults) {
event.preventDefault();
if (document.activeElement == input) {
input.focus();
} else if (document.activeElement == first) {
input.focus();
} else {
document.activeElement.parentElement.previousSibling.firstElementChild.focus();
}
}
}
});
// Update search on each keypress
input.onkeyup = function (event) {
executeQuery(this.value);
};
function displaySearch() {
if (!indexed) {
buildIndex();
}
if (!searchVisible) {
document.body.style.overflow = "hidden";
wrapper.style.visibility = "visible";
input.focus();
searchVisible = true;
}
}
function hideSearch() {
if (searchVisible) {
document.body.style.overflow = "visible";
wrapper.style.visibility = "hidden";
document.activeElement.blur();
searchVisible = false;
}
}
function fetchJSON(path, callback) {
var httpRequest = new XMLHttpRequest();
httpRequest.onreadystatechange = function () {
if (httpRequest.readyState === 4) {
if (httpRequest.status === 200) {
var data = JSON.parse(httpRequest.responseText);
if (callback) callback(data);
}
}
};
httpRequest.open("GET", path);
httpRequest.send();
}
function buildIndex() {
var baseURL = wrapper.getAttribute("data-url");
fetchJSON(baseURL + "index.json", function (data) {
var options = {
shouldSort: true,
ignoreLocation: true,
threshold: 0.0,
includeMatches: true,
keys: [
{ name: "title", weight: 0.8 },
{ name: "section", weight: 0.2 },
{ name: "summary", weight: 0.6 },
{ name: "content", weight: 0.4 },
],
};
fuse = new Fuse(data, options);
indexed = true;
});
}
function executeQuery(term) {
let results = fuse.search(term);
let resultsHTML = "";
if (results.length > 0) {
results.forEach(function (value, key) {
resultsHTML =
resultsHTML +
`<li class="mb-2">
<a class="flex items-center px-3 py-2 rounded-md appearance-none bg-neutral-100 dark:bg-neutral-700 focus:bg-primary-100 hover:bg-primary-100 dark:hover:bg-primary-900 dark:focus:bg-primary-900 focus:outline-dotted focus:outline-transparent focus:outline-2" href="${value.item.permalink}" tabindex="0">
<div class="grow">
<div class="-mb-1 text-lg font-bold">${value.item.title}</div>
<div class="text-sm text-neutral-500 dark:text-neutral-400">${value.item.section}<span class="px-2 text-primary-500">&middot;</span>${value.item.date}</span></div>
<div class="text-sm italic">${value.item.summary}</div>
</div>
<div class="ml-2 ltr:block rtl:hidden text-neutral-500">&rarr;</div>
<div class="mr-2 ltr:hidden rtl:block text-neutral-500">&larr;</div>
</a>
</li>`;
});
hasResults = true;
} else {
resultsHTML = "";
hasResults = false;
}
output.innerHTML = resultsHTML;
if (results.length > 0) {
first = output.firstChild.firstElementChild;
last = output.lastChild.firstElementChild;
}
}

9
assets/lib/fuse/fuse.min.js vendored 100644

File diff suppressed because one or more lines are too long

View File

@ -3,57 +3,11 @@
# https://jpanther.github.io/congo/docs/getting-started/ # https://jpanther.github.io/congo/docs/getting-started/
# baseURL = "https://your_domain.com/" # baseURL = "https://your_domain.com/"
languageCode = "en"
defaultContentLanguage = "en" defaultContentLanguage = "en"
title = "Congo"
# copyright = "Copy, _right?_ :thinking_face:"
enableRobotsTXT = true enableRobotsTXT = true
paginate = 10
summaryLength = 0 summaryLength = 0
[author] [outputs]
# name = "Your name here" home = ["HTML", "RSS", "JSON"]
# image = "img/author.jpg"
# bio = "A little bit about you"
# links = [
# { email = "mailto:hello@your_domain.com" },
# { link = "https://link-to-some-website.com/" },
# { amazon = "https://www.amazon.com/hz/wishlist/ls/wishlist-id" },
# { apple = "https://www.apple.com" },
# { blogger = "https://username.blogspot.com/" },
# { codepen = "https://codepen.io/username" },
# { dev = "https://dev.to/username" },
# { discord = "https://discord.gg/invitecode" },
# { dribbble = "https://dribbble.com/username" },
# { facebook = "https://facebook.com/username" },
# { flickr = "https://www.flickr.com/photos/username/" },
# { foursquare = "https://foursquare.com/username" },
# { github = "https://github.com/username" },
# { gitlab = "https://gitlab.com/username" },
# { google = "https://www.google.com/" },
# { instagram = "https://instagram.com/username" },
# { keybase = "https://keybase.io/username" },
# { kickstarter = "https://www.kickstarter.com/profile/username" },
# { lastfm = "https://lastfm.com/user/username" },
# { linkedin = "https://linkedin.com/in/username" },
# { mastodon = "https://mastodon.instance/@username" },
# { medium = "https://medium.com/username" },
# { microsoft = "https://www.microsoft.com/" },
# { patreon = "https://www.patreon.com/username" },
# { pinterest = "https://pinterest.com/username" },
# { reddit = "https://reddit.com/user/username" },
# { slack = "https://workspace.url/team/userid" },
# { snapchat = "https://snapchat.com/add/username" },
# { soundcloud = "https://soundcloud.com/username" },
# { stackoverflow = "https://stackoverflow.com/users/6digit/username" },
# { steam = "https://steamcommunity.com/profiles/userid" },
# { telegram = "https://t.me/username" },
# { tiktok = "https://tiktok.com/@username" },
# { tumblr = "https://username.tumblr.com" },
# { twitch = "https://twitch.tv/username" },
# { twitter = "https://twitter.com/username" },
# { whatsapp = "https://wa.me/phone-number" },
# { youtube = "https://youtube.com/username" },
# ]

View File

@ -0,0 +1,58 @@
languageCode = "en"
languageName = "English"
displayName = "EN"
isoCode = "en"
weight = 1
rtl = false
title = "Congo"
# logo = "img/logo.jpg"
# description = "My awesome website"
# copyright = "Copy, _right?_ :thinking_face:"
dateFormat = "2 January 2006"
[author]
# name = "Your name here"
# image = "img/author.jpg"
# headline = "I'm only human"
# bio = "A little bit about you"
# links = [
# { email = "mailto:hello@your_domain.com" },
# { link = "https://link-to-some-website.com/" },
# { amazon = "https://www.amazon.com/hz/wishlist/ls/wishlist-id" },
# { apple = "https://www.apple.com" },
# { blogger = "https://username.blogspot.com/" },
# { codepen = "https://codepen.io/username" },
# { dev = "https://dev.to/username" },
# { discord = "https://discord.gg/invitecode" },
# { dribbble = "https://dribbble.com/username" },
# { facebook = "https://facebook.com/username" },
# { flickr = "https://www.flickr.com/photos/username/" },
# { foursquare = "https://foursquare.com/username" },
# { github = "https://github.com/username" },
# { gitlab = "https://gitlab.com/username" },
# { google = "https://www.google.com/" },
# { instagram = "https://instagram.com/username" },
# { keybase = "https://keybase.io/username" },
# { kickstarter = "https://www.kickstarter.com/profile/username" },
# { lastfm = "https://lastfm.com/user/username" },
# { linkedin = "https://linkedin.com/in/username" },
# { mastodon = "https://mastodon.instance/@username" },
# { medium = "https://medium.com/username" },
# { microsoft = "https://www.microsoft.com/" },
# { patreon = "https://www.patreon.com/username" },
# { pinterest = "https://pinterest.com/username" },
# { reddit = "https://reddit.com/user/username" },
# { slack = "https://workspace.url/team/userid" },
# { snapchat = "https://snapchat.com/add/username" },
# { soundcloud = "https://soundcloud.com/username" },
# { steam = "https://steamcommunity.com/profiles/userid" },
# { telegram = "https://t.me/username" },
# { tiktok = "https://tiktok.com/@username" },
# { tumblr = "https://username.tumblr.com" },
# { twitch = "https://twitch.tv/username" },
# { twitter = "https://twitter.com/username" },
# { whatsapp = "https://wa.me/phone-number" },
# { youtube = "https://youtube.com/username" },
# ]

View File

@ -7,3 +7,7 @@
[highlight] [highlight]
noClasses = false noClasses = false
[tableOfContents]
startLevel = 2
endLevel = 4

View File

@ -1,3 +1,3 @@
[hugoVersion] [hugoVersion]
extended = false extended = false
min = "0.86.1" min = "0.87.0"

View File

@ -6,12 +6,16 @@
# https://jpanther.github.io/congo/docs/configuration/#theme-parameters # https://jpanther.github.io/congo/docs/configuration/#theme-parameters
colorScheme = "congo" colorScheme = "congo"
# darkMode = "auto" defaultAppearance = "light" # valid options: light or dark
# darkToggle = false autoSwitchAppearance = true
# logo = "img/logo.jpg" showAppearanceSwitcher = false
# description = "My awesome website"
enableSearch = false
enableCodeCopy = false
# mainSections = ["section1", "section2"] # mainSections = ["section1", "section2"]
# robots = "" # robots = ""
showScrollToTop = true
[homepage] [homepage]
layout = "page" # valid options: page, profile, custom layout = "page" # valid options: page, profile, custom
@ -19,7 +23,7 @@ colorScheme = "congo"
[article] [article]
showDate = true showDate = true
dateFormat = "2 January 2006" showDateUpdated = false
showAuthor = true showAuthor = true
showBreadcrumbs = false showBreadcrumbs = false
showDraftLabel = true showDraftLabel = true
@ -28,21 +32,25 @@ colorScheme = "congo"
editAppendPath = true editAppendPath = true
showHeadingAnchors = true showHeadingAnchors = true
showPagination = true showPagination = true
invertPagination = false
showReadingTime = true showReadingTime = true
showTableOfContents = false
showTaxonomies = false
showWordCount = false showWordCount = false
# sharingLinks = ["facebook", "twitter", "pinterest", "reddit", "linkedin", "email"] # sharingLinks = ["facebook", "twitter", "pinterest", "reddit", "linkedin", "email"]
[list] [list]
showBreadcrumbs = false showBreadcrumbs = false
showSummary = false showSummary = false
showTableOfContents = false
groupByYear = true groupByYear = true
[taxonomy]
showTermCount = true
[sitemap] [sitemap]
excludedKinds = ["taxonomy", "term"] excludedKinds = ["taxonomy", "term"]
[taxonomy]
showTermCount = true
[fathomAnalytics] [fathomAnalytics]
# site = "ABC12345" # site = "ABC12345"
# domain = "llama.yoursite.com" # domain = "llama.yoursite.com"

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

View File

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -0,0 +1,27 @@
function switchHomeLayout() {
const pageDiv = document.getElementById("page");
const profileDiv = document.getElementById("profile");
const layoutCode = document.querySelectorAll("code[id=layout]");
if (pageDiv.style.display === "none") {
pageDiv.style.display = "block";
profileDiv.style.display = "none";
layoutCode.forEach(function (el) {
el.innerText = "page";
});
} else {
pageDiv.style.display = "none";
profileDiv.style.display = "block";
layoutCode.forEach(function (el) {
el.innerText = "profile";
});
}
}
window.addEventListener("DOMContentLoaded", (event) => {
document.querySelectorAll("#switch-layout-button").forEach((button) =>
button.addEventListener("click", function (e) {
e.preventDefault();
switchHomeLayout();
})
);
});

View File

@ -1,70 +0,0 @@
# Site configuration for the Congo demo site
# --------------------------------------------------------------------------
# IMPORTANT: You should not use this file as a template for configuration
# as it does not contain all the required theme settings!
#
# Refer to the theme docs for configuration instructions if you're unsure.
# https://jpanther.github.io/congo/docs/
# --------------------------------------------------------------------------
theme = "congo"
languageCode = "en-AU"
defaultContentLanguage = "en"
title = "Congo"
summaryLength = 0
[author]
name = "Congo"
image = "img/author.jpg"
bio = "This is an example author bio, and although there's a stock photo of a dog here, this article was actually created by a human. :dog:"
links = [
{ twitter = "https://twitter.com/" },
{ facebook = "https://facebook.com/" },
{ linkedin = "https://linkedin.com/" },
{ youtube = "https://youtube.com/" },
]
[taxonomies]
tag = "tags"
[params]
# logo = "logo.jpg"
[params.homepage]
layout = "custom"
showRecent = true
mainSections = ["samples"]
[params.list]
groupByYear = false
showBreadcrumbs = true
[params.article]
showBreadcrumbs = true
showEdit = true
editURL = "https://github.com/jpanther/congo/tree/dev/exampleSite/content/"
editAppendPath = true
[[menu.main]]
name = "Docs"
pageRef = "docs"
weight = 10
[[menu.main]]
name = "Samples"
pageRef = "samples"
weight = 20
[[menu.main]]
name = "Users"
pageRef = "users"
weight = 30
[[menu.main]]
name = "GitHub"
url = "https://github.com/jpanther/congo"
weight = 40
[markup.goldmark]
[markup.goldmark.renderer]
unsafe = true
[markup.highlight]
noClasses = false

View File

@ -0,0 +1,13 @@
# -- Site Configuration --
# Refer to the theme docs for more details about each of these parameters.
# https://jpanther.github.io/congo/docs/getting-started/
theme = "congo"
defaultContentLanguage = "en"
enableRobotsTXT = true
paginate = 15
summaryLength = 0
[outputs]
home = ["HTML", "RSS", "JSON"]

View File

@ -0,0 +1,25 @@
languageCode = "en-au"
languageName = "English (Australia)"
displayName = ":flag-au:"
isoCode = "en-AU"
weight = 1
rtl = false
title = "Congo"
# logo = "img/logo.jpg"
description = "A powerful, lightweight theme for Hugo built with Tailwind CSS."
copyright = "&copy; 2022 Congo contributors"
dateFormat = "2 January 2006"
[author]
name = "Congo"
image = "img/author.jpg"
headline = "Not your ordinary theme!"
bio = "This is an example author bio, and although there's a stock photo of a dog here, this article was actually created by a human. :dog:"
links = [
{ twitter = "https://twitter.com/" },
{ facebook = "https://facebook.com/" },
{ linkedin = "https://linkedin.com/" },
{ youtube = "https://youtube.com/" },
]

View File

@ -0,0 +1,13 @@
# -- Markup --
# These settings are required for the theme to function.
[goldmark]
[goldmark.renderer]
unsafe = true
[highlight]
noClasses = false
[tableOfContents]
startLevel = 2
endLevel = 4

View File

@ -0,0 +1,41 @@
# -- Main Menu --
# The main menu is displayed in the header at the top of the page.
# Acceptable parameters are name, pageRef, page, url, title, weight.
#
# The simplest menu configuration is to provide:
# name = The name to be displayed for this menu link
# pageRef = The identifier of the page or section to link to
#
# By default the menu is ordered alphabetically. This can be
# overridden by providing a weight value. The menu will then be
# ordered by weight from lowest to highest.
[[main]]
name = "Docs"
pageRef = "docs"
weight = 10
[[main]]
name = "Samples"
pageRef = "samples"
weight = 20
[[main]]
name = "Users"
pageRef = "users"
weight = 30
[[main]]
name = "GitHub"
url = "https://github.com/jpanther/congo"
weight = 40
# -- Footer Menu --
# The footer menu is displayed at the bottom of the page, just before
# the copyright notice. Configure as per the main menu above.
# [[footer]]
# name = "Tags"
# pageRef = "tags"
# weight = 10

View File

@ -0,0 +1,3 @@
[hugoVersion]
extended = false
min = "0.86.1"

View File

@ -0,0 +1,62 @@
# -- Theme Options --
# These options control how the theme functions and allow you to
# customise the display of your website.
#
# Refer to the theme docs for more details about each of these parameters.
# https://jpanther.github.io/congo/docs/configuration/#theme-parameters
colorScheme = "congo"
defaultAppearance = "light" # valid options: light or dark
autoSwitchAppearance = true
showAppearanceSwitcher = true
enableSearch = true
enableCodeCopy = true
mainSections = ["samples"]
# robots = ""
showScrollToTop = true
[homepage]
layout = "custom" # valid options: page, profile, custom
showRecent = true
[article]
showDate = true
showDateUpdated = false
showAuthor = true
showBreadcrumbs = true
showDraftLabel = true
showEdit = true
editURL = "https://github.com/jpanther/congo/tree/dev/exampleSite/content/"
editAppendPath = true
showHeadingAnchors = true
showPagination = true
invertPagination = false
showReadingTime = true
showTableOfContents = true
showTaxonomies = false
showWordCount = false
# sharingLinks = ["facebook", "twitter", "pinterest", "reddit", "linkedin", "email"]
[list]
showBreadcrumbs = true
showSummary = false
showTableOfContents = true
groupByYear = false
[sitemap]
excludedKinds = ["taxonomy", "term"]
[taxonomy]
showTermCount = true
[fathomAnalytics]
# site = "ABC12345"
# domain = "llama.yoursite.com"
[verification]
# google = ""
# bing = ""
# pinterest = ""
# yandex = ""

View File

@ -0,0 +1 @@
tag = "tags"

View File

@ -4,26 +4,26 @@ description: "This is a demo of the Congo theme for Hugo."
--- ---
{{< lead >}} {{< lead >}}
A simple, lightweight theme for Hugo built with Tailwind CSS. A powerful, lightweight theme for Hugo built with Tailwind CSS.
{{< /lead >}} {{< /lead >}}
This is a demo site built entirely using Congo. It also contains a complete set of [theme documentation]({{< ref "docs" >}}). Congo is flexible and is great for both static page-based content (like this demo) or a traditional blog with a feed of recent posts.
<div class="flex px-4 py-2 mb-8 text-base rounded-md bg-primary-100 dark:bg-primary-900"> <div class="flex px-4 py-2 mb-8 text-base rounded-md bg-primary-100 dark:bg-primary-900">
<span class="flex items-center pr-3 text-primary-400"> <span class="flex items-center ltr:pr-3 rtl:pl-3 text-primary-400">
{{< icon "exclamation-triangle" >}} {{< icon "exclamation-triangle" >}}
</span> </span>
<span class="flex items-center justify-between flex-grow dark:text-neutral-300"> <span class="flex items-center justify-between grow dark:text-neutral-300">
<span class="prose dark:text-neutral">This is a demo of the <code id="layout">page</code> layout.</span> <span class="prose dark:prose-invert">This is a demo of the <code id="layout">page</code> layout.</span>
<button <button
id="switch-layout-button"
class="px-4 !text-neutral !no-underline rounded-md bg-primary-600 hover:!bg-primary-500 dark:bg-primary-800 dark:hover:!bg-primary-700" class="px-4 !text-neutral !no-underline rounded-md bg-primary-600 hover:!bg-primary-500 dark:bg-primary-800 dark:hover:!bg-primary-700"
onclick="switchLayout()"
> >
Switch layout &orarr; Switch layout &orarr;
</button> </button>
</span> </span>
</div> </div>
This is a demo site built entirely using Congo. It also contains a complete set of [theme documentation]({{< ref "docs" >}}). Congo is flexible and is great for both static page-based content (like this demo) or a traditional blog with a feed of recent posts.
Explore the [sample pages]({{< ref "samples" >}}) to get a feel for what Congo can do. If you like what you see, check out the project on [Github](https://github.com/jpanther/congo) or read the [Installation guide]({{< ref "docs/installation" >}}) to get started. Explore the [sample pages]({{< ref "samples" >}}) to get a feel for what Congo can do. If you like what you see, check out the project on [Github](https://github.com/jpanther/congo) or read the [Installation guide]({{< ref "docs/installation" >}}) to get started.
{{< figure src="mountains.jpg" width="1200" height="800" caption="Photo by [Anna Scarfiello](https://unsplash.com/@little_anne?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com/?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)." >}} ![A stylised photograph of a purple squid on a pink backdrop.](squid.jpg "Photo by [Jippe Joosten](https://unsplash.com/@jippe_joosten?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com/s/photos/vibrant-purple?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText).")

View File

@ -5,13 +5,14 @@ description: "Learn how to use Congo and its features."
cascade: cascade:
showDate: false showDate: false
showAuthor: false showAuthor: false
invertPagination: true
--- ---
{{< lead >}} {{< lead >}}
Simple, yet powerful. Learn how to use Congo and its features. Simple, yet powerful. Learn how to use Congo and its features.
{{< /lead >}} {{< /lead >}}
{{< figure src="screenshot.png" >}} ![Screenshots of Congo on an iPhone, iPad and MacBook](screenshot.png)
This section contains everything you need to know about Congo. If you're new, check out the [Installation]({{< ref "docs/installation" >}}) guide to begin or visit the [Samples]({{< ref "samples" >}}) section to see what Congo can do. This section contains everything you need to know about Congo. If you're new, check out the [Installation]({{< ref "docs/installation" >}}) guide to begin or visit the [Samples]({{< ref "samples" >}}) section to see what Congo can do.

View File

@ -1,6 +1,6 @@
--- ---
title: "Advanced Customisation" title: "Advanced Customisation"
date: 2020-08-09 date: 2020-08-08
draft: false draft: false
description: "Learn how to build Congo manually." description: "Learn how to build Congo manually."
slug: "advanced-customisation" slug: "advanced-customisation"
@ -37,6 +37,16 @@ In addition to the default schemes, you can also create your own and re-style th
Congo defines a three-colour palette that is used throughout the theme. The three colours are defined as `neutral`, `primary` and `secondary` variants, each containing ten shades of colour. Congo defines a three-colour palette that is used throughout the theme. The three colours are defined as `neutral`, `primary` and `secondary` variants, each containing ten shades of colour.
Due to the way Tailwind CSS 3.0 calculates colour values with opacity, the colours specified in the scheme need to [conform to a particular format](https://github.com/adamwathan/tailwind-css-variable-text-opacity-demo) by providing the red, green and blue colour values.
```css
:root {
--color-primary-500: 139, 92, 246;
}
```
This example defines a CSS variable for the `primary-500` colour with a red value of `139`, green value of `92` and blue value of `246`.
Use one of the existing theme stylesheets as a template. You are free to define your own colours, but for some inspiration, check out the official [Tailwind colour palette reference](https://tailwindcss.com/docs/customizing-colors#color-palette-reference). Use one of the existing theme stylesheets as a template. You are free to define your own colours, but for some inspiration, check out the official [Tailwind colour palette reference](https://tailwindcss.com/docs/customizing-colors#color-palette-reference).
## Overriding the stylesheet ## Overriding the stylesheet
@ -60,36 +70,112 @@ html {
Simply by changing this one value, all the font sizes on your website will be adjusted to match this new size. Therefore, to increase the overall font sizes used, make the value greater than `12pt`. Similarly, to decrease the font sizes, make the value less than `12pt`. Simply by changing this one value, all the font sizes on your website will be adjusted to match this new size. Therefore, to increase the overall font sizes used, make the value greater than `12pt`. Similarly, to decrease the font sizes, make the value less than `12pt`.
## Building from source ## Building the theme CSS from source
If you'd like to make a major change, you can take advantage of Tailwind CSS's JIT compiler and rebuild the entire theme CSS from scratch. If you'd like to make a major change, you can take advantage of Tailwind CSS's JIT compiler and rebuild the entire theme CSS from scratch. This is useful if you want to adjust the Tailwind configuration or add extra Tailwind classes to the main stylesheet.
{{< alert >}} {{< alert >}}
**Note:** Building the theme manually is intended for advanced users. **Note:** Building the theme manually is intended for advanced users.
{{< /alert >}} {{< /alert >}}
Change into the `themes/congo/` folder and install the project dependencies. Let's step through how building the Tailwind CSS works.
```bash ### Tailwind configuration
In order to generate a CSS file that only contains the Tailwind classes that are actually being used the JIT compiler needs to scan through all the HTML templates and Markdown content files to check which styles are present in the markup. The compiler does this by looking at the `tailwind.config.js` file which is included in the root of the theme directory:
```js
// themes/congo/tailwind.config.js
module.exports = {
content: [
"./layouts/**/*.html",
"./content/**/*.{html,md}",
"./themes/congo/layouts/**/*.html",
"./themes/congo/content/**/*.{html,md}",
],
// and more...
};
```
This default configuration has been included with these content paths so that you can easily generate your own CSS file without needing to modify it, provided you follow a particular project structure. Namely, **you have to include Congo in your project as a subdirectory at `themes/congo/`**. This means you cannot easily use Hugo Modules to install the theme and you must go down either the git submodule (recommended) or manual install routes. The [Installation docs]({{< ref "installation" >}}) explain how to install the theme using either of these methods.
### Project structure
In order to take advantage of the default configuration, your project should look something like this...
```shell
.
├── assets
│ └── css
│ └── compiled
│ └── main.css # this is the file we will generate
├── config # site config
│ └── _default
├── content # site content
│ ├── _index.md
│ ├── projects
│ │ └── _index.md
│ └── blog
│ └── _index.md
├── layouts # custom layouts for your site
│ ├── partials
│ │ └── extend-article-link.html
│ ├── projects
│ │ └── list.html
│ └── shortcodes
│ └── disclaimer.html
└── themes
└── congo # git submodule or manual theme install
```
This example structure adds a new `projects` content type with its own custom layout along with a custom shortcode and extended partial. Provided the project follows this structure, all that's required is to recompile the `main.css` file.
### Install dependencies
In order for this to work you'll need to change into the `themes/congo/` directory and install the project dependencies. You'll need [npm](https://docs.npmjs.com/cli/v7/configuring-npm/install) on your local machine for this step.
```shell
cd themes/congo
npm install npm install
``` ```
Once installed, you can edit the `themes/congo/tailwind.config.js` to change the styles that are applied throughout the theme. You can also adjust specific styles in `themes/congo/assets/css/main.css`. ### Run the Tailwind compiler
To allow for easy theme colour changes, Congo defines a three-colour palette that is used throughout the theme. The three colours are defined as `neutral`, `primary` and `secondary` variants, each containing ten shades of colour. In order to change the colour across the entire theme, simply edit the `tailwind.config.js` file accordingly. With the dependencies installed all that's left is to use [Tailwind CLI](https://v2.tailwindcss.com/docs/installation#using-tailwind-cli) to invoke the JIT compiler. Navigate back to the root of your Hugo project and issue the following command:
For a full list of colours available, and their corresponding configuration values, see the official [Tailwind docs](https://tailwindcss.com/docs/customizing-colors#color-palette-reference). ```shell
cd ../..
After editing the configuration, you need to rebuild the theme's stylesheets. This will run the Tailwind JIT compiler in watch mode which aids with testing style changes. ./themes/congo/node_modules/tailwindcss/lib/cli.js -c ./themes/congo/tailwind.config.js -i ./themes/congo/assets/css/main.css -o ./assets/css/compiled/main.css --jit
```bash
npm run dev
``` ```
This will automatically output a CSS file to `/themes/congo/assets/css/compiled/main.css`. It's a bit of an ugly command due to the paths involved but essentially you're calling Tailwind CLI and passing it the location of the Tailwind config file (the one we looked at above), where to find the theme's `main.css` file and then where you want the compiled CSS file to be placed (it's going into the `assets/css/compiled/` folder of your Hugo project).
{{< alert >}} The config file will automatically inspect all the content and layouts in your project as well as all those in the theme and build a new CSS file that contains all the CSS required for your website. Due to the way Hugo handles file hierarchy, this file in your project will now automatically override the one that comes with the theme.
**Note:** You should not make manual edits to the compiled CSS file.
{{< /alert >}}
Now whenever you make a change, the CSS files will be rebuilt automatically. This mode is useful to run when using `hugo server` to preview your site during development. Asset files will be minified by Hugo at site build time. Each time you make a change to your layouts and need new Tailwind CSS styles, you can simply re-run the command and generate the new CSS file. You can also add `-w` to the end of the command to run the JIT compiler in watch mode.
### Make a build script
To fully complete this solution, you can simplify this whole process by adding aliases for these commands, or do what I do and add a `package.json` to the root of your project which contains the necessary scripts...
```js
// package.json
{
"name": "my-website",
"version": "1.0.0",
"description": "",
"scripts": {
"server": "hugo server -b http://localhost -p 8000",
"dev": "NODE_ENV=development ./themes/congo/node_modules/tailwindcss/lib/cli.js -c ./themes/congo/tailwind.config.js -i ./themes/congo/assets/css/main.css -o ./assets/css/compiled/main.css --jit -w",
"build": "NODE_ENV=production ./themes/congo/node_modules/tailwindcss/lib/cli.js -c ./themes/congo/tailwind.config.js -i ./themes/congo/assets/css/main.css -o ./assets/css/compiled/main.css --jit"
},
// and more...
}
```
Now when you want to work on designing your site, you can invoke `npm run dev` and the compiler will run in watch mode. When you're ready to deploy, run `npm run build` and you'll get a clean Tailwind CSS build.
🙋‍♀️ If you need help, feel free to ask a question on [GitHub Discussions](https://github.com/jpanther/congo/discussions).

View File

@ -25,25 +25,68 @@ Standard Hugo configuration variables are respected throughout the theme, howeve
The site configuration is managed through the `config/_default/config.toml` file. The table below outlines all the settings that the Congo takes advantage of. The site configuration is managed through the `config/_default/config.toml` file. The table below outlines all the settings that the Congo takes advantage of.
Note that the variable names provided in this table use dot notation to simplify the TOML data structure (ie. `author.name` refers to `[author] name`). Note that the variable names provided in this table use dot notation to simplify the TOML data structure (ie. `outputs.home` refers to `[outputs] home`).
<!-- prettier-ignore-start --> <!-- prettier-ignore-start -->
|Name|Type|Default|Description| |Name|Default|Description|
| --- | --- | --- | --- | |---|---|---|
|`theme`|string|`"congo"`|When using Hugo Modules this config value should be removed. For all other installation types, this must be set to `congo` for the theme to function.| |`theme`|`"congo"`|When using Hugo Modules this config value should be removed. For all other installation types, this must be set to `congo` for the theme to function.|
|`baseURL`|string|_Not set_|The URL to the root of the website.| |`baseURL`|_Not set_|The URL to the root of the website.|
|`languageCode`|string|`"en"`|The language of the website for site metadata purposes. It can be a top-level language (ie. `en`) or a sub-variant (ie. `en-AU`)."| |`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`|string|`"en"`|This value determines the language of theme components."| |`enableRobotsTXT`|`true`|When enabled a `robots.txt` file will be created in the site root that allows search engines to crawl the entire site. Set to `false` if you wish to provide your own file.|
|`title`|string|`"Congo"`|The title of the website. This will be displayed in the site header and footer.| |`paginate`|`10`|The number of articles listed on each page of the article listing.|
|`copyright`|string|_Not set_|A Markdown string containing the copyright message to be displayed in the site footer. If none is provided, Congo will automatically generate a copyright string using the site `title`. |`summaryLength`|`0`|The number of words that are used to generate the article summary when one is not provided in the [front matter]({{< ref "front-matter" >}}). A value of `0` will use the first sentence. This value has no effect when summaries are hidden.|
|`enableRobotsTXT`|boolean|`true`|When enabled a `robots.txt` file will be created in the site root that allows search engines to crawl the entire site. Set to `false` if you wish to provide your own file.| |`outputs.home`|`["HTML", "RSS", "JSON"]`|The output formats that are generated for the site. Congo requires HTML, RSS and JSON for all theme components to work correctly.|
|`summaryLength`|integer|`0`|The number of words that are used to generate the article summary when one is not provided in the [front matter]({{< ref "front-matter" >}}). A value of `0` will use the first sentence. This value has no effect when summaries are hidden.| |`permalinks`|_Not set_|Refer to the [Hugo docs](https://gohugo.io/content-management/urls/#permalinks) for permalink configuration.|
|`author.name`|string|_Not set_|The author's name. This will be displayed in article footers, and on the homepage when the profile layout is used.| |`taxonomies`|_Not set_|Refer to the [Organising content]({{< ref "getting-started#organising-content" >}}) section for taxonomy configuration.|
|`author.image`|string|_Not set_|Path to the image file of the author. The image should be a 1:1 aspect ratio and placed in the site's `static/` folder.| <!-- prettier-ignore-end -->
|`author.bio`|string|_Not set_|A Markdown string containing the author's bio. It will be displayed in article footers.|
|`author.links`|array of objects|_Not set_|The links to display alongside the author's details. The config file contains example links which can simply be uncommented to enable. The order that the links are displayed is determined by the order they appear in the array. Custom links can be added by providing corresponding SVG icon assets in `assets/icons/`.| ## Language and i18n
|`permalinks`||_Not set_|Refer to the [Hugo docs](https://gohugo.io/content-management/urls/#permalinks) for permalink configuration.|
|`taxonomies`||_Not set_|Refer to the [Organising content]({{< ref "getting-started#organising-content" >}}) section for taxonomy configuration.| Congo is optimised for full multilingual websites and theme assets are translated into several languages out of the box. The language configuration allows you to generate multiple versions of your content to provide a customised experience to your visitors in their native language.
The theme currently supports the following languages by default:
| Language | Code |
| ---------------------------- | ------- |
| :gb: English | `en` |
| :cn: Chinese | `zh` |
| :fr: French | `fr` |
| :de: German | `de` |
| :brazil: Portuguese (Brazil) | `pt-br` |
| :es: Spanish (Spain) | `es` |
| :tr: Turkish | `tr` |
The default translations can be overridden by creating a custom file in `i18n/[code].yaml` that contains the translation strings. You can also use this method to add new languages. If you'd like to share a new translation with the community, please [open a pull request](https://github.com/jpanther/congo/pulls).
### Configuration
In order to be as flexible as possible, a language configuration file needs to be created for each language on the website. By default Congo includes an English language configuration at `config/_default/languages.en.toml`.
The default file can be used as a template to create additional languages, or renamed if you wish to author your website in a language other than English. Simply name the file using the format `languages.[language-code].toml`.
{{< alert >}}
**Note:** Ensure the `defaultContentLanguage` parameter in the [site configuration](#site-configuration) matches the language code in your language config filename.
{{< /alert >}}
<!-- prettier-ignore-start -->
|Name|Default|Description|
|---|---|---|
|`languageCode`|`"en"`|The Hugo language code for this file. It can be a top-level language (ie. `en`) or a sub-variant (ie. `en-au`) and should match the language code in the filename. Hugo expects this value to always be in lowercase. For proper HTML compliance, set the `isoCode` parameter which is case-sensitive.|
|`languageName`|`"English"`|The name of the language.|
|`displayName`|`"EN"`|The name used when the language appears on the website.|
|`isoCode`|`"en"`|The ISO language code for HTML metadata purposes. It can be a top-level language (ie. `en`) or a sub-variant (ie. `en-AU`).|
|`weight`|`1`|The weight determines the order of languages when building multilingual sites.|
|`rtl`|`false`|Whether or not this is a RTL language. Set to `true` to reflow content from right-to-left. Congo fully supports using RTL and LTR languages at the same time and will dynamically adjust to both.|
|`dateFormat`|`"2 January 2006"`|How dates are formatted in this language. Refer to the [Hugo docs](https://gohugo.io/functions/format/#gos-layout-string) for acceptable formats.|
|`title`|`"Congo"`|The title of the website. This will be displayed in the site header and footer.|
|`description`|_Not set_|The website description. This will be used in the site metadata.|
|`copyright`|_Not set_|A Markdown string containing the copyright message to be displayed in the site footer. If none is provided, Congo will automatically generate a copyright string using the site `title`.|
|`author.name`|_Not set_|The author's name. This will be displayed in article footers, and on the homepage when the profile layout is used.|
|`author.image`|_Not set_|Path to the image file of the author. The image should be a 1:1 aspect ratio and placed in the site's `assets/` folder.|
|`author.headline`|_Not set_|A Markdown string containing the author's headline. It will be displayed on the profile homepage under the author's name.|
|`author.bio`|_Not set_|A Markdown string containing the author's bio. It will be displayed in article footers.|
|`author.links`|_Not set_|The links to display alongside the author's details. The config file contains example links which can simply be uncommented to enable. The order that the links are displayed is determined by the order they appear in the array. Custom links can be added by providing corresponding SVG icon assets in `assets/icons/`.|
<!-- prettier-ignore-end --> <!-- prettier-ignore-end -->
## Theme parameters ## Theme parameters
@ -53,40 +96,46 @@ Congo provides a large number of configuration parameters that control how the t
Many of the article defaults here can be overridden on a per article basis by specifying it in the front matter. Refer to the [Front Matter]({{< ref "front-matter" >}}) section for further details. Many of the article defaults here can be overridden on a per article basis by specifying it in the front matter. Refer to the [Front Matter]({{< ref "front-matter" >}}) section for further details.
<!-- prettier-ignore-start --> <!-- prettier-ignore-start -->
|Name|Type|Default|Description| |Name|Default|Description|
| --- | --- | --- | --- | |---|---|---|
|`colorScheme`|string|`"congo"`|The theme colour scheme to use. Valid values are `congo` (default), `avocado`, `ocean`, `fire` and `slate`. Refer to the [Colour Schemes]({{< ref "getting-started#colour-schemes" >}}) section for more details.| |`colorScheme`|`"congo"`|The theme colour scheme to use. Valid values are `congo` (default), `avocado`, `ocean`, `fire` and `slate`. Refer to the [Colour Schemes]({{< ref "getting-started#colour-schemes" >}}) section for more details.|
|`darkMode`|boolean or string|`"auto"`|The preferred theme appearance for dark mode. Set to `true` to force dark appearance or `false` to force light appearance. Using `"auto"` will defer to the user's operating system preference.| |`defaultAppearance`|`"light"`|The default theme appearance, either `light` or `dark`.|
|`darkToggle`|boolean|`false`|When `darkMode` is set to `"auto"`, this parameter determines whether or not to show the appearance toggle in the site footer. The browser's local storage is used to persist the user's preference.| |`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`.|
|`logo`|string|_Not set_|The relative path to the site logo file within the `assets/` folder. The logo file should be provided at 2x resolution and supports any image dimensions.| |`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.|
|`description`|string|_Not set_|The description of the website for metadata purposes.| |`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.|
|`mainSections`|array of strings|_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.| |`enableCodeCopy`|`false`|Whether copy-to-clipboard buttons are enabled for `<code>` blocks.|
|`robots`|string|_Not set_|String that indicates how robots should handle your site. If set, it will be output in the page head. Refer to [Google's docs](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives) for valid values.| |`logo`|_Not set_|The relative path to the site logo file within the `assets/` folder. The logo file should be provided at 2x resolution and supports any image dimensions.|
|`homepage.layout`|string|`"page"`|The layout of the homepage. Valid values are `page`, `profile` or `custom`. When set to `custom`, you must provide your own layout by creating a `/layouts/partials/home/custom.html` file. Refer to the [Homepage Layout]({{< ref "homepage-layout" >}}) section for more details.| |`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.|
|`homepage.showRecent`|boolean|`false`|Whether or not to display the recent articles list on the homepage.| |`robots`|_Not set_|String that indicates how robots should handle your site. If set, it will be output in the page head. Refer to [Google's docs](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives) for valid values.|
|`article.showDate`|boolean|`true`|Whether or not article dates are displayed.| |`showScrollToTop`|`true`|When set to `true` the scroll to top arrow is displayed.|
|`article.showDateUpdated`|boolean|`false`|Whether or not the dates articles were updated are displayed.| |`homepage.layout`|`"page"`|The layout of the homepage. Valid values are `page`, `profile` or `custom`. When set to `custom`, you must provide your own layout by creating a `/layouts/partials/home/custom.html` file. Refer to the [Homepage Layout]({{< ref "homepage-layout" >}}) section for more details.|
|`article.dateFormat`|string|`"2 January 2006"`|How article dates are formatted. Refer to the [Hugo docs](https://gohugo.io/functions/format/#gos-layout-string) for acceptable formats.| |`homepage.showRecent`|`false`|Whether or not to display the recent articles list on the homepage.|
|`article.showAuthor`|boolean|`true`|Whether or not the author box is displayed in the article footer.| |`article.showDate`|`true`|Whether or not article dates are displayed.|
|`article.showBreadcrumbs`|boolean|`false`|Whether or not breadcrumbs are displayed in the article header.| |`article.showDateUpdated`|`false`|Whether or not the dates articles were updated are displayed.|
|`article.showDraftLabel`|boolean|`true`|Whether or not the draft indicator is shown next to articles when site is built with `--buildDrafts`.| |`article.showAuthor`|`true`|Whether or not the author box is displayed in the article footer.|
|`article.showEdit`|boolean|`false`|Whether or not the link to edit the article content should be displayed.| |`article.showBreadcrumbs`|`false`|Whether or not breadcrumbs are displayed in the article header.|
|`article.editURL`|string|_Not set_|When `article.showEdit` is active, the URL for the edit link.| |`article.showDraftLabel`|`true`|Whether or not the draft indicator is shown next to articles when site is built with `--buildDrafts`.|
|`article.editAppendPath`|boolean|`true`|When `article.showEdit` is active, whether or not the path to the current article should be appended to the URL set at `article.editURL`.| |`article.showEdit`|`false`|Whether or not the link to edit the article content should be displayed.|
|`article.showHeadingAnchors`|boolean|`true`|Whether or not heading anchor links are displayed alongside headings within articles.| |`article.editURL`|_Not set_|When `article.showEdit` is active, the URL for the edit link.|
|`article.showPagination`|boolean|`true`|Whether or not the next/previous article links are displayed in the article footer.| |`article.editAppendPath`|`true`|When `article.showEdit` is active, whether or not the path to the current article should be appended to the URL set at `article.editURL`.|
|`article.showReadingTime`|boolean|`true`|Whether or not article reading times are displayed.| |`article.showHeadingAnchors`|`true`|Whether or not heading anchor links are displayed alongside headings within articles.|
|`article.showWordCount`|boolean|`false`|Whether or not article word counts are displayed.| |`article.showPagination`|`true`|Whether or not the next/previous article links are displayed in the article footer.|
|`article.sharingLinks`|array of strings|_Not set_|Which sharing links to display at the end of each article. When not provided, or set to `false` no links will be displayed.| |`article.invertPagination`|`false`|Whether or not to flip the direction of the next/previous article links.|
|`list.showBreadcrumbs`|boolean|`false`|Whether or not breadcrumbs are displayed in the header on list pages.| |`article.showReadingTime`|`true`|Whether or not article reading times are displayed.|
|`list.showSummary`|boolean|`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).| |`article.showTableOfContents`|`false`|Whether or not the table of contents is displayed on articles.|
|`list.groupByYear`|boolean|`true`|Whether or not articles are grouped by year on list pages.| |`article.showTaxonomies`|`false`|Whether or not the taxonomies related to this article are displayed.|
|`sitemap.excludedKinds`|array of strings|`["taxonomy", "term"]`|Kinds of content that should be excluded from the generated `/sitemap.xml` file. Refer to the [Hugo docs](https://gohugo.io/templates/section-templates/#page-kinds) for acceptable values.| |`article.showWordCount`|`false`|Whether or not article word counts are displayed.|
|`taxonomy.showTermCount`|boolean|`true`|Whether or not the number of articles within a taxonomy term is displayed on the taxonomy listing.| |`article.sharingLinks`|_Not set_|Which sharing links to display at the end of each article. When not provided, or set to `false` no links will be displayed.|
|`fathomAnalytics.site`|string|_Not set_|The site code generated by Fathom Analytics for the website. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details.| |`list.showBreadcrumbs`|`false`|Whether or not breadcrumbs are displayed in the header on list pages.|
|`fathomAnalytics.domain`|string|_Not set_|If using a custom domain with Fathom Analytics, provide it here to serve `script.js` from the custom domain.| |`list.showTableOfContents`|`false`|Whether or not the table of contents is displayed on list pages.|
|`verification.google`|string|_Not set_|The site verification string provided by Google to be included in the site metadata.| |`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).|
|`verification.bing`|string|_Not set_|The site verification string provided by Bing to be included in the site metadata.| |`list.groupByYear`|`true`|Whether or not articles are grouped by year on list pages.|
|`verification.pinterest`|string|_Not set_|The site verification string provided by Pinterest to be included in the site metadata.| |`sitemap.excludedKinds`|`["taxonomy", "term"]`|Kinds of content that should be excluded from the generated `/sitemap.xml` file. Refer to the [Hugo docs](https://gohugo.io/templates/section-templates/#page-kinds) for acceptable values.|
|`verification.yandex`|string|_Not set_|The site verification string provided by Yandex to be included in the site metadata.| |`taxonomy.showTermCount`|`true`|Whether or not the number of articles within a taxonomy term is displayed on the taxonomy listing.|
|`fathomAnalytics.site`|_Not set_|The site code generated by Fathom Analytics for the website. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details.|
|`fathomAnalytics.domain`|_Not set_|If using a custom domain with Fathom Analytics, provide it here to serve `script.js` from the custom domain.|
|`verification.google`|_Not set_|The site verification string provided by Google to be included in the site metadata.|
|`verification.bing`|_Not set_|The site verification string provided by Bing to be included in the site metadata.|
|`verification.pinterest`|_Not set_|The site verification string provided by Pinterest to be included in the site metadata.|
|`verification.yandex`|_Not set_|The site verification string provided by Yandex to be included in the site metadata.|
<!-- prettier-ignore-end --> <!-- prettier-ignore-end -->

View File

@ -0,0 +1,294 @@
---
title: "Content Examples"
date: 2020-08-09
draft: false
description: "All the partials available in Congo."
slug: "content-examples"
tags: ["content", "example"]
---
If you've been reading the documentation in order, you should now know about all the features and configurations available in Congo. This page is designed to pull everything together and offer some worked examples that you might like to use in your Hugo project.
{{< alert >}}
**Tip:** If you're new to Hugo, be sure to check out the [official docs](https://gohugo.io/content-management/page-bundles/) to learn more about the concept of page bundles and resources.
{{< /alert >}}
The examples on this page can all be adapted to different scenarios but hopefully give you some ideas about how to approach formatting a particular content item for your individual project.
## Branch pages
Branch page bundles in Hugo cover items like the homepage, section listings, and taxonomy pages. The important thing to remember about branch bundles is that the filename for this content type is **`_index.md`**.
Congo will honour the front matter parameters specified in branch pages and these will override the default settings for that particular page. For example, setting the `title` parameter in a branch page will allow overriding the page title.
### Homepage
| | |
| ------------ | -------------------- |
| **Layout:** | `layouts/index.html` |
| **Content:** | `content/_index.md` |
The homepage in Congo is special in that it's overarching design is controlled by the homepage layout config parameter. You can learn more about this in the [Homepage Layout]({{< ref "homepage-layout" >}}) section.
If you want to add custom content to this page, you simply need to create a `content/_index.md` file. Anything in this file will then be included in your homepage.
**Example:**
```yaml
---
title: "Welcome to Congo!"
description: "This is a demo of adding content to the homepage."
---
Welcome to my website! I'm really happy you stopped by.
```
_This example sets a custom title and adds some additional text to the body of the page. Any Markdown formatted text is acceptable, including shortcodes, images and links._
### List pages
| | |
| ------------ | ---------------------------- |
| **Layout:** | `layouts/_default/list.html` |
| **Content:** | `content/../_index.md` |
List pages group all the pages within into a section and provide a way for visitors to reach each page. A blog or portfolio are examples of a list page as they group together posts or projects.
Creating a list page is as simple as making a sub-directory in the content folder. For example, to create a "Projects" section, you would create `content/projects/`. Then create a Markdown file for each of your projects.
A list page will be generated by default, however to customise the content, you should also create an `_index.md` page in this new directory.
```shell
.
└── content
└── projects
├── _index.md # /projects
├── first-project.md # /projects/first-project
└── another-project
├── index.md # /projects/another-project
└── project.jpg
```
Hugo will generate URLs for the pages in your projects folder accordingly.
Just like the homepage, content in the `_index.md` file will be output into the generated list index. Congo will then list any pages in this section below the content.
**Example:**
```yaml
---
title: "Projects"
description: "Learn about some of my projects."
cascade:
showReadingTime: false
---
This section contains all my current projects.
```
_In this example, the special `cascade` parameter is being used to hide the reading time on any sub-pages within this section. By doing this, any project pages will not have their reading time showing. This is a great way to override default theme parameters for an entire section without having to include them in every individual page._
The [samples section]({{< ref "samples" >}}) of this site is an example of a list page.
### Taxonomy pages
| | |
| ---------------- | -------------------------------- |
| **List layout:** | `layouts/_default/taxonomy.html` |
| **Term layout:** | `layouts/_default/term.html` |
| **Content:** | `content/../_index.md` |
Taxonomy pages come in two forms - taxonomy lists and taxonomy terms. Lists display a listing of each of the terms within a given taxonomy, while terms display a list of pages that are related to a given term.
The terminology can get a little confusing so let's explore an example using a taxonomy named `animals`.
Firstly, to use taxonomies in Hugo, they have to be configured. This is done by creating a config file at `config/_default/taxonomies.toml` and defining the taxonomy name.
```toml
# config/_default/taxonomies.toml
animal = "animals"
```
Hugo expects taxonomies to be listed using their singular and plural forms, so we add the singular `animal` equals the plural `animals` to create our example taxonomy.
Now that our `animals` taxonomy exists, it needs to be added to individual content items. It's as simple as inserting it into the front matter:
```yaml
---
title: "Into the Lion's Den"
description: "This week we're learning about lions."
animals: ["lion", "cat"]
---
```
This has now created two _terms_ within our `animals` taxonomy - `lion` and `cat`.
Although it's not obvious at this point, Hugo will now be generating list and term pages for this new taxonomy. By default the listing can be accessed at `/animals/` and the term pages can be found at `/animals/lion/` and `/animals/cat/`.
The list page will list all the terms contained within the taxonomy. In this example, navigating to `/animals/` will show a page that has links for "lion" and "cat" which take visitors to the individual term pages.
The term pages will list all the pages contained within that term. These term lists are essentially the same as normal [list pages](#list-pages) and behave in much the same way.
In order to add custom content to taxonomy pages, simply create `_index.md` files in the content folder using the taxonomy name as the sub-directory name.
```shell
.
└── content
└── animals
├── _index.md # /animals
└── lion
└── _index.md # /animals/lion
```
Anything in these content files will now be placed onto the generated taxonomy pages. As with other content, the front matter variables can be used to override defaults. In this way you could have a tag named `lion` but override the `title` to be "Lion".
To see how this looks in reality, check out the [tags taxonomy listing]({{< ref "tags" >}}) on this site.
## Leaf pages
| | |
| ------------------------- | ------------------------------- |
| **Layout:** | `layouts/_default/single.html` |
| **Content (standalone):** | `content/../page-name.md` |
| **Content (bundled):** | `content/../page-name/index.md` |
Leaf pages in Hugo are basically standard content pages. They are defined as pages that don't contain any sub-pages. These could be things like an about page, or an individual blog post that lives in the blog section of the website.
The most important thing to remember about leaf pages is that unlike branch pages, leaf pages should be named `index.md` _without_ an underscore. Leaf pages are also special in that they can be grouped together at the top level of the section and named with a unique name.
```shell
.
└── content
└── blog
├── first-post.md # /blog/first-post
├── second-post.md # /blog/second-post
└── third-post
├── index.md # /blog/third-post
└── image.jpg
```
When including assets in a page, like an image, a page bundle should be used. Page bundles are created using a sub-directory with an `index.md` file. Grouping the assets with the content in its own directory is important as many of the shortcodes and other theme logic assumes that resources are bundled alongside pages.
**Example:**
```yaml
---
title: "My First Blog Post"
date: 2022-01-25
description: "Welcome to my blog!"
summary: "Learn more about me and why I am starting this blog."
tags: ["welcome", "new", "about", "first"]
---
_This_ is the content of my blog post.
```
Leaf pages have a wide variety of [front matter]({{< ref "front-matter" >}}) parameters that can be used to customise how they are displayed.
### External links
Congo has a special feature that allows links to external pages to appear alongside articles in the article listings. This is useful if you have content on third party websites like Medium, or research papers that you'd like to link to, without replicating the content in your Hugo site.
In order to create an external link article, some special front matter needs to be set:
```yaml
---
title: "My Medium post"
date: 2022-01-25
externalUrl: "https://medium.com/"
summary: "I wrote a post on Medium."
showReadingTime: false
_build:
render: "false"
list: "local"
---
```
Along with the normal front matter parameters like `title` and `summary`, the `externalUrl` parameter is used to tell Congo that this is not an ordinary article. The URL provided here will be where visitors are directed when they select this article.
Additionally, we use a special Hugo front matter parameter `_build` to prevent a normal page for this content being generated - there's no point generating a page since we're linking to an external URL!
The theme includes an archetype to make generating these external link articles simple. Just specify `-k external` when making new content.
```shell
hugo new -k external posts/my-post.md
```
## Custom layouts
One of the benefits of Hugo is that it makes it easy to create custom layouts for the whole site, individual sections or pages.
Layouts follow all the normal Hugo templating rules and more information is available in the [official Hugo docs](https://gohugo.io/templates/introduction/).
### Overriding default layouts
Each of the content types discussed above lists the layout file that is used to generate each type of page. If this file is created in your local project it will override the theme template and thus can be used to customise the default style of the website.
For example, creating a `layouts/_default/single.html` file will allow the layout of leaf pages to be completely customised.
### Custom section layouts
It is also simple to create custom layouts for individual content sections. This is useful when you want to make a section that lists a certain type of content using a particular style.
Let's step through an example that creates a custom "Projects" page that lists projects using a special layout.
In order to do this, structure your content using the normal Hugo content rules and create a section for your projects. Additionally, create a new layout for the projects section by using the same directory name as the content and adding a `list.html` file.
```shell
.
└── content
│ └── projects
│ ├── _index.md
│ ├── first-project.md
│ └── second-project.md
└── layouts
└── projects
└── list.html
```
This `list.html` file will now override the default list template, but only for the `projects` section. Before we look at this file, lets first look at the individual project files.
```yaml
---
title: "Congo"
date: 2021-08-11
icon: "github"
description: "A theme for Hugo built with Tailwind CSS."
topics: ["Hugo", "Web", "Tailwind"]
externalUrl: "https://github.com/jpanther/congo/"
---
```
_In this example we are assigning some metadata for each project that we can then use in our list template. There's no page content, but there's nothing stopping you from including it. It's your own custom template after all!_
With the projects defined, now we can create a list template that outputs the details of each project.
```go
{{ define "main" }}
<section class="mt-8">
{{ range .Pages }}
<article class="pb-6">
<a class="flex" href="{{ .Params.externalUrl }}">
<div class="mr-3 text-3xl text-neutral-300">
<span class="relative inline-block align-text-bottom">
{{ partial "icon.html" .Params.icon }}
</span>
</div>
<div>
<h3 class="flex text-xl font-semibold">
{{ .Title }}
</h3>
<p class="text-sm text-neutral-400">
{{ .Description }}
</p>
</div>
</a>
</article>
{{ end }}
</section>
{{ end }}
```
Although this is quite a straightforward example, you can see that it steps through each of the pages in this section (ie. each project), and then outputs HTML links to each project alongside an icon. The metadata in the front matter for each project is used to determine which information is displayed.
Keep in mind that you'll need to ensure the relevant styles and classes are available, which may require the Tailwind CSS to be recompiled. This is discussed in more detail in the [Advanced Customisation]({{< ref "advanced-customisation" >}}) section.
When making custom templates like this one, it's always easiest to take a look at how the default Congo template works and then use that as a guide. Remember, the [Hugo docs](https://gohugo.io/templates/introduction/) are a great resource to learn more about creating templates too.

View File

@ -12,25 +12,29 @@ In addition to the [default Hugo front matter parameters](https://gohugo.io/cont
Front matter parameter default values are inherited from the theme's [base configuration]({{< ref "configuration" >}}), so you only need to specify these parameters in your front matter when you want to override the default. Front matter parameter default values are inherited from the theme's [base configuration]({{< ref "configuration" >}}), so you only need to specify these parameters in your front matter when you want to override the default.
<!-- prettier-ignore-start --> <!-- prettier-ignore-start -->
|Name|Type|Default|Description| |Name|Default|Description|
| --- | --- | --- | --- | |---|---|---|
|`description`|string|_Not set_|The text description for the article. It is used in the HTML metadata.| |`title`|_Not set_|The name of the article.|
|`externalUrl`|string|_Not set_|If this article is published on a third-party website, the URL to this article. Providing a URL will prevent a content page being generated and any references to this article will link directly to the third-party website.| |`description`|_Not set_|The text description for the article. It is used in the HTML metadata.|
|`editURL`|string|`article.editURL`|When `showEdit` is active, the URL for the edit link.| |`externalUrl`|_Not set_|If this article is published on a third-party website, the URL to this article. Providing a URL will prevent a content page being generated and any references to this article will link directly to the third-party website.|
|`editAppendPath`|boolean|`article.editAppendPath`|When `showEdit` is active, whether or not the path to the current article should be appended to the URL set at `editURL`.| |`editURL`|`article.editURL`|When `showEdit` is active, the URL for the edit link.|
|`groupByYear`|boolean|`list.groupByYear`|Whether or not articles are grouped by year on list pages.| |`editAppendPath`|`article.editAppendPath`|When `showEdit` is active, whether or not the path to the current article should be appended to the URL set at `editURL`.|
|`menu`|string or array|_Not set_|When a value is provided, a link to this article will appear in the named menus. Valid values are `main` or `footer`.| |`groupByYear`|`list.groupByYear`|Whether or not articles are grouped by year on list pages.|
|`robots`|string|_Not set_|String that indicates how robots should handle this article. If set, it will be output in the page head. Refer to [Google's docs](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives) for valid values.| |`menu`|_Not set_|When a value is provided, a link to this article will appear in the named menus. Valid values are `main` or `footer`.|
|`sharingLinks`|array of strings|`article.sharingLinks`|Which sharing links to display at the end of this article. When not provided, or set to `false` no links will be displayed.| |`robots`|_Not set_|String that indicates how robots should handle this article. If set, it will be output in the page head. Refer to [Google's docs](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives) for valid values.|
|`showAuthor`|boolean|`article.showAuthor`|Whether or not the author box is displayed in the article footer.| |`sharingLinks`|`article.sharingLinks`|Which sharing links to display at the end of this article. When not provided, or set to `false` no links will be displayed.|
|`showDate`|boolean|`article.showDate`|Whether or not the article date is displayed. The date is set using the `date` parameter.| |`showAuthor`|`article.showAuthor`|Whether or not the author box is displayed in the article footer.|
|`showDateUpdated`|boolean|`article.showDateUpdated`|Whether or not the date the article was updated is displayed. The date is set using the `lastmod` parameter.| |`showDate`|`article.showDate`|Whether or not the article date is displayed. The date is set using the `date` parameter.|
|`showEdit`|boolean|`article.showEdit`|Whether or not the link to edit the article content should be displayed.| |`showDateUpdated`|`article.showDateUpdated`|Whether or not the date the article was updated is displayed. The date is set using the `lastmod` parameter.|
|`showHeadingAnchors`|boolean|`article.showHeadingAnchors`|Whether or not heading anchor links are displayed alongside headings within this article.| |`showEdit`|`article.showEdit`|Whether or not the link to edit the article content should be displayed.|
|`showPagination`|boolean|`article.showPagination`|Whether or not the next/previous article links are displayed in the article footer.| |`showHeadingAnchors`|`article.showHeadingAnchors`|Whether or not heading anchor links are displayed alongside headings within this article.|
|`showReadingTime`|boolean|`article.showReadingTime`|Whether or not the article reading time is displayed.| |`showPagination`|`article.showPagination`|Whether or not the next/previous article links are displayed in the article footer.|
|`showWordCount`|boolean|`article.showWordCount`|Whether or not the article word count is displayed.| |`invertPagination`|`article.invertPagination`|Whether or not to flip the direction of the next/previous article links.|
|`showSummary`|boolean|`list.showSummary`|Whether or not the article summary should be displayed on list pages.| |`showReadingTime`|`article.showReadingTime`|Whether or not the article reading time is displayed.|
|`summary`|string|Auto generated using `summaryLength` (see [site configuration]({{< ref "configuration#site-configuration" >}}))|When `showSummary` is enabled, this is the Markdown string to be used as the summary for this article.| |`showTaxonomies`|`article.showTaxonomies`|Whether or not the taxonomies that relate to this article are displayed.|
|`xml`|boolean|`true` unless excluded by `sitemap.excludedKinds`|Whether or not this article is included in the generated `/sitemap.xml` file.| |`showTableOfContents`|`article.showTableOfContents`|Whether or not the table of contents is displayed on this article.|
|`showWordCount`|`article.showWordCount`|Whether or not the article word count is displayed.|
|`showSummary`|`list.showSummary`|Whether or not the article summary should be displayed on list pages.|
|`summary`|Auto generated using `summaryLength` (see [site configuration]({{< ref "configuration#site-configuration" >}}))|When `showSummary` is enabled, this is the Markdown string to be used as the summary for this article.|
|`xml`|`true` unless excluded by `sitemap.excludedKinds`|Whether or not this article is included in the generated `/sitemap.xml` file.|
<!-- prettier-ignore-end --> <!-- prettier-ignore-end -->

View File

@ -13,27 +13,43 @@ This section assumes you have already [installed the Congo theme]({{< ref "docs/
The config files that ship with Congo contain all of the possible settings that the theme recognises. By default, many of these are commented out but you can simply uncomment them to activate or change a specific feature. The config files that ship with Congo contain all of the possible settings that the theme recognises. By default, many of these are commented out but you can simply uncomment them to activate or change a specific feature.
There are a few things you should set in `config.toml` for a new installation: ## Basic configuration
Before creating any content, there are a few things you should set for a new installation. Starting in the `config.toml` file, set the `baseURL` and `languageCode` parameters. The `languageCode` should be set to the main language that you will be using to author your content.
```toml ```toml
# config/_default/config.toml # config/_default/config.toml
baseURL = "https://your_domain.com" baseURL = "https://your_domain.com"
languageCode = "en-AU" languageCode = "en"
```
The next step is to configure the language settings. Although Congo supports multilingual setups, for now, just configure the main language.
Locate the `languages.en.toml` file in the config folder. If your main language is English you can use this file as is. Otherwise, rename it so that it includes the correct language code in the filename. For example, for French, rename the file to `languages.fr.toml`.
{{< alert >}}
Note that the language code in the language config filename should match the `languageCode` setting in `config.toml`.
{{< /alert >}}
```toml
# config/_default/languages.en.toml
title = "My awesome website" title = "My awesome website"
[author] [author]
name = "My name" name = "My name"
image = "img/author.jpg" image = "img/author.jpg"
headline = "A generally awesome human"
bio = "A little bit about me" bio = "A little bit about me"
links = [ links = [
{ twitter = "https://twitter.com/username" } { twitter = "https://twitter.com/username" }
] ]
``` ```
The `[author]` configuration determines how the author information is displayed on the website. The image should be placed in the site's `static/` folder. Links will be displayed in the order they are listed. The `[author]` configuration determines how the author information is displayed on the website. The image should be placed in the site's `assets/` folder. Links will be displayed in the order they are listed.
Further detail about these configuration options is covered in the [Configuration]({{< ref "configuration" >}}) section. If you need extra detail, further information about each of these configuration options, is covered in the [Configuration]({{< ref "configuration" >}}) section.
## Colour schemes ## Colour schemes
@ -65,7 +81,7 @@ Congo defines a three-colour palette that is used throughout the theme. Each mai
#### Slate #### Slate
{{< swatches "#6B7280" "#6B7280" "#6B7280" >}} {{< swatches "#6B7280" "#64748b" "#6B7280" >}}
Although these are the default schemes, you can also create your own. Refer to the [Advanced Customisation]({{< ref "advanced-customisation#colour-schemes" >}}) section for details. Although these are the default schemes, you can also create your own. Refer to the [Advanced Customisation]({{< ref "advanced-customisation#colour-schemes" >}}) section for details.
@ -73,9 +89,33 @@ Although these are the default schemes, you can also create your own. Refer to t
By default, Congo doesn't force you to use a particular content type. In doing so you are free to define your content as you wish. You might prefer _pages_ for a static site, _posts_ for a blog, or _projects_ for a portfolio. By default, Congo doesn't force you to use a particular content type. In doing so you are free to define your content as you wish. You might prefer _pages_ for a static site, _posts_ for a blog, or _projects_ for a portfolio.
The same logic applies to taxonomies. Some people prefer to use _tags_ and _categories_, others prefer to use _topics_. Here's a quick overview of a basic Congo project. All content is placed within the `content` folder:
Hugo defaults to using posts, tags and categories out of the box and this will work fine if that's what you want. If you wish to customise this, however, you can do so by creating the following files: ```shell
.
├── assets
│ └── img
│ └── author.jpg
├── config
│ └── _default
├── content
│ ├── _index.md
│ ├── about.md
│ └── posts
│ ├── _index.md
│ ├── first-post.md
│ └── another-post
│ ├── aardvark.jpg
│ └── index.md
└── themes
└── congo
```
It's important to have a firm grasp of how Hugo expects content to be organised as the theme is designed to take full advantage of Hugo page bundles. Be sure to read the [official Hugo docs](https://gohugo.io/content-management/organization/) for more information.
Congo is also flexible when it comes to taxonomies. Some people prefer to use _tags_ and _categories_ to group their content, others prefer to use _topics_.
Hugo defaults to using posts, tags and categories out of the box and this will work fine if that's what you want. If you wish to customise this, however, you can do so by creating a `taxonomies.toml` configuation file:
```toml ```toml
# config/_default/taxonomies.toml # config/_default/taxonomies.toml
@ -85,7 +125,7 @@ topic = "topics"
This will replace the default _tags_ and _categories_ with _topics_. Refer to the [Hugo Taxonomy docs](https://gohugo.io/content-management/taxonomies/) for more information on naming taxonomies. This will replace the default _tags_ and _categories_ with _topics_. Refer to the [Hugo Taxonomy docs](https://gohugo.io/content-management/taxonomies/) for more information on naming taxonomies.
When you create a new taxonomy, you will need to adjust the navigation links on the website to point to the correct sections. When you create a new taxonomy, you will need to adjust the navigation links on the website to point to the correct sections, which is covered below.
## Menus ## Menus

View File

@ -15,7 +15,7 @@ The layout of the homepage is controlled by the `homepage.layout` setting in the
The default layout is the page layout. It's simply a normal content page that displays your Markdown content. It's great for static websites and provides a lot of flexibility. The default layout is the page layout. It's simply a normal content page that displays your Markdown content. It's great for static websites and provides a lot of flexibility.
![Profile layout](home-page.jpg) ![Screenshot of homepage layout](home-page.jpg)
To enable the page layout, set `homepage.layout = "page"` in the `params.toml` configuration file. To enable the page layout, set `homepage.layout = "page"` in the `params.toml` configuration file.
@ -23,9 +23,9 @@ To enable the page layout, set `homepage.layout = "page"` in the `params.toml` c
The profile layout 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. The profile layout 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.
![Profile layout](home-profile.jpg) ![Screenshot of profile layout](home-profile.jpg)
The author information is provided in the `config.toml` configuration file. Refer to the [Getting Started]({{< ref "getting-started" >}}) and [Site Configuration]({{< ref "configuration#site-configuration" >}}) sections for parameter details. 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.
Additionally, any Markdown content that is provided in the homepage content will be placed below the author profile. This allows extra flexibility for displaying a bio or other custom content using shortcodes. Additionally, any Markdown content that is provided in the homepage content will be placed below the author profile. This allows extra flexibility for displaying a bio or other custom content using shortcodes.

View File

@ -1,6 +1,6 @@
--- ---
title: "Hosting & Deployment" title: "Hosting & Deployment"
date: 2020-08-08 date: 2020-08-07
draft: false draft: false
description: "Learn how to deploy a Congo site." description: "Learn how to deploy a Congo site."
slug: "hosting-deployment" slug: "hosting-deployment"

View File

@ -20,7 +20,7 @@ These instructions will get you up and running using Hugo and Congo from a compl
If you haven't used Hugo before, you will need to [install it onto your local machine](https://gohugo.io/getting-started/installing). You can check if it's already installed by running the command `hugo version`. If you haven't used Hugo before, you will need to [install it onto your local machine](https://gohugo.io/getting-started/installing). You can check if it's already installed by running the command `hugo version`.
{{< alert >}} {{< alert >}}
Make sure you are using **Hugo version 0.86.1** or later as the theme takes advantage of some of the latest Hugo features. Make sure you are using **Hugo version 0.87.0** or later as the theme takes advantage of some of the latest Hugo features.
{{< /alert >}} {{< /alert >}}
You can find detailed installation instructions for your platform in the [Hugo docs](https://gohugo.io/getting-started/installing). You can find detailed installation instructions for your platform in the [Hugo docs](https://gohugo.io/getting-started/installing).

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

View File

@ -95,6 +95,47 @@ data: {
You can see some additional Chart.js examples on the [charts samples]({{< ref "charts" >}}) page. You can see some additional Chart.js examples on the [charts samples]({{< ref "charts" >}}) page.
## Figure
Congo includes a `figure` shortcode for adding images to content. The shortcode replaces the base Hugo functionality in order to provide additional performance benefits.
Images included using `figure` will be optimised using Hugo Pipes and scaled in order to provide images appropriate to different device resolutions.
The `figure` shortcode accepts six parameters:
<!-- prettier-ignore-start -->
|Parameter|Description|
|---|---|
|`src`|**Required.** The filename of the image. This image must be a [page resource](https://gohugo.io/content-management/page-resources/) bundled with the page.|
|`alt`|[Alternative text description](https://moz.com/learn/seo/alt-text) for the image.|
|`caption`|Markdown for the image caption, which will be displayed below the image.|
|`class`|Additional CSS classes to apply to the image.|
|`href`|URL that the image should be linked to.|
|`default`|Special parameter to revert to default Hugo `figure` behaviour. Simply provide `default=true` and then use normal [Hugo shortcode syntax](https://gohugo.io/content-management/shortcodes/#figure).|
<!-- prettier-ignore-end -->
Congo also supports automatic conversion of images included using standard Markdown syntax. Simply use the following format and the theme will handle the rest:
```md
![Alt text](image.jpg "Image caption")
```
**Example:**
```md
{{</* figure
src="abstract.jpg"
alt="Abstract purple artwork"
caption="Photo by [Jr Korpa](https://unsplash.com/@jrkorpa) on [Unsplash](https://unsplash.com/)"
*/>}}
<!-- OR -->
![Abstract purple artwork](abstract.jpg "Photo by [Jr Korpa](https://unsplash.com/@jrkorpa) on [Unsplash](https://unsplash.com/)")
```
{{< figure src="abstract.jpg" alt="Abstract purple artwork" caption="Photo by [Jr Korpa](https://unsplash.com/@jrkorpa) on [Unsplash](https://unsplash.com/)" >}}
## Icon ## 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. `icon` outputs an SVG icon and takes the icon name as its only parameter. The icon is scaled to match the current text size.

View File

@ -0,0 +1,96 @@
---
title: "What's New in 2.0 ✨"
date: 2022-01-19
draft: false
description: "Discover what's new in Congo version 2.0."
tags: ["new", "docs"]
---
{{< lead >}}
Congo 2.0 is packed with tons of new features and optimisations.
{{< /lead >}}
The original aim of Congo was to develop a theme that was simple and lightweight. Version 2 takes this one step further and makes the theme even more powerful while still maintaining its lightweight footprint.
Continue reading below to discover what's new. When you're ready to upgrade, check out the [guide to upgrading]({{< ref "upgrade" >}}).
## Tailwind CSS 3.0
Tailwind CSS is at the heart of Congo and this new release contains the very latest [Tailwind CSS version 3](https://tailwindcss.com/blog/tailwindcss-v3). It brings with it performance optimisations and support for some great new CSS features.
{{< youtube "TmWIrBPE6Bc" >}}
Implementing this new version has also removed some Tailwind plugin dependencies from the theme, allowing the overall footprint to remain lightweight.
## Multilingual support
A highly requested feature, Congo is now multilingual! If you publish your content in multiple languages, the site will be built with all the translations available.
<div class="text-2xl text-center" style="font-size: 2.8rem">:flag-au: :de: :fr: :es: :cn: :brazil: :tr:</div>
Thanks to submissions from the community, Congo has already been translated into [seven languages](https://github.com/jpanther/congo/tree/dev/i18n) with more to be added over time. By the way, [pull requests](https://github.com/jpanther/congo/pulls) for new languages are always welcome!
## RTL language support
One of the benefits of the new Tailwind and Multilingual features is the ability to add RTL language support. When enabled, the entire site will reflow content from right-to-left. Every element in the theme has been restyled to ensure it looks great in this mode which aids authors who wish to generate content in RTL languages.
RTL is controlled on a per-language basis so you can mix and match both RTL and LTR content in your projects and the theme will respond accordingly.
## Automatic image resizing
A big change in Congo 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)
```html
<!-- Markdown: ![My image](image.jpg) -->
<img
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"
src="/image_635x0_resize_q75_box.jpg"
alt="My image"
/>
```
Best of all there's nothing you need to change! Simply insert standard Markdown image syntax and let the theme do the rest. If you want a little more control, the `figure` shortcode has been completely rewritten to provide the same resizing benefits.
## Performance improvements
This update packs performance improvements throughout. A key objective for this release was to improve Lighthouse scores and Congo now scores a perfect 100 on all four metrics.
{{< screenshot src="lighthouse.jpg" >}}
There's too many individual changes to highlight them here but the results speak for themselves. If you want to dig deeper, you can [view the Lighthouse report](lighthouse.html). Real world performance will vary based upon server configuration.
## Site search
Powered by [Fuse.js](https://fusejs.io), site search allows visitors to quickly and easily find your content. All searches are performed client-side meaning there's nothing to configure on the server and queries are performed super fast. Simply enable the feature in your site configuration and you're all set. Oh, and it also supports full keyboard navigation!
## Tables of contents
A highly requested feature, Congo now supports tables of contents on article pages. You can see it in action on this page. The contents are fully responsive and will adjust to take advantage of the space available at different screen resolutions.
Available on a global or per article basis, the table of contents can be fully customised using standard Hugo configuration values, allowing you to adjust the behaviour to suit your project.
## Accessibility improvements
From adding ARIA descriptions to more items or simply adjusting the contrast of certain text elements, this release is the most accessible yet.
Version 2 also introduces "skip to content" and "scroll to top" links that enable quick navigation. There's also keyboard shortcuts for enabling items like search without reaching for the mouse.
The new image resizing features also provide full control over `alt` and `title` elements enabling an accessible experience for all visitors.
## A whole lot more
There's countless other minor changes to explore. From being able to display taxonomies on articles and list pages, to using the new `headline` author parameter to customise your homepage. There's also improved JSON-LD strucured data which further optimises SEO performance. Plus the entire theme has had extra polish to ensure a consistent design language.
:rocket: Check out the [full changelog](https://github.com/jpanther/congo/blob/dev/CHANGELOG.md) to learn more.
## Next steps
If you're ready to upgrade, read the [upgrading from version 1 guide]({{< ref "upgrade" >}}) to get started. If you're new to Congo, check out the [Installation guide]({{< ref "docs/installation" >}}) to begin a new project.
---

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

View File

@ -0,0 +1,190 @@
---
title: "Upgrading from Congo 1.x"
date: 2022-01-20
draft: false
description: "Discover what's new in Congo version 2.0."
tags: ["new", "docs"]
---
Although Congo 2.0 contains a large number of changes, the theme has been designed to minimise the effort required to upgrade to the latest release.
That said, there are some changes that require adjustments to existing sites that are built with Congo version 1.x. This guide will step you through the process and highlight things you need to consider.
## Step 1: Upgrade Hugo
{{< alert >}}
Congo 2.0 requires a minimum of **Hugo v0.87.0 or later**
{{< /alert >}}
Congo is built to take advantage of some of the latest Hugo features. You should regularly keep your Hugo installation up to date to avoid any issues.
You can check your current version using the command `hugo version`. Visit the [Hugo docs](https://gohugo.io/getting-started/installing/) for information on obtaining a newer release for your platform.
## Step 2: Upgrade Congo
The process for upgrading Congo will depend on how you include the theme in your project. Instructions for each method can be found below.
- [Upgrade using Hugo](#upgrade-using-hugo)
- [Upgrade using git](#upgrade-using-git)
- [Upgrade manually](#upgrade-manually)
### Upgrade using Hugo
Hugo makes updating modules super easy. Simply change into your project directory and execute the following command:
```shell
hugo mod get -u
```
Hugo will automatically upgrade any modules that are required for your project. It does this by inspecting your `module.toml` and `go.mod` files. If you have any issues with the upgrade, check to ensure these files are still configured correctly.
Once the theme has been upgraded, continue to the [next section](#step-3-theme-configuration).
### Upgrade using git
Git submodules can be upgraded using the `git` command. Simply execute the following command and the latest version of the theme will be downloaded into your local repository:
```shell
git submodule upgrade --remote --merge
```
Once the submodule has been upgraded, continue to the [next section](#step-3-theme-configuration).
### Upgrade manually
Updating Congo manually requires you to download the latest copy of the theme and replace the old version in your project.
{{< alert >}}
Note that any local customisations you have made to the theme files will be lost during this process.
{{< /alert >}}
1. Download the latest release of the theme source code.
{{< button href="https://github.com/jpanther/congo/releases/latest" target="_blank" >}}Download from Github{{< /button >}}
2. Extract the archive, rename the folder to `congo` and move it to the `themes/` directory inside your Hugo project's root folder. You will need to overwrite the existing directory to replace all the theme files.
3. Continue to the [next section](#step-3-theme-configuration).
## Step 3: Theme configuration
Congo 2.0 introduces a number of new theme configuration parameters. Although the theme will adapt to existing version 1 configurations, in order to take advantage of some of the newer theme features, you will need to adjust your existing configuration.
The simplest way to do this is to take a copy of the theme's default configuration and compare it to your existing files. The process is outlined in greater detail below.
### Languages.toml
In order to provide multilingual support, language-specific theme parameters have been moved to a new config file `languages.[lang-code].toml`. The theme comes with a template `languages.en.toml` file which can be used as a guide.
{{< alert >}}
This step is optional if you do not need multilingual support, although completing it now will make future theme upgrades easier.
{{< /alert >}}
The languages config file follows this structure:
```toml
# config/_default/languagues.en.toml
languageCode = "en"
languageName = "English"
displayName = "EN"
htmlCode = "en"
weight = 1
rtl = false
# Language-specific parameters go here
```
Using your preferred language, simply create this new file in `config/_default/` and then move the language-specific parameters from any existing config files over to this new file. The table below outlines the parameters that need to be moved.
| Parameter | Old location |
| ------------- | ------------- |
| `title` | `config.toml` |
| `description` | `params.toml` |
| `copyright` | `config.toml` |
| `dateFormat` | `params.toml` |
| `[author]` | `config.toml` |
Once the values have been moved to the new location, these parameters should be deleted from their original locations.
### Config.toml
The `config.toml` file now only contains base Hugo configuration values. Other than removing the language-specific strings above, there are only two changes to consider.
If you're using a language other than English, provide a `defaultContentLanguage` value that matches the language code in the config file you created for your language. Secondly, to take advange of the new site search in Congo 2.0, an `[outputs]` block needs to be provided.
```toml
# config/_default/config.toml
defaultContentLanguage = "en"
enableRobotsTXT = true
paginate = 10
summaryLength = 0
[outputs]
home = ["HTML", "RSS", "JSON"]
```
### Markup.toml
Congo 2.0 adds support for tables of contents on article pages. Although Hugo ships with default settings for generating contents listings, you can adjust this behaviour by adding a new `[tableOfContents]` block to your `markup.toml` file.
The recommended settings are as follows, which includes any headings in the Markdown content at levels 2, 3 and 4:
```toml
# config/_default/markup.toml
[tableOfContents]
startLevel = 2
endLevel = 4
```
### Params.toml
A number of new theme parameters have been introduced in Congo 2.0. Some minor changes are requried to existing configurations. Remember, the theme will always revert to a sensible default if a parameter is not provided.
The way that dark mode works in Congo has been changed to allow greater flexibility around configuration. The old `darkMode` and `darkToggle` parameters have been **removed and replaced** by three new parameters. These new options operate independently of each other, making it possible to force the appearance while still allowing the user to override.
<!-- prettier-ignore-start -->
| New parameter | Type | Default | Description |
| --- | --- | --- | --- |
| `defaultAppearance` | String | `"light"` | Default theme appearance; either `light` or `dark`.<br>:warning: _Setting this to `light` replicates the old `darkMode = false` setting, while `dark` replicates `darkMode = true`._ |
| `autoSwitchAppearance` | Boolean | `true` | Whether the theme appearance automatically switches based upon the operating system preference. Set to `false` to force the site to always use the `defaultAppearance`. <br>:warning: _Setting this to `true` replicates the old `darkMode = "auto"` setting._ |
| `showAppearanceSwitcher` | Boolean | `false` | Whether the theme appearance switcher is dispalyed in the site footer. <br>:warning: _This parameter replaces `darkToggle`._ |
<!-- prettier-ignore-end -->
The following table outlines some other key **new parameters** that control new features in version 2:
| New parameter | Type | Default |
| ----------------------------- | ------- | ------- |
| `enableSearch` | Boolean | `false` |
| `showScrollToTop` | Boolean | `true` |
| `article.showTaxonomies` | Boolean | `false` |
| `article.showTableOfContents` | Boolean | `false` |
| `list.showTableOfContents` | Boolean | `false` |
For the full list of supported parameters, refer to the [Configuration]({{< ref "docs/configuration" >}}) docs.
## Step 4: Move assets
All site assets now use Hugo Pipes to build an optimised version of your project. In order for the theme to locate your files, any previously static assets used in the theme need to be moved to the Hugo assets folder.
`static/me.jpg` **&rarr;** `assets/me.jpg`
`static/logo.jpg` **&rarr;** `assets/logo.jpg`
If you have provided an author image or site logo, simply move these assets from the `static/` folder to the `assets/` folder. If you use the same directory structure the theme will know where to find these files automatically. If you would like to provide a new path, update the `logo` and `author.image` config values accordingly.
## Step 5: Check content
The behavior of the `figure` shortcode is different in version 2. If you are using `figure` in your content and have advanced use cases, you may need to adjust the parameters you are providing.
Consult the [shortcode docs]({{< ref "docs/shortcodes#figure" >}}) to learn more about supported parameters.
## Step 6: Rebuild
Now that all the configuration changes are complete, it's time to rebuild the site. Run `hugo`, or your build command, and check that everything works as expected.
If you come across any errors, check the configuration is correct and refer to the [full documentation]({{< ref "docs" >}}) for further guidance. Remember, the example config files bundled with the theme contain all the default parameters and are a great starting point.
🙋‍♀️ If you still need help, feel free to ask your question on [GitHub Discussions](https://github.com/jpanther/congo/discussions).

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

View File

@ -0,0 +1,14 @@
---
title: "An External Article"
date: 2019-01-24
externalUrl: "https://jamespanther.com/writings/i-switched-from-google-analytics-to-fathom-analytics/"
summary: "The `externalUrl` front matter parameter can link to any URL."
showReadingTime: false
_build:
render: "false"
list: "local"
---
This page uses the `externalUrl` front matter parameter to link to an article outside of this Hugo website.
It's great for things like linking to posts on Medium or to research papers you may have hosted on third party websites.

View File

@ -45,7 +45,7 @@ The blockquote element represents content that is quoted from another source, op
> Don't communicate by sharing memory, share memory by communicating.<br> > Don't communicate by sharing memory, share memory by communicating.<br>
> — <cite>Rob Pike[^1]</cite> > — <cite>Rob Pike[^1]</cite>
[^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015. [^1]: The above quote is excerpted from Rob Pike's [talk `about` nothing](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.
## Tables ## Tables
@ -81,7 +81,7 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou
### Code block indented with four spaces ### Code block indented with four spaces
<!doctype html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
@ -94,9 +94,9 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou
### Code block with Hugo's internal highlight shortcode ### Code block with Hugo's internal highlight shortcode
{{< highlight html >}} {{< highlight html "linenos=table,hl_lines=4 7-9" >}}
<!doctype html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">

View File

@ -26,7 +26,7 @@ Rursus nulli murmur; hastile inridet ut ab gravi sententia! Nomine potitus silen
## Vagus elidunt ## Vagus elidunt
<svg class="canon" xmlns="http://www.w3.org/2000/svg" overflow="visible" viewBox="0 0 496 373" height="373" width="496"><g fill="none"><path stroke="#000" stroke-width=".75" d="M.599 372.348L495.263 1.206M.312.633l494.95 370.853M.312 372.633L247.643.92M248.502.92l246.76 370.566M330.828 123.869V1.134M330.396 1.134L165.104 124.515"></path><path stroke="#ED1C24" stroke-width=".75" d="M275.73 41.616h166.224v249.05H275.73zM54.478 41.616h166.225v249.052H54.478z"></path><path stroke="#000" stroke-width=".75" d="M.479.375h495v372h-495zM247.979.875v372"></path><ellipse cx="498.729" cy="177.625" rx=".75" ry="1.25"></ellipse><ellipse cx="247.229" cy="377.375" rx=".75" ry="1.25"></ellipse></g></svg> <svg xmlns="http://www.w3.org/2000/svg" overflow="visible" viewBox="0 0 496 373" height="186" width="248"><g fill="none"><path stroke="#000" stroke-width="2" d="M.599 372.348L495.263 1.206M.312.633l494.95 370.853M.312 372.633L247.643.92M248.502.92l246.76 370.566M330.828 123.869V1.134M330.396 1.134L165.104 124.515"></path><path stroke="#ED1C24" stroke-width="2" d="M275.73 41.616h166.224v249.05H275.73zM54.478 41.616h166.225v249.052H54.478z"></path><path stroke="#000" stroke-width="2" d="M.479.375h495v372h-495zM247.979.875v372"></path><ellipse cx="498.729" cy="177.625" rx="2" ry="1.25"></ellipse><ellipse cx="247.229" cy="377.375" rx="2" ry="1.25"></ellipse></g></svg>
[The Van de Graaf Canon](https://en.wikipedia.org/wiki/Canons_of_page_construction#Van_de_Graaf_canon) [The Van de Graaf Canon](https://en.wikipedia.org/wiki/Canons_of_page_construction#Van_de_Graaf_canon)

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 KiB

View File

@ -0,0 +1,9 @@
---
title: Tags
---
Congo has full support for Hugo taxonomies and will adapt to any taxonomy set up. Taxonomy listings like this one also support custom content to be displayed above the list of terms.
This area could be used to add some extra decriptive text to each taxonomy. Check out the [advanced tag]({{< ref "advanced" >}}) below to see how to take this concept even further.
---

View File

@ -0,0 +1,7 @@
---
title: advanced
---
This is the advanced tag. Just like other listing pages in Congo, you can add custom content to individual taxonomy terms and it will be displayed at the top of the term listing. :rocket:
You can also use these content pages to define Hugo metadata like titles and descriptions that will be used for SEO and other purposes.

View File

@ -1,27 +1,8 @@
{{ $jsHome := resources.Get "js/home.js" | resources.Minify | resources.Fingerprint "sha512" }}
<div id="page"> <div id="page">
{{ partial "partials/home/page.html" . }} {{ partial "partials/home/page.html" . }}
</div> </div>
<div id="profile" class="hidden h-full"> <div id="profile" class="hidden h-full">
{{ partial "partials/home/profile.html" . }} {{ partial "partials/home/profile.html" . }}
</div> </div>
<script defer type="text/javascript" src="{{ $jsHome.RelPermalink }}" integrity="{{ $jsHome.Data.Integrity }}"></script>
<script type="text/javascript">
function switchLayout() {
const pageDiv = document.getElementById("page");
const profileDiv = document.getElementById("profile");
const layoutCode = document.querySelectorAll("code[id=layout]");
if (pageDiv.style.display === "none") {
pageDiv.style.display = "block";
profileDiv.style.display = "none";
layoutCode.forEach(function (el) {
el.innerText = "page";
});
} else {
pageDiv.style.display = "none";
profileDiv.style.display = "block";
layoutCode.forEach(function (el) {
el.innerText = "profile";
});
}
}
</script>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

View File

@ -1,12 +1,14 @@
article: article:
anchor_label: "Anker" anchor_label: "Anker"
date: "{{ .Date }}"
# date_updated: "Updated: {{ .Date }}"
draft: "Entwurf" draft: "Entwurf"
edit_title: "Inhalt bearbeiten" edit_title: "Inhalt bearbeiten"
reading_time: reading_time:
one: "{{ .Count }} min" one: "{{ .Count }} min"
other: "{{ .Count }} min" other: "{{ .Count }} min"
reading_time_title: "Lesezeit" reading_time_title: "Lesezeit"
# updated: "Updated" # table_of_contents: "Table of Contents"
# word_count: # word_count:
# one: "{{ .Count }} word" # one: "{{ .Count }} word"
# other: "{{ .Count }} words" # other: "{{ .Count }} words"
@ -14,6 +16,10 @@ article:
author: author:
byline_title: "Autor" byline_title: "Autor"
# code:
# copy: "Copy"
# copied: "Copied"
error: error:
404_title: "Seite nicht gefunden :confused:" 404_title: "Seite nicht gefunden :confused:"
404_error: "Fehler 404" 404_error: "Fehler 404"
@ -28,6 +34,15 @@ list:
externalurl_title: "Link zu einer externen Seite" externalurl_title: "Link zu einer externen Seite"
no_articles: "Es gibt hier noch keine Beiträge." no_articles: "Es gibt hier noch keine Beiträge."
# nav:
# scroll_to_top_title: "Scroll to top"
# skip_to_main: "Skip to main content"
# search:
# open_button_title: "Search (/)"
# close_button_title: "Close (Esc)"
# input_placeholder: "Search"
sharing: sharing:
email: "Per E-Mail teilen" email: "Per E-Mail teilen"
facebook: "Auf Facebook teilen" facebook: "Auf Facebook teilen"
@ -38,4 +53,3 @@ sharing:
shortcode: shortcode:
recent_articles: "Kürzlich" recent_articles: "Kürzlich"
icon_none: "Icon nicht gefunden."

View File

@ -1,12 +1,14 @@
article: article:
anchor_label: "Anchor" anchor_label: "Anchor"
date: "{{ .Date }}"
date_updated: "Updated: {{ .Date }}"
draft: "Draft" draft: "Draft"
edit_title: "Edit content" edit_title: "Edit content"
reading_time: reading_time:
one: "{{ .Count }} min" one: "{{ .Count }} min"
other: "{{ .Count }} mins" other: "{{ .Count }} mins"
reading_time_title: "Reading time" reading_time_title: "Reading time"
updated: "Updated" table_of_contents: "Table of Contents"
word_count: word_count:
one: "{{ .Count }} word" one: "{{ .Count }} word"
other: "{{ .Count }} words" other: "{{ .Count }} words"
@ -14,6 +16,10 @@ article:
author: author:
byline_title: "Author" byline_title: "Author"
code:
copy: "Copy"
copied: "Copied"
error: error:
404_title: "Page Not Found :confused:" 404_title: "Page Not Found :confused:"
404_error: "Error 404" 404_error: "Error 404"
@ -28,6 +34,15 @@ list:
externalurl_title: "Link to external site" externalurl_title: "Link to external site"
no_articles: "There's no articles to list here yet." no_articles: "There's no articles to list here yet."
nav:
scroll_to_top_title: "Scroll to top"
skip_to_main: "Skip to main content"
search:
open_button_title: "Search (/)"
close_button_title: "Close (Esc)"
input_placeholder: "Search"
sharing: sharing:
email: "Send via email" email: "Send via email"
facebook: "Share on Facebook" facebook: "Share on Facebook"
@ -38,4 +53,3 @@ sharing:
shortcode: shortcode:
recent_articles: "Recent" recent_articles: "Recent"
icon_none: "Icon not found."

View File

@ -1,12 +1,14 @@
article: article:
anchor_label: "Ancla" anchor_label: "Ancla"
date: "{{ .Date }}"
date_updated: "Actualizado: {{ .Date }}"
draft: "Borrador" draft: "Borrador"
edit_title: "Editar contenido" edit_title: "Editar contenido"
reading_time: reading_time:
one: "{{ .Count }} min" one: "{{ .Count }} min"
other: "{{ .Count }} mins" other: "{{ .Count }} mins"
reading_time_title: "Tiempo de lectura" reading_time_title: "Tiempo de lectura"
updated: "Actualizado" # table_of_contents: "Table of Contents"
word_count: word_count:
one: "{{ .Count }} palabra" one: "{{ .Count }} palabra"
other: "{{ .Count }} palabras" other: "{{ .Count }} palabras"
@ -14,6 +16,10 @@ article:
author: author:
byline_title: "Autor" byline_title: "Autor"
# code:
# copy: "Copy"
# copied: "Copied"
error: error:
404_title: "Página no encontrada :confused:" 404_title: "Página no encontrada :confused:"
404_error: "Error 404" 404_error: "Error 404"
@ -28,6 +34,15 @@ list:
externalurl_title: "Link a página externa" externalurl_title: "Link a página externa"
no_articles: "Aún no hay artículos para listar aquí." no_articles: "Aún no hay artículos para listar aquí."
# nav:
# scroll_to_top_title: "Scroll to top"
# skip_to_main: "Skip to main content"
# search:
# open_button_title: "Search (/)"
# close_button_title: "Close (Esc)"
# input_placeholder: "Search"
sharing: sharing:
email: "Enviar vía email" email: "Enviar vía email"
facebook: "Compartir en Facebook" facebook: "Compartir en Facebook"
@ -38,4 +53,3 @@ sharing:
shortcode: shortcode:
recent_articles: "Reciente" recent_articles: "Reciente"
icon_none: "Icono no encontrado."

View File

@ -1,12 +1,14 @@
article: article:
anchor_label: "Ancre" anchor_label: "Ancre"
date: "{{ .Date }}"
# date_updated: "Updated: {{ .Date }}"
draft: "Brouillon" draft: "Brouillon"
edit_title: "Editer" edit_title: "Editer"
reading_time: reading_time:
one: "{{ .Count }} min" one: "{{ .Count }} min"
other: "{{ .Count }} mins" other: "{{ .Count }} mins"
reading_time_title: "Temps de lecture" reading_time_title: "Temps de lecture"
# updated: "Updated" # table_of_contents: "Table of Contents"
# word_count: # word_count:
# one: "{{ .Count }} word" # one: "{{ .Count }} word"
# other: "{{ .Count }} words" # other: "{{ .Count }} words"
@ -14,6 +16,10 @@ article:
author: author:
byline_title: "Auteur" byline_title: "Auteur"
# code:
# copy: "Copy"
# copied: "Copied"
error: error:
404_title: "Cette page n'existe pas :confused:" 404_title: "Cette page n'existe pas :confused:"
404_error: "Erreur 404" 404_error: "Erreur 404"
@ -28,6 +34,15 @@ list:
externalurl_title: "Lien d'article externe." externalurl_title: "Lien d'article externe."
no_articles: "Il n'y a pas encore d'articles ici." no_articles: "Il n'y a pas encore d'articles ici."
# nav:
# scroll_to_top_title: "Scroll to top"
# skip_to_main: "Skip to main content"
# search:
# open_button_title: "Search (/)"
# close_button_title: "Close (Esc)"
# input_placeholder: "Search"
sharing: sharing:
email: "Envoyer par email" email: "Envoyer par email"
facebook: "Poster sur Facebook" facebook: "Poster sur Facebook"
@ -38,4 +53,3 @@ sharing:
shortcode: shortcode:
recent_articles: "Recent" recent_articles: "Recent"
icon_none: "Icone non trouvée."

View File

@ -1,12 +1,14 @@
article: article:
anchor_label: "Anchor" anchor_label: "Anchor"
date: "{{ .Date }}"
# date_updated: "Updated: {{ .Date }}"
draft: "Draft" draft: "Draft"
edit_title: "Editar Conteúdo" edit_title: "Editar Conteúdo"
reading_time: reading_time:
one: "{{ .Count }} minuto" one: "{{ .Count }} minuto"
other: "{{ .Count }} minutos" other: "{{ .Count }} minutos"
reading_time_title: "Tempo de leitura" reading_time_title: "Tempo de leitura"
# updated: "Updated" # table_of_contents: "Table of Contents"
# word_count: # word_count:
# one: "{{ .Count }} word" # one: "{{ .Count }} word"
# other: "{{ .Count }} words" # other: "{{ .Count }} words"
@ -14,6 +16,10 @@ article:
author: author:
byline_title: "Autor" byline_title: "Autor"
# code:
# copy: "Copy"
# copied: "Copied"
error: error:
404_title: "Página não econtrada :confused:" 404_title: "Página não econtrada :confused:"
404_error: "Erro 404" 404_error: "Erro 404"
@ -28,6 +34,15 @@ list:
externalurl_title: "Link para site externo" externalurl_title: "Link para site externo"
no_articles: "Não tem artigos para lista aqui ainda." no_articles: "Não tem artigos para lista aqui ainda."
# nav:
# scroll_to_top_title: "Scroll to top"
# skip_to_main: "Skip to main content"
# search:
# open_button_title: "Search (/)"
# close_button_title: "Close (Esc)"
# input_placeholder: "Search"
sharing: sharing:
email: "Enviar por email" email: "Enviar por email"
facebook: "Compartilhar pelo Facebook" facebook: "Compartilhar pelo Facebook"
@ -38,4 +53,3 @@ sharing:
shortcode: shortcode:
recent_articles: "Recente" recent_articles: "Recente"
icon_none: "Ícone não encontrado."

View File

@ -1,12 +1,13 @@
article: article:
anchor_label: "Anchor" anchor_label: "Anchor"
date: "{{ .Date }}"
# date_updated: "Updated: {{ .Date }}"
draft: "Taslak" draft: "Taslak"
edit_title: "İçeriği düzenle" edit_title: "İçeriği düzenle"
reading_time: reading_time:
one: "{{ .Count }} dk" one: "{{ .Count }} dk"
other: "{{ .Count }} dk" other: "{{ .Count }} dk"
reading_time_title: "Okuma süresi" reading_time_title: "Okuma süresi"
# updated: "Updated"
word_count: word_count:
one: "{{ .Count }} kelime" one: "{{ .Count }} kelime"
other: "{{ .Count }} kelime" other: "{{ .Count }} kelime"
@ -14,6 +15,10 @@ article:
author: author:
byline_title: "Yazar" byline_title: "Yazar"
# code:
# copy: "Copy"
# copied: "Copied"
error: error:
404_title: "Sayfa Bulunamadı :confused:" 404_title: "Sayfa Bulunamadı :confused:"
404_error: "Hata 404" 404_error: "Hata 404"
@ -28,6 +33,15 @@ list:
externalurl_title: "Harici siteye bağlantı" externalurl_title: "Harici siteye bağlantı"
no_articles: "Henüz burada listelenecek bir makale yok." no_articles: "Henüz burada listelenecek bir makale yok."
# nav:
# scroll_to_top_title: "Scroll to top"
# skip_to_main: "Skip to main content"
# search:
# open_button_title: "Search (/)"
# close_button_title: "Close (Esc)"
# input_placeholder: "Search"
sharing: sharing:
email: "Email ile gönder" email: "Email ile gönder"
facebook: "Facebook'ta paylaş" facebook: "Facebook'ta paylaş"

View File

@ -1,11 +1,13 @@
article: article:
anchor_label: "锚点" anchor_label: "锚点"
date: "{{ .Date }}"
# date_updated: "Updated: {{ .Date }}"
draft: "草稿" draft: "草稿"
edit_title: "编辑内容" edit_title: "编辑内容"
reading_time: reading_time:
other: "{{ .Count }} 分钟" other: "{{ .Count }} 分钟"
reading_time_title: "预计阅读" reading_time_title: "预计阅读"
# updated: "Updated" # table_of_contents: "Table of Contents"
word_count: word_count:
one: "{{ .Count }} 字" one: "{{ .Count }} 字"
other: "{{ .Count }} 字" other: "{{ .Count }} 字"
@ -13,6 +15,10 @@ article:
author: author:
byline_title: "作者" byline_title: "作者"
# code:
# copy: "Copy"
# copied: "Copied"
error: error:
404_title: "找不到网页 :confused:" 404_title: "找不到网页 :confused:"
404_error: "404 错误" 404_error: "404 错误"
@ -27,6 +33,15 @@ list:
externalurl_title: "链接到外部网站" externalurl_title: "链接到外部网站"
no_articles: "这里还没有任何文章可以列出。" no_articles: "这里还没有任何文章可以列出。"
# nav:
# scroll_to_top_title: "Scroll to top"
# skip_to_main: "Skip to main content"
# search:
# open_button_title: "Search (/)"
# close_button_title: "Close (Esc)"
# input_placeholder: "Search"
sharing: sharing:
email: "通过电子邮件发送" email: "通过电子邮件发送"
facebook: "分享到 Facebook" facebook: "分享到 Facebook"
@ -37,4 +52,3 @@ sharing:
shortcode: shortcode:
recent_articles: "最近的文章" recent_articles: "最近的文章"
icon_none: "未找到图标。"

View File

@ -3,7 +3,7 @@
<p class="mt-8 mb-12 text-neutral-400 dark:text-neutral-500"> <p class="mt-8 mb-12 text-neutral-400 dark:text-neutral-500">
{{ i18n "error.404_error" | emojify }} {{ i18n "error.404_error" | emojify }}
</p> </p>
<div class="prose dark:prose-light"> <div class="prose dark:prose-invert">
<p>{{ i18n "error.404_description" | emojify }}</p> <p>{{ i18n "error.404_description" | emojify }}</p>
</div> </div>
{{ end }} {{ end }}

View File

@ -1 +1 @@
<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }} {{ if .Page.Params.showHeadingAnchors | default (.Page.Site.Params.article.showHeadingAnchors | default true) }}<a class="heading-anchor" href="#{{ .Anchor | safeURL }}" aria-label="{{ i18n "article.anchor_label" }}">#</a>{{ end }}</h{{ .Level }}> <h{{ .Level }} id="{{ .Anchor | safeURL }}" class="relative group">{{ .Text | safeHTML }} {{ if .Page.Params.showHeadingAnchors | default (.Page.Site.Params.article.showHeadingAnchors | default true) }}<span class="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100"><a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700" style="text-decoration-line: none !important;" href="#{{ .Anchor | safeURL }}" aria-label="{{ i18n "article.anchor_label" }}">#</a></span>{{ end }}</h{{ .Level }}>

View File

@ -0,0 +1,19 @@
{{ $altText := .Text }}
{{ $caption := .Title }}
{{ with $.Page.Resources.GetMatch (.Destination) }}
<figure>
<img
class="my-0 rounded-md"
srcset="
{{ (.Resize "330x").RelPermalink }} 330w,
{{ (.Resize "660x").RelPermalink }} 660w,
{{ (.Resize "1024x").RelPermalink }} 1024w,
{{ (.Resize "1320x").RelPermalink }} 2x"
src="{{ (.Resize "660x").RelPermalink }}"
alt="{{ $altText }}"
/>
<figcaption>{{ $caption | markdownify }}</figcaption>
</figure>
{{ else }}
{{ errorf `[CONGO] Markdown image error in "%s": Resource "%s" not found. Check the path is correct or remove the image from the content.` .Page.Path .Destination }}
{{ end }}

View File

@ -1,14 +1,52 @@
<!DOCTYPE html> <!DOCTYPE html>
<html <html
lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en{{ end }}" lang="{{ with .Site.Params.isoCode | default (.Site.LanguageCode | default "en") }}
{{ if .Site.Params.darkMode | default false }}class="dark"{{ end }} {{- . -}}
{{ end }}"
dir="{{ if .Site.Params.rtl | default false -}}
rtl
{{- else -}}
ltr
{{- end }}"
class="scroll-smooth {{ if eq (.Site.Params.defaultAppearance | default "light") "dark" -}}
dark
{{- end }}"
data-auto-appearance="{{ .Site.Params.autoSwitchAppearance | default "true" }}"
> >
{{- partial "head.html" . -}} {{- partial "head.html" . -}}
<body <body
class="flex flex-col h-screen px-6 m-auto text-lg leading-7 bg-neutral text-neutral-900 sm:px-14 md:px-24 lg:px-32 dark:bg-neutral-800 dark:text-neutral max-w-7xl" class="flex flex-col h-screen px-6 m-auto text-lg leading-7 bg-neutral text-neutral-900 sm:px-14 md:px-24 lg:px-32 dark:bg-neutral-800 dark:text-neutral max-w-7xl"
> >
<div id="the-top" class="absolute flex self-center">
<a
class="px-3 py-1 text-sm -translate-y-8 rounded-b-lg bg-primary-200 dark:bg-neutral-600 focus:translate-y-0"
href="#main-content"
><span class="font-bold ltr:pr-2 rtl:pl-2 text-primary-600 dark:text-primary-400"
>&darr;</span
>{{ i18n "nav.skip_to_main" }}</a
>
</div>
{{- partial "header.html" . -}} {{- partial "header.html" . -}}
<main class="flex-grow">{{- block "main" . }}{{- end }}</main> <main id="main-content" class="relative">
{{- block "main" . }}{{- end }}
{{ if and (.Site.Params.showScrollToTop | default true) (gt .WordCount 200) }}
<div
class="absolute top-[110vh] ltr:right-0 rtl:left-0 w-12 pointer-events-none bottom-[-5.5rem]"
>
<a
href="#the-top"
class="w-12 h-12 sticky pointer-events-auto top-[calc(100vh-5rem)] bg-neutral/50 dark:bg-neutral-800/50 backdrop-blur rounded-full text-xl flex items-center justify-center text-neutral-700 dark:text-neutral hover:text-primary-600 dark:hover:text-primary-400"
aria-label="{{ i18n "nav.scroll_to_top_title" }}"
title="{{ i18n "nav.scroll_to_top_title" }}"
>
&uarr;
</a>
</div>
{{ end }}
</main>
{{ if .Site.Params.enableSearch | default false }}
{{- partial "search.html" . -}}
{{ end }}
{{- partial "footer.html" . -}} {{- partial "footer.html" . -}}
</body> </body>
</html> </html>

View File

@ -0,0 +1,6 @@
{{- $.Scratch.Add "index" slice -}}
{{- range .Site.RegularPages -}}
{{ $section := .Site.GetPage "section" .Section }}
{{- $.Scratch.Add "index" (dict "date" (.Date | time.Format (.Site.Language.Params.dateFormat | default ":date_long")) "title" .Title "section" $section.Title "summary" .Summary "content" (.Plain | safeJS) "permalink" .Permalink) -}}
{{- end -}}
{{- $.Scratch.Get "index" | jsonify -}}

View File

@ -1,5 +1,29 @@
{{ define "main" }} {{ define "main" }}
{{ partial "section-header.html" . }} {{ $toc := and (.Params.showTableOfContents | default (.Site.Params.list.showTableOfContents | default false)) (in .TableOfContents "<ul") }}
<header>
{{ if .Site.Params.list.showBreadcrumbs | default false }}
{{ partial "breadcrumbs.html" . }}
{{ end }}
<h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral">{{ .Title }}</h1>
</header>
<section
class="flex flex-col max-w-full prose lg:flex-row dark:prose-invert {{ if $toc -}}
mt-12
{{- else -}}
mt-0
{{- end }}"
>
{{ if $toc }}
<div class="order-first px-0 lg:max-w-xs ltr:lg:pl-8 rtl:lg:pr-8 lg:order-last">
<div class="ltr:pl-5 rtl:pr-5 toc lg:sticky lg:top-10">
{{ partial "toc.html" . }}
</div>
</div>
{{ end }}
<div class="min-w-0 min-h-0 max-w-prose">
{{ .Content | emojify }}
</div>
</section>
{{ if gt .Pages 0 }} {{ if gt .Pages 0 }}
<section> <section>
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }} {{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
@ -16,7 +40,7 @@
</section> </section>
{{ partial "pagination.html" . }} {{ partial "pagination.html" . }}
{{ else }} {{ else }}
<section class="mt-10 prose dark:prose-light"> <section class="mt-10 prose dark:prose-invert">
<p class="py-8 border-t"> <p class="py-8 border-t">
<em>{{ i18n "list.no_articles" | emojify }}</em> <em>{{ i18n "list.no_articles" | emojify }}</em>
</p> </p>

View File

@ -1,6 +1,6 @@
{{ define "main" }} {{ define "main" }}
<article class="max-w-prose"> <article>
<header> <header class="max-w-prose">
{{ if .Site.Params.article.showBreadcrumbs | default false }} {{ if .Site.Params.article.showBreadcrumbs | default false }}
{{ partial "breadcrumbs.html" . }} {{ partial "breadcrumbs.html" . }}
{{ end }} {{ end }}
@ -11,10 +11,19 @@
{{ partial "article-meta.html" (dict "context" . "scope" "single") }} {{ partial "article-meta.html" (dict "context" . "scope" "single") }}
</div> </div>
</header> </header>
<section class="prose dark:prose-light"> <section class="flex flex-col max-w-full mt-0 prose lg:flex-row dark:prose-invert">
{{ if and (.Params.showTableOfContents | default (.Site.Params.article.showTableOfContents | default false)) (in .TableOfContents "<ul") }}
<div class="order-first px-0 lg:max-w-xs ltr:lg:pl-8 rtl:lg:pr-8 lg:order-last">
<div class="ltr:pl-5 rtl:pr-5 toc lg:sticky lg:top-10">
{{ partial "toc.html" . }}
</div>
</div>
{{ end }}
<div class="min-w-0 min-h-0 max-w-prose">
{{ .Content | emojify }} {{ .Content | emojify }}
</div>
</section> </section>
<footer class="pt-8"> <footer class="pt-8 max-w-prose">
{{ partial "author.html" . }} {{ partial "author.html" . }}
{{ partial "sharing-links.html" . }} {{ partial "sharing-links.html" . }}
{{ partial "article-pagination.html" . }} {{ partial "article-pagination.html" . }}

View File

@ -1,17 +1,29 @@
{{ define "main" }} {{ define "main" }}
{{ partial "section-header.html" . }} <header>
{{ if .Site.Params.list.showBreadcrumbs | default false }}
{{ partial "breadcrumbs.html" . }}
{{ end }}
<h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral">{{ .Title }}</h1>
</header>
{{ if .Content }}
<section class="flex flex-col max-w-full mt-0 prose lg:flex-row dark:prose-invert">
<div class="min-w-0 min-h-0 max-w-prose">
{{ .Content | emojify }}
</div>
</section>
{{ end }}
<section class="flex flex-wrap -mx-2 overflow-hidden"> <section class="flex flex-wrap -mx-2 overflow-hidden">
{{ range .Data.Terms }} {{ range .Data.Terms }}
<article class="w-full px-2 my-3 overflow-hidden sm:w-1/2 md:w-1/3 lg:w-1/4 xl:w-1/5"> <article class="w-full px-2 my-3 overflow-hidden sm:w-1/2 md:w-1/3 lg:w-1/4 xl:w-1/5">
<h2> <h2 class="flex items-center">
<a <a
class="text-xl font-medium hover:underline hover:underline-primary-500 hover:underline-offset-small" class="text-xl font-medium hover:underline hover:decoration-primary-500 hover:underline-offset-2"
href="{{ .Page.RelPermalink }}" href="{{ .Page.RelPermalink }}"
>{{ .Page.Title }}</a >{{ .Page.Title }}</a
> >
{{ if $.Site.Params.taxonomy.showTermCount | default true }} {{ if $.Site.Params.taxonomy.showTermCount | default true }}
<span class="px-2 text-base text-primary-500">&middot;</span>
<span class="text-base text-neutral-400"> <span class="text-base text-neutral-400">
<span class="px-1 text-primary-500">&middot;</span>
{{ .Count }} {{ .Count }}
</span> </span>
{{ end }} {{ end }}

View File

@ -1,5 +1,17 @@
{{ define "main" }} {{ define "main" }}
{{ partial "section-header.html" . }} <header>
{{ if .Site.Params.list.showBreadcrumbs | default false }}
{{ partial "breadcrumbs.html" . }}
{{ end }}
<h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral">{{ .Title }}</h1>
</header>
{{ if .Content }}
<section class="flex flex-col max-w-full mt-0 prose lg:flex-row dark:prose-invert">
<div class="min-w-0 min-h-0 max-w-prose">
{{ .Content | emojify }}
</div>
</section>
{{ end }}
<section> <section>
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }} {{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
<h2 class="mt-12 text-2xl font-bold first:mt-8">{{ .Key }}</h2> <h2 class="mt-12 text-2xl font-bold first:mt-8">{{ .Key }}</h2>

View File

@ -2,7 +2,7 @@
<h3 class="flex items-center mt-6 text-xl font-semibold"> <h3 class="flex items-center mt-6 text-xl font-semibold">
{{ with .Params.externalUrl }} {{ with .Params.externalUrl }}
<a <a
class="hover:underline hover:underline-primary-500 hover:underline-offset-small text-neutral-800 dark:text-neutral" class="hover:underline hover:decoration-primary-500 hover:underline-offset-2 text-neutral-800 dark:text-neutral"
href="{{ . }}" href="{{ . }}"
target="_blank" target="_blank"
rel="external" rel="external"
@ -16,13 +16,13 @@
</span> </span>
{{ else }} {{ else }}
<a <a
class="hover:underline hover:underline-primary-500 hover:underline-offset-small text-neutral-800 dark:text-neutral" class="hover:underline hover:decoration-primary-500 hover:underline-offset-2 text-neutral-800 dark:text-neutral"
href="{{ .RelPermalink }}" href="{{ .RelPermalink }}"
>{{ .Title | emojify }}</a >{{ .Title | emojify }}</a
> >
{{ end }} {{ end }}
{{ if and .Draft .Site.Params.article.showDraftLabel }} {{ if and .Draft .Site.Params.article.showDraftLabel }}
<div class="ml-2"> <div class="ltr:ml-2 rtl:mr-2">
{{ partial "badge.html" (i18n "article.draft" | emojify) }} {{ partial "badge.html" (i18n "article.draft" | emojify) }}
</div> </div>
{{ end }} {{ end }}
@ -34,7 +34,7 @@
{{ partial "article-meta.html" . }} {{ partial "article-meta.html" . }}
</div> </div>
{{ if .Params.showSummary | default (.Site.Params.list.showSummary | default false) }} {{ if .Params.showSummary | default (.Site.Params.list.showSummary | default false) }}
<div class="py-1 prose dark:prose-light"> <div class="py-1 prose dark:prose-invert">
{{ .Summary | emojify }} {{ .Summary | emojify }}
</div> </div>
{{ end }} {{ end }}

View File

@ -44,4 +44,21 @@
<span class="pl-2">{{ partial "badge.html" (i18n "article.draft" | emojify) }}</span> <span class="pl-2">{{ partial "badge.html" (i18n "article.draft" | emojify) }}</span>
{{ end }} {{ end }}
</div> </div>
{{/* Output taxonomies */}}
{{ if .Params.showTaxonomies | default (.Site.Params.article.showTaxonomies | default false) }}
<div class="my-1 text-xs text-neutral-500 dark:text-neutral-400 ">
{{ range $taxonomy, $terms := .Site.Taxonomies }}
{{ if (gt (len ($context.GetTerms $taxonomy)) 0) }}
{{ range $context.GetTerms $taxonomy }}
<a
href="{{ .RelPermalink }}"
class="px-1 py-[1px] border rounded-md border-neutral-200 dark:border-neutral-600 hover:border-primary-300 hover:text-primary-700 dark:hover:border-primary-600 dark:hover:text-primary-400"
>{{ .LinkTitle }}</a
>
{{ end }}
{{ end }}
{{ end }}
</div>
{{ end }}
{{ end }} {{ end }}

View File

@ -1,19 +1,33 @@
{{ if .Params.showPagination | default (.Site.Params.article.showPagination | default true) }} {{ if .Params.showPagination | default (.Site.Params.article.showPagination | default true) }}
{{ if or .NextInSection .PrevInSection }} {{ if or .NextInSection .PrevInSection }}
<div class="pt-8 article-pagination"> {{ $next := .NextInSection }}
{{ $prev := .PrevInSection }}
{{ if .Params.invertPagination | default (.Site.Params.article.invertPagination | default false) }}
{{ $next = .PrevInSection }}
{{ $prev = .NextInSection }}
{{ end }}
<div class="pt-8">
<hr class="border-dotted border-neutral-300 dark:border-neutral-600" /> <hr class="border-dotted border-neutral-300 dark:border-neutral-600" />
<div class="flex justify-between pt-3"> <div class="flex justify-between pt-3">
<span> <span>
{{ if .NextInSection }} {{ if $prev }}
<a class="flex" href="{{ .NextInSection.RelPermalink }}"> <a class="flex group" href="{{ $prev.RelPermalink }}">
<span class="mr-3 article-pagination-direction">&larr;</span> <span
class="mr-3 ltr:inline rtl:hidden text-neutral-700 dark:text-neutral group-hover:text-primary-600 dark:group-hover:text-primary-400"
>&larr;</span
>
<span
class="ml-3 ltr:hidden rtl:inline text-neutral-700 dark:text-neutral group-hover:text-primary-600 dark:group-hover:text-primary-400"
>&rarr;</span
>
<span class="flex flex-col"> <span class="flex flex-col">
<span class="article-pagination-title mt-[0.1rem] leading-6" <span
>{{ .NextInSection.Title | emojify }}</span class="mt-[0.1rem] leading-6 group-hover:underline group-hover:decoration-primary-500"
>{{ $prev.Title | emojify }}</span
> >
<span class="mt-[0.1rem] text-xs text-neutral-500 dark:text-neutral-400"> <span class="mt-[0.1rem] text-xs text-neutral-500 dark:text-neutral-400">
{{ if .Params.showDate | default (.Site.Params.article.showDate | default true) }} {{ if .Params.showDate | default (.Site.Params.article.showDate | default true) }}
{{ partial "meta/date.html" .NextInSection.Date }} {{ partial "meta/date.html" $prev.Date }}
{{ end }} {{ end }}
</span> </span>
</span> </span>
@ -21,19 +35,27 @@
{{ end }} {{ end }}
</span> </span>
<span> <span>
{{ if .PrevInSection }} {{ if $next }}
<a class="flex text-right" href="{{ .PrevInSection.RelPermalink }}"> <a class="flex text-right group" href="{{ $next.RelPermalink }}">
<span class="flex flex-col"> <span class="flex flex-col">
<span class="article-pagination-title mt-[0.1rem] leading-6" <span
>{{ .PrevInSection.Title | emojify }}</span class="mt-[0.1rem] leading-6 group-hover:underline group-hover:decoration-primary-500"
>{{ $next.Title | emojify }}</span
> >
<span class="mt-[0.1rem] text-xs text-neutral-500 dark:text-neutral-400"> <span class="mt-[0.1rem] text-xs text-neutral-500 dark:text-neutral-400">
{{ if .Params.showDate | default (.Site.Params.article.showDate | default true) }} {{ if .Params.showDate | default (.Site.Params.article.showDate | default true) }}
{{ partial "meta/date.html" .PrevInSection.Date }} {{ partial "meta/date.html" $next.Date }}
{{ end }} {{ end }}
</span> </span>
</span> </span>
<span class="ml-3 article-pagination-direction">&rarr;</span> <span
class="ml-3 ltr:inline rtl:hidden text-neutral-700 dark:text-neutral group-hover:text-primary-600 dark:group-hover:text-primary-400"
>&rarr;</span
>
<span
class="mr-3 ltr:hidden rtl:inline text-neutral-700 dark:text-neutral group-hover:text-primary-600 dark:group-hover:text-primary-400"
>&larr;</span
>
</a> </a>
{{ end }} {{ end }}
</span> </span>

View File

@ -1,14 +1,18 @@
{{ if .Params.showAuthor | default (.Site.Params.article.showAuthor | default true) }} {{ if .Params.showAuthor | default (.Site.Params.article.showAuthor | default true) }}
<div class="flex"> <div class="flex">
{{ with .Site.Author.image }} {{ with .Site.Author.image }}
{{ $authorImage := resources.Get . }}
{{ if $authorImage }}
{{ $authorImage := $authorImage.Fill "192x192" }}
<img <img
class="w-24 h-24 !mt-0 !mb-0 mr-4 rounded-full" class="w-24 h-24 !mt-0 !mb-0 ltr:mr-4 rtl:ml-4 rounded-full"
width="96" width="96"
height="96" height="96"
alt="Author" alt="Author"
src="{{ . | relURL }}" src="{{ $authorImage.RelPermalink }}"
/> />
{{ end }} {{ end }}
{{ end }}
<div class="place-self-center"> <div class="place-self-center">
{{ with .Site.Author.name | markdownify | emojify }} {{ with .Site.Author.name | markdownify | emojify }}
<div class="text-[0.6rem] leading-3 text-neutral-500 dark:text-neutral-400 uppercase"> <div class="text-[0.6rem] leading-3 text-neutral-500 dark:text-neutral-400 uppercase">

View File

@ -1,6 +1,6 @@
<span class="flex"> <span class="flex">
<span <span
class="ml-1 px-1 py-[1px] text-xs font-normal border rounded-md text-primary-700 dark:text-primary-400 border-primary-400 dark:border-primary-600" class="ltr:ml-1 rtl:mr-1 px-1 py-[1px] text-xs font-normal border rounded-md text-primary-700 dark:text-primary-400 border-primary-400 dark:border-primary-600"
> >
{{ . }} {{ . }}
</span> </span>

View File

@ -9,9 +9,13 @@
{{ end }} {{ end }}
<li class="inline {{ if or (eq .p1 .p2) (.p1.IsHome) }}hidden{{ end }}"> <li class="inline {{ if or (eq .p1 .p2) (.p1.IsHome) }}hidden{{ end }}">
<a <a
class="hover:underline hover:underline-neutral-300 dark:underline-neutral-600" class="hover:underline hover:decoration-neutral-300 dark:underline-neutral-600"
href="{{ .p1.RelPermalink }}" href="{{ .p1.RelPermalink }}"
>{{ .p1.Title }}</a >{{ if .p1.Title }}
{{- .p1.Title -}}
{{ else }}
{{- .p1.Section -}}
{{ end }}</a
><span class="px-1 text-primary-500">/</span> ><span class="px-1 text-primary-500">/</span>
</li> </li>
{{ end }} {{ end }}

View File

@ -6,7 +6,7 @@
{{ range .Site.Menus.footer }} {{ range .Site.Menus.footer }}
<li class="mb-1 sm:mb-0 sm:mr-7 sm:last:mr-0"> <li class="mb-1 sm:mb-0 sm:mr-7 sm:last:mr-0">
<a <a
class="hover:underline hover:underline-primary-500 hover:underline-thickness-bold hover:underline-offset-small" class="hover:underline hover:decoration-primary-500 hover:decoration-2 hover:underline-offset-2"
href="{{ .URL }}" href="{{ .URL }}"
title="{{ .Title }}" title="{{ .Title }}"
>{{ .Name | markdownify | emojify }}</a >{{ .Name | markdownify | emojify }}</a
@ -20,7 +20,7 @@
<div> <div>
{{/* Copyright */}} {{/* Copyright */}}
<p class="text-sm text-neutral-500 dark:text-neutral-400"> <p class="text-sm text-neutral-500 dark:text-neutral-400">
{{- with .Site.Copyright }} {{- with .Site.Params.copyright }}
{{ . | emojify | markdownify }} {{ . | emojify | markdownify }}
{{- else }} {{- else }}
&copy; &copy;
@ -30,34 +30,30 @@
</p> </p>
{{/* Theme attribution */}} {{/* Theme attribution */}}
{{ if .Site.Params.attribution | default true }} {{ if .Site.Params.attribution | default true }}
<p class="text-xs text-neutral-400 dark:text-neutral-600"> <p class="text-xs text-neutral-500 dark:text-neutral-400">
{{ $hugo := printf `<a class="hover:underline hover:underline-primary-400 hover:text-primary-500" {{ $hugo := printf `<a class="hover:underline hover:decoration-primary-400 hover:text-primary-500"
href="https://gohugo.io/" target="_blank" rel="noopener noreferrer">Hugo</a>` }} href="https://gohugo.io/" target="_blank" rel="noopener noreferrer">Hugo</a>`
{{ $congo := printf `<a class="hover:underline hover:underline-primary-400 hover:text-primary-500" href="https://git.io/hugo-congo" target="_blank" rel="noopener noreferrer">Congo</a>` }} }}
{{ $congo := printf `<a class="hover:underline hover:decoration-primary-400 hover:text-primary-500" href="https://git.io/hugo-congo" target="_blank" rel="noopener noreferrer">Congo</a>` }}
{{ i18n "footer.powered_by" (dict "Hugo" $hugo "Congo" $congo) | safeHTML }} {{ i18n "footer.powered_by" (dict "Hugo" $hugo "Congo" $congo) | safeHTML }}
</p> </p>
{{ end }} {{ end }}
</div> </div>
{{/* Dark mode toggle */}} {{/* Appearance switch */}}
{{ if and (.Site.Params.darkToggle | default false) (eq (.Site.Params.darkMode | default "auto") "auto") }} {{ if .Site.Params.showAppearanceSwitcher | default false }}
<div class="text-sm cursor-pointer text-neutral-400 dark:text-neutral-500"> <div
class="text-sm cursor-pointer text-neutral-700 dark:text-neutral hover:text-primary-600 dark:hover:text-primary-400 {{ if .Site.Params.showScrollToTop | default true -}}
ltr:mr-14 rtl:ml-14
{{- end }}"
>
<button <button
id="dark-toggle" id="appearance-switcher"
onclick="setPreferredAppearance('dark');" class="w-12 h-12 "
oncontextmenu="setPreferredAppearance('default'); return false;" type="button"
class="inline px-2 py-1 border rounded-md border-neutral-200 dark:hidden hover:text-primary-500 hover:border-primary-400"
title="{{ i18n "footer.dark_appearance" }}" title="{{ i18n "footer.dark_appearance" }}"
> >
{{ partial "icon.html" "moon" }} <span class="inline dark:hidden">{{ partial "icon.html" "moon" }}</span>
</button> <span class="hidden dark:inline">{{ partial "icon.html" "sun" }}</span>
<button
id="light-toggle"
onclick="setPreferredAppearance('light');"
oncontextmenu="setPreferredAppearance('default'); return false;"
class="hidden px-2 py-1 border rounded-md cursor-pointer dark:inline border-neutral-700 hover:text-primary-400 hover:border-primary-500"
title="{{ i18n "footer.light_appearance" }}"
>
{{ partial "icon.html" "sun" }}
</button> </button>
</div> </div>
{{ end }} {{ end }}

View File

@ -0,0 +1 @@
{{ return time.Format (site.Language.Params.dateFormat | default ":date_long") . }}

View File

@ -1,6 +1,6 @@
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
{{ with .Site.LanguageCode }} {{ with .Site.Language.Params.htmlCode | default .Site.LanguageCode }}
<meta http-equiv="content-language" content="{{ . }}" /> <meta http-equiv="content-language" content="{{ . }}" />
{{ end }} {{ end }}
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
@ -14,10 +14,8 @@
<meta name="title" content="{{ .Title | emojify }} &middot; {{ .Site.Title | emojify }}" /> <meta name="title" content="{{ .Title | emojify }} &middot; {{ .Site.Title | emojify }}" />
{{- end }} {{- end }}
{{/* Metadata */}} {{/* Metadata */}}
{{ with .Params.Description -}} {{ with .Site.Params.description -}}
<meta name="description" content="{{ . }}" /> <meta name="description" content="{{ . }}" />
{{- else -}}
<meta name="description" content="{{ $.Site.Params.Description }}" />
{{- end }} {{- end }}
{{ with .Site.Params.keywords -}} {{ with .Site.Params.keywords -}}
<meta name="keywords" content="{{ . }}" /> <meta name="keywords" content="{{ . }}" />
@ -32,60 +30,42 @@
{{ range .AlternativeOutputFormats -}} {{ range .AlternativeOutputFormats -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .RelPermalink ($.Site.Title | emojify) | safeHTML }} {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .RelPermalink ($.Site.Title | emojify) | safeHTML }}
{{ end -}} {{ end -}}
{{/* Styles */}} {{/* Asset bundles */}}
{{ $schemeCSS := resources.Get (printf "css/schemes/%s.css" (.Site.Params.colorScheme | default "congo")) }} {{ $assets := newScratch }}
{{ if not $schemeCSS }} {{ $cssScheme := resources.Get (printf "css/schemes/%s.css" (.Site.Params.colorScheme | default "congo")) }}
{{ $schemeCSS = resources.Get "css/schemes/congo.css" }} {{ if not $cssScheme }}
{{ $cssScheme = resources.Get "css/schemes/congo.css" }}
{{ end }} {{ end }}
{{ $schemeStyles := $schemeCSS | resources.Minify | resources.Fingerprint "sha512" }} {{ $assets.Add "css" (slice $cssScheme) }}
<link {{ $cssMain := resources.Get "css/compiled/main.css" }}
type="text/css" {{ $assets.Add "css" (slice $cssMain) }}
rel="stylesheet" {{ $cssCustom := resources.Get "css/custom.css" }}
href="{{ $schemeStyles.RelPermalink }}" {{ if $cssCustom }}
integrity="{{ $schemeStyles.Data.Integrity }}" {{ $assets.Add "css" (slice $cssCustom) }}
/>
{{ $mainCSS := resources.Get "css/compiled/main.css" }}
{{ $mainStyles := $mainCSS | resources.Minify | resources.Fingerprint "sha512" }}
<link
type="text/css"
rel="stylesheet"
href="{{ $mainStyles.RelPermalink }}"
integrity="{{ $mainStyles.Data.Integrity }}"
/>
{{ $customCSS := resources.Get "css/custom.css" }}
{{ if $customCSS }}
{{ $customStyles := $customCSS | resources.Minify | resources.Fingerprint "sha512" }}
<link
type="text/css"
rel="stylesheet"
href="{{ $customStyles.RelPermalink }}"
integrity="{{ $customStyles.Data.Integrity }}"
/>
{{ end }} {{ end }}
{{ if eq (.Site.Params.darkMode | default "auto") "auto" }} {{ $bundleCSS := $assets.Get "css" | resources.Concat "css/main.bundle.css" | resources.Minify | resources.Fingerprint "sha512" }}
<script> <link
function loadPreferredAppearance() { type="text/css"
if (localStorage.preferredAppearance === "dark" || (!("preferredAppearance" in localStorage) && window.matchMedia("(prefers-color-scheme: dark)").matches)) { rel="stylesheet"
document.documentElement.classList.add("dark"); href="{{ $bundleCSS.RelPermalink }}"
} else { integrity="{{ $bundleCSS.Data.Integrity }}"
document.documentElement.classList.remove("dark"); />
} {{ if .Site.Params.enableAppearanceSwitching | default true }}
} {{ $jsAppearance := resources.Get "js/appearance.js" }}
function setPreferredAppearance(scheme) { {{ $assets.Add "js" (slice $jsAppearance) }}
if (scheme == "default") { {{ end }}
localStorage.removeItem("preferredAppearance"); {{ if .Site.Params.enableSearch | default false }}
} else { {{ $jsFuse := resources.Get "lib/fuse/fuse.min.js" }}
localStorage.preferredAppearance = scheme; {{ $jsSearch := resources.Get "js/search.js" }}
} {{ $assets.Add "js" (slice $jsFuse $jsSearch) }}
loadPreferredAppearance(); {{ end }}
} {{ if .Site.Params.enableCodeCopy | default false }}
loadPreferredAppearance(); {{ $jsCode := resources.Get "js/code.js" }}
window.matchMedia("(prefers-color-scheme: dark)").addListener(loadPreferredAppearance); {{ $assets.Add "js" (slice $jsCode) }}
</script> {{ end }}
{{ else }} {{ if $assets.Get "js" }}
<script> {{ $bundleJS := $assets.Get "js" | resources.Concat "js/main.bundle.js" | resources.Minify | resources.Fingerprint "sha512" }}
localStorage.removeItem("preferredAppearance"); <script defer type="text/javascript" id="script-bundle" src="{{ $bundleJS.RelPermalink }}" integrity="{{ $bundleJS.Data.Integrity }}" data-copy="{{ i18n "code.copy" }}" data-copied="{{ i18n "code.copied" }}"></script>
</script>
{{ end }} {{ end }}
{{/* Icons */}} {{/* Icons */}}
{{ if templates.Exists "partials/favicons.html" }} {{ if templates.Exists "partials/favicons.html" }}

View File

@ -6,7 +6,7 @@
{{ if .Site.Params.Logo -}} {{ if .Site.Params.Logo -}}
{{ $logo := resources.Get .Site.Params.Logo }} {{ $logo := resources.Get .Site.Params.Logo }}
{{ if $logo }} {{ if $logo }}
<a href="{{ "/" | relURL }}"> <a href="{{ "/" | relLangURL }}">
<img <img
src="{{ $logo.RelPermalink }}" src="{{ $logo.RelPermalink }}"
width="{{ div $logo.Width 2 }}" width="{{ div $logo.Width 2 }}"
@ -18,27 +18,43 @@
{{ end }} {{ end }}
{{ else }} {{ else }}
<a <a
class="hover:underline hover:underline-primary-500 hover:underline-thickness-bold hover:underline-offset-small" class="hover:underline hover:decoration-primary-500 hover:decoration-2 hover:underline-offset-2"
rel="me" rel="me"
href="{{ "/" | relURL }}" href="{{ "/" | relLangURL }}"
>{{ .Site.Title | markdownify | emojify }}</a >{{ .Site.Title | markdownify | emojify }}</a
> >
{{- end }} {{- end }}
{{ partial "translations.html" . }}
</div> </div>
{{/* Main menu */}} {{/* Main menu */}}
{{ if .Site.Menus.main }} {{ if .Site.Menus.main }}
<nav> <nav>
<ul class="flex flex-col list-none sm:flex-row"> <ul class="flex flex-col list-none sm:flex-row">
{{ range .Site.Menus.main }} {{ range .Site.Menus.main }}
<li class="mb-1 text-right sm:mb-0 sm:mr-7 sm:last:mr-0"> <li
class="mb-1 ltr:text-right rtl:text-left sm:mb-0 ltr:sm:mr-7 ltr:sm:last:mr-0 rtl:sm:ml-7 rtl:sm:last:ml-0"
>
<a <a
class="hover:underline hover:underline-primary-500 hover:underline-thickness-bold hover:underline-offset-small" class="hover:underline hover:decoration-primary-500 hover:decoration-2 hover:underline-offset-2"
href="{{ .URL }}" href="{{ .URL }}"
title="{{ .Title }}" title="{{ .Title }}"
>{{ .Name | markdownify | emojify }}</a >{{ .Name | markdownify | emojify }}</a
> >
</li> </li>
{{ end }} {{ end }}
{{ if .Site.Params.enableSearch | default false }}
<li
class="ltr:text-right rtl:text-left ltr:sm:mr-7 ltr:sm:last:mr-0 rtl:sm:ml-7 rtl:sm:last:ml-0"
>
<button
id="search-button"
class="text-base hover:text-primary-600 dark:hover:text-primary-400"
title="{{ i18n "search.open_button_title" }}"
>
{{ partial "icon.html" "search" }}
</button>
</li>
{{ end }}
</ul> </ul>
</nav> </nav>
{{ end }} {{ end }}

View File

@ -1,4 +1,4 @@
<article class="max-w-full prose dark:prose-light"> <article class="max-w-full prose dark:prose-invert">
{{ with .Title }} {{ with .Title }}
<header> <header>
<h1>{{ . | emojify }}</h1> <h1>{{ . | emojify }}</h1>

View File

@ -5,16 +5,31 @@
> >
<header class="flex flex-col items-center mb-3"> <header class="flex flex-col items-center mb-3">
{{ with .Site.Author.image }} {{ with .Site.Author.image }}
<img class="mb-2 rounded-full w-36 h-36" alt="Author" src="{{ . | relURL }}" /> {{ $authorImage := resources.Get . }}
{{ if $authorImage }}
{{ $authorImage := $authorImage.Fill "288x288" }}
<img
class="mb-2 rounded-full w-36 h-36"
width="144"
height="144"
alt="Author"
src="{{ $authorImage.RelPermalink }}"
/>
{{ end }}
{{ end }} {{ end }}
<h1 class="text-4xl font-extrabold"> <h1 class="text-4xl font-extrabold">
{{ .Site.Author.name | default .Site.Title }} {{ .Site.Author.name | default .Site.Title }}
</h1> </h1>
{{ with .Site.Author.headline }}
<h2 class="text-xl text-neutral-500 dark:text-neutral-400">
{{ . }}
</h2>
{{ end }}
<div class="mt-1 text-2xl"> <div class="mt-1 text-2xl">
{{ partialCached "author-links.html" . }} {{ partialCached "author-links.html" . }}
</div> </div>
</header> </header>
<section class="prose dark:prose-light">{{ .Content | emojify }}</section> <section class="prose dark:prose-invert">{{ .Content | emojify }}</section>
</article> </article>
<section> <section>
{{ partial "recent-articles.html" . }} {{ partial "recent-articles.html" . }}

View File

@ -1,3 +1,4 @@
{{- i18n "article.updated" -}}:&nbsp; <time datetime="{{ . }}">
{{ partial "meta/date.html" . }} {{- i18n "article.date_updated" (dict "Date" (partial "functions/date.html" .)) | markdownify | emojify -}}
</time>
{{- /* Trim EOF */ -}} {{- /* Trim EOF */ -}}

View File

@ -1,4 +1,4 @@
<time datetime="{{ . }}"> <time datetime="{{ . }}">
{{- .Format (site.Params.article.dateFormat | default "2 January 2006") -}} {{- i18n "article.date" (dict "Date" (partial "functions/date.html" .)) | markdownify | emojify -}}
</time> </time>
{{- /* Trim EOF */ -}} {{- /* Trim EOF */ -}}

View File

@ -1,4 +1,4 @@
<span title="{{ i18n "article.reading_time_title" }}"> <span title="{{ i18n "article.reading_time_title" }}">
{{- i18n "article.reading_time" .ReadingTime | emojify -}} {{- i18n "article.reading_time" .ReadingTime | markdownify | emojify -}}
</span> </span>
{{- /* Trim EOF */ -}} {{- /* Trim EOF */ -}}

View File

@ -1,5 +1,4 @@
<span> <span>
{{- i18n "article.word_count" .WordCount | emojify -}} {{- i18n "article.word_count" .WordCount | markdownify | emojify -}}
</span> </span>
{{- /* Trim EOF */ -}} {{- /* Trim EOF */ -}}

View File

@ -3,38 +3,47 @@
{ {
"@context": "https://schema.org", "@context": "https://schema.org",
"@type": "WebSite", "@type": "WebSite",
"@id": "{{ (site.GetPage "/").Permalink | safeURL }}",
"name": "{{ .Site.Title | safeJS }}", "name": "{{ .Site.Title | safeJS }}",
{{ with .Site.Params.description }}"description": "{{ . | safeJS }}",{{ end }}
{{ with .Site.LanguageCode }}"inLanguage": "{{ . }}",{{ end }}
"url": "{{ (site.GetPage "/").Permalink | safeURL }}", "url": "{{ (site.GetPage "/").Permalink | safeURL }}",
"description": "{{ .Site.Params.description | safeJS }}" "publisher" : {
"@type": "Person",
"name": "{{ .Site.Author.name | safeJS }}",
},
{{ with .Site.Params.keywords }}"keywords": {{ . }},{{ end }}
} }
</script> </script>
{{ else if .IsPage }} {{ else if .IsPage }}
{{- $iso8601 := "2006-01-02T15:04:05-07:00" -}} {{- $iso8601 := "2006-01-02T15:04:05-07:00" -}}
<script type="application/ld+json"> <script type="application/ld+json">
{ [{
"@context": "https://schema.org", "@context": "https://schema.org",
"@type": "BlogPosting", "@type": "Article",
"articleSection": "{{ (site.GetPage .Section).Title }}", "articleSection": "{{ (site.GetPage .Section).Title | safeJS }}",
"name": "{{ .Title | safeJS }}", "name": "{{ .Title | safeJS }}",
"headline": "{{ .Title | safeJS }}", "headline": "{{ .Title | safeJS }}",
"description": "{{ with .Description }}{{ . }}{{ else }}{{ if .IsPage }}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}", {{ with .Description }}"description": "{{ . | safeJS }}",{{ end }}
{{ with .Site.LanguageCode }}"inLanguage": {{ . }},{{ end }} {{ with .Summary }}"abstract": "{{ . | safeJS }}",{{ end }}
{{ with .Site.LanguageCode }}"inLanguage": "{{ . }}",{{ end }}
"url" : "{{ .Permalink }}",
"author" : { "author" : {
"@type": "Person", "@type": "Person",
"name": "{{ .Site.Author.name | safeJS }}" "name": "{{ .Site.Author.name | safeJS }}"
}, },
"creator" : {
"@type": "Person",
"name": "{{ .Site.Author.name | safeJS }}"
},
"copyrightHolder": "{{ .Site.Author.name | safeJS }}",
{{ with .PublishDate }}"copyrightYear": "{{ .Format "2006" }}",{{ end }} {{ with .PublishDate }}"copyrightYear": "{{ .Format "2006" }}",{{ end }}
{{ with .PublishDate }}"dateCreated": "{{ .Format $iso8601 }}",{{ end }} {{ with .Date }}"dateCreated": "{{ .Format $iso8601 }}",{{ end }}
{{ with .PublishDate }}"datePublished": "{{ .Format $iso8601 }}",{{ end }} {{ with .PublishDate }}"datePublished": "{{ .Format $iso8601 }}",{{ end }}
{{ with .ExpiryDate }}"expires": "{{ .Format $iso8601 }}",{{ end }}
{{ with .Lastmod }}"dateModified": "{{ .Format $iso8601 }}",{{ end }} {{ with .Lastmod }}"dateModified": "{{ .Format $iso8601 }}",{{ end }}
"url" : "{{ .Permalink }}", {{ if .Keywords }}
{{ with .Keywords }}"keywords": {{ . }},{{ end }}
{{ else }}
{{ with .Params.tags }}"keywords": {{ . }},{{ end }} {{ with .Params.tags }}"keywords": {{ . }},{{ end }}
{{ end }}
"mainEntityOfPage": "true",
"wordCount": "{{ .WordCount }}" "wordCount": "{{ .WordCount }}"
} }]
</script> </script>
{{ end }} {{ end }}

View File

@ -0,0 +1,47 @@
<div
id="search-wrapper"
class="fixed inset-0 z-50 flex flex-col p-4 sm:p-6 md:p-[10vh] lg:p-[12vh] w-screen h-screen cursor-default bg-neutral-500/50 backdrop-blur-sm dark:bg-neutral-900/50 invisible"
data-url="{{ .Site.BaseURL }}"
>
<div
id="search-modal"
class="flex flex-col w-full max-w-3xl min-h-0 mx-auto border rounded-md shadow-lg border-neutral-200 top-20 bg-neutral dark:bg-neutral-800 dark:border-neutral-700"
>
<header class="relative z-10 flex items-center justify-between flex-none px-2">
<form class="flex items-center flex-auto min-w-0">
<div class="flex items-center justify-center w-8 h-8 text-neutral-400">
{{ partial "icon.html" "search" }}
</div>
<input
type="search"
id="search-query"
class="flex flex-auto h-12 mx-1 bg-transparent appearance-none focus:outline-dotted focus:outline-transparent focus:outline-2"
placeholder="{{ i18n "search.input_placeholder" }}"
tabindex="0"
/>
</form>
<button
id="close-search-button"
class="flex items-center justify-center w-8 h-8 text-neutral-700 dark:text-neutral hover:text-primary-600 dark:hover:text-primary-400"
title="{{ i18n "search.close_button_title" }}"
>
{{ partial "icon.html" "times" }}
</button>
</header>
<section class="flex-auto px-2 overflow-auto">
<ul id="search-results">
<!-- <li class="mb-2">
<a class="flex items-center px-3 py-2 rounded-md appearance-none bg-neutral-100 dark:bg-neutral-700 focus:bg-primary-100 hover:bg-primary-100 dark:hover:bg-primary-900 dark:focus:bg-primary-900 focus:outline-dotted focus:outline-transparent focus:outline-2" href="${value.item.permalink}" tabindex="0">
<div class="grow">
<div class="-mb-1 text-lg font-bold">${value.item.title}</div>
<div class="text-sm text-neutral-500 dark:text-neutral-400">${value.item.section}<span class="px-2 text-primary-500">&middot;</span>${value.item.date}</span></div>
<div class="text-sm italic">${value.item.summary}</div>
</div>
<div class="ml-2 ltr:block rtl:hidden text-neutral-500">&rarr;</div>
<div class="mr-2 ltr:hidden rtl:block text-neutral-500">&larr;</div>
</a>
</li> -->
</ul>
</section>
</div>
</div>

View File

@ -1,9 +0,0 @@
<header>
{{ if .Site.Params.list.showBreadcrumbs | default false }}
{{ partial "breadcrumbs.html" . }}
{{ end }}
<section class="prose dark:prose-light">
<h1 class="mb-3 text-4xl font-extrabold text-neutral-800">{{ .Title }}</h1>
<section>{{ .Content }}</section>
</section>
</header>

View File

@ -0,0 +1,12 @@
<details open class="mt-0 overflow-hidden rounded-lg rtl:pr-5 ltr:pl-5 ltr:-ml-5 rtl:-mr-5 lg:mt-3">
<summary
class="block py-1 text-lg font-semibold cursor-pointer rtl:pr-5 ltr:pl-5 ltr:-ml-5 rtl:-mr-5 text-neutral-800 dark:text-neutral-100 lg:hidden bg-neutral-100 dark:bg-neutral-700"
>
{{ i18n "article.table_of_contents" }}
</summary>
<div
class="py-2 border-dotted ltr:border-l rtl:border-r rtl:pr-5 ltr:pl-5 ltr:-ml-5 rtl:-mr-5 border-neutral-300 dark:border-neutral-600"
>
{{ .TableOfContents }}
</div>
</details>

View File

@ -0,0 +1,7 @@
{{ if .IsTranslated }}
<nav class="inline">
{{ range .AllTranslations }}
<a href="{{ .RelPermalink }}">{{ .Language.Params.displayName | emojify }}</a>
{{ end }}
</nav>
{{ end }}

View File

@ -1,38 +1,18 @@
{{/* Mermaid */}} {{/* Mermaid */}}
{{ if .Page.HasShortcode "mermaid" }} {{ if .Page.HasShortcode "mermaid" }}
{{ $mermaidJS := resources.Get "lib/mermaid/mermaid.min.js" }} {{ $mermaidLib := resources.Get "lib/mermaid/mermaid.min.js" }}
{{ $mermaidJS := $mermaidJS | resources.Fingerprint "sha512" }} {{ $mermaidConfig := resources.Get "js/mermaid.js" }}
<script defer src="{{ $mermaidJS.RelPermalink }}" integrity="{{ $mermaidJS.Data.Integrity }}"></script> {{ $mermaidConfig := $mermaidConfig | resources.Minify }}
<script> {{ $mermaidJS := slice $mermaidLib $mermaidConfig | resources.Concat "js/mermaid.bundle.js" | resources.Fingerprint "sha512" }}
document.addEventListener('DOMContentLoaded', (event) => { <script defer type="text/javascript" src="{{ $mermaidJS.RelPermalink }}" integrity="{{ $mermaidJS.Data.Integrity }}"></script>
function css(name) {
return getComputedStyle(document.documentElement).getPropertyValue(name);
}
mermaid.initialize({ theme: "base", themeVariables: { background: css("--color-neutral"), primaryColor: css("--color-primary-200"), secondaryColor: css("--color-secondary-200"), tertiaryColor: css("--color-neutral-100"), primaryBorderColor: css("--color-primary-400"), secondaryBorderColor: css("--color-secondary-400"), tertiaryBorderColor: css("--color-neutral-400"), lineColor: css("--color-neutral-600"), fontFamily: "ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif", fontSize: "16px" }});
});
</script>
{{ end }} {{ end }}
{{/* Chart */}} {{/* Chart */}}
{{ if .Page.HasShortcode "chart" }} {{ if .Page.HasShortcode "chart" }}
{{ $chartJS := resources.Get "lib/chart/chart.min.js" }} {{ $chartLib := resources.Get "lib/chart/chart.min.js" }}
{{ $chartJS := $chartJS | resources.Fingerprint "sha512" }} {{ $chartConfig := resources.Get "js/chart.js" }}
<script defer src="{{ $chartJS.RelPermalink }}" integrity="{{ $chartJS.Data.Integrity }}"></script> {{ $chartConfig := $chartConfig | resources.Minify }}
<script> {{ $chartJS := slice $chartLib $chartConfig | resources.Concat "js/chart.bundle.js" | resources.Fingerprint "sha512" }}
document.addEventListener('DOMContentLoaded', (event) => { <script defer type="text/javascript" src="{{ $chartJS.RelPermalink }}" integrity="{{ $chartJS.Data.Integrity }}"></script>
function css(name) {
return getComputedStyle(document.documentElement).getPropertyValue(name);
}
Chart.defaults.font.size = 14;
Chart.defaults.backgroundColor = css("--color-primary-300");
Chart.defaults.elements.point.borderColor = css("--color-primary-400");
Chart.defaults.elements.bar.borderColor = css("--color-primary-500");
Chart.defaults.elements.bar.borderWidth = 1;
Chart.defaults.elements.line.borderColor = css("--color-primary-400");
Chart.defaults.elements.arc.backgroundColor = css("--color-primary-200");
Chart.defaults.elements.arc.borderColor = css("--color-primary-500");
Chart.defaults.elements.arc.borderWidth = 1;
});
</script>
{{ end }} {{ end }}
{{/* Katex */}} {{/* Katex */}}
{{ if .Page.HasShortcode "katex" }} {{ if .Page.HasShortcode "katex" }}

Some files were not shown because too many files have changed in this diff Show More