-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
74052a5
commit 9204bf8
Showing
248 changed files
with
19,442 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# https://editorconfig.org | ||
|
||
# this file is the top-most editorconfig file | ||
root = true | ||
|
||
# all files | ||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_style = space | ||
indent_size = 4 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
# markdown files | ||
[*.md] | ||
insert_final_newline = false | ||
trim_trailing_whitespace = false | ||
|
||
# configuration files | ||
[*.toml] | ||
indent_size = 2 | ||
|
||
# web files | ||
[*.{html,css,scss}] | ||
indent_size = 2 | ||
|
||
[Makefile] | ||
indent_style = tab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.idea | ||
**/themes/ | ||
exampleSite/public/ | ||
exampleSite/resources/ | ||
*.lock | ||
public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
# Contributors | ||
|
||
- [Chip Senkbeil](https://github.com/chipsenkbeil) | ||
- [Dale Noe](https://github.com/dalenoe) | ||
- [Gabor Nagy](https://github.com/Aigeruth) | ||
- [Harry Khanna](https://github.com/hkhanna) | ||
- [Ihor Dvoretskyi](https://github.com/idvoretskyi) | ||
- [Jacob Wood](https://github.com/jacoblukewood) | ||
- [Jan Baudisch](https://github.com/flyingP0tat0) | ||
- [Jiri Hubacek](https://github.com/qeef) | ||
- [Khosrow Moossavi](https://github.com/khos2ow) | ||
- [Maikel](https://github.com/mbollemeijer) | ||
- [MetBril](https://github.com/metbril) | ||
- [Myles Johnson](https://github.com/MylesJohnson) | ||
- [Niels Reijn](https://github.com/reijnn) | ||
- [Padraic Renaghan](https://github.com/prenagha) | ||
- [peterrus](https://github.com/peterrus) | ||
- [Philipp Rintz](https://github.com/p-rintz) | ||
- [Ralf Junghanns](https://github.com/rabbl) | ||
- [rdhox](https://rdhox.io) | ||
- [tobaloidee](https://github.com/Tobaloidee) | ||
- [Tomasz Wąsiński](https://github.com/wasinski) | ||
- [Vinícius dos Santos Oliveira](https://github.com/vinipsmaker) | ||
- [Vlad Ionescu](https://github.com/Vlaaaaaaad) | ||
- [Joseph Ting](https://github.com/josephting) | ||
- [Abner Campanha](https://github.com/abnerpc) | ||
- [Martin Kiesel](https://github.com/Kyslik) | ||
- [John Tobin](https://www.johntobin.ie/) | ||
- [Thomas Nys](https://thomasnys.com) | ||
- [Piotr Januszewski](https://piojanu.github.io) | ||
- [Artem Khvastunov](https://artspb.me) | ||
- [Gabriel Nepomuceno](https://blog.nepomuceno.me) | ||
- [Salvatore Giordano](https://salvatore-giordano.github.io) | ||
- [Jeffrey Carpenter](https://uvolabs.me) | ||
- [Paul Lettington](https://github.com/plett) | ||
- [Thomas Vochten](https://github.com/thomasvochten) | ||
- [Caspar Krieger](https://www.asparck.com) | ||
- [D_DAndrew](https://d-dandrew.github.io) | ||
- [Wataru Mizukami](https://github.com/tarumzu) | ||
- [Yudi Widiyanto](https://github.com/yudiwdynto) | ||
- [Łukasz Mróz](https://github.com/mrozlukasz) | ||
- [Jia "Jay" Tan](https://github.com/j7an) | ||
- [Ryan](https://github.com/alrayyes) | ||
- [Naim A.](https://github.com/naim94a) | ||
- [Alexander Rohde](https://github.com/a1x42) | ||
- [Shreyansh Khajanchi](https://shreyanshja.in) | ||
- [Lionel Brianto](https://lionel.brianto.dev) | ||
- [Luis Zarate](https://github.com/jlzaratec) | ||
- [Ariejan de Vroom](https://www.devroom.io) | ||
- [Bobby Lindsey](https://bobbywlindsey.com) | ||
- [José Mª Escartín](https://github.com/jme52) | ||
- [John Schroeder](https://blog.schroedernet.software) | ||
- [Tobias Lindberg](https://github.com/tobiasehlert) | ||
- [KK](https://github.com/bebound) | ||
- [Eli W. Hunter](https://github.com/elihunter173) | ||
- [Víctor López](https://github.com/viticlick) | ||
- [Anson VanDoren](https://github.com/anson-vandoren) | ||
- [Michael Lynch](https://github.com/mtlynch) | ||
- [FIGBERT](https://figbert.com/) | ||
- [Yash Mehrotra](https://yashmehrotra.com) | ||
- [Paolo Mainardi](https://paolomainardi.com) | ||
- [Ka-Wai Lin](https://github.com/kwlin) | ||
- [Piotr Orzechowski](https://orzechowski.tech) | ||
- [Glenn Feunteun](https://github.com/gfeun) | ||
- [Santiago González](https://github.com/netrules) | ||
- [Codruț Constantin Gușoi](https://www.codrut.pro) | ||
- [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://duchnovsky.com) | ||
- [Alex Miranda](https://ammiranda.com) | ||
- [Alphonse Mariya](https://github.com/alfunx) | ||
- [Ziwei Pan](https://github.com/PanZiwei/) | ||
- [Viktar Patotski](https://github.com/xp-vit) | ||
- [cuso4-5h2o](https://www.cuso4.me) | ||
- [freeformz](https://icanhazdowntime.org) | ||
- [Roberto Gongora](https://yourfavourite.blog) | ||
- [kuba86](https://kuba86.com) | ||
- [Vladislav Matus](https://github.com/matusvla) | ||
- [Kirill Feoktistov](https://feoktistoff.org) | ||
- [leins275](https://github.com/LanskovNV) | ||
- [Michael Weiss](https://mweiss.ch) | ||
- [Simon Pai](https://github.com/simonpai) | ||
- [Brenton Mallen](https://github.com/brentonmallen1) | ||
- [Xiaoyang Luo](https://github.com/ccviolett/) | ||
- [Michiel Appelman](https://appelman.se) | ||
- [Mark Wood](https://digitalnotions.net) | ||
- [Sam A.](https://samsapti.dev) | ||
- [John Feminella](https://jxf.me) | ||
- [zzsqwq](https://zzsqwq.cn) | ||
- [George Tsiokos](https://george.tsiokos.com) | ||
- [Eltjo](https://github.com/eltjo) | ||
- [Saurmandal](https://saur.neocities.org) | ||
- [Jneo8](https://github.com/jneo8) | ||
- [Daniel Nduati](https://github.com/DanNduati) | ||
- [Simon Hollingshead](https://github.com/simonhollingshead) | ||
- [yangyangdaji](https://github.com/yangyangdaji) | ||
- [xiaotianxt](https://github.com/xiaotianxt) | ||
- [Nour Agha](https://github.com/nourkagha) | ||
- [Brian Lachniet](https://github.com/blachniet) | ||
- [ShortArrow](https://github.com/ShortArrow) | ||
- [Martin Hellspong](https://github.com/marhel) | ||
- [Robert Tucker](https://github.com/robertwtucker) | ||
- [Michał Pawlik](https://michalp.net) | ||
- [Kilian Kluge](https://github.com/ionicsolutions) | ||
- [Jaroslaw Rozanski](https://jarekrozanski.eu) | ||
- [Easton Man](https://github.com/eastonman) | ||
- [Yiğit Altınay](https://altinay.xyz) | ||
- [Fei Kong](https://github.com/alpha0422) | ||
- [Ahmet Enes Bayraktar](https://github.com/aeb-dev) | ||
- [Todor Bogosavljević](https://github.com/tbx1b) | ||
- [Kemal Akkoyun](https://github.com/kakkoyun) | ||
- [Igetin](https://github.com/Igetin) | ||
- [Kirill Che.](https://github.com/g4s8) | ||
- [iron3oxide](https://github.com/iron3oxide) | ||
- [Jens Rantil](https://github.com/JensRantil) | ||
- [Muqeet Malik](https://github.com/mmalik23) | ||
- [Sammy44nts](https://github.com/sammy44nts) | ||
- [Shaked8634](https://github.com/shaked8634) | ||
- [Leo Heimann Ruiz](https://leo.heitmannruiz.org/) | ||
- [Antoine "Toinux" Wam](https://github.com/itzwam) | ||
- [Reberti Carvalho Soares](https://github.com/RebertiCS) | ||
- [Andreas Deininger](https://github.com/deining) | ||
- [Ardemium](https://github.com/ardemium) | ||
- [Matt Ellery](https://github.com/matt-ellery) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2018 Luiz F. A. de Prá | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
the Software, and to permit persons to whom the Software is furnished to do so, | ||
subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
HUGO_BIN=hugo | ||
|
||
.PHONY: build demo release | ||
|
||
build: | ||
$(HUGO_BIN) --themesDir=../.. --source=exampleSite | ||
|
||
demo: | ||
$(HUGO_BIN) server -D --themesDir=../.. --source=exampleSite --bind 0.0.0.0 | ||
|
||
release: build | ||
rm -rf ./resources && cp -r ./exampleSite/resources ./resources |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<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/). | ||
|
||
![](images/screenshot.png) | ||
|
||
## Live Demo | ||
|
||
See [here](https://hugo-coder.netlify.app/). | ||
|
||
## 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`. | ||
2. Configure your `hugo.toml`. You can either use [this minimal configuration](https://github.com/luizdepra/hugo-coder/blob/main/docs/configurations.md#complete-example) as a base, or look for a complete explanation about all configurations [here](https://github.com/luizdepra/hugo-coder/blob/main/docs/configurations.md). The [`hugo.toml`](https://github.com/luizdepra/hugo-coder/blob/master/exampleSite/hugo.toml) inside the [`exampleSite`](https://github.com/luizdepra/hugo-coder/tree/master/exampleSite) is also a good reference. | ||
3. Build your site with `hugo server` and see the result at `http://localhost:1313/`. | ||
|
||
## Documentation | ||
|
||
See the [`docs`](docs/home.md) folder. | ||
|
||
## License | ||
|
||
Coder is licensed under the [MIT license](https://github.com/luizdepra/hugo-coder/blob/master/LICENSE.md). | ||
|
||
## Maintenance | ||
|
||
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 | ||
|
||
- 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
+++ | ||
draft = true | ||
date = {{ .Date }} | ||
title = "" | ||
slug = "" | ||
+++ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
+++ | ||
draft = true | ||
date = {{ .Date }} | ||
title = "" | ||
description = "" | ||
slug = "" | ||
authors = [] | ||
tags = [] | ||
categories = [] | ||
externalLink = "" | ||
series = [] | ||
+++ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
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"); | ||
} | ||
|
||
if (darkModeToggle) { | ||
darkModeToggle.addEventListener('click', () => { | ||
let theme = body.classList.contains("colorscheme-dark") ? "light" : "dark"; | ||
setTheme(theme); | ||
rememberTheme(theme); | ||
}); | ||
} | ||
|
||
darkModeMediaQuery.addListener((event) => { | ||
setTheme(event.matches ? "dark" : "light"); | ||
}); | ||
|
||
document.addEventListener("DOMContentLoaded", function () { | ||
let node = document.querySelector('.preload-transitions'); | ||
node.classList.remove('preload-transitions'); | ||
}); | ||
|
||
function setTheme(theme) { | ||
body.classList.remove('colorscheme-auto'); | ||
let inverse = theme === 'dark' ? 'light' : 'dark'; | ||
body.classList.remove('colorscheme-' + inverse); | ||
body.classList.add('colorscheme-' + theme); | ||
document.documentElement.style['color-scheme'] = theme; | ||
|
||
function waitForElm(selector) { | ||
return new Promise(resolve => { | ||
if (document.querySelector(selector)) { | ||
return resolve(document.querySelector(selector)); | ||
} | ||
|
||
const observer = new MutationObserver(mutations => { | ||
if (document.querySelector(selector)) { | ||
resolve(document.querySelector(selector)); | ||
observer.disconnect(); | ||
} | ||
}); | ||
|
||
observer.observe(document.body, { | ||
childList: true, | ||
subtree: true | ||
}); | ||
}); | ||
} | ||
|
||
if (theme === 'dark') { | ||
const message = { | ||
type: 'set-theme', | ||
theme: 'github-dark' | ||
}; | ||
waitForElm('.utterances-frame').then((iframe) => { | ||
iframe.contentWindow.postMessage(message, 'https://utteranc.es'); | ||
}) | ||
|
||
} | ||
else { | ||
const message = { | ||
type: 'set-theme', | ||
theme: 'github-light' | ||
}; | ||
waitForElm('.utterances-frame').then((iframe) => { | ||
iframe.contentWindow.postMessage(message, 'https://utteranc.es'); | ||
}) | ||
|
||
} | ||
|
||
function sendMessage(message) { | ||
const iframe = document.querySelector('iframe.giscus-frame'); | ||
if (!iframe) return; | ||
iframe.contentWindow.postMessage({ giscus: message }, 'https://giscus.app'); | ||
} | ||
sendMessage({ | ||
setConfig: { | ||
theme: theme, | ||
}, | ||
}); | ||
|
||
// Create and send event | ||
const event = new Event('themeChanged'); | ||
document.dispatchEvent(event); | ||
} | ||
|
||
function rememberTheme(theme) { | ||
localStorage.setItem('colorscheme', theme); | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.