diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/.envrc b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/.envrc @@ -0,0 +1 @@ +use flake diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/.github/dependabot.yml b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/.github/dependabot.yml new file mode 100644 index 0000000..5ace460 --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/.github/workflows/gh-pages.yml b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/.github/workflows/gh-pages.yml new file mode 100644 index 0000000..2679a29 --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/.github/workflows/gh-pages.yml @@ -0,0 +1,36 @@ +name: github pages + +on: + push: + branches: + - main # Set a branch that will trigger a deployment + pull_request: + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: true # Fetch Hugo themes (true OR recursive) + # fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod + + - name: Setup Nix + uses: cachix/install-nix-action@v26 + with: + github_access_token: ${{ secrets.GITHUB_TOKEN }} + - uses: DeterminateSystems/magic-nix-cache-action@v3 + + - name: Check code format + shell: bash + run: nix develop --command just check + + - name: Build + run: nix develop --command just build + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + if: github.ref == 'refs/heads/main' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./public diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/.gitignore b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/.gitignore new file mode 100644 index 0000000..f023768 --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/.gitignore @@ -0,0 +1,12 @@ +.direnv/ +node_modules/ +public/ +resources/ + +.DS_Store +.hugo_build.lock +package-lock.json +result +result-* +yarn.lock +bun.lockb diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/.prettierrc.json b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/.prettierrc.json new file mode 100644 index 0000000..d6dafb9 --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/.prettierrc.json @@ -0,0 +1,13 @@ +{ + "printWidth": 99, + "plugins": ["prettier-plugin-go-template"], + "overrides": [ + { + "files": ["*.html"], + "options": { + "parser": "go-template" + } + } + ], + "goTemplateBracketSpacing": true +} diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/LICENSE b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/LICENSE new file mode 100644 index 0000000..53089b2 --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Shaolong Chen + +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. diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/README.md b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/README.md new file mode 100644 index 0000000..6269ac4 --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/README.md @@ -0,0 +1,35 @@ +# Hugo ʕ•ᴥ•ʔ Simple + +[![Minimum Hugo Version](https://img.shields.io/static/v1?label=min-HUGO-version&message=>=v0.112.4&color=blue&logo=hugo)](https://github.com/gohugoio/hugo/releases/tag/v0.112.4) +[![built with nix](https://builtwithnix.org/badge.svg)](https://builtwithnix.org) + +A [Hugo](https://gohugo.io/)-theme based on [Simple.css](https://simplecss.org/) and [Bear Blog](https://bearblog.dev). + +## Features + +- No-JavaScript, high performance ⚡ +- Table of Contents 📌 +- Dark mode 🌗 +- SEO friendly 🔍 +- Beautiful code highlighting 😻 (thanks [catppuccin/catppuccin](https://github.com/catppuccin/catppuccin)) + +## Demo Site + +[![screenshot](https://raw.githubusercontent.com/maolonglong/hugo-simple/main/images/tn.png)](https://maolonglong.github.io/hugo-simple/) + +Source code and **configuration** can be found at [exampleSite](https://github.com/maolonglong/hugo-simple/tree/main/exampleSite). + +## Installation + +```bash +git submodule add https://github.com/maolonglong/hugo-simple.git themes/hugo-simple +# OR +hugo mod get github.com/maolonglong/hugo-simple +``` + +## Special Thanks 🎁 + +- [HermanMartinus/bearblog](https://github.com/HermanMartinus/bearblog) +- [kevquirk/simple.css](https://github.com/kevquirk/simple.css) +- [janraasch/hugo-bearblog](https://github.com/janraasch/hugo-bearblog) +- [clente/hugo-bearcub](https://github.com/clente/hugo-bearcub) diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/assets/simple.css b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/assets/simple.css new file mode 100644 index 0000000..788d069 --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/assets/simple.css @@ -0,0 +1,698 @@ +/* Global variables. */ +:root, +::backdrop { + /* Set sans-serif & mono fonts */ + --sans-font: -apple-system, BlinkMacSystemFont, "Avenir Next", Avenir, + "Nimbus Sans L", Roboto, "Noto Sans", "Segoe UI", Arial, Helvetica, + "Helvetica Neue", sans-serif; + --mono-font: Consolas, Menlo, Monaco, "Andale Mono", "Ubuntu Mono", monospace; + --standard-border-radius: 5px; + + /* Default (light) theme */ + --bg: #fff; + --accent-bg: #f5f7ff; + --text: #212121; + --text-light: #585858; + --border: #898EA4; + --accent: #0d47a1; + --accent-hover: #1266e2; + --accent-text: var(--bg); + --code: #d81b60; + --preformatted: #444; + --marked: #ffdd33; + --disabled: #efefef; +} + +/* Dark theme */ +@media (prefers-color-scheme: dark) { + :root, + ::backdrop { + color-scheme: dark; + --bg: #212121; + --accent-bg: #2b2b2b; + --text: #dcdcdc; + --text-light: #ababab; + --accent: #ffb300; + --accent-hover: #ffe099; + --accent-text: var(--bg); + --code: #f06292; + --preformatted: #ccc; + --disabled: #111; + } + /* Add a bit of transparency so light media isn't so glaring in dark mode */ + img, + video { + opacity: 0.8; + } +} + +/* Reset box-sizing */ +*, *::before, *::after { + box-sizing: border-box; +} + +/* Reset default appearance */ +textarea, +select, +input, +progress { + appearance: none; + -webkit-appearance: none; + -moz-appearance: none; +} + +html { + /* Set the font globally */ + font-family: var(--sans-font); + scroll-behavior: smooth; +} + +/* Make the body a nice central block */ +body { + color: var(--text); + background-color: var(--bg); + font-size: 1.15rem; + line-height: 1.5; + display: grid; + grid-template-columns: 1fr min(45rem, 90%) 1fr; + margin: 0; +} +body > * { + grid-column: 2; +} + +/* Make the header bg full width, but the content inline with body */ +body > header { + background-color: var(--accent-bg); + border-bottom: 1px solid var(--border); + text-align: center; + padding: 0 0.5rem 2rem 0.5rem; + grid-column: 1 / -1; +} + +body > header > *:only-child { + margin-block-start: 2rem; +} + +body > header h1 { + max-width: 1200px; + margin: 1rem auto; +} + +body > header p { + max-width: 40rem; + margin: 1rem auto; +} + +/* Add a little padding to ensure spacing is correct between content and header > nav */ +main { + padding-top: 1.5rem; +} + +body > footer { + margin-top: 4rem; + padding: 2rem 1rem 1.5rem 1rem; + color: var(--text-light); + font-size: 0.9rem; + text-align: center; + border-top: 1px solid var(--border); +} + +/* Format headers */ +h1 { + font-size: 3rem; +} + +h2 { + font-size: 2.6rem; + margin-top: 3rem; +} + +h3 { + font-size: 2rem; + margin-top: 3rem; +} + +h4 { + font-size: 1.44rem; +} + +h5 { + font-size: 1.15rem; +} + +h6 { + font-size: 0.96rem; +} + +p { + margin: 1.5rem 0; +} + +/* Prevent long strings from overflowing container */ +p, h1, h2, h3, h4, h5, h6 { + overflow-wrap: break-word; +} + +/* Fix line height when title wraps */ +h1, +h2, +h3 { + line-height: 1.1; +} + +/* Reduce header size on mobile */ +@media only screen and (max-width: 720px) { + h1 { + font-size: 2.5rem; + } + + h2 { + font-size: 2.1rem; + } + + h3 { + font-size: 1.75rem; + } + + h4 { + font-size: 1.25rem; + } +} + +/* Format links & buttons */ +a, +a:visited { + color: var(--accent); +} + +a:hover { + text-decoration: none; +} + +button, +.button, +a.button, /* extra specificity to override a */ +input[type="submit"], +input[type="reset"], +input[type="button"], +label[type="button"] { + border: 1px solid var(--accent); + background-color: var(--accent); + color: var(--accent-text); + padding: 0.5rem 0.9rem; + text-decoration: none; + line-height: normal; +} + +.button[aria-disabled="true"], +input:disabled, +textarea:disabled, +select:disabled, +button[disabled] { + cursor: not-allowed; + background-color: var(--disabled); + border-color: var(--disabled); + color: var(--text-light); +} + +input[type="range"] { + padding: 0; +} + +/* Set the cursor to '?' on an abbreviation and style the abbreviation to show that there is more information underneath */ +abbr[title] { + cursor: help; + text-decoration-line: underline; + text-decoration-style: dotted; +} + +button:enabled:hover, +.button:not([aria-disabled="true"]):hover, +input[type="submit"]:enabled:hover, +input[type="reset"]:enabled:hover, +input[type="button"]:enabled:hover, +label[type="button"]:hover { + background-color: var(--accent-hover); + border-color: var(--accent-hover); + cursor: pointer; +} + +.button:focus-visible, +button:focus-visible:where(:enabled), +input:enabled:focus-visible:where( + [type="submit"], + [type="reset"], + [type="button"] +) { + outline: 2px solid var(--accent); + outline-offset: 1px; +} + +/* Format navigation */ +header > nav { + font-size: 1rem; + line-height: 2; + padding: 1rem 0 0 0; +} + +/* Use flexbox to allow items to wrap, as needed */ +header > nav ul, +header > nav ol { + align-content: space-around; + align-items: center; + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: center; + list-style-type: none; + margin: 0; + padding: 0; +} + +/* List items are inline elements, make them behave more like blocks */ +header > nav ul li, +header > nav ol li { + display: inline-block; +} + +header > nav a, +header > nav a:visited { + margin: 0 0.5rem 1rem 0.5rem; + border: 1px solid var(--border); + border-radius: var(--standard-border-radius); + color: var(--text); + display: inline-block; + padding: 0.1rem 1rem; + text-decoration: none; +} + +header > nav a:hover, +header > nav a.current, +header > nav a[aria-current="page"] { + border-color: var(--accent); + color: var(--accent); + cursor: pointer; +} + +/* Reduce nav side on mobile */ +@media only screen and (max-width: 720px) { + header > nav a { + border: none; + padding: 0; + text-decoration: underline; + line-height: 1; + } +} + +/* Consolidate box styling */ +aside, details, pre, progress { + background-color: var(--accent-bg); + border: 1px solid var(--border); + border-radius: var(--standard-border-radius); + margin-bottom: 1rem; +} + +aside { + font-size: 1rem; + width: 30%; + padding: 0 15px; + margin-inline-start: 15px; + float: right; +} +*[dir="rtl"] aside { + float: left; +} + +/* Make aside full-width on mobile */ +@media only screen and (max-width: 720px) { + aside { + width: 100%; + float: none; + margin-inline-start: 0; + } +} + +article, fieldset, dialog { + border: 1px solid var(--border); + padding: 1rem; + border-radius: var(--standard-border-radius); + margin-bottom: 1rem; +} + +article h2:first-child, +section h2:first-child { + margin-top: 1rem; +} + +section { + border-top: 1px solid var(--border); + border-bottom: 1px solid var(--border); + padding: 2rem 1rem; + margin: 3rem 0; +} + +/* Don't double separators when chaining sections */ +section + section, +section:first-child { + border-top: 0; + padding-top: 0; +} + +section:last-child { + border-bottom: 0; + padding-bottom: 0; +} + +details { + padding: 0.7rem 1rem; +} + +summary { + cursor: pointer; + font-weight: bold; + padding: 0.7rem 1rem; + margin: -0.7rem -1rem; + word-break: break-all; +} + +details[open] > summary + * { + margin-top: 0; +} + +details[open] > summary { + margin-bottom: 0.5rem; +} + +details[open] > :last-child { + margin-bottom: 0; +} + +/* Format tables */ +table { + border-collapse: collapse; + margin: 1.5rem 0; +} + +figure > table { + width: max-content; +} + +td, +th { + border: 1px solid var(--border); + text-align: start; + padding: 0.5rem; +} + +th { + background-color: var(--accent-bg); + font-weight: bold; +} + +tr:nth-child(even) { + /* Set every other cell slightly darker. Improves readability. */ + background-color: var(--accent-bg); +} + +table caption { + font-weight: bold; + margin-bottom: 0.5rem; +} + +/* Format forms */ +textarea, +select, +input, +button, +.button { + font-size: inherit; + font-family: inherit; + padding: 0.5rem; + margin-bottom: 0.5rem; + border-radius: var(--standard-border-radius); + box-shadow: none; + max-width: 100%; + display: inline-block; +} +textarea, +select, +input { + color: var(--text); + background-color: var(--bg); + border: 1px solid var(--border); +} +label { + display: block; +} +textarea:not([cols]) { + width: 100%; +} + +/* Add arrow to drop-down */ +select:not([multiple]) { + background-image: linear-gradient(45deg, transparent 49%, var(--text) 51%), + linear-gradient(135deg, var(--text) 51%, transparent 49%); + background-position: calc(100% - 15px), calc(100% - 10px); + background-size: 5px 5px, 5px 5px; + background-repeat: no-repeat; + padding-inline-end: 25px; +} +*[dir="rtl"] select:not([multiple]) { + background-position: 10px, 15px; +} + +/* checkbox and radio button style */ +input[type="checkbox"], +input[type="radio"] { + vertical-align: middle; + position: relative; + width: min-content; +} + +input[type="checkbox"] + label, +input[type="radio"] + label { + display: inline-block; +} + +input[type="radio"] { + border-radius: 100%; +} + +input[type="checkbox"]:checked, +input[type="radio"]:checked { + background-color: var(--accent); +} + +input[type="checkbox"]:checked::after { + /* Creates a rectangle with colored right and bottom borders which is rotated to look like a check mark */ + content: " "; + width: 0.18em; + height: 0.32em; + border-radius: 0; + position: absolute; + top: 0.05em; + left: 0.17em; + background-color: transparent; + border-right: solid var(--bg) 0.08em; + border-bottom: solid var(--bg) 0.08em; + font-size: 1.8em; + transform: rotate(45deg); +} +input[type="radio"]:checked::after { + /* creates a colored circle for the checked radio button */ + content: " "; + width: 0.25em; + height: 0.25em; + border-radius: 100%; + position: absolute; + top: 0.125em; + background-color: var(--bg); + left: 0.125em; + font-size: 32px; +} + +/* Makes input fields wider on smaller screens */ +@media only screen and (max-width: 720px) { + textarea, + select, + input { + width: 100%; + } +} + +/* Set a height for color input */ +input[type="color"] { + height: 2.5rem; + padding: 0.2rem; +} + +/* do not show border around file selector button */ +input[type="file"] { + border: 0; +} + +/* Misc body elements */ +hr { + border: none; + height: 1px; + background: var(--border); + margin: 1rem auto; +} + +mark { + padding: 2px 5px; + border-radius: var(--standard-border-radius); + background-color: var(--marked); + color: black; +} + +mark a { + color: #0d47a1; +} + +img, +video { + max-width: 100%; + height: auto; + border-radius: var(--standard-border-radius); +} + +figure { + margin: 0; + display: block; + overflow-x: auto; +} + +figcaption { + text-align: center; + font-size: 0.9rem; + color: var(--text-light); + margin-bottom: 1rem; +} + +blockquote { + margin-inline-start: 2rem; + margin-inline-end: 0; + margin-block: 2rem; + padding: 0.4rem 0.8rem; + border-inline-start: 0.35rem solid var(--accent); + color: var(--text-light); + font-style: italic; +} + +cite { + font-size: 0.9rem; + color: var(--text-light); + font-style: normal; +} + +dt { + color: var(--text-light); +} + +/* Use mono font for code elements */ +code, +pre, +pre span, +kbd, +samp { + font-family: var(--mono-font); + color: var(--code); +} + +kbd { + color: var(--preformatted); + border: 1px solid var(--preformatted); + border-bottom: 3px solid var(--preformatted); + border-radius: var(--standard-border-radius); + padding: 0.1rem 0.4rem; +} + +pre { + padding: 1rem 1.4rem; + max-width: 100%; + overflow: auto; + color: var(--preformatted); +} + +/* Fix embedded code within pre */ +pre code { + color: var(--preformatted); + background: none; + margin: 0; + padding: 0; +} + +/* Progress bars */ +/* Declarations are repeated because you */ +/* cannot combine vendor-specific selectors */ +progress { + width: 100%; +} + +progress:indeterminate { + background-color: var(--accent-bg); +} + +progress::-webkit-progress-bar { + border-radius: var(--standard-border-radius); + background-color: var(--accent-bg); +} + +progress::-webkit-progress-value { + border-radius: var(--standard-border-radius); + background-color: var(--accent); +} + +progress::-moz-progress-bar { + border-radius: var(--standard-border-radius); + background-color: var(--accent); + transition-property: width; + transition-duration: 0.3s; +} + +progress:indeterminate::-moz-progress-bar { + background-color: var(--accent-bg); +} + +dialog { + max-width: 40rem; + margin: auto; +} + +dialog::backdrop { + background-color: var(--bg); + opacity: 0.8; +} + +@media only screen and (max-width: 720px) { + dialog { + max-width: 100%; + margin: auto 1em; + } +} + +/* Superscript & Subscript */ +/* Prevent scripts from affecting line-height. */ +sup, sub { + vertical-align: baseline; + position: relative; +} + +sup { + top: -0.4em; +} + +sub { + top: 0.3em; +} + +/* Classes for notices */ +.notice { + background: var(--accent-bg); + border: 2px solid var(--border); + border-radius: var(--standard-border-radius); + padding: 1.5rem; + margin: 2rem 0; +} diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/assets/style.css b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/assets/style.css new file mode 100644 index 0000000..c8318f5 --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/assets/style.css @@ -0,0 +1,47 @@ +body { + -webkit-text-size-adjust: 100%; /* prevent Mobile Safari from adjusting font sizes */ +} + +nav a.current { + color: var(--accent) !important; + border-color: var(--accent) !important; +} + +div.pagination { + display: flex; + justify-content: space-between; +} + +ul.blog-posts { + padding-left: 0; +} + +ul.blog-posts > li { + list-style-type: none; + display: flex; +} + +ul.blog-posts > li span { + flex: 0 0 130px; + color: var(--text-light); +} + +nav#TableOfContents > ul { + margin-block-start: 0; +} + +main > p:first-child time { + color: var(--text-light); +} + +.icon { + vertical-align: sub; + padding-right: 0.25rem; + display: inline-block; + width: 1em; + height: 1.3em; + margin-right: 0.2rem; + stroke-width: 0; + stroke: currentColor; + fill: currentColor; +} diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/config.toml b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/config.toml new file mode 100644 index 0000000..5ed5926 --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/config.toml @@ -0,0 +1,3 @@ +[module.hugoVersion] +extended = false +min = "0.112.4" diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/exampleSite/content/_index.md b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/exampleSite/content/_index.md new file mode 100644 index 0000000..3d8cbef --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/exampleSite/content/_index.md @@ -0,0 +1,23 @@ +--- +title: "ᕦʕ •ᴥ•ʔᕤ" +--- + +Today's websites are bloated, slow, and full of scripts, ads, and trackers. This +became so commonplace that we lost all sense of perspective, to the point that +we now think multi-megabyte webpages are normal. + +> The internet has become a bloated mess. Huge JavaScript libraries, countless +> client-side queries and overly complex frontend frameworks are par for the +> course these days. +> +> --- [Kev Quirk](https://512kb.club/) + +Let's change this, one website at a time! **Hugo Simple** is a +[Hugo](https://gohugo.io/) theme based on [Simple.css](https://simplecss.org/) and +[Hugo Bear](https://github.com/janraasch/hugo-bearblog/) that takes care of speed and +optimization, so you can focus on writing good content. + +It is free, multilingual, optimized for search engines, no-nonsense, responsive, +light, and fast. Really fast. + +Made with 💟 by [Shaolong Chen](https://github.com/maolonglong). diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/exampleSite/content/blog/_index.md b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/exampleSite/content/blog/_index.md new file mode 100644 index 0000000..c22710f --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/exampleSite/content/blog/_index.md @@ -0,0 +1,3 @@ ++++ +title = "Posts" ++++ diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/exampleSite/content/blog/emoji-support.md b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/exampleSite/content/blog/emoji-support.md new file mode 100644 index 0000000..f17f49a --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/exampleSite/content/blog/emoji-support.md @@ -0,0 +1,46 @@ ++++ +author = "Hugo Authors" +title = "Emoji Support" +date = "2019-03-05" +description = "Guide to emoji usage in Hugo" +tags = [ + "emoji", +] ++++ + +Emoji can be enabled in a Hugo project in a number of ways. + +The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes). + +To enable emoji globally, set `enableEmoji` to `true` in your site's [configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files; e.g. + +

🙈 :see_no_evil: 🙉 :hear_no_evil: 🙊 :speak_no_evil:

+
+ +The [Emoji cheat sheet](http://www.emoji-cheat-sheet.com/) is a useful reference for emoji shorthand codes. + +*** + +**N.B.** The above steps enable Unicode Standard emoji characters and sequences in Hugo, however the rendering of these glyphs depends on the browser and the platform. To style the emoji you can either use a third party emoji font or a font stack; e.g. + +{{< highlight html >}} +.emoji { + font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols; +} +{{< /highlight >}} + +{{< css.inline >}} + +{{< /css.inline >}} diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/exampleSite/content/blog/markdown-syntax.md b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/exampleSite/content/blog/markdown-syntax.md new file mode 100644 index 0000000..6131a09 --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/exampleSite/content/blog/markdown-syntax.md @@ -0,0 +1,149 @@ ++++ +author = "Hugo Authors" +title = "Markdown Syntax Guide" +date = "2019-03-11" +description = "Sample article showcasing basic Markdown syntax and formatting for HTML elements." +tags = [ + "markdown", + "css", + "html", +] +categories = [ + "themes", + "syntax", +] +series = ["Themes Guide"] +aliases = ["migrate-from-jekyl"] +toc = true ++++ + +This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme. + + +## Headings + +The following HTML `

`—`

` elements represent six levels of section headings. `

` is the highest section level while `

` is the lowest. + +# H1 +## H2 +### H3 +#### H4 +##### H5 +###### H6 + +## Paragraph + +Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat. + +Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat. + +## Blockquotes + +The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations. + +### Blockquote without attribution + +> Tiam, ad mint andaepu dandae nostion secatur sequo quae. +> **Note** that you can use *Markdown syntax* within a blockquote. + +### Blockquote with attribution + +> Don't communicate by sharing memory, share memory by communicating.
+> — Rob Pike[^1] + +[^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015. + +## Tables + +Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box. + + Name | Age +--------|------ + Bob | 27 + Alice | 23 + +### Inline Markdown within tables + +| Italics | Bold | Code | +| -------- | -------- | ------ | +| *italics* | **bold** | `code` | + +## Code Blocks + +### Code block with backticks + +```html + + + + + Example HTML5 Document + + +

Test

+ + +``` + +### Code block indented with four spaces + + + + + + Example HTML5 Document + + +

Test

+ + + +### Code block with Hugo's internal highlight shortcode +{{< highlight html >}} + + + + + Example HTML5 Document + + +

Test

+ + +{{< /highlight >}} + +## List Types + +### Ordered List + +1. First item +2. Second item +3. Third item + +### Unordered List + +* List item +* Another item +* And another item + +### Nested list + +* Fruit + * Apple + * Orange + * Banana +* Dairy + * Milk + * Cheese + +## Other Elements — abbr, sub, sup, kbd, mark + +GIF is a bitmap image format. + +H2O + +Xn + Yn = Zn + +Press CTRL+ALT+Delete to end the session. + +Most salamanders are nocturnal, and hunt for insects, worms, and other small creatures. diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/exampleSite/content/blog/math-typesetting.md b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/exampleSite/content/blog/math-typesetting.md new file mode 100644 index 0000000..62831a9 --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/exampleSite/content/blog/math-typesetting.md @@ -0,0 +1,49 @@ +--- +author: Hugo Authors +title: Math Typesetting +date: 2019-03-08 +description: A brief guide to setup KaTeX +math: true +--- + +Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries. + + +In this example we will be using [KaTeX](https://katex.org/) + +- Create a partial under `/layouts/partials/math.html` +- Within this partial reference the [Auto-render Extension](https://katex.org/docs/autorender.html) or host these scripts locally. +- Include the partial in your templates like so: + +```bash +{{ if or .Params.math .Site.Params.math }} +{{ partial "math.html" . }} +{{ end }} +``` + +- To enable KaTex globally set the parameter `math` to `true` in a project's configuration +- To enable KaTex on a per page basis include the parameter `math: true` in content files + +**Note:** Use the online reference of [Supported TeX Functions](https://katex.org/docs/supported.html) + +{{< math.inline >}} +{{ if or .Page.Params.math .Site.Params.math }} + + + + +{{ end }} +{{}} + +### Examples + +{{< math.inline >}} +

+Inline math: \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\) +

+{{}} + +Block math: +$$ + \varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } } +$$ diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/exampleSite/content/blog/placeholder-text.md b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/exampleSite/content/blog/placeholder-text.md new file mode 100644 index 0000000..9ed5f69 --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/exampleSite/content/blog/placeholder-text.md @@ -0,0 +1,45 @@ ++++ +author = "Hugo Authors" +title = "Placeholder Text" +date = "2019-03-09" +description = "Lorem Ipsum Dolor Si Amet" +tags = [ + "markdown", + "text", +] ++++ + +Lorem est tota propiore conpellat pectoribus de pectora summo. Redit teque digerit hominumque toris verebor lumina non cervice subde tollit usus habet Arctonque, furores quas nec ferunt. Quoque montibus nunc caluere tempus inhospita parcite confusaque translucet patri vestro qui optatis lumine cognoscere flos nubis! Fronde ipsamque patulos Dryopen deorum. + +1. Exierant elisi ambit vivere dedere +2. Duce pollice +3. Eris modo +4. Spargitque ferrea quos palude + +Rursus nulli murmur; hastile inridet ut ab gravi sententia! Nomine potitus silentia flumen, sustinet placuit petis in dilapsa erat sunt. Atria tractus malis. + +1. Comas hunc haec pietate fetum procerum dixit +2. Post torum vates letum Tiresia +3. Flumen querellas +4. Arcanaque montibus omnes +5. Quidem et + +# Vagus elidunt + + + +[The Van de Graaf Canon](https://en.wikipedia.org/wiki/Canons_of_page_construction#Van_de_Graaf_canon) + +## Mane refeci capiebant unda mulcebat + +Victa caducifer, malo vulnere contra dicere aurato, ludit regale, voca! Retorsit colit est profanae esse virescere furit nec; iaculi matertera et visa est, viribus. Divesque creatis, tecta novat collumque vulnus est, parvas. **Faces illo pepulere** tempus adest. Tendit flamma, ab opes virum sustinet, sidus sequendo urbis. + +Iubar proles corpore raptos vero auctor imperium; sed et huic: manus caeli Lelegas tu lux. Verbis obstitit intus oblectamina fixis linguisque ausus sperare Echionides cornuaque tenent clausit possit. Omnia putatur. Praeteritae refert ausus; ferebant e primus lora nutat, vici quae mea ipse. Et iter nil spectatae vulnus haerentia iuste et exercebat, sui et. + +Eurytus Hector, materna ipsumque ut Politen, nec, nate, ignari, vernum cohaesit sequitur. Vel **mitis temploque** vocatus, inque alis, *oculos nomen* non silvis corpore coniunx ne displicet illa. Crescunt non unus, vidit visa quantum inmiti flumina mortis facto sic: undique a alios vincula sunt iactata abdita! Suspenderat ego fuit tendit: luna, ante urbem Propoetides **parte**. + +{{< css.inline >}} + +{{< /css.inline >}} diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/exampleSite/content/blog/rich-content.md b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/exampleSite/content/blog/rich-content.md new file mode 100644 index 0000000..bf7e101 --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/exampleSite/content/blog/rich-content.md @@ -0,0 +1,34 @@ ++++ +author = "Hugo Authors" +title = "Rich Content" +date = "2019-03-10" +description = "A brief description of Hugo Shortcodes" +tags = [ + "shortcodes", + "privacy", +] ++++ + +Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugos-built-in-shortcodes) for rich content, along with a [Privacy Config](https://gohugo.io/about/hugo-and-gdpr/) and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds. + +--- + +## YouTube Privacy Enhanced Shortcode + +{{< youtube ZJthWmvUzzc >}} + +
+ +--- + +## Twitter Simple Shortcode + +{{< tweet user="DesignReviewed" id="1085870671291310081" >}} + +
+ +--- + +## Vimeo Simple Shortcode + +{{< vimeo_simple 48912912 >}} diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/exampleSite/hugo.toml b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/exampleSite/hugo.toml new file mode 100644 index 0000000..9cd1677 --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/exampleSite/hugo.toml @@ -0,0 +1,61 @@ +# Basic config +baseURL = "https://example.com" +theme = "hugo-simple" +languageCode = "en" # zh-Hans +title = "Hugo Simple" +copyright = "© 2024 Shaolong Chen" + +# Generate a nice robots.txt for SEO +enableRobotsTXT = true + +# https://github.com/gohugoio/hugo/issues/12152 +capitalizeListTitles = false + +# Generate "Bearblog"-like URLs !only!, see https://bearblog.dev/. +disableKinds = ["taxonomy"] +# ignoreErrors = ["error-disable-taxonomy"] +[taxonomies] +tag = "tags" + +[permalinks] +blog = "/:slugorfilename/" +tags = "/blog/:slug" + +[markup.goldmark.renderer] +unsafe = true +[markup.tableOfContents] +startLevel = 2 +endLevel = 3 +[markup.highlight] +lineNos = true +lineNumbersInTable = false +noClasses = true +style = "catppuccin-mocha" + +[params] +title = "Hugo Simple" +description = "Hugo Simple Demo" +favicon = "images/favicon.png" +dateFormat = "2006-01-02" +hideMadeWithLine = false +[params.author] +name = "Shaolong Chen" +email = "shaolong.chen@outlook.it" + +[[menu.main]] +name = "Home" +pageRef = "/" +weight = 10 +[[menu.main]] +name = "Blog" +pageRef = "/blog" +weight = 20 + +[services.rss] +limit = 42 + +[outputs] +# Generate RSS for home only. +section = ["html"] +taxonomy = ["html"] +term = ["html"] diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/exampleSite/static/favicon.ico b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/exampleSite/static/favicon.ico new file mode 100644 index 0000000..f99e4c4 Binary files /dev/null and b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/exampleSite/static/favicon.ico differ diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/exampleSite/static/images/favicon.png b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/exampleSite/static/images/favicon.png new file mode 100644 index 0000000..636ba3d Binary files /dev/null and b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/exampleSite/static/images/favicon.png differ diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/flake.lock b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/flake.lock new file mode 100644 index 0000000..ec40af3 --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/flake.lock @@ -0,0 +1,96 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1705309234, + "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1708943256, + "narHash": "sha256-K9VeHrhXsigdhNMZ8hqAk7jtRy4ollqhkYYNZqbfssg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "fcea2b6260dd566c28c894b4207a5f2b56c2cba3", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1708475490, + "narHash": "sha256-g1v0TsWBQPX97ziznfJdWhgMyMGtoBFs102xSYO4syU=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "0e74ca98a74bc7270d28838369593635a5db3260", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs", + "treefmt-nix": "treefmt-nix" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "treefmt-nix": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1708897213, + "narHash": "sha256-QECZB+Hgz/2F/8lWvHNk05N6NU/rD9bWzuNn6Cv8oUk=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "e497a9ddecff769c2a7cbab51e1ed7a8501e7a3a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/flake.nix b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/flake.nix new file mode 100644 index 0000000..fa6b8e0 --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/flake.nix @@ -0,0 +1,50 @@ +{ + description = "Hugo Simple Example Site"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + treefmt-nix.url = "github:numtide/treefmt-nix"; + }; + + outputs = { + self, + nixpkgs, + flake-utils, + treefmt-nix, + ... + }: + flake-utils.lib.eachDefaultSystem ( + system: let + pkgs = nixpkgs.legacyPackages.${system}; + treefmtEval = treefmt-nix.lib.evalModule pkgs ./treefmt.nix; + in { + formatter = treefmtEval.config.build.wrapper; + checks = { + formatting = treefmtEval.config.build.check self; + }; + + devShells.default = pkgs.mkShell { + nativeBuildInputs = + [ + (pkgs.hugo.override { + buildGoModule = args: + pkgs.buildGoModule (args + // { + # Remove "extended". + tags = []; + }); + }) + ] + ++ (with pkgs; [ + bun + just + ]); + + shellHook = '' + [ -d "$PWD/node_modules" ] || bun install + ''; + }; + } + ); +} diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/go.mod b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/go.mod new file mode 100644 index 0000000..e3442d6 --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/go.mod @@ -0,0 +1,3 @@ +module github.com/maolonglong/hugo-simple + +go 1.20 diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/images/screenshot.png b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/images/screenshot.png new file mode 100644 index 0000000..1c075d8 Binary files /dev/null and b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/images/screenshot.png differ diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/images/tn.png b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/images/tn.png new file mode 100644 index 0000000..0d6401a Binary files /dev/null and b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/images/tn.png differ diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/justfile b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/justfile new file mode 100644 index 0000000..75e5eb5 --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/justfile @@ -0,0 +1,30 @@ +set ignore-comments + +alias s := server +alias serve := server +alias b := build + +default: + just --list + +server: + hugo server -D --source ./exampleSite --themesDir ../.. + +build: + hugo --minify --gc --destination ../public --source ./exampleSite --themesDir ../.. --baseURL https://maolonglong.github.io/hugo-simple/ + +fmt: + # TODO: https://github.com/numtide/treefmt-nix/issues/112 + nix fmt + bun run fmt + +check: + # TODO: https://github.com/numtide/treefmt-nix/issues/112 + nix flake check + bun run check + +update-simplecss: + curl -fSL https://cdn.simplecss.org/simple.css -o ./assets/simple.css + +clean: + rm -r public diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/404.html b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/404.html new file mode 100644 index 0000000..c84f0c9 --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/404.html @@ -0,0 +1,6 @@ +{{ define "title" }}404{{ end }} + +{{ define "main" }} +

404

+

ʕノ•ᴥ•ʔノ ︵ ┻━┻

+{{ end }} diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/_default/_markup/render-codeblock.html b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/_default/_markup/render-codeblock.html new file mode 100644 index 0000000..e1d6fa5 --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/_default/_markup/render-codeblock.html @@ -0,0 +1,7 @@ + +{{ .Page.Store.Set "hasCodeBlock" true }} + + + +{{ $result := transform.HighlightCodeBlock . }} +{{ $result.Wrapped }} diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/_default/baseof.html b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/_default/baseof.html new file mode 100644 index 0000000..7604c27 --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/_default/baseof.html @@ -0,0 +1,58 @@ + + + + + + + {{- partial "favicon.html" . -}} + + {{- block "title" . -}} + {{- if not .IsHome -}} + {{ with .Title }}{{ . }} | {{ end }} + {{- end -}} + {{ .Site.Title }} + {{- end -}} + + + {{- partial "seo_tags.html" . -}} + + + {{ $simple := resources.Get "simple.css" | minify }} + + + {{ $style := resources.Get "style.css" | minify }} + + + {{ with .Params.style }} + {{ $extra := resources.Get . | minify }} + + {{ end }} + + {{ with .OutputFormats.Get "rss" -}} + {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} + {{ end -}} + + + + {{- partial "custom_head.html" . -}} + + + +
+ {{ partial "header.html" . }} +
+
+ {{ block "main" . }}{{ end }} +
+ + + + {{- partial "custom_body.html" . -}} + + diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/_default/list.html b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/_default/list.html new file mode 100644 index 0000000..1752106 --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/_default/list.html @@ -0,0 +1,42 @@ +{{ define "main" }} + + {{ if .Data.Singular }} +

Filtering for "{{ .Title }}"

+ + Remove filter + + {{ end }} + {{ if or .Paginator.HasPrev .Paginator.HasNext }} + {{- partial "pagination.html" . -}} + {{ end }} + + {{ if not .Data.Singular }} + +
+ {{ range .Site.Taxonomies.tags }} + #{{ .Page.LinkTitle }}   + {{ end }} +
+
+ {{ end }} +
+{{ end }} diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/_default/rss.xml b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/_default/rss.xml new file mode 100644 index 0000000..40346e1 --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/_default/rss.xml @@ -0,0 +1,72 @@ +{{- /* Deprecate site.Author.email in favor of site.Params.author.email */}} +{{- $authorEmail := "" }} +{{- with site.Params.author }} + {{- if reflect.IsMap . }} + {{- with .email }} + {{- $authorEmail = . }} + {{- end }} + {{- end }} +{{- else }} + {{- with site.Author.email }} + {{- $authorEmail = . }} + {{- warnf "The author key in site configuration is deprecated. Use params.author.email instead." }} + {{- end }} +{{- end }} + +{{- /* Deprecate site.Author.name in favor of site.Params.author.name */}} +{{- $authorName := "" }} +{{- with site.Params.author }} + {{- if reflect.IsMap . }} + {{- with .name }} + {{- $authorName = . }} + {{- end }} + {{- else }} + {{- $authorName = . }} + {{- end }} +{{- else }} + {{- with site.Author.name }} + {{- $authorName = . }} + {{- warnf "The author key in site configuration is deprecated. Use params.author.name instead." }} + {{- end }} +{{- end }} + +{{- $pctx := . }} +{{- if .IsHome }}{{ $pctx = .Site }}{{ end }} +{{- $pages := slice }} +{{- if or $.IsHome $.IsSection }} +{{- $pages = $pctx.RegularPages }} +{{- else }} +{{- $pages = $pctx.Pages }} +{{- end }} +{{- $limit := .Site.Config.Services.RSS.Limit }} +{{- if ge $limit 1 }} +{{- $pages = $pages | first $limit }} +{{- end }} +{{- printf "" | safeHTML }} + + + {{ .Site.Title }} + {{ .Permalink }} + Recent content on {{ .Site.Title }} + Hugo -- gohugo.io + {{ site.Language.LanguageCode }}{{ with $authorEmail }} + {{.}}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with $authorEmail }} + {{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with .Site.Copyright }} + {{ . }}{{ end }}{{ if not .Date.IsZero }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} + {{- with .OutputFormats.Get "RSS" }} + {{ printf "" .Permalink .MediaType | safeHTML }} + {{- end }} + {{- range $pages }} + + {{ .Title }} + {{ .Permalink }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{- with $authorEmail }}{{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }} + {{ .Permalink }} + {{ .Summary | html }} + {{ `` | safeHTML }} + + {{- end }} + + diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/_default/single.html b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/_default/single.html new file mode 100644 index 0000000..80c7fb8 --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/_default/single.html @@ -0,0 +1,28 @@ +{{ define "main" }} + {{ if eq .Type "blog" }} + {{ if not .Params.menu }} + +

+ + + +

+ {{ end }} + {{ end }} + {{ if .Params.toc }} +
+ Table of Contents + {{ .TableOfContents }} +
+ {{ end }} + + {{ .Content }} + +

+ {{ range (.GetTerms "tags") }} + #{{ .LinkTitle }}   + {{ end }} +

+{{ end }} diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/index.html b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/index.html new file mode 100644 index 0000000..e0e8308 --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/index.html @@ -0,0 +1,3 @@ +{{ define "main" }} + {{ .Content }} +{{ end }} diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/partials/custom_body.html b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/partials/custom_body.html new file mode 100644 index 0000000..126375a --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/partials/custom_body.html @@ -0,0 +1,3 @@ + diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/partials/custom_head.html b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/partials/custom_head.html new file mode 100644 index 0000000..4c53c40 --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/partials/custom_head.html @@ -0,0 +1,3 @@ + diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/partials/favicon.html b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/partials/favicon.html new file mode 100644 index 0000000..fd55750 --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/partials/favicon.html @@ -0,0 +1,3 @@ +{{ with .Site.Params.favicon }} + +{{ end }} diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/partials/footer.html b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/partials/footer.html new file mode 100644 index 0000000..29c4632 --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/partials/footer.html @@ -0,0 +1,10 @@ +{{ with .Site.Copyright }} + {{ . }} +{{ end }} +{{ if not .Site.Params.hideMadeWithLine }} + + {{ if .Site.Copyright }}|{{ end }} + Made with + Hugo ʕ•ᴥ•ʔ Simple + +{{ end }} diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/partials/header.html b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/partials/header.html new file mode 100644 index 0000000..095d626 --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/partials/header.html @@ -0,0 +1,6 @@ + + +

{{ .Title }}

+{{ with .Description }} +

{{ . }}

+{{ end }} diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/partials/nav.html b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/partials/nav.html new file mode 100644 index 0000000..5e3582b --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/partials/nav.html @@ -0,0 +1,17 @@ +{{ $currentPage := . -}} +{{ range .Site.Menus.main.ByWeight }} + {{ .Name }} +{{ end }} + + + + + + RSS + diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/partials/pagination.html b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/partials/pagination.html new file mode 100644 index 0000000..ef81e48 --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/partials/pagination.html @@ -0,0 +1,18 @@ + diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/partials/seo_tags.html b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/partials/seo_tags.html new file mode 100644 index 0000000..3dd6f1e --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/partials/seo_tags.html @@ -0,0 +1,47 @@ + + + + +{{ with .Site.Params.author.name }} + +{{ end }} + + + +{{ template "_internal/opengraph.html" . }} + + + +{{ template "_internal/twitter_cards.html" . }} + + + +{{ template "_internal/schema.html" . }} diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/robots.txt b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/robots.txt new file mode 100644 index 0000000..4f4ca44 --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/robots.txt @@ -0,0 +1,3 @@ +User-agent: * +Allow: / +Sitemap: {{ "sitemap.xml" | absURL }} diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/shortcodes/highlight.html b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/shortcodes/highlight.html new file mode 100644 index 0000000..fed1bcf --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/layouts/shortcodes/highlight.html @@ -0,0 +1,10 @@ + +{{ .Page.Store.Set "hasCodeBlock" true }} + + + +{{ if len .Params | eq 2 }} + {{ highlight (trim .InnerDeindent "\n\r") (.Get 0) (.Get 1) }} +{{ else }} + {{ highlight (trim .InnerDeindent "\n\r") (.Get 0) "" }} +{{ end }} diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/package.json b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/package.json new file mode 100644 index 0000000..7c83576 --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/package.json @@ -0,0 +1,10 @@ +{ + "scripts": { + "fmt": "prettier layouts/**/*.html assets/style.css --write", + "check": "prettier layouts/**/*.html assets/style.css --check" + }, + "devDependencies": { + "prettier": "^3.2.5", + "prettier-plugin-go-template": "^0.0.15" + } +} diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/theme.toml b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/theme.toml new file mode 100644 index 0000000..dacb52d --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/theme.toml @@ -0,0 +1,18 @@ +name = "Hugo Simple" +license = "MIT" +licenselink = "https://github.com/maolonglong/hugo-simple/blob/main/LICENSE" +description = "A Hugo-theme based on Simple.css and Bear Blog" +homepage = "https://github.com/maolonglong/hugo-simple" +demosite = "https://maolonglong.github.io/hugo-simple" + +tags = ["blog", "minimal", "fast", "dark mode"] +features = ["favicon", "no javascript", "rss", "dark mode"] + +[author] +name = "Shaolong Chen" +homepage = "https://github.com/maolonglong" + +[original] +author = "Caio Lente" +homepage = "https://lente.dev" +repo = "https://github.com/clente/hugo-bearcub" diff --git a/sites/blog.hermitcollective.net/blog/themes/hugo-simple/treefmt.nix b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/treefmt.nix new file mode 100644 index 0000000..deba111 --- /dev/null +++ b/sites/blog.hermitcollective.net/blog/themes/hugo-simple/treefmt.nix @@ -0,0 +1,5 @@ +{pkgs, ...}: { + projectRootFile = "flake.nix"; + programs.alejandra.enable = true; + programs.taplo.enable = true; +}