Merge branch 'master' of https://github.com/luizdepra/hugo-coder into luizdepra-master

This commit is contained in:
2021-01-27 19:41:22 +01:00
91 changed files with 6886 additions and 193 deletions

View File

@@ -10,6 +10,7 @@
- [Jiri Hubacek](https://github.com/qeef) - [Jiri Hubacek](https://github.com/qeef)
- [Khosrow Moossavi](https://github.com/khos2ow) - [Khosrow Moossavi](https://github.com/khos2ow)
- [Maikel](https://github.com/mbollemeijer) - [Maikel](https://github.com/mbollemeijer)
- [MetBril](https://github.com/metbril)
- [Myles Johnson](https://github.com/MylesJohnson) - [Myles Johnson](https://github.com/MylesJohnson)
- [Niels Reijn](https://github.com/reijnn) - [Niels Reijn](https://github.com/reijnn)
- [Padraic Renaghan](https://github.com/prenagha) - [Padraic Renaghan](https://github.com/prenagha)
@@ -63,5 +64,34 @@
- [Piotr Orzechowski](https://orzechowski.tech) - [Piotr Orzechowski](https://orzechowski.tech)
- [Glenn Feunteun](https://github.com/gfeun) - [Glenn Feunteun](https://github.com/gfeun)
- [Santiago González](https://github.com/netrules) - [Santiago González](https://github.com/netrules)
- [Codruț Constantin Gușoi](https://www.sdwolfz.pro) - [Codruț Constantin Gușoi](https://www.codrut.pro)
- [Clément Pannetier](https://clementpannetier.dev) - [Clément Pannetier](https://clementpannetier.dev)
- [FantasticMao](https://github.com/FantasticMao)
- [Utkarsh Gupta](https://utkarsh2102.com)
- [Latiif Alsharif](https://latiif.se)
- [Endormi](https://endormi.io)
- [Rajiv Ranjan Singh](https://iamrajiv.github.io/)
- [Pakhomov Alexander](https://github.com/PakhomovAlexander)
- [Rhys Perry](https://rhysperry.com)
- [Arunvel Sriram](https://github.com/arunvelsriram)
- [Lorenzo Cameroni](https://github.com/came88)
- [Jared Sturdy](https://github.com/jsturdy)
- [Daniel Monteiro](https://github.com/dfamonteiro)
- [Dave Rolsky](https://github.com/autarch)
- [Joseph Sanders](https://github.com/jls83)
- [Rabin Adhikari](https://github.com/rabinadk1/)
- [Hussaini Zulkifli](https://github.com/hussaini/)
- [Ellison Leão](https://github.com/ellisonleao)
- [Lucas de Oliveira](https://github.com/lucas-dOliveira)
- [Jian Loong Liew](https://github.com/JianLoong)
- [earnest ma](https://github.com/earnestma)
- [TMineCola](https://github.com/tminecola)
- [Arafat Hasan](https://github.com/arafat-hasan)
- [YUJI](https://yuji.ne.jp/)
- [JaeSang Yoo](https://github.com/JSYoo5B)
- [tianheg](https://github.com/tianheg)
- [Felix](https://github.com/lazyyz)
- [Peter Duchnovsky](https://pduchnovsky.com)
- [Alex Miranda](https://ammiranda.com)
- [Alphonse Mariya](https://github.com/alfunx)
- [Ziwei Pan](https://github.com/PanZiwei/)

View File

@@ -1,4 +1,19 @@
![Hugo Coder Logotype](https://github.com/luizdepra/hugo-coder/blob/master/images/logos/logotype-a.png) <p align="center">
<p align="center">
<a href="https://themes.gohugo.io/hugo-coder/">
<img src="https://img.shields.io/badge/theme-hugo--coder-2b8cbe" alt="Hugo Theme Badge"">
</a>
<a href="https://github.com/luizdepra/hugo-coder/blob/master/LICENSE.txt">
<img src="https://img.shields.io/github/license/luizdepra/hugo-coder.svg" alt="MIT License Badge">
</a>
</p>
<p align="center">
<a href="https://github.com/luizdepra/hugo-coder">
<img src="images/logos/logotype-a.png" alt="Hugo Coder Logo" width="600px" height="184px">
</a>
</p>
</p>
A simple and clean blog theme for [Hugo](https://gohugo.io/). A simple and clean blog theme for [Hugo](https://gohugo.io/).
@@ -10,13 +25,19 @@ This theme is forked from https://github.com/luizdepra/hugo-coder.
## Quick Start ## Quick Start
1. Add the repository into your Hugo Project repository as a submodule, `git submodule add https://github.com/luizdepra/hugo-coder.git themes/hugo-coder`. 1. Add the repository into your Hugo Project repository as a submodule, `git submodule add https://github.com/luizdepra/hugo-coder.git themes/hugo-coder`.
2. Configure your `config.toml`. You can either use the [this minimal configuration](https://github.com/luizdepra/hugo-coder/wiki/Configurations#complete-example) as a base, or look for a complete explanation about all configurations [here](https://github.com/luizdepra/hugo-coder/wiki/Configurations). The [`config.toml`](https://github.com/luizdepra/hugo-coder/blob/master/exampleSite/config.toml) inside the [`exampleSite`](https://github.com/luizdepra/hugo-coder/tree/master/exampleSite) is also a good reference. 2. Configure your `config.toml`. You can either use [this minimal configuration](https://github.com/luizdepra/hugo-coder/wiki/Configurations#complete-example) as a base, or look for a complete explanation about all configurations [here](https://github.com/luizdepra/hugo-coder/wiki/Configurations). The [`config.toml`](https://github.com/luizdepra/hugo-coder/blob/master/exampleSite/config.toml) inside the [`exampleSite`](https://github.com/luizdepra/hugo-coder/tree/master/exampleSite) is also a good reference.
3. Build your site with `hugo serve` and see the result at `http://localhost:1313/`. 3. Build your site with `hugo serve` and see the result at `http://localhost:1313/`.
## Extra Guides ## Extra Guides
* [Multilingual Mode](https://github.com/luizdepra/hugo-coder/wiki/Multilingual-Mode) * [Multilingual Mode](https://github.com/luizdepra/hugo-coder/wiki/Multilingual-Mode)
## Stackbit
This theme is ready to import into Stackbit. This theme can be deployed to Netlify and you can connect any headless CMS including Forestry, NetlifyCMS, DatoCMS or Contentful.
[![Create with Stackbit](https://assets.stackbit.com/badge/create-with-stackbit.svg)](https://app.stackbit.com/create?theme=https://github.com/luizdepra/hugo-coder)
## License ## License
Coder is licensed under the [MIT license](https://github.com/luizdepra/hugo-coder/blob/master/LICENSE.md). Coder is licensed under the [MIT license](https://github.com/luizdepra/hugo-coder/blob/master/LICENSE.md).
@@ -25,13 +46,13 @@ Coder is licensed under the [MIT license](https://github.com/luizdepra/hugo-code
This theme is maintained by its author [Luiz de Prá](https://github.com/luizdepra) with the help from these awesome [contributors](CONTRIBUTORS.md). This theme is maintained by its author [Luiz de Prá](https://github.com/luizdepra) with the help from these awesome [contributors](CONTRIBUTORS.md).
## Sponsoring
If you like my project or it was useful for you, consider supporting its development. Just:
<a href="https://www.buymeacoffee.com/luizdepra" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-green.png" alt="Buy Me A Coffee" height="41" width="174"></a>
## Special Thanks ## Special Thanks
- Gleen McComb, for his great [article](https://glennmccomb.com/articles/how-to-build-custom-hugo-pagination/) about custom pagination. - Gleen McComb, for his great [article](https://glennmccomb.com/articles/how-to-build-custom-hugo-pagination/) about custom pagination.
- All contributors, for every PR and Issue reported. - All contributors, for every PR and Issue reported.
## Stackbit
This theme is ready to import into Stackbit. This theme can be deployed to Netlify and you can connect any headless CMS including Forestry, NetlifyCMS, DatoCMS or Contentful.
[![Create with Stackbit](https://assets.stackbit.com/badge/create-with-stackbit.svg)](https://app.stackbit.com/create?theme=https://github.com/luizdepra/hugo-coder)

View File

@@ -4,6 +4,7 @@ date = {{ .Date }}
title = "" title = ""
description = "" description = ""
slug = "" slug = ""
authors = []
tags = [] tags = []
categories = [] categories = []
externalLink = "" externalLink = ""

28
assets/js/dark-mode.js Normal file
View File

@@ -0,0 +1,28 @@
const body = document.body;
const darkModeToggle = document.getElementById('dark-mode-toggle');
const darkModeMediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
// Check if user preference is set, if not check value of body class for light or dark else it means that colorscheme = auto
if (localStorage.getItem("colorscheme")) {
setTheme(localStorage.getItem("colorscheme"));
} else if (body.classList.contains('colorscheme-light') || body.classList.contains('colorscheme-dark')) {
setTheme(body.classList.contains("colorscheme-dark") ? "dark" : "light");
} else {
setTheme(darkModeMediaQuery.matches ? "dark" : "light");
}
darkModeToggle.addEventListener('click', () => {
setTheme(body.classList.contains("colorscheme-dark") ? "light" : "dark");
});
darkModeMediaQuery.addListener((event) => {
setTheme(event.matches ? "dark" : "light");
});
function setTheme(theme) {
body.classList.remove('colorscheme-auto');
inverse = theme === 'dark' ? 'light' : 'dark';
localStorage.setItem('colorscheme', theme);
body.classList.remove('colorscheme-' + inverse);
body.classList.add('colorscheme-' + theme);
}

View File

@@ -26,6 +26,7 @@ a {
font-weight: 300; font-weight: 300;
color: $link-color; color: $link-color;
text-decoration: none; text-decoration: none;
transition: all .25s ease-in;
&:focus, &:focus,
&:hover { &:hover {
text-decoration: underline; text-decoration: underline;
@@ -46,6 +47,24 @@ h6 {
font-weight: 700; font-weight: 700;
color: $alt-fg-color; color: $alt-fg-color;
margin: 6.4rem 0 3.2rem 0; margin: 6.4rem 0 3.2rem 0;
&:hover .heading-link {
visibility: visible;
}
.heading-link {
color: $link-color;
font-weight: inherit;
text-decoration: none;
font-size: 80%;
visibility: hidden;
}
.title-link {
color: inherit;
font-weight: inherit;
text-decoration: none;
}
} }
h1 { h1 {
@@ -210,3 +229,10 @@ figure {
.fas { .fas {
font-weight: 900; font-weight: 900;
} }
img.emoji {
height: 1em;
width: 1em;
margin: 0 .05em 0 .1em;
vertical-align: -0.1em;
}

View File

@@ -14,6 +14,24 @@
h5, h5,
h6 { h6 {
color: $alt-fg-color-dark; color: $alt-fg-color-dark;
&:hover .heading-link {
visibility: visible;
}
.heading-link {
color: $link-color-dark;
font-weight: inherit;
text-decoration: none;
font-size: 80%;
visibility: hidden;
}
.title-link {
color: inherit;
font-weight: inherit;
text-decoration: none;
}
} }
code { code {

View File

@@ -3,6 +3,11 @@
margin-top: 1.6rem; margin-top: 1.6rem;
margin-bottom: 3.2rem; margin-bottom: 3.2rem;
article { article {
details {
summary {
cursor: pointer;
}
}
header { header {
margin-top: 6.4rem; margin-top: 6.4rem;
margin-bottom: 3.2rem; margin-bottom: 3.2rem;
@@ -83,6 +88,7 @@
} }
.date { .date {
display: inline-block; display: inline-block;
flex:1;
width: 20.0rem; width: 20.0rem;
text-align: right; text-align: right;
margin-right: 3.0rem; margin-right: 3.0rem;
@@ -93,6 +99,7 @@
} }
.title { .title {
font-size: 1.8rem; font-size: 1.8rem;
flex:2;
color: $fg-color; color: $fg-color;
font-family: $heading-font-family; font-family: $heading-font-family;
font-weight: 700; font-weight: 700;
@@ -103,6 +110,13 @@
} }
} }
} }
ul:not(.pagination) {
li {
@media only screen and (min-width : 768.1px) {
display: flex;
}
}
}
} }
.centered { .centered {

27
assets/scss/_float.scss Normal file
View File

@@ -0,0 +1,27 @@
.float-container {
bottom: 2rem;
right: 2rem;
z-index: 100;
position: fixed;
font-size: 1.6em;
a {
display: block;
text-align: center;
width: 3.0rem;
height: 3.0rem;
color: $alt-fg-color;
background-color: $alt-bg-color;
font-size: 2.0rem;
border-radius: 0.5rem;
opacity: 50%;
transition: all .25s ease-in;
&:hover, &:focus {
color: $link-color;
opacity: 100%;
@media only screen and (max-width : 768px) {
color: $alt-fg-color;
opacity: 50%;
}
}
}
}

View File

@@ -0,0 +1,24 @@
@mixin float_dark {
.float-container {
a {
color: $alt-fg-color-dark;
background-color: $alt-bg-color-dark;
&:hover, &:focus {
color: $link-color-dark;
@media only screen and (max-width : 768px) {
color: $alt-fg-color-dark;
}
}
}
}
}
body.colorscheme-dark {
@include float_dark()
}
body.colorscheme-auto {
@media (prefers-color-scheme: dark) {
@include float_dark()
}
}

View File

@@ -1,6 +1,7 @@
.footer { .footer {
width: 100%; width: 100%;
text-align: center; text-align: center;
font-family: $heading-font-family;
line-height: 2.0rem; line-height: 2.0rem;
margin-bottom:1.0rem; margin-bottom:1.0rem;
a { a {

View File

@@ -55,6 +55,11 @@
margin-right: 1.0rem; margin-right: 1.0rem;
} }
} }
.separator {
@media only screen and (max-width : 768px) {
display: none;
}
}
.menu-separator { .menu-separator {
@media only screen and (max-width : 768px) { @media only screen and (max-width : 768px) {
border-top: 2px solid $fg-color; border-top: 2px solid $fg-color;
@@ -65,10 +70,19 @@
} }
} }
} }
#dark-mode-toggle {
margin: 1.7rem 0;
font-size: 2.4rem;
line-height: inherit;
bottom: 2rem;
left: 2rem;
z-index: 100;
position: fixed;
}
#menu-toggle { #menu-toggle {
display: none; display: none;
@media only screen and (max-width : 768px) { @media only screen and (max-width : 768px) {
&:checked + label { &:checked + label > i {
color: $alt-bg-color; color: $alt-bg-color;
} }
&:checked + label + ul { &:checked + label + ul {
@@ -82,15 +96,23 @@
display: none; display: none;
@media only screen and (max-width : 768px) { @media only screen and (max-width : 768px) {
display: block; display: block;
margin: 1.8rem 0;
font-size: 2.4rem; font-size: 2.4rem;
font-weight: 400; font-weight: 400;
line-height: 6.0rem; }
i {
&:hover, &:focus {
color: $alt-fg-color;
}
}
}
i {
color: $fg-color; color: $fg-color;
cursor: pointer; cursor: pointer;
&:hover, &:hover,
&:focus { &:focus {
color: $link-color color: $link-color;
}
} }
} }
} }

View File

@@ -25,19 +25,24 @@
} }
#menu-toggle { #menu-toggle {
@media only screen and (max-width : 768px) { @media only screen and (max-width : 768px) {
&:checked + label { &:checked + label > i {
color: $alt-bg-color-dark; color: $alt-bg-color-dark;
} }
} }
} }
.menu-button { i {
@media only screen and (max-width : 768px) {
color: $fg-color-dark; color: $fg-color-dark;
&:hover, &:hover,
&:focus { &:focus {
color: $link-color-dark; color: $link-color-dark;
} }
} }
.menu-button {
i {
&:hover, &:focus {
color: $alt-fg-color-dark;
}
}
} }
} }

View File

@@ -15,4 +15,4 @@ $bg-color-dark: #212121 !default;
$fg-color-dark: #dadada !default; $fg-color-dark: #dadada !default;
$alt-bg-color-dark: #424242 !default; $alt-bg-color-dark: #424242 !default;
$alt-fg-color-dark: #dadada !default; $alt-fg-color-dark: #dadada !default;
$link-color-dark: #36679f !default; $link-color-dark: #42a5f5 !default;

View File

@@ -3,3 +3,4 @@
@import "content_dark"; @import "content_dark";
@import "navigation_dark"; @import "navigation_dark";
@import "footer_dark"; @import "footer_dark";
@import "float_dark";

View File

@@ -1,6 +1,8 @@
@import "css/normalize", "css/fork-awesome";
@import "variables"; @import "variables";
@import "base"; @import "base";
@import "content"; @import "content";
@import "navigation"; @import "navigation";
@import "pagination"; @import "pagination";
@import "footer"; @import "footer";
@import "float";

File diff suppressed because it is too large Load Diff

349
assets/scss/css/normalize.css vendored Normal file
View File

@@ -0,0 +1,349 @@
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/
html {
line-height: 1.15; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/* Sections
========================================================================== */
/**
* Remove the margin in all browsers.
*/
body {
margin: 0;
}
/**
* Render the `main` element consistently in IE.
*/
main {
display: block;
}
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/* Grouping content
========================================================================== */
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr {
box-sizing: content-box; /* 1 */
height: 0; /* 1 */
overflow: visible; /* 2 */
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
pre {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/* Text-level semantics
========================================================================== */
/**
* Remove the gray background on active links in IE 10.
*/
a {
background-color: transparent;
}
/**
* 1. Remove the bottom border in Chrome 57-
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
border-bottom: none; /* 1 */
text-decoration: underline; /* 2 */
text-decoration: underline dotted; /* 2 */
}
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder;
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/**
* Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/* Embedded content
========================================================================== */
/**
* Remove the border on images inside links in IE 10.
*/
img {
border-style: none;
}
/* Forms
========================================================================== */
/**
* 1. Change the font styles in all browsers.
* 2. Remove the margin in Firefox and Safari.
*/
button,
input,
optgroup,
select,
textarea {
font-family: inherit; /* 1 */
font-size: 100%; /* 1 */
line-height: 1.15; /* 1 */
margin: 0; /* 2 */
}
/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/
button,
input { /* 1 */
overflow: visible;
}
/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
button,
select { /* 1 */
text-transform: none;
}
/**
* Correct the inability to style clickable types in iOS and Safari.
*/
button,
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
}
/**
* Remove the inner border and padding in Firefox.
*/
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
/**
* Restore the focus styles unset by the previous rule.
*/
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
outline: 1px dotted ButtonText;
}
/**
* Correct the padding in Firefox.
*/
fieldset {
padding: 0.35em 0.75em 0.625em;
}
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
box-sizing: border-box; /* 1 */
color: inherit; /* 2 */
display: table; /* 1 */
max-width: 100%; /* 1 */
padding: 0; /* 3 */
white-space: normal; /* 1 */
}
/**
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
vertical-align: baseline;
}
/**
* Remove the default vertical scrollbar in IE 10+.
*/
textarea {
overflow: auto;
}
/**
* 1. Add the correct box sizing in IE 10.
* 2. Remove the padding in IE 10.
*/
[type="checkbox"],
[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
[type="search"] {
-webkit-appearance: textfield; /* 1 */
outline-offset: -2px; /* 2 */
}
/**
* Remove the inner padding in Chrome and Safari on macOS.
*/
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button; /* 1 */
font: inherit; /* 2 */
}
/* Interactive
========================================================================== */
/*
* Add the correct display in Edge, IE 10+, and Firefox.
*/
details {
display: block;
}
/*
* Add the correct display in all browsers.
*/
summary {
display: list-item;
}
/* Misc
========================================================================== */
/**
* Add the correct display in IE 10+.
*/
template {
display: none;
}
/**
* Add the correct display in IE 10.
*/
[hidden] {
display: none;
}

View File

@@ -1,17 +1,16 @@
baseurl = "http://www.example.com" baseURL = "http://www.example.com"
title = "johndoe" title = "johndoe"
theme = "hugo-coder" theme = "hugo-coder"
languagecode = "en" languageCode = "en"
defaultcontentlanguage = "en" defaultContentLanguage = "en"
paginate = 20 paginate = 20
canonifyurls = true
pygmentsstyle = "b2" pygmentsStyle = "b2"
pygmentscodefences = true pygmentsCodeFences = true
pygmentscodefencesguesssyntax = true pygmentsCodeFencesGuessSyntax = true
disqusShortname = "yourdiscussshortname" disqusShortname = "yourdiscussshortname"
@@ -20,11 +19,11 @@ disqusShortname = "yourdiscussshortname"
description = "John Doe's personal website" description = "John Doe's personal website"
keywords = "blog,developer,personal" keywords = "blog,developer,personal"
info = "Full Stack DevOps and Magician" info = "Full Stack DevOps and Magician"
avatarurl = "images/avatar.jpg" avatarURL = "images/avatar.jpg"
#gravatar = "john.doe@example.com" #gravatar = "john.doe@example.com"
footercontent = "Enter a text here." footerContent = "Enter a text here."
dateformat = "January 2, 2006" dateFormat = "January 2, 2006"
hideFooter = false hideFooter = false
hideCredits = false hideCredits = false
@@ -41,16 +40,25 @@ disqusShortname = "yourdiscussshortname"
# "auto" (use preference set by browser) # "auto" (use preference set by browser)
# "dark" (dark background, light foreground) # "dark" (dark background, light foreground)
# "light" (light background, dark foreground) (default) # "light" (light background, dark foreground) (default)
colorscheme = "auto" colorScheme = "auto"
# Hide the toggle button, along with the associated vertical divider
hideColorSchemeToggle = false
# Series see also post count # Series see also post count
maxSeeAlsoItems = 5 maxSeeAlsoItems = 5
# Enable Twemoji
enableTwemoji = true
# Custom CSS # Custom CSS
custom_css = [] customCSS = []
# Custom SCSS
customSCSS = []
# Custom JS # Custom JS
custom_js = [] customJS = []
# If you want to use fathom(https://usefathom.com) for analytics, add this section # If you want to use fathom(https://usefathom.com) for analytics, add this section
[params.fathomAnalytics] [params.fathomAnalytics]
@@ -58,39 +66,86 @@ disqusShortname = "yourdiscussshortname"
# Default value is cdn.usefathom.com, overwrite this if you are self-hosting # Default value is cdn.usefathom.com, overwrite this if you are self-hosting
serverURL = "analytics.example.com" serverURL = "analytics.example.com"
# If you want to use plausible(https://plausible.io) for analytics, add this section
[params.plausibleAnalytics]
domain = "example.com"
# Default value is plausible.io, overwrite this if you are self-hosting or using a custom domain
serverURL = "analytics.example.com"
# If you want to use goatcounter(https://goatcounter.com) for analytics, add this section
[params.goatCounter]
code = "code"
# If you want to use Cloudflare Web Analytics(https://cloudflare.com) for analytics, add this section
[params.cloudflare]
token = "token"
# If you want to use Matomo(https://matomo.org) for analytics, add this section
[params.matomo]
# Default value is "1", overwrite this if you are cloud-hosting
siteID = "ABCDE"
# For cloud-hosting, use provided URL, e.g. example.matomo.cloud
serverURL = "analytics.example.com"
# If you want to implement a Content-Security-Policy, add this section
[params.csp]
childsrc = ["'self'"]
fontsrc = [
"'self'",
"https://fonts.gstatic.com",
"https://cdn.jsdelivr.net/"
]
formaction = ["'self'"]
framesrc = ["'self'"]
imgsrc = ["'self'"]
objectsrc = ["'none'"]
stylesrc = [
"'self'",
"'unsafe-inline'",
"https://fonts.googleapis.com/",
"https://cdn.jsdelivr.net/"
]
scriptsrc = [
"'self'",
"'unsafe-inline'",
"https://www.google-analytics.com"
]
prefetchsrc = ["'self'"]
[taxonomies] [taxonomies]
category = "categories" category = "categories"
series = "series" series = "series"
tag = "tags" tag = "tags"
author = "authors"
[[params.social]] [[params.social]]
name = "Github" name = "Github"
icon = "fab fa-github" icon = "fa fa-github"
weight = 1 weight = 1
url = "https://github.com/johndoe/" url = "https://github.com/johndoe/"
[[params.social]] [[params.social]]
name = "Gitlab" name = "Gitlab"
icon = "fab fa-gitlab" icon = "fa fa-gitlab"
weight = 2 weight = 2
url = "https://gitlab.com/johndoe/" url = "https://gitlab.com/johndoe/"
[[params.social]] [[params.social]]
name = "Twitter" name = "Twitter"
icon = "fab fa-twitter" icon = "fa fa-twitter"
weight = 3 weight = 3
url = "https://twitter.com/johndoe/" url = "https://twitter.com/johndoe/"
[[params.social]] [[params.social]]
name = "LinkedIn" name = "LinkedIn"
icon = "fab fa-linkedin" icon = "fa fa-linkedin"
weight = 4 weight = 4
url = "https://www.linkedin.com/in/johndoe/" url = "https://www.linkedin.com/in/johndoe/"
[[params.social]] [[params.social]]
name = "Medium" name = "Medium"
icon = "fab fa-medium" icon = "fa fa-medium"
weight = 5 weight = 5
url = "https://medium.com/@johndoe" url = "https://medium.com/@johndoe"
[[params.social]] [[params.social]]
name = "RSS" name = "RSS"
icon = "fas fa-rss" icon = "fa fa-rss"
weight = 6 weight = 6
url = "https://myhugosite.com/index.xml" url = "https://myhugosite.com/index.xml"
rel = "alternate" rel = "alternate"
@@ -99,7 +154,7 @@ disqusShortname = "yourdiscussshortname"
[languages] [languages]
[languages.en] [languages.en]
languagename = "English" languageName = "English"
[languages.en.menu] [languages.en.menu]
@@ -125,7 +180,7 @@ disqusShortname = "yourdiscussshortname"
[languages.pt-br] [languages.pt-br]
languagename = "Português" languageName = "Português"
title = "João Ninguém" title = "João Ninguém"
[languages.pt-br.params] [languages.pt-br.params]
@@ -133,7 +188,7 @@ disqusShortname = "yourdiscussshortname"
info = "Full Stack DevOps e Mágico" info = "Full Stack DevOps e Mágico"
description = "Sítio pessoal de João Ninguém" description = "Sítio pessoal de João Ninguém"
keywords = "blog,desenvolvedor,pessoal" keywords = "blog,desenvolvedor,pessoal"
footercontent = "Coloque algum texto aqui." footerContent = "Coloque algum texto aqui."
[languages.pt-br.menu] [languages.pt-br.menu]

View File

@@ -5,6 +5,7 @@ slug = "creating-a-new-theme"
tags = [] tags = []
categories = [] categories = []
series = ["Theme", "Hugo"] series = ["Theme", "Hugo"]
authors = ["John Doe"]
+++ +++
## Introduction ## Introduction
@@ -308,7 +309,7 @@ Edit the file to add the theme, add a title for the site, and specify that all o
``` ```
$ vi config.toml $ vi config.toml
theme = "zafta" theme = "zafta"
baseurl = "" baseURL = ""
languageCode = "en-us" languageCode = "en-us"
title = "zafta - totally refreshing" title = "zafta - totally refreshing"
MetaDataFormat = "toml" MetaDataFormat = "toml"

View File

@@ -4,6 +4,7 @@ title = "Dummy"
slug = "dummy" slug = "dummy"
tags = ["hugo", "i18n"] tags = ["hugo", "i18n"]
categories = ["blog"] categories = ["blog"]
authors = ["Translation test"]
+++ +++
Nada para ver aqui! Nada para ver aqui!

View File

@@ -12,4 +12,5 @@ categories = [
] ]
externalLink = "https://github.com/luizdepra/hugo-coder/wiki" externalLink = "https://github.com/luizdepra/hugo-coder/wiki"
series = ["Hugo"] series = ["Hugo"]
authors = ["External link test"]
+++ +++

View File

@@ -14,6 +14,7 @@ categories = [
"golang", "golang",
] ]
series = ["Getting Started", "Hugo"] series = ["Getting Started", "Hugo"]
authors = ["Jane Smith"]
+++ +++
Hugo uses the excellent [go][] [html/template][gohtmltemplate] library for Hugo uses the excellent [go][] [html/template][gohtmltemplate] library for
@@ -240,7 +241,7 @@ instead of depending on the context.
{{ $title := .Site.Title }} {{ $title := .Site.Title }}
{{ range .Params.tags }} {{ range .Params.tags }}
<li> <a href="{{ $baseurl }}/tags/{{ . | urlize }}">{{ . }}</a> - {{ $title }} </li> <li> <a href="{{ $baseURL }}/tags/{{ . | urlize }}">{{ . }}</a> - {{ $title }} </li>
{{ end }} {{ end }}
Notice how once we have entered the loop the value of {{ . }} has changed. We Notice how once we have entered the loop the value of {{ . }} has changed. We

View File

@@ -12,7 +12,7 @@ categories = [
"golang", "golang",
] ]
series = ["Getting Started", "Hugo"] series = ["Getting Started", "Hugo"]
featured_image = "https://imgs.xkcd.com/comics/angular_momentum.jpg" featuredImage = "https://imgs.xkcd.com/comics/angular_momentum.jpg"
+++ +++
## Step 1. Install Hugo ## Step 1. Install Hugo

View File

@@ -5,6 +5,7 @@ description = "The post demonstrates features of the coder theme."
images = ["/images/N90.jpg"] images = ["/images/N90.jpg"]
math = true math = true
series = ["Theme", "Hugo"] series = ["Theme", "Hugo"]
authors = ["John Doe", "Jane Smith"]
+++ +++
## Style Demo ## Style Demo

View File

@@ -0,0 +1,23 @@
+++
date = "2020-05-25"
title = "Twemoji Support 🤩"
description = "The post demonstrates Twemoji support"
series = ["Theme", "Hugo"]
+++
If you want to use Twitter's [Twemoji](https://twemoji.twitter.com/) across your website, enable it in your `config.toml`
```toml
[params]
enableTwemoji = true
```
This will not only give your website unified emojis across all platforms. It will also give you [the latest Unicode 13 emoji set](https://blog.emojipedia.org/twemoji-13-0-emoji-changelog/), such as 🧋🫕🛻🪗🪞.
# Emoji size changes with text size 🤩
## Emoji size changes with text size 🤩
### Emoji size changes with text size 🤩
#### Emoji size changes with text size 🤩
##### Emoji size changes with text size 🤩
###### Emoji size changes with text size 🤩
---

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

32
i18n/ar.toml Normal file
View File

@@ -0,0 +1,32 @@
[category]
other = "فئة"
[tag]
other = "وَسم"
[series]
other = "سلسلة"
[reading_time]
other = "تستغرق {{ .Count }} د"
[page_not_found]
other = "الصفحة غير موجودة"
[page_does_not_exist]
other = "هذه الصفحة غير موجودة"
[head_back]
other = "بإمكانك العودة إلى <a href=\"{{ . }}\">homepage</a>."
[powered_by]
other = "بواسطة"
[author]
other = "الكاتب"
[see_also]
other = "انظر أيضاً"
[posts]
other = "المنشورات"

33
i18n/bn.toml Normal file
View File

@@ -0,0 +1,33 @@
[category]
other = "বিভাগ"
[tag]
other = "ট্যাগ"
[series]
other = "সিরিজ"
[author]
other = "লেখক"
[posts]
other = "সব পোস্ট"
[reading_time]
one = "পড়তে এক মিনিট লাগবে"
other = "পড়তে {{ .Count }} মিনিট লাগবে"
[page_not_found]
other = "পাতাটি পাওয়া যায় নি"
[page_does_not_exist]
other = "দুঃখিত, কাঙ্ক্ষিত পাতাটির অস্তিত্ব নেই"
[head_back]
other = "আপনি <a href=\"{{ . }}\">নীড়পাতায়</a> ফিরে যেতে পারেন"
[powered_by]
other = "চালনায়"
[see_also]
other = "আরও দেখুন"

26
i18n/cs.toml Normal file
View File

@@ -0,0 +1,26 @@
[category]
other = "kategorie"
[tag]
other = "tag"
[series]
other = "série"
[reading_time]
other = "Délka čtení: {{ .Count }}"
[page_not_found]
other = "Stránka nenalezena"
[page_does_not_exist]
other = "Omlouváme se, stránka nebyla nalezena."
[head_back]
other = "Můžete se vrátit na <a href=\"{{ . }}\">homepage</a>."
[powered_by]
other = "Stránka používá"
[see_also]
other = "Podívejte se také na"

View File

@@ -7,7 +7,14 @@ other = "tag"
[series] [series]
other = "series" other = "series"
[author]
other = "author"
[posts]
other = "posts"
[reading_time] [reading_time]
one = "One-minute read"
other = "{{ .Count }}-minute read" other = "{{ .Count }}-minute read"
[page_not_found] [page_not_found]
@@ -21,3 +28,6 @@ other = "You can head back to <a href=\"{{ . }}\">homepage</a>."
[powered_by] [powered_by]
other = "Powered by" other = "Powered by"
[see_also]
other = "See also in"

View File

@@ -2,23 +2,32 @@
other = "categoría" other = "categoría"
[tag] [tag]
other = "tag" other = "etiqueta"
[series] [series]
other = "serie" other = "serie"
[author]
other = "autor"
[posts]
other = "publicaciones"
[reading_time] [reading_time]
one = "Un minuto de lectura" one = "Un minuto de lectura"
other = "{{ .Count }} minutos de lectura." other = "{{ .Count }} minutos de lectura."
[page_not_found] [page_not_found]
other = "Página no existe." other = "Página no encontrada."
[page_does_not_exist] [page_does_not_exist]
other = "Disculpa, aquí no hay nada." other = "Disculpa, la página no existe."
[head_back] [head_back]
other = "Puedes regresar a la <a href=\"{{ . }}\">primera página</a>." other = "Puedes regresar a la <a href=\"{{ . }}\">página inicial</a>."
[powered_by] [powered_by]
other = "Promovido por" other = "Desarrollado por"
[see_also]
other = "También ver en"

33
i18n/fi.toml Normal file
View File

@@ -0,0 +1,33 @@
[category]
other = "kategoria"
[tag]
other = "merkki"
[series]
other = "sarja"
[author]
other = "Kirjoittaja"
[reading_time]
one = "Yksi lukuminuutti"
other = "{{ .Count }} lukuminuuttia"
[page_not_found]
other = "Sivua ei löydetty"
[page_does_not_exist]
other = "Valitettavasti tätä sivua ei ole olemassa."
[head_back]
other = "Voit palata takaisin <a href=\"{{ . }}\">kotisivulle</a>."
[powered_by]
other = "Tarjoaa"
[see_also]
other = "Katso myös"
[posts]
other = "Artikkelit"

View File

@@ -7,6 +7,9 @@ other = "tag"
[series] [series]
other = "séries" other = "séries"
[author]
other = "auteur"
[reading_time] [reading_time]
one = "Une minute de lecture" one = "Une minute de lecture"
other = "{{ .Count }} minutes de lecture" other = "{{ .Count }} minutes de lecture"
@@ -23,3 +26,8 @@ other = "Vous pouvez revenir à <a href=\"{{ . }}\">l'accueil</a>."
[powered_by] [powered_by]
other = "Propulsé par" other = "Propulsé par"
[see_also]
other = "Voir aussi dans"
[posts]
other = "Articles"

View File

@@ -7,6 +7,9 @@ other = "תגית"
[series] [series]
other = "סדרה" other = "סדרה"
[author]
other = "סופר"
[reading_time] [reading_time]
one = "דקה אחת לקרוא" one = "דקה אחת לקרוא"
other = "דקות לקרוא {{ .Count }}" other = "דקות לקרוא {{ .Count }}"
@@ -20,6 +23,12 @@ other = "מצטערים, דף אינטרנט זה אינו קיים"
[head_back] [head_back]
other = " אתה יכול לחזור<a href=\"{{ . }}\">לדף הבית</a>." other = " אתה יכול לחזור<a href=\"{{ . }}\">לדף הבית</a>."
[powered_by] [powered_by]
other = "מופעל על ידי" other = "מופעל על ידי"
[see_also]
other = "רואה עוד ב"
[posts]
other = "פוסטים"

33
i18n/hi.toml Normal file
View File

@@ -0,0 +1,33 @@
[category]
other = "श्रेणी"
[tag]
other = "टैग"
[series]
other = "श्रृंखला"
[author]
other = "लेखक"
[reading_time]
one = "एक पढ़ने का समय"
other = "{{ .Count }} पढ़ने का समय"
[page_not_found]
other = "पृष्ठ नहीं मिला"
[page_does_not_exist]
other = "क्षमा करें, यह पृष्ठ मौजूद नहीं है।"
[head_back]
other = "आप वापस आ सकते हैं <a href=\"{{ . }}\">मुखपृष्ठ</a>."
[powered_by]
other = "द्वारा संचालित"
[see_also]
other = "यह भी देखें"
[posts]
other = "सामग्री"

View File

@@ -7,6 +7,12 @@ other = "Címke"
[series] [series]
other = "Sorozat" other = "Sorozat"
[author]
other = "Szerző"
[posts]
other = "Írások"
[reading_time] [reading_time]
one = "Egyperces" one = "Egyperces"
other = "{{ .Count }} percnyi olvasnivaló" other = "{{ .Count }} percnyi olvasnivaló"
@@ -22,3 +28,6 @@ other = "Itt visszaléphet a <a href=\"{{ . }}\">Főoldalra</a>."
[powered_by] [powered_by]
other = "Motor:" other = "Motor:"
[see_also]
other = "Lásd még"

33
i18n/id.toml Normal file
View File

@@ -0,0 +1,33 @@
[category]
other = "kategori"
[tag]
other = "label"
[series]
other = "seri"
[author]
other = "penulis"
[posts]
other = "artikel"
[reading_time]
one = "bacaan satu menit"
other = "bacaan {{ .Count }} menit"
[page_not_found]
other = "Halaman tidak ditemukan"
[page_does_not_exist]
other = "Maaf, halaman ini tidak ada."
[head_back]
other = "Anda dapat kembali ke <a href=\"{{ . }}\">beranda</a>."
[powered_by]
other = "Dipersembahkan oleh"
[see_also]
other = "artikel terkait"

View File

@@ -5,11 +5,17 @@ other = "categoria"
other = "tag" other = "tag"
[series] [series]
other = "series" other = "serie"
[author]
other = "autore"
[posts]
other = "post"
[reading_time] [reading_time]
one = "Lettura di un minuto" one = "Lettura di un minuto"
other = "{{ .Count }} minuti letti" other = "{{ .Count }} minuti di lettura"
[page_not_found] [page_not_found]
other = "Pagina non trovata" other = "Pagina non trovata"
@@ -18,7 +24,10 @@ other = "Pagina non trovata"
other = "Siamo spiacenti, questa pagina non esiste." other = "Siamo spiacenti, questa pagina non esiste."
[head_back] [head_back]
other = "Puoi tornare a <a href=\"{{ . }}\">homepage</a>." other = "Torna alla <a href=\"{{ . }}\">homepage</a>."
[powered_by] [powered_by]
other = "Alimentato da" other = "Generato da"
[see_also]
other = "Vedi anche in"

View File

@@ -7,6 +7,12 @@ other = "タグ"
[series] [series]
other = "シリーズ" other = "シリーズ"
[author]
other = "筆者"
[posts]
other = "記事"
[reading_time] [reading_time]
one = "1分で読めます" one = "1分で読めます"
other = "{{ .Count }}分で読めます" other = "{{ .Count }}分で読めます"
@@ -18,7 +24,10 @@ other = "ページが見つかりません"
other = "申し訳ございません。アクセスしようとしたページが見つかりませんでした。" other = "申し訳ございません。アクセスしようとしたページが見つかりませんでした。"
[head_back] [head_back]
other = "<a href=\"{{ . }}\">ホームページ</a>からお探しいただきますようお願い申し上げます。" other = "<a href=\"{{ . }}\">トップページ</a>からお探しいただきますようお願い申し上げます。"
[powered_by] [powered_by]
other = "利用技術" other = "利用技術"
[see_also]
other = "関連記事:"

33
i18n/ko.toml Normal file
View File

@@ -0,0 +1,33 @@
[category]
other = "카테고리"
[tag]
other = "태그"
[series]
other = "시리즈"
[author]
other = "저자"
[posts]
other = "포스트"
[reading_time]
one = "읽는데 1분"
other = "읽는데 {{ .Count }}분"
[page_not_found]
other = "페이지를 찾을 수 없습니다."
[page_does_not_exist]
other = "해당 페이지가 존재하지 않습니다."
[head_back]
other = "<a href=\"{{ . }}\">홈페이지</a>로 돌아가기"
[powered_by]
other = "Powered by"
[see_also]
other = "관련 글:"

27
i18n/ms.toml Normal file
View File

@@ -0,0 +1,27 @@
[category]
other = "kategori"
[tag]
other = "teg"
[series]
other = "siri"
[reading_time]
one = "Bacaan 1 minit"
other = "Bacaan {{ .Count }} minit"
[page_not_found]
other = "Halaman Tidak Dijumpai"
[page_does_not_exist]
other = "Maaf, halaman ini tidak wujud."
[head_back]
other = "Kembali ke <a href=\"{{ . }}\">halaman utama</a>."
[powered_by]
other = "Dikuasakan oleh"
[see_also]
other = "Lihat juga"

24
i18n/nl.toml Normal file
View File

@@ -0,0 +1,24 @@
[category]
other = "Categorie"
[tag]
other = "Label"
[series]
other = "Serie"
[reading_time]
one = "Een minuut leestijd"
other = "{{ .Count }} minuten leestijd"
[page_not_found]
other = "Pagina niet gevonden"
[page_does_not_exist]
other = "Sorry, deze pagina bestaat niet."
[head_back]
other = "U kunt terugkeren naar de <a href=\"{{ . }}\">thuispagina</a>."
[powered_by]
other = "Aangedreven door"

View File

@@ -7,8 +7,15 @@ other = "tag"
[series] [series]
other = "seria" other = "seria"
[author]
other = "autor(ka)"
[posts]
other = "posty"
[reading_time] [reading_time]
other = "czas czytania: {{ .Count }} min" one = "1 min czytania"
other = "{{ .Count }} min czytania"
[page_not_found] [page_not_found]
other = "Nie znaleziono strony" other = "Nie znaleziono strony"
@@ -21,3 +28,6 @@ other = "Możesz wrócić na <a href=\"{{ . }}\">stronę domową</a>."
[powered_by] [powered_by]
other = "Napędzane przez" other = "Napędzane przez"
[see_also]
other = "Zobacz również"

View File

@@ -7,6 +7,12 @@ other = "tag"
[series] [series]
other = "séries" other = "séries"
[author]
other = "autor"
[posts]
other = "artigos"
[reading_time] [reading_time]
one = "Um minuto de leitura" one = "Um minuto de leitura"
other = "{{ .Count }} minutos de leitura" other = "{{ .Count }} minutos de leitura"

33
i18n/ro.toml Normal file
View File

@@ -0,0 +1,33 @@
[category]
other = "categorie"
[tag]
other = "etichetă"
[series]
other = "serie"
[author]
other = "autor"
[posts]
other = "articole"
[reading_time]
one = "Un minut de lectură"
other = "{{ .Count }} {{ if lt .Count 20 }}minute{{ else }}de minute{{ end }} de lectură"
[page_not_found]
other = "Pagină Pierdută"
[page_does_not_exist]
other = "Ne pare rău, această pagină nu există."
[head_back]
other = "Poți să te întorci la <a href=\"{{ . }}\">pagina principală</a>."
[powered_by]
other = "Susținut de"
[see_also]
other = "Altele din seria"

View File

@@ -9,7 +9,8 @@ other = "серии"
[reading_time] [reading_time]
one = "Читать одну минуту" one = "Читать одну минуту"
other = "Читать около {{ .Count }} минут" few = "Читать около {{ .Count }} минут"
many = "Читать около {{ .Count }} минут"
[page_not_found] [page_not_found]
other = "Страница не найдена" other = "Страница не найдена"
@@ -22,3 +23,12 @@ other = "Можете вернуться обратно на <a href=\"{{ . }}\"
[powered_by] [powered_by]
other = "Работает на" other = "Работает на"
[author]
other = "автор"
[posts]
other = "статьи"
[see_also]
other = "Также смотреть"

View File

@@ -1,3 +1,6 @@
[posts]
other = "články"
[category] [category]
other = "kategória" other = "kategória"
@@ -9,6 +12,8 @@ other = "diel"
[reading_time] [reading_time]
one = "Prečítate si za minútu" one = "Prečítate si za minútu"
few = "Prečítate si do {{ .Count }} minút"
many = "Prečítate si do {{ .Count }} minút"
other = "Prečítate si do {{ .Count }} minút" other = "Prečítate si do {{ .Count }} minút"
[page_not_found] [page_not_found]
@@ -20,5 +25,11 @@ other = "Prepáčte, ale táto stránka neexistuje."
[head_back] [head_back]
other = "Späť na <a href=\"{{ . }}\">domácu stránku</a>." other = "Späť na <a href=\"{{ . }}\">domácu stránku</a>."
[see_also]
other = "Pozrite tiež"
[author]
other = "autor"
[powered_by] [powered_by]
other = "Táto stránka bola vytvorená cez" other = "Táto stránka bola vytvorená cez"

View File

@@ -7,6 +7,9 @@ other = "tag"
[series] [series]
other = "dizi" other = "dizi"
[author]
other = "yazar"
[reading_time] [reading_time]
one = "Bir dakikalık okuma" one = "Bir dakikalık okuma"
other = "{{ .Count }} dakikalık okuma" other = "{{ .Count }} dakikalık okuma"
@@ -22,3 +25,9 @@ other = "<a href=\"{{ . }}\">Ana sayfaya</a> dönebilirsiniz."
[powered_by] [powered_by]
other = "Site program altyapısı" other = "Site program altyapısı"
[see_also]
other = "Ayrıca bakınız"
[posts]
other = "Gönderiler"

View File

@@ -7,9 +7,15 @@ other = "标签"
[series] [series]
other = "系列" other = "系列"
[author]
other = "作者"
[posts]
other = "文章"
[reading_time] [reading_time]
one = "1分钟阅读时间" one = "阅读时间1 分钟"
other = "{{ .Count }} 分钟阅读时间" other = "阅读时间:{{ .Count }} 分钟"
[page_not_found] [page_not_found]
other = "找不到页面" other = "找不到页面"
@@ -18,7 +24,10 @@ other = "找不到页面"
other = "此页面不存在" other = "此页面不存在"
[head_back] [head_back]
other = "返回 <a href=\"{{ . }}\">主页面</a>." other = "返回 <a href=\"{{ . }}\">首页</a>."
[powered_by] [powered_by]
other = "技术支持" other = "技术支持"
[see_also]
other = "参见"

33
i18n/zh-tw.toml Normal file
View File

@@ -0,0 +1,33 @@
[category]
other = "分類"
[tag]
other = "標籤"
[series]
other = "系列"
[author]
other = "作者"
[reading_time]
one = "閱讀時間 1 分鐘"
other = "閱讀時間 {{ .Count }} 分鐘"
[page_not_found]
other = "找不到頁面"
[page_does_not_exist]
other = "此頁面不存在"
[head_back]
other = "返回 <a href=\"{{ . }}\">首頁</a>."
[powered_by]
other = "技術支援"
[see_also]
other = "參見"
[posts]
other = "文章"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

View File

@@ -0,0 +1,6 @@
<h{{ .Level }} id="{{ .Anchor | safeURL }}">
{{ .Text | safeHTML }}
<a class="heading-link" href="#{{ .Anchor | safeURL }}">
<i class="fa fa-link" aria-hidden="true"></i>
</a>
</h{{ .Level }}>

View File

@@ -4,26 +4,27 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Language" content="{{ .Site.Language.Lang }}">
{{ if .Site.Params.csp }}
{{ partial "csp.html" . }}
{{ end }}
{{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }} {{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
{{ with .Site.Params.description }}<meta name="description" content="{{ . }}">{{ end }} <meta name="description" content="{{ .Description | default (.Summary | default .Site.Params.description ) }}">
{{ with .Site.Params.keywords }}<meta name="keywords" content="{{ . }}">{{ end }} <meta name="keywords" content="{{ (delimit .Keywords ",") | default .Site.Params.keywords }}">
{{ template "_internal/twitter_cards.html" . }} {{ template "_internal/twitter_cards.html" . }}
{{ template "_internal/opengraph.html" . }} {{ template "_internal/opengraph.html" . }}
{{ if .Permalink }}
<base href="{{ .Permalink }}">
{{ end }}
<title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title> <title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>
{{ if .Permalink }} {{ if .Permalink }}
<link rel="canonical" href="{{ .Permalink }}"> <link rel="canonical" href="{{ .Permalink }}">
{{ end }} {{ end }}
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css?family=Lato:400,700%7CMerriweather:300,700%7CSource+Code+Pro:400,700&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Lato:400,700%7CMerriweather:300,700%7CSource+Code+Pro:400,700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.11.2/css/all.css" integrity="sha384-KA6wR/X5RY4zFAHpv/CnoG2UW1uogYfdnP67Uv7eULvTveboZJg0qUpmJZb5VqzN" crossorigin="anonymous" /> <link rel="preload" href="/fonts/forkawesome-webfont.woff2?v=1.1.7" as="font" type="font/woff2" crossorigin>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css" integrity="sha256-l85OmPOjvil/SOvVt3HnSSjzF1TUMyT9eV0c2BzEGzU=" crossorigin="anonymous" />
{{ if .Site.IsServer }} {{ if .Site.IsServer }}
{{ $cssOpts := (dict "targetPath" "css/coder.css" "enableSourceMap" true ) }} {{ $cssOpts := (dict "targetPath" "css/coder.css" "enableSourceMap" true ) }}
@@ -47,7 +48,7 @@
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ if or (eq .Site.Params.colorscheme "auto") (eq .Site.Params.colorscheme "dark") }} {{ if or (eq .Site.Params.colorScheme "auto") (eq .Site.Params.colorScheme "dark") }}
{{ if .Site.IsServer }} {{ if .Site.IsServer }}
{{ $cssOpts := (dict "targetPath" "css/coder-dark.css" "enableSourceMap" true ) }} {{ $cssOpts := (dict "targetPath" "css/coder-dark.css" "enableSourceMap" true ) }}
{{ $styles := resources.Get "scss/coder-dark.scss" | resources.ExecuteAsTemplate "style.coder-dark.css" . | toCSS $cssOpts }} {{ $styles := resources.Get "scss/coder-dark.scss" | resources.ExecuteAsTemplate "style.coder-dark.css" . | toCSS $cssOpts }}
@@ -59,15 +60,11 @@
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ range .Site.Params.custom_css }} {{ range .Site.Params.customCSS }}
<link rel="stylesheet" href="{{ . | relURL }}" /> <link rel="stylesheet" href="{{ . | relURL }}" />
{{ end }} {{ end }}
{{ range .Site.Params.custom_js }} {{ range .Site.Params.customSCSS }}
<script src="{{ . | relURL }}"></script>
{{ end }}
{{ range .Site.Params.custom_scss }}
{{/* We don't change the targetPath to because it's transparent to users */}} {{/* We don't change the targetPath to because it's transparent to users */}}
{{ if $.Site.IsServer }} {{ if $.Site.IsServer }}
{{ $cssOpts := (dict "enableSourceMap" true ) }} {{ $cssOpts := (dict "enableSourceMap" true ) }}
@@ -79,23 +76,34 @@
{{ end }} {{ end }}
{{ end }} {{ end }}
<link rel="icon" type="image/png" href="{{ .Site.Params.favicon_32 | default "/images/favicon-32x32.png" | absURL }}" sizes="32x32"> <link rel="icon" type="image/png" href="{{ .Site.Params.favicon_32 | default "/images/favicon-32x32.png" | relURL }}" sizes="32x32">
<link rel="icon" type="image/png" href="{{ .Site.Params.favicon_16 | default "/images/favicon-16x16.png" | absURL }}" sizes="16x16"> <link rel="icon" type="image/png" href="{{ .Site.Params.favicon_16 | default "/images/favicon-16x16.png" | relURL }}" sizes="16x16">
<link rel="apple-touch-icon" href="{{ .Site.Params.touchicon | default "/images/apple-touch-icon.png" | relURL }}">
<link rel="apple-touch-icon" sizes="180x180" href="{{ .Site.Params.touchicon | default "/images/apple-touch-icon.png" | relURL }}">
{{ range .AlternativeOutputFormats -}} {{ range .AlternativeOutputFormats -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
{{ end -}} {{ end -}}
{{ if .Site.Params.enableTwemoji }}
<script defer src="https://twemoji.maxcdn.com/v/13.0.1/twemoji.min.js"
integrity="sha384-5f4X0lBluNY/Ib4VhGx0Pf6iDCF99VGXJIyYy7dDLY5QlEd7Ap0hICSSZA1XYbc4" crossorigin="anonymous"></script>
{{ end }}
{{ hugo.Generator }} {{ hugo.Generator }}
</head> </head>
{{ $csClass := "colorscheme-light" }} {{ $csClass := "colorscheme-light" }}
{{ if eq .Site.Params.colorscheme "dark" }} {{ if eq .Site.Params.colorScheme "dark" }}
{{ $csClass = "colorscheme-dark" }} {{ $csClass = "colorscheme-dark" }}
{{ else if eq .Site.Params.colorscheme "auto" }} {{ else if eq .Site.Params.colorScheme "auto" }}
{{ $csClass = "colorscheme-auto" }} {{ $csClass = "colorscheme-auto" }}
{{ end }} {{ end }}
<body class="{{ $csClass }}{{ if .Site.Params.rtl }} rtl{{ end }}"> <body class="{{ $csClass }}{{ if .Site.Params.rtl }} rtl{{ end }}"
onload="{{ if .Site.Params.enableTwemoji }} twemoji.parse(document.body); {{ end }}"
>
{{ partial "float" . }}
<main class="wrapper"> <main class="wrapper">
{{ partial "header.html" . }} {{ partial "header.html" . }}
@@ -106,12 +114,41 @@
{{ partial "footer.html" . }} {{ partial "footer.html" . }}
</main> </main>
{{ if not .Site.Params.hideColorSchemeToggle }}
{{ if .Site.IsServer }}
{{ $script := resources.Get "js/dark-mode.js" }}
<script src="{{ $script.RelPermalink }}"></script>
{{ else }}
{{ $script := resources.Get "js/dark-mode.js" | minify | fingerprint }}
<script src="{{ $script.RelPermalink }}"></script>
{{ end }}
{{ end }}
{{ range .Site.Params.customJS }}
<script src="{{ . | relURL }}"></script>
{{ end }}
{{ template "_internal/google_analytics.html" . }} {{ template "_internal/google_analytics.html" . }}
{{ if and .Site.Params.fathomAnalytics .Site.Params.fathomAnalytics.siteID }} {{ if and .Site.Params.fathomAnalytics .Site.Params.fathomAnalytics.siteID }}
{{- partial "analytics/fathom" . -}} {{- partial "analytics/fathom" . -}}
{{ end }} {{ end }}
{{ if and .Site.Params.plausibleAnalytics .Site.Params.plausibleAnalytics.domain }}
{{- partial "analytics/plausible" . -}}
{{ end }}
{{ if and .Site.Params.goatCounter .Site.Params.goatCounter.code }}
{{- partial "analytics/goatcounter" . -}}
{{ end }}
{{ if and .Site.Params.cloudflare .Site.Params.cloudflare.token }}
{{- partial "analytics/cloudflare" . -}}
{{ end }}
{{ if and .Site.Params.matomo .Site.Params.matomo.serverURL }}
{{- partial "analytics/matomo" . -}}
{{ end }}
</body> </body>
</html> </html>

View File

@@ -1,5 +1,5 @@
{{ define "title" }} {{ define "title" }}
{{- if eq .Kind "taxonomy" -}} {{- if eq .Kind "term" -}}
{{- i18n .Data.Singular | title -}} {{- i18n .Data.Singular | title -}}
{{- print ": " -}} {{- print ": " -}}
{{- end -}} {{- end -}}

View File

@@ -3,4 +3,5 @@
{{ end }} {{ end }}
{{ define "content" }} {{ define "content" }}
{{ partial "page.html" . }} {{ partial "page.html" . }}
{{ partial "posts/math.html" . }}
{{ end }} {{ end }}

View File

@@ -0,0 +1,4 @@
<!-- Cloudflare Web Analytics -->
<script defer src='https://static.cloudflareinsights.com/beacon.min.js'
data-cf-beacon='{"token": "{{ $.Site.Params.cloudflare.token }}"}'></script>
<!-- End Cloudflare Web Analytics -->

View File

@@ -0,0 +1,2 @@
<script data-goatcounter="https://{{ $.Site.Params.goatCounter.code }}.goatcounter.com/count"
async src="//gc.zgo.at/count.js"></script>

View File

@@ -0,0 +1,13 @@
<script type="application/javascript">
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://{{ $.Site.Params.matomo.serverURL }}/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '{{ $.Site.Params.matomo.siteID | default "1" }}']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>

View File

@@ -0,0 +1 @@
<script async defer data-domain="{{ .Site.Params.plausibleAnalytics.domain }}" src="https://{{ .Site.Params.plausibleAnalytics.serverURL | default "plausible.io" }}/js/plausible.js"></script>

View File

@@ -0,0 +1 @@
{{ printf `<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests; block-all-mixed-content; default-src 'self'; child-src %s; font-src %s; form-action %s; frame-src %s; img-src %s; object-src %s; style-src %s; script-src %s; prefetch-src %s;">` (delimit .Site.Params.csp.childsrc " ") (delimit .Site.Params.csp.fontsrc " ") (delimit .Site.Params.csp.formaction " ") (delimit .Site.Params.csp.framesrc " ") (delimit .Site.Params.csp.imgsrc " ") (delimit .Site.Params.csp.objectsrc " ") (delimit .Site.Params.csp.stylesrc " ") (delimit .Site.Params.csp.scriptsrc " ") (delimit .Site.Params.csp.prefetchsrc " ") | safeHTML }}

View File

@@ -0,0 +1,7 @@
{{ if not .Site.Params.hideColorSchemeToggle }}
<div class="float-container">
<a id="dark-mode-toggle" class="colorscheme-toggle">
<i class="fa fa-adjust fa-fw" aria-hidden="true"></i>
</a>
</div>
{{ end }}

View File

@@ -1,7 +1,7 @@
{{ if not .Site.Params.hideFooter | default false }} {{ if not .Site.Params.hideFooter | default false }}
<footer class="footer"> <footer class="footer">
<section class="container"> <section class="container">
{{ with .Site.Params.footercontent | safeHTML }} {{ with .Site.Params.footerContent | safeHTML }}
<p>{{ . }}</p> <p>{{ . }}</p>
{{ end }} {{ end }}
{{ if not .Site.Params.hideCopyright }} {{ if not .Site.Params.hideCopyright }}
@@ -10,7 +10,7 @@
{{ .Site.Params.since }} - {{ .Site.Params.since }} -
{{ end }} {{ end }}
{{ now.Year }} {{ now.Year }}
{{ with .Site.Params.Author }} {{ . }} {{ end }} {{ with .Site.Params.author }} {{ . }} {{ end }}
{{ end }} {{ end }}
{{ if not .Site.Params.hideCredits }} {{ if not .Site.Params.hideCredits }}
{{ if not .Site.Params.hideCopyright }} · {{ end }} {{ if not .Site.Params.hideCopyright }} · {{ end }}

View File

@@ -5,19 +5,21 @@
</a> </a>
{{ if or .Site.Menus.main .Site.IsMultiLingual }} {{ if or .Site.Menus.main .Site.IsMultiLingual }}
<input type="checkbox" id="menu-toggle" /> <input type="checkbox" id="menu-toggle" />
<label class="menu-button float-right" for="menu-toggle"><i class="fas fa-bars"></i></label> <label class="menu-button float-right" for="menu-toggle">
<i class="fa fa-bars fa-fw" aria-hidden="true"></i>
</label>
<ul class="navigation-list"> <ul class="navigation-list">
{{ with .Site.Menus.main}} {{ with .Site.Menus.main}}
{{ range sort . }} {{ range sort . }}
<li class="navigation-item"> <li class="navigation-item">
<a class="navigation-link" href="{{ .URL | absLangURL }}">{{ .Name }}</a> <a class="navigation-link" href="{{ .URL | relLangURL }}">{{ .Name }}</a>
</li> </li>
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ if .Site.IsMultiLingual }} {{ if .Site.IsMultiLingual }}
{{ $node := . }} {{ $node := . }}
{{ .Scratch.Set "separator" true }} {{ .Scratch.Set "separator" true }}
{{ range .Translations }} {{ range (default .Site.Home.AllTranslations .Translations) }}
{{ if ne $.Site.Language .Language }} {{ if ne $.Site.Language .Language }}
{{ if $node.Scratch.Get "separator" }} {{ if $node.Scratch.Get "separator" }}
<li class="navigation-item menu-separator"> <li class="navigation-item menu-separator">

View File

@@ -1,7 +1,7 @@
<section class="container centered"> <section class="container centered">
<div class="about"> <div class="about">
{{ if and (isset .Site.Params "avatarurl") (not (isset .Site.Params "gravatar")) }} {{ if and (isset .Site.Params "avatarurl") (not (isset .Site.Params "gravatar")) }}
{{ with .Site.Params.avatarurl }} {{ with .Site.Params.avatarURL }}
<div class="avatar"><img src="{{ . | relURL }}" alt="avatar"></div> <div class="avatar"><img src="{{ . | relURL }}" alt="avatar"></div>
{{ end }} {{ end }}
{{ end }} {{ end }}
@@ -15,13 +15,13 @@
{{ range sort . "weight" }} {{ range sort . "weight" }}
{{ if .icon }} {{ if .icon }}
<li> <li>
<a href="{{ .url }}" aria-label="{{ .name }}" {{ if .rel }}rel="{{ .rel }}"{{ end }} {{ if .target }}target="{{ .target }}"{{ end }} {{ if .type }}type="{{ .type }}"{{ end }}> <a href="{{ .url | safeURL }}" aria-label="{{ .name }}" {{ if .rel }}rel="{{ .rel }}"{{ end }} {{ if .target }}target="{{ .target }}"{{ end }} {{ if .type }}type="{{ .type }}"{{ end }}>
<i class="{{ .icon }}" aria-hidden="true"></i> <i class="{{ .icon }}" aria-hidden="true"></i>
</a> </a>
</li> </li>
{{ else }} {{ else }}
<li> <li>
<a href="{{ .url }}" aria-label="{{ .name }}" {{ if .rel }}rel="{{ .rel }}"{{ end }} {{ if .target }}target="{{ .target }}"{{ end }}>{{ .name }}</a> <a href="{{ .url | safeURL }}" aria-label="{{ .name }}" {{ if .rel }}rel="{{ .rel }}"{{ end }} {{ if .target }}target="{{ .target }}"{{ end }}>{{ .name }}</a>
</li> </li>
{{ end }} {{ end }}
{{ end }} {{ end }}

View File

@@ -1,18 +1,20 @@
<section class="container list"> <section class="container list">
<h1 class="title"> <h1 class="title">
{{- if eq .Kind "taxonomy" -}} <a class="title-link" href="{{ .Permalink | safeURL }}">
{{- if eq .Kind "term" -}}
{{- i18n .Data.Singular | title -}} {{- i18n .Data.Singular | title -}}
{{- print ": " -}} {{- print ": " -}}
{{- end -}} {{- end -}}
{{- .Title -}} {{- .Title -}}
</a>
</h1> </h1>
{{ .Content }} {{ .Content }}
<ul> <ul>
{{ range .Paginator.Pages }} {{ range .Paginator.Pages }}
<li> <li>
<span class="date">{{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006" ) }}</span> <span class="date">{{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006" ) }}</span>
<a class="title" href="{{ .Params.ExternalLink | default .RelPermalink }}">{{ .Title }}</a> <a class="title" href="{{ .Params.externalLink | default .RelPermalink }}">{{ .Title }}</a>
</li> </li>
{{ end }} {{ end }}
</ul> </ul>

View File

@@ -1,7 +1,11 @@
<section class="container page"> <section class="container page">
<article> <article>
<header> <header>
<h1>{{ .Title }}</h1> <h1 class="title">
<a class="title-link" href="{{ .Permalink | safeURL }}">
{{ .Title }}
</a>
</h1>
</header> </header>
{{ .Content }} {{ .Content }}

View File

@@ -1,4 +1,4 @@
{{- if and (isset .Site.Params "commentourl") (not (eq .Site.Params.commentoUrl "" )) (eq (.Params.disable_comments | default false) false) -}} {{- if and (isset .Site.Params "commentourl") (not (eq .Site.Params.commentoURL "" )) (eq (.Params.disableComments | default false) false) -}}
<div id="commento"></div> <div id="commento"></div>
<script src="{{ .Site.Params.commentoUrl }}/js/commento.js"></script> <script src="{{ .Site.Params.commentoURL }}/js/commento.js"></script>
{{- end -}} {{- end -}}

View File

@@ -1,3 +1,3 @@
{{- if and (not (eq (.Site.DisqusShortname | default "") "")) (eq (.Params.disable_comments | default false) false) -}} {{- if and (not (eq (.Site.DisqusShortname | default "") "")) (eq (.Params.disableComments | default false) false) -}}
{{ template "_internal/disqus.html" . }} {{ template "_internal/disqus.html" . }}
{{- end -}} {{- end -}}

View File

@@ -1,7 +1,7 @@
{{- if or (.Params.math) (.Site.Params.math) -}} {{- if or (.Params.math) (.Site.Params.math) -}}
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script> <script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script type="text/javascript" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script> {{/* The file is already minified */}}
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/startup.js" id="MathJax-script"></script> <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<script> <script>
MathJax = { MathJax = {
tex: { tex: {
@@ -18,9 +18,13 @@
</script> </script>
{{- end -}} {{- end -}}
{{- if or (.Params.katex) (.Site.Params.katex) -}} {{- if or (.Params.katex) (.Site.Params.katex) -}}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.10.1/dist/katex.min.css" integrity="sha384-dbVIfZGuN1Yq7/1Ocstc1lUEm+AT+/rCkibIcC/OmWo5f0EA48Vf8CytHzGrSwbQ" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.css"
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.10.1/dist/katex.min.js" integrity="sha384-2BKqo+exmr9su6dir+qCw08N2ZKRucY4PrGQPPWU1A7FtlCGjmEGFqXCv5nyM5Ij" crossorigin="anonymous"></script> integrity="sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.10.1/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous" {{/* The loading of KaTeX is deferred to speed up page rendering */}}
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.js"
integrity="sha384-g7c+Jr9ZivxKLnZTDUhnkOnsh30B4H0rpLUpJ4jAIKs4fnJI+sEnkvrMWph2EDg4" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/contrib/auto-render.min.js"
integrity="sha384-mll67QQFJfxn0IYznZYonOWZ644AWYC+Pt2cHqMaRhXVrursRwvLnLaebdGIlYNa" crossorigin="anonymous"
onload="renderMathInElement(document.body, onload="renderMathInElement(document.body,
{ {
delimiters: [ delimiters: [
@@ -30,6 +34,5 @@
{left: '\\[', right: '\\]', display: true} {left: '\\[', right: '\\]', display: true}
] ]
} }
);"> );"></script>
</script>
{{- end -}} {{- end -}}

View File

@@ -5,14 +5,19 @@
{{ $name := . | urlize }} {{ $name := . | urlize }}
{{ $series := index $.Site.Taxonomies.series $name }} {{ $series := index $.Site.Taxonomies.series $name }}
{{ if gt (len $series.Pages) 1 }} {{ if gt (len $series.Pages) 1 }}
<h3>See also in {{ . }}</h3> <h3 id="{{ i18n "see_also" | default "See also in" | anchorize }}-{{ anchorize . | safeURL }}">
{{ i18n "see_also" | default "See also in" }} {{ . }}
<a class="heading-link" href="#{{ i18n "see_also" | default "See also in" | anchorize }}-{{ anchorize . | safeURL }}">
<i class="fa fa-link" aria-hidden="true"></i>
</a>
</h3>
<nav> <nav>
<ul> <ul>
{{ $maxItems := $.Site.Params.maxSeeAlsoItems | default 5 }} {{ $maxItems := $.Site.Params.maxSeeAlsoItems | default 5 }}
{{ range first (add $maxItems 1) $series.Pages }} {{ range first (add $maxItems 1) $series.Pages }}
{{ if ne .RelPermalink $currentPageUrl }} {{ if ne .RelPermalink $currentPageUrl }}
<li> <li>
<a href="{{ .Params.ExternalLink | default .RelPermalink }}">{{ .Title }}</a> <a href="{{ .Params.externalLink | default .RelPermalink }}">{{ .Title }}</a>
</li> </li>
{{ end }} {{ end }}
{{ end }} {{ end }}

View File

@@ -1,11 +0,0 @@
{{- if isset .Site.Params "utteranc" -}}
{{- if and (isset .Site.Params.utteranc "repo") (not (eq .Site.Params.utteranc.repo "" )) (eq (.Params.disable_comments | default false) false) -}}
<script src="https://utteranc.es/client.js"
repo= "{{ .Site.Params.utteranc.repo }}"
issue-term="{{ default "title" .Site.Params.utteranc.issueTerm }}"
theme="{{ default "github-light" .Site.Params.utteranc.theme }}"
crossorigin="anonymous"
async>
</script>
{{- end -}}
{{- end -}}

View File

@@ -0,0 +1,12 @@
{{- if isset .Site.Params "utterances" -}}
{{- if and (isset .Site.Params.utterances "repo") (not (eq .Site.Params.utterances.repo "" )) (eq (.Params.disable_comments | default false) false) -}}
<script src="https://utteranc.es/client.js"
repo= "{{ .Site.Params.utterances.repo }}"
issue-term="{{ default "title" .Site.Params.utterances.issueTerm }}"
{{ if isset .Site.Params.utterances "label" }}label="{{ .Site.Params.utterances.label }}"{{ end }}
theme="{{ default "github-light" .Site.Params.utterances.theme }}"
crossorigin="anonymous"
async>
</script>
{{- end -}}
{{- end -}}

View File

@@ -0,0 +1,9 @@
<div class="authors">
<i class="fa fa-user" aria-hidden="true"></i>
{{- range $index, $el := . -}}
{{- if gt $index 0 }}
<span class="separator"></span>
{{- end }}
<a href="{{ ( printf "authors/%s/" ( . | urlize ) ) | relLangURL }}">{{ . }}</a>
{{- end -}}
</div>

View File

@@ -1,5 +1,5 @@
<div class="categories"> <div class="categories">
<i class="fas fa-folder"></i> <i class="fa fa-folder" aria-hidden="true"></i>
{{- range $index, $el := . -}} {{- range $index, $el := . -}}
{{- if gt $index 0 }} {{- if gt $index 0 }}
<span class="separator"></span> <span class="separator"></span>

View File

@@ -1,5 +1,5 @@
<div class="tags"> <div class="tags">
<i class="fas fa-tag"></i> <i class="fa fa-tag" aria-hidden="true"></i>
{{- range $index, $el := . -}} {{- range $index, $el := . -}}
{{- if gt $index 0 }} {{- if gt $index 0 }}
<span class="separator"></span> <span class="separator"></span>

View File

@@ -1,4 +1,4 @@
<li> <li>
<span class="date">{{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006" ) }}</span> <span class="date">{{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006" ) }}</span>
<a class="title" href="{{ .Params.ExternalLink | default .RelPermalink }}">{{ .Title }}</a> <a class="title" href="{{ .Params.externalLink | default .RelPermalink }}">{{ .Title }}</a>
</li> </li>

View File

@@ -1,10 +1,14 @@
{{ define "title" }} {{ define "title" }}
{{ .Title }} · {{ .Site.Title }} {{ title (i18n (lower .Title)) | default .Title }} · {{ .Site.Title }}
{{ end }} {{ end }}
{{ define "content" }} {{ define "content" }}
<section class="container list"> <section class="container list">
<h1 class="title">{{ .Title }}</h1> <h1 class="title">
<a class="title-link" href="{{ .Permalink | safeURL }}">
{{ title (i18n (lower .Title)) | default .Title }}
</a>
</h1>
{{ .Content }}
<ul> <ul>
{{- range .Paginator.Pages -}} {{- range .Paginator.Pages -}}
{{- .Render "li" -}} {{- .Render "li" -}}

View File

@@ -7,29 +7,34 @@
<article> <article>
<header> <header>
<div class="post-title"> <div class="post-title">
<h1 class="title">{{ .Title }}</h1> <h1 class="title">
<a class="title-link" href="{{ .Permalink | safeURL }}">
{{ .Title }}
</a>
</h1>
</div> </div>
<div class="post-meta"> <div class="post-meta">
<div class="date"> <div class="date">
<span class="posted-on"> <span class="posted-on">
<i class="fas fa-calendar"></i> <i class="fa fa-calendar" aria-hidden="true"></i>
<time datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'> <time datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'>
{{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006" ) }} {{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006" ) }}
</time> </time>
</span> </span>
<span class="reading-time"> <span class="reading-time">
<i class="fas fa-clock"></i> <i class="fa fa-clock-o" aria-hidden="true"></i>
{{ i18n "reading_time" .ReadingTime }} {{ i18n "reading_time" .ReadingTime }}
</span> </span>
</div> </div>
{{ with .Page.Params.Authors }}{{ partial "taxonomy/authors.html" . }}{{ end }}
{{ with .Page.Params.Categories }}{{ partial "taxonomy/categories.html" . }}{{ end }} {{ with .Page.Params.Categories }}{{ partial "taxonomy/categories.html" . }}{{ end }}
{{ with .Page.Params.Tags }}{{ partial "taxonomy/tags.html" . }}{{ end }} {{ with .Page.Params.Tags }}{{ partial "taxonomy/tags.html" . }}{{ end }}
</div> </div>
</header> </header>
<div> <div>
{{ if .Params.featured_image }} {{ if .Params.featuredImage }}
<img src='{{ .Params.featured_image }}' alt="Featured image"/> <img src='{{ .Params.featuredImage }}' alt="Featured image"/>
{{ end }} {{ end }}
{{ .Content }} {{ .Content }}
</div> </div>
@@ -39,7 +44,7 @@
{{ partial "posts/series.html" . }} {{ partial "posts/series.html" . }}
{{ partial "posts/disqus.html" . }} {{ partial "posts/disqus.html" . }}
{{ partial "posts/commento.html" . }} {{ partial "posts/commento.html" . }}
{{ partial "posts/utteranc.html" . }} {{ partial "posts/utterances.html" . }}
</footer> </footer>
</article> </article>

View File

@@ -3,10 +3,10 @@
command = "make prepare && hugo --source demo --baseURL $URL" command = "make prepare && hugo --source demo --baseURL $URL"
[context.production.environment] [context.production.environment]
HUGO_VERSION = "0.54.0" HUGO_VERSION = "0.73.0"
[context.deploy-preview] [context.deploy-preview]
command = "make prepare && hugo --source demo --buildFuture --buildDrafts --baseURL $DEPLOY_PRIME_URL" command = "make prepare && hugo --source demo --buildFuture --buildDrafts --baseURL $DEPLOY_PRIME_URL"
[context.deploy-preview.environment] [context.deploy-preview.environment]
HUGO_VERSION = "0.54.0" HUGO_VERSION = "0.73.0"

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
{"Target":"css/coder-dark.min.83a2010dac9f59f943b3004cd6c4f230507ad036da635d3621401d42ec4e2835.css","MediaType":"text/css","Data":{"Integrity":"sha256-g6IBDayfWflDswBM1sTyMFB60DbaY102IUAdQuxOKDU="}} {"Target":"css/coder-dark.min.89c82b6022b96f77aeb521b240daec4f87ea029d84d1c78b8acd0735b91b3c92.css","MediaType":"text/css","Data":{"Integrity":"sha256-icgrYCK5b3eutSGyQNrsT4fqAp2E0ceLis0HNbkbPJI="}}

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
{"Target":"css/coder.min.a4f332213a21ce8eb521670c614470c58923aaaf385e2a73982c31dd7642decb.css","MediaType":"text/css","Data":{"Integrity":"sha256-pPMyITohzo61IWcMYURwxYkjqq84XipzmCwx3XZC3ss="}} {"Target":"css/coder.min.f48a4da9bd32cecaff90717ae85529411dd087c10fc0dfca9c9c329c7327e5e1.css","MediaType":"text/css","Data":{"Integrity":"sha256-9IpNqb0yzsr/kHF66FUpQR3Qh8EPwN/KnJwynHMn5eE="}}

View File

@@ -1,29 +1,24 @@
stackbitVersion: ~0.2.0 stackbitVersion: ~0.3.0
ssgName: custom ssgName: hugo
publishDir: demo/public
buildCommand: make prepare && hugo --source demo --baseURL "/"
uploadDir: images uploadDir: images
staticDir: exampleSite/static pageLayoutKey: null
pagesDir: exampleSite/content
dataDir: exampleSite
models: models:
config: config:
type: data type: config
label: Config label: Site Config
file: config.toml
fields: fields:
- type: string - type: string
name: title name: title
label: Title label: Title
required: true required: true
- type: string - type: string
name: baseurl name: baseURL
label: Base URL label: Base URL
description: Hostname (and path) to the root description: Hostname (and path) to the root
- type: string - type: string
name: languagecode name: languageCode
- type: string - type: string
name: defaultcontentlanguage name: defaultContentLanguage
- type: string - type: string
name: themesDir name: themesDir
- type: string - type: string
@@ -32,13 +27,13 @@ models:
- type: number - type: number
name: paginate name: paginate
- type: boolean - type: boolean
name: canonifyurls name: canonifyURLs
- type: string - type: string
name: pygmentsstyle name: pygmentsStyle
- type: boolean - type: boolean
name: pygmentscodefences name: pygmentsCodeFences
- type: boolean - type: boolean
name: pygmentscodefencesguesssyntax name: pygmentsCodeFencesGuessSyntax
- type: string - type: string
name: disqusShortname name: disqusShortname
- type: object - type: object
@@ -55,17 +50,19 @@ models:
- type: string - type: string
name: info name: info
- type: string - type: string
name: avatarurl name: avatarURL
- type: boolean - type: boolean
name: hideFooter name: hideFooter
- type: string - type: string
name: footercontent name: footerContent
- type: string - type: string
name: dateformat name: dateFormat
- type: boolean - type: boolean
name: hideCredits name: hideCredits
- type: boolean - type: boolean
name: hideCopyright name: hideCopyright
- type: boolean
name: hideColorSchemeToggle
- type: number - type: number
name: since name: since
- type: string - type: string
@@ -73,13 +70,17 @@ models:
- type: boolean - type: boolean
name: rtl name: rtl
- type: string - type: string
name: colorscheme name: colorScheme
- type: number - type: number
name: maxSeeAlsoItems name: maxSeeAlsoItems
- type: list - type: list
name: custom_css name: customCSS
- type: list - type: list
name: custom_js name: customSCSS
- type: list
name: customJS
- type: boolean
name: enableTwemoji
- type: list - type: list
name: social name: social
label: Social Media Icons label: Social Media Icons
@@ -114,13 +115,49 @@ models:
- type: string - type: string
name: serverURL name: serverURL
label: URL for Fathom Analytics label: URL for Fathom Analytics
- type: object
name: plausibleAnalytics
label: Plausible Analytics (optional)
fields:
- type: string
name: domain
label: Website domain for Plausible Analytics
- type: string
name: serverURL
label: URL for Plausible Analytics
- type: object
name: goatCounter
label: Goat Counter (optional)
fields:
- type: string
name: code
label: URL for Goat Counter
- type: object
name: cloudflare
label: Cloudflare Web Analytics (optional)
fields:
- type: string
name: token
label: token for Cloudflare Web Analytics
- type: object
name: matomo
label: Matomo (optional)
fields:
- type: string
name: siteID
label: Site ID for Matomo
- type: string
name: serverURL
label: URL for Matomo
- type: object - type: object
name: languages name: languages
fields: fields:
- type: language_config - type: model
name: en name: en
- type: language_config models: [language_config]
- type: model
name: "pt-br" name: "pt-br"
models: [language_config]
- type: object - type: object
name: taxonomies name: taxonomies
fields: fields:
@@ -130,6 +167,8 @@ models:
name: series name: series
- type: string - type: string
name: tag name: tag
- type: string
name: author
basicpage: basicpage:
type: page type: page
label: Basic Page label: Basic Page
@@ -172,6 +211,11 @@ models:
label: Series label: Series
items: items:
type: string type: string
- type: list
name: authors
label: Authors
items:
type: string
- type: string - type: string
name: externalLink name: externalLink
- type: string - type: string
@@ -185,9 +229,13 @@ models:
items: items:
type: string type: string
- type: image - type: image
name: featured_image name: featuredImage
label: Featured Image label: Featured Image
description: Image featured in post display description: Image featured in post display
- type: list
name: authors
items:
type: string
snippets: snippets:
type: page type: page
label: Snippets label: Snippets
@@ -201,7 +249,7 @@ models:
label: Language Config label: Language Config
fields: fields:
- type: string - type: string
name: languagename name: languageName
- type: string - type: string
name: title name: title
- type: object - type: object
@@ -216,7 +264,7 @@ models:
- type: string - type: string
name: keywords name: keywords
- type: string - type: string
name: footercontent name: footerContent
- type: number - type: number
name: since name: since
- type: object - type: object

Binary file not shown.

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 470 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -19,7 +19,7 @@ features = [
"single-column", "single-column",
"syntax-highlighting" "syntax-highlighting"
] ]
min_version = "0.54" min_version = "0.73.0"
[author] [author]
name = "Hannes Kuchelmeister" name = "Hannes Kuchelmeister"