diff --git a/.editorconfig b/.editorconfig index 1923d41..452070b 100644 --- a/.editorconfig +++ b/.editorconfig @@ -2,7 +2,10 @@ root = true [*] indent_style = space -indent_size = 2 +indent_size = 4 charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true + +[*.{json,yml,yaml}] +indent_size = 2 diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index e666dac..bc4412c 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -1,79 +1,31 @@ -name: Build and deploy +name: GitHub Pages on: push: branches: - main - workflow_dispatch: - -permissions: - contents: read - pages: write - id-token: write - -concurrency: - group: pages - cancel-in-progress: false jobs: - build: - runs-on: ubuntu-latest - container: - image: hugomods/hugo:ci - env: - TZ: Europe/Budapest - + deploy: + runs-on: ubuntu-20.04 steps: - - name: Checkout - uses: actions/checkout@v6 - with: - submodules: recursive - fetch-depth: 0 - - - name: Setup Pages - id: pages - uses: actions/configure-pages@v5 - - - name: Cache restore - id: cache-restore - uses: actions/cache/restore@v5 + - uses: actions/checkout@v2 with: - path: ${{ runner.temp }}/hugo_cache - key: hugo-${{ github.run_id }} - restore-keys: - hugo- - - - name: Build the site - run: | - hugo \ - --gc \ - --minify \ - --baseURL "${{ steps.pages.outputs.base_url }}/" \ - --cacheDir "${{ runner.temp }}/hugo_cache" + submodules: true # Fetch Hugo themes (true OR recursive) + fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod - - name: Cache save - id: cache-save - uses: actions/cache/save@v5 + - name: Setup Hugo + uses: peaceiris/actions-hugo@v2 with: - path: ${{ runner.temp }}/hugo_cache - key: ${{ steps.cache-restore.outputs.cache-primary-key }} + hugo-version: "latest" + # extended: true - # This is necessary to upload artifacts - - name: Install GNU Tar - run: | - apk add tar + - name: Build + run: hugo --minify - - name: Upload artifact - uses: actions/upload-pages-artifact@v4 + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + if: github.ref == 'refs/heads/main' with: - path: ./public - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - needs: build - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./public diff --git a/.gitignore b/.gitignore index b1154f1..9f082d0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,5 @@ -# Generated files by hugo -/public/ -/resources/_gen/ -/assets/jsconfig.json -hugo_stats.json - -# Executable may be added to repository -hugo.exe -hugo.darwin -hugo.linux +/.vscode/ -# Temporary lock file while building -/.hugo_build.lock +/public/ -*.local.json +.hugo_build.lock diff --git a/.gitmodules b/.gitmodules index ce3490a..89af1b0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "themes/hugo-coder"] - path = themes/hugo-coder - url = https://github.com/luizdepra/hugo-coder.git +[submodule "themes/PaperMod"] + path = themes/PaperMod + url = https://github.com/adityatelange/hugo-PaperMod.git diff --git a/archetypes/default.md b/archetypes/default.md index 25b6752..00e77bd 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -1,5 +1,6 @@ -+++ -date = '{{ .Date }}' -draft = true -title = '{{ replace .File.ContentBaseName "-" " " | title }}' -+++ +--- +title: "{{ replace .Name "-" " " | title }}" +date: {{ .Date }} +draft: true +--- + diff --git a/assets/scss/coder-dark.scss b/assets/scss/coder-dark.scss deleted file mode 100644 index 1dd569a..0000000 --- a/assets/scss/coder-dark.scss +++ /dev/null @@ -1,17 +0,0 @@ -// Override theme variables before importing -$link-color-dark: rgb(206, 145, 120); - -// Import theme dark mode styles -@import "variables"; - -$font-family: 'Lora', 'Georgia', serif; - -@import "base_dark"; -@import "content_dark"; -@import "notices_dark"; -@import "navigation_dark"; -@import "tabs_dark"; -@import "taxonomies_dark"; -@import "footer_dark"; -@import "float_dark"; -@import "syntax_dark"; diff --git a/assets/scss/coder.scss b/assets/scss/coder.scss deleted file mode 100644 index 0fe9de3..0000000 --- a/assets/scss/coder.scss +++ /dev/null @@ -1,25 +0,0 @@ -// Override theme variables before importing -$link-color: rgb(163, 21, 21); - -// Import theme styles -@import "css/normalize"; -@import "variables"; - -$font-family: 'Lora', 'Georgia', serif; - -@import "font-awesome/fontawesome"; -@import "font-awesome/regular"; -@import "font-awesome/solid"; -@import "font-awesome/brands"; -@import "font-awesome/v4-shims"; -@import "base"; -@import "content"; -@import "notices"; -@import "navigation"; -@import "pagination"; -@import "tabs"; -@import "taxonomies"; -@import "footer"; -@import "float"; -@import "mastodon"; -@import "syntax"; diff --git a/assets/scss/custom.scss b/assets/scss/custom.scss deleted file mode 100644 index 16f8cf2..0000000 --- a/assets/scss/custom.scss +++ /dev/null @@ -1,56 +0,0 @@ -@font-face { - font-family: "Lora"; - font-style: normal; - src: url("../fonts/Lora-VariableFont_wght.ttf"); -} - -@font-face { - font-family: "Lora"; - font-style: italic; - src: url("../fonts/Lora-Italic-VariableFont_wght.ttf"); -} - -.navigation-item { - text-transform: uppercase; -} - -a { - transition: none; -} - -.navigation { - a:hover { - text-decoration: none; - } -} - -.content { - .post { - .post-content { - p { - text-align: left; - hyphens: none; - } - - figure > img { - border-radius: 1rem; - box-shadow: 0 0.6rem 1.25rem rgba(0, 0, 0, 0.25); - } - - figure > figcaption > p { - text-align: center; - } - - table { - margin: 0 auto; - tr { - th, - td { - border-left: 0 !important; - border-right: 0 !important; - } - } - } - } - } -} diff --git a/config.yml b/config.yml new file mode 100644 index 0000000..79128af --- /dev/null +++ b/config.yml @@ -0,0 +1,37 @@ +baseURL: "https://lptr.github.io/" +languageCode: "en-us" +title: "Redneck Overengineering" +theme: "PaperMod" +googleAnalytics: G-3FC267J0K7 +disqusShortname: redneck-overengineering + +menu: + main: + - name: About + url: about + weight: 1 + - name: Archive + url: archives + weight: 5 + +outputs: + home: + - HTML + - RSS + - JSON + +params: + homeInfoParams: + Title: "Welcome" + Content: > + Welcome to my tech blog on the internet. + + socialIcons: + - name: GitHub + url: "https://github.com/lptr" + - name: Mastodon + url: "https://mas.to/@lptr" + - name: RSS + url: "index.xml" + + showFullTextinRSS: true diff --git a/content/archives.md b/content/archives.md new file mode 100644 index 0000000..5628e34 --- /dev/null +++ b/content/archives.md @@ -0,0 +1,6 @@ +--- +title: "Archive" +layout: "archives" +url: "/archives/" +summary: archives +--- diff --git a/content/blog/_index.md b/content/blog/_index.md deleted file mode 100644 index c63b190..0000000 --- a/content/blog/_index.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Blog -type: posts -cascade: - type: posts ---- diff --git a/content/blog/dockero-host.md b/content/blog/dockero-host.md deleted file mode 100644 index 8c19d02..0000000 --- a/content/blog/dockero-host.md +++ /dev/null @@ -1,55 +0,0 @@ -+++ -date = '2026-02-03' -title = 'Dockero in the Local Development Environment' -summary = 'How to configure Dockero to work with alternative Docker runtimes in development' -+++ - -I've been using the excellent [Dockero](https://github.com/the-abra/dockero) library for running some Docker containers in my web applications. In production environments the applications are running on the actual Docker runtime, but in my development environment I like to use alternatives. - -Specifically, when I started using macOS again recently, I first opted for [Colima](https://github.com/abiosoft/colima) for its simplicity. However, anything involving Docker in my local development environment broke, and it took me a while to figure out what was wrong. - -It took a while to figure out that the Dockero expects the Docker Unix socket to be at `/var/run/docker.sock`, but Colima has it at `~/.colima/default/docker.sock`. - -To make Dockero work, you have to set the `DOCKER_HOST` environment variable. For my [Express](https://expressjs.com/)-based application this meant adding to `.env` (no `$HOME` variable substitution here unfortunately): - -```properties -DOCKER_HOST=unix:///Users/lptr/.colima/default/docker.sock -``` - -I also had some tests using [Jest](https://jestjs.io/) that involved executing Docker containers. Fixing those was a bit more complicated. - -I first installed [`dotenv`](https://github.com/motdotla/dotenv): - -```shell -npm install dotenv --save-dev -``` - -Then in `jest.config.ts` I added: - -```ts -import type { Config } from 'jest'; - -export default { - // ... - setupFiles: ['./jest.setup.ts'], -} as Config; -``` - -And in `jest.setup.js`: - -```ts -import { config } from 'dotenv'; - -config({ - path: '.env.test', - quiet: true, -}); -``` - -This loads a `.env.test` file before tests executed by Jest, so I can also put the `DOCKER_HOST` in there. - -I then later switched from Colima to [Rancher Desktop](https://rancherdesktop.io/). To make things work once again I had to change both `.env` files: - -```properties -DOCKER_HOST=unix:///Users/lptr/.rd/docker.sock -``` diff --git a/content/posts/_index.md b/content/posts/_index.md new file mode 100644 index 0000000..3582a6d --- /dev/null +++ b/content/posts/_index.md @@ -0,0 +1,9 @@ +--- +cascade: + comments: true + author: "Lóránt Pintér" + ShowShareButtons: true + ShowReadingTime: true + ShowPostNavLinks: true + ShowCodeCopyButtons: true +--- diff --git a/content/blog/a-new-beginning/chicken-door-drawing.png b/content/posts/a-new-beginning/chicken-door-drawing.png similarity index 100% rename from content/blog/a-new-beginning/chicken-door-drawing.png rename to content/posts/a-new-beginning/chicken-door-drawing.png diff --git a/content/blog/a-new-beginning/chicken-door.jpg b/content/posts/a-new-beginning/chicken-door.jpg similarity index 100% rename from content/blog/a-new-beginning/chicken-door.jpg rename to content/posts/a-new-beginning/chicken-door.jpg diff --git a/content/blog/a-new-beginning/chickens.jpg b/content/posts/a-new-beginning/chickens.jpg similarity index 100% rename from content/blog/a-new-beginning/chickens.jpg rename to content/posts/a-new-beginning/chickens.jpg diff --git a/content/blog/a-new-beginning/esp8266.jpg b/content/posts/a-new-beginning/esp8266.jpg similarity index 100% rename from content/blog/a-new-beginning/esp8266.jpg rename to content/posts/a-new-beginning/esp8266.jpg diff --git a/content/blog/a-new-beginning/flow-alert-drawing.png b/content/posts/a-new-beginning/flow-alert-drawing.png similarity index 100% rename from content/blog/a-new-beginning/flow-alert-drawing.png rename to content/posts/a-new-beginning/flow-alert-drawing.png diff --git a/content/blog/a-new-beginning/flow-alert-photo.jpg b/content/posts/a-new-beginning/flow-alert-photo.jpg similarity index 100% rename from content/blog/a-new-beginning/flow-alert-photo.jpg rename to content/posts/a-new-beginning/flow-alert-photo.jpg diff --git a/content/blog/a-new-beginning/index.md b/content/posts/a-new-beginning/index.md similarity index 100% rename from content/blog/a-new-beginning/index.md rename to content/posts/a-new-beginning/index.md diff --git a/content/blog/a-new-beginning/node-red-dashboard.jpg b/content/posts/a-new-beginning/node-red-dashboard.jpg similarity index 100% rename from content/blog/a-new-beginning/node-red-dashboard.jpg rename to content/posts/a-new-beginning/node-red-dashboard.jpg diff --git a/content/blog/a-new-beginning/prusa-mk3s.jpg b/content/posts/a-new-beginning/prusa-mk3s.jpg similarity index 100% rename from content/blog/a-new-beginning/prusa-mk3s.jpg rename to content/posts/a-new-beginning/prusa-mk3s.jpg diff --git a/content/blog/a-new-beginning/speaker-mount.jpg b/content/posts/a-new-beginning/speaker-mount.jpg similarity index 100% rename from content/blog/a-new-beginning/speaker-mount.jpg rename to content/posts/a-new-beginning/speaker-mount.jpg diff --git a/content/blog/on-ikea-and-legos/index.md b/content/posts/on-ikea-and-legos/index.md similarity index 98% rename from content/blog/on-ikea-and-legos/index.md rename to content/posts/on-ikea-and-legos/index.md index 45d051d..80c4cb9 100644 --- a/content/blog/on-ikea-and-legos/index.md +++ b/content/posts/on-ikea-and-legos/index.md @@ -1,5 +1,6 @@ --- title: "On IKEA and Legos" +date: ??? draft: true --- diff --git a/hugo.toml b/hugo.toml deleted file mode 100644 index 99fd22f..0000000 --- a/hugo.toml +++ /dev/null @@ -1,64 +0,0 @@ -baseURL = 'https://lptr.github.io/' -languageCode = 'en-us' -title = 'Redneck Overengineering' -theme = 'hugo-coder' - -[params] -since = 2021 -author = 'Lóránt Pintér' -description = 'Taking farm automation to extreme levels' -colorScheme = "auto" -hidecolorschemetoggle = true -customSCSS = ["scss/custom.scss"] -commit = "https://github.com/lptr/lptr.github.io/tree/" -contactEmail = "lorant@pindoro.eu" -gravatar = 'lorant@pindoro.eu' - -# Menu -[[menu.main]] -name = "Blog" -weight = 1 -url = "/blog/" - -[outputs] -home = ["html"] -blog = ["html", "rss"] - -# Social links -[[params.social]] -name = "GitHub" -icon = "fa-brands fa-github fa-2x" -weight = 1 -url = "https://github.com/lptr/" - -[[params.social]] -name = "Mastodon" -icon = "fa-brands fa-mastodon fa-2x" -weight = 2 -url = "https://mas.to/@lptr" - -[[params.social]] -name = "LinkedIn" -icon = "fa-brands fa-linkedin fa-2x" -weight = 3 -url = "https://www.linkedin.com/in/lorantpinter/" - -[[params.social]] -name = "RSS" -icon = "fa-solid fa-rss fa-2x" -weight = 4 -url = "https://lptr.github.io/blog/index.xml" -rel = "alternate" -type = "application/rss+xml" - -[params.umami] -siteID = "b6c0fdbc-a1b5-4581-bdd5-ed239d653585" -scriptURL = "https://analytics.cornucopia-machines.eu/script.js" - -[services] -[services.disqus] -shortname = "lptr" - -[caches] -[caches.images] -dir = ':cacheDir/images' diff --git a/layouts/_partials/analytics/umami.html b/layouts/_partials/analytics/umami.html deleted file mode 100644 index 6a9c33a..0000000 --- a/layouts/_partials/analytics/umami.html +++ /dev/null @@ -1,5 +0,0 @@ - -{{- if hugo.IsProduction }} - -{{- end }} - diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html new file mode 100644 index 0000000..0b59e05 --- /dev/null +++ b/layouts/partials/comments.html @@ -0,0 +1 @@ +{{ template "_internal/disqus.html" . }} diff --git a/static/fonts/Lora-Italic-VariableFont_wght.ttf b/static/fonts/Lora-Italic-VariableFont_wght.ttf deleted file mode 100644 index 81d81c6..0000000 Binary files a/static/fonts/Lora-Italic-VariableFont_wght.ttf and /dev/null differ diff --git a/static/fonts/Lora-VariableFont_wght.ttf b/static/fonts/Lora-VariableFont_wght.ttf deleted file mode 100644 index f9eb7ce..0000000 Binary files a/static/fonts/Lora-VariableFont_wght.ttf and /dev/null differ diff --git a/static/site.webmanifest b/static/site.webmanifest deleted file mode 100644 index 8d2c0fb..0000000 --- a/static/site.webmanifest +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "Redneck Overengineering", - "short_name": "RNOE", - "description": "Taking farm automation to extreme levels", - "start_url": "/blog", - "display": "standalone", - "theme_color": "#ffffff", - "background_color": "#ffffff" -} diff --git a/themes/PaperMod b/themes/PaperMod new file mode 160000 index 0000000..54a3c60 --- /dev/null +++ b/themes/PaperMod @@ -0,0 +1 @@ +Subproject commit 54a3c6073518005182f3c3250ddb7e8c0cacd7ad diff --git a/themes/hugo-coder b/themes/hugo-coder deleted file mode 160000 index cb13ec4..0000000 --- a/themes/hugo-coder +++ /dev/null @@ -1 +0,0 @@ -Subproject commit cb13ec4671611990420f29321c4430e928a67518