Giter Site home page Giter Site logo

schnerring / hugo-theme-gruvbox Goto Github PK

View Code? Open in Web Editor NEW
168.0 168.0 43.0 13.46 MB

A retro-looking Hugo theme inspired by gruvbox. The pastel colors are high contrast, easily distinguishable, pleasing to the eye, and feature light and dark color palettes.

License: MIT License

HTML 48.68% CSS 35.14% JavaScript 16.18%
dark-mode flexsearch gruvbox hugo hugo-theme jsonresume theme

hugo-theme-gruvbox's Introduction

πŸ‘‹ Greetings from Switzerland

When I was a first grader in the mid-90s, I got my first Windows 95 computer as a gift from my dad. Since then, I have been fascinated by computers and the Internet, giving me access to an ever-expanding universe. I’ve lived throughout the digital age since its dawn and I continue to be amazed at how technology is shaping our world ever faster, for better and for worse.

With infinite amounts of information at my fingertips, I love discovering and learning new things every day. I enjoy building (and breaking) tech to efficiently solve real-world problems. When I’m on my own time, I sometimes like over-engineering things just because I can. πŸš€

However, few soulless corporations control the Web. I actively sponsor and contribute to open-source projects to make the WWW a more human and independent place again. I strive to regain as much of my digital privacy as possible and educate others by documenting my journey. But it’s tough β€” a constant balancing act between convenience and nuisance, between being an advisor and being a preacher, between being a cypherpunk and being a hypocrite.

On my website, I share my thoughts and notes about things that I’m excited about and working on, and hope to connect with people having a similar mindset. I’d love to hear from you!

πŸ”¨ Recent Pull Requests

πŸ“ Recent Blog Posts

πŸ“« How to Reach Me

πŸ“Š Stats

Michael Schnerring's GitHub Stats Michael Schnerring's Top Languages

hugo-theme-gruvbox's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

hugo-theme-gruvbox's Issues

Theme Installation Issue

Output from hugo server:
Start building sites …
hugo v0.116.1-3e1ea030a5897addaf9d113d0826709fe07f77c0+extended windows/amd64 BuildDate=2023-08-01T07:24:54Z VendorInfo=gohugoio

WARN found no layout file for "html" for kind "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN found no layout file for "html" for kind "home": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.

-------------------+-----
Pages | 3
Paginator pages | 0
Non-page files | 0
Static files | 0
Processed images | 0
Aliases | 0
Sitemaps | 1
Cleaned | 0

Built in 5 ms
Environment: "development"
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)

Output on localhost:
image

OS: Windows

Error about render of "page" failed: execute of template failed

Hello Michael, I used gruvbox as my blog theme for long time, and I really like it. Thanks for your great work!!
But recently I can't successfully run local host. When I run hugo server I got this Error:
Do you know how to fix it?

E:\gruvbox>hugo server
port 1313 already in use, attempting to use an available port
Start building sites …
hugo v0.89.0-ADE966B8+extended windows/amd64 BuildDate=2021-11-02T10:00:18Z VendorInfo=gohugoio
ERROR 2023/06/18 22:05:09 render of "page" failed: execute of template failed: template: _default/single.html:9:9: executing "_default/single.html" at <partial "header.html" .>: error calling partial: execute of template failed: template: partials/header.html:42:9: executing "partials/header.html" at <partial "icons/tabler-icon.html" "menu-2">: error calling partial: execute of template failed: template: partials/icons/tabler-icon.html:1:3: executing "partials/icons/tabler-icon.html" at <partial "icons/svg.html" (printf "tabler-icons/%s.svg" .)>: error calling partial: "E:\gruvbox\layouts\partials\icons\svg.html:2:18": execute of template failed: template: partials/icons/svg.html:2:18: executing "partials/icons/svg.html" at <$path>: nil pointer evaluating resource.Resource.Content
ERROR 2023/06/18 22:05:09 render of "page" failed: execute of template failed: template: cv/single.html:9:9: executing "cv/single.html" at <partial "header.html" .>: error calling partial: execute of template failed: template: partials/header.html:42:9: executing "partials/header.html" at <partial "icons/tabler-icon.html" "menu-2">: error calling partial: execute of template failed: template: partials/icons/tabler-icon.html:1:3: executing "partials/icons/tabler-icon.html" at <partial "icons/svg.html" (printf "tabler-icons/%s.svg" .)>: error calling partial: "E:\gruvbox\layouts\partials\icons\svg.html:2:18": execute of template failed: template: partials/icons/svg.html:2:18: executing "partials/icons/svg.html" at <$path>: nil pointer evaluating resource.Resource.Content
ERROR 2023/06/18 22:05:09 render of "page" failed: execute of template failed: template: _default/single.html:9:9: executing "_default/single.html" at <partial "header.html" .>: error calling partial: execute of template failed: template: partials/header.html:42:9: executing "partials/header.html" at <partial "icons/tabler-icon.html" "menu-2">: error calling partial: execute of template failed: template: partials/icons/tabler-icon.html:1:3: executing "partials/icons/tabler-icon.html" at <partial "icons/svg.html" (printf "tabler-icons/%s.svg" .)>: error calling partial: "E:\gruvbox\layouts\partials\icons\svg.html:2:18": execute of template failed: template: partials/icons/svg.html:2:18: executing "partials/icons/svg.html" at <$path>: nil pointer evaluating resource.Resource.Content
ERROR 2023/06/18 22:05:09 render of "page" failed: execute of template failed: template: _default/single.html:9:9: executing "_default/single.html" at <partial "header.html" .>: error calling partial: execute of template failed: template: partials/header.html:42:9: executing "partials/header.html" at <partial "icons/tabler-icon.html" "menu-2">: error calling partial: execute of template failed: template: partials/icons/tabler-icon.html:1:3: executing "partials/icons/tabler-icon.html" at <partial "icons/svg.html" (printf "tabler-icons/%s.svg" .)>: error calling partial: "E:\gruvbox\layouts\partials\icons\svg.html:2:18": execute of template failed: template: partials/icons/svg.html:2:18: executing "partials/icons/svg.html" at <$path>: nil pointer evaluating resource.Resource.Content
Error: Error building site: failed to render pages: render of "page" failed: execute of template failed: template: _default/single.html:9:9: executing "_default/single.html" at <partial "header.html" .>: error calling partial: execute of template failed: template: partials/header.html:42:9: executing "partials/header.html" at <partial "icons/tabler-icon.html" "menu-2">: error calling partial: execute of template failed: template: partials/icons/tabler-icon.html:1:3: executing "partials/icons/tabler-icon.html" at <partial "icons/svg.html" (printf "tabler-icons/%s.svg" .)>: error calling partial: "E:\gruvbox\layouts\partials\icons\svg.html:2:18": execute of template failed: template: partials/icons/svg.html:2:18: executing "partials/icons/svg.html" at <$path>: nil pointer evaluating resource.Resource.Content
Built in 1699 ms

In another issue I found this, but still can not fix it.

hugo mod get -u ./... 
hugo mod npm pack 
npm install 

I don't have too much knowledge of coding. If you need more information, please let me knowπŸ˜₯

Implement i18n

Things to translate

  • CV
  • Read more
  • Modified date
  • Reading time
  • Date formats(?)

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/publish.yml
  • actions/checkout v4
  • actions/setup-node v4
  • peaceiris/actions-hugo v3
  • stefanzweifel/git-auto-commit-action v5
  • actions/checkout v4
  • actions/setup-node v4
  • peaceiris/actions-hugo v3
  • cloudflare/pages-action v1
.github/workflows/renovate-hugo-modules.yml
  • actions/checkout v4
  • peaceiris/actions-hugo v3
  • stefanzweifel/git-auto-commit-action v5
gomod
go.mod
  • go 1.22.4
npm
package.hugo.json
  • @tabler/icons ^2.47.0
  • flexsearch 0.7.31
  • normalize.css ^8.0.1
  • prism-themes ^1.9.0
  • prismjs ^1.29.0
  • typeface-fira-code ^1.1.13
  • typeface-roboto-slab ^1.1.13
  • @fullhuman/postcss-purgecss ^6.0.0
  • cssnano ^7.0.3
  • eslint ^8.57.0
  • eslint-config-prettier ^9.1.0
  • eslint-plugin-prettier ^5.1.3
  • husky ^9.0.11
  • lint-staged ^15.2.6
  • markdownlint-cli ^0.41.0
  • postcss ^8.4.38
  • postcss-cli ^11.0.0
  • postcss-custom-media ^10.0.6
  • postcss-import ^16.1.0
  • postcss-nesting ^12.1.5
  • postcss-preset-env ^9.5.14
  • postcss-url ^10.1.3
  • prettier ^3.3.2
  • prettier-plugin-go-template ^0.0.15
  • stylelint ^16.6.1
  • stylelint-prettier ^5.0.0

  • Check this box to trigger a request for Renovate to run again on this repository

Improve internal templates

We need to figure out if the internal Twitter, RSS etc. internal templates are sufficient or need to be optimized for SEO and more.

Quickstart throws an error

When i follow the quickstart instructions and run hugo server i get this error message:

WARN 2022/08/18 21:53:25 Module "github.com/schnerring/hugo-theme-gruvbox" is not compatible with this Hugo version; run "hugo mod graph" for more information.
Start building sites …
hugo v0.101.0-466fa43c16709b4483689930a4f9ac8add5c9f66 windows/amd64 BuildDate=2022-06-16T07:09:16Z VendorInfo=gohugoio
ERROR 2022/08/18 21:53:31 render of "home" failed: "C:\Hugo\test\layouts\index.html:5:5": execute of template failed: template: index.html:5:5: executing "main" at <partial "post-list.html" $paginator>: error calling partial: "C:\Hugo\test\layouts\partials\post-list.html:3:7": execute of template failed: template: partials/post-list.html:3:7: executing "partials/post-list.html" at <partial "post-header.html" (dict "page" . "pageIndex" $pageIndex)>: error calling partial: "C:\Hugo\test\layouts\partials\post-header.html:40:9": execute of template failed: template: partials/post-header.html:40:9: executing "partials/post-header.html" at <partial "image.html" (dict "src" .page.Params.cover.src "alt" .page.Params.cover.alt "caption" .page.Params.cover.caption "page" .page "lazy" $lazy)>: error calling partial: "C:\Hugo\test\layouts\partials\image.html:55:28": execute of template failed: template: partials/image.html:55:28: executing "partials/image.html" at <$image.Resize>: error calling Resize: image "C:\Hugo\test\content\blog\image-optimization\alexandre-van-thuan-mr9FouttLGY-unsplash.jpg": this feature is not available in your current Hugo version, see https://goo.gl/YMrWcn for more information
ERROR 2022/08/18 21:53:31 render of "section" failed: "C:\Hugo\test\layouts_default\list.html:2:5": execute of template failed: template: _default/list.html:2:5: executing "main" at <partial "post-list.html" .Paginator>: error calling partial: "C:\Hugo\test\layouts\partials\post-list.html:3:7": execute of template failed: template: partials/post-list.html:3:7: executing "partials/post-list.html" at <partial "post-header.html" (dict "page" . "pageIndex" $pageIndex)>: error calling partial: "C:\Hugo\test\layouts\partials\post-header.html:40:9": execute of template failed: template: partials/post-header.html:40:9: executing "partials/post-header.html" at <partial "image.html" (dict "src" .page.Params.cover.src "alt" .page.Params.cover.alt "caption" .page.Params.cover.caption "page" .page "lazy" $lazy)>: error calling partial: "C:\Hugo\test\layouts\partials\image.html:55:28": execute of template failed: template: partials/image.html:55:28: executing "partials/image.html" at <$image.Resize>: error calling Resize: image "C:\Hugo\test\content\blog\image-optimization\alexandre-van-thuan-mr9FouttLGY-unsplash.jpg": this feature is not available in your current Hugo version, see https://goo.gl/YMrWcn for more information
Error: Error building site: failed to render pages: render of "page" failed: "C:\Hugo\test\layouts_default\single.html:3:7": execute of template failed: template: _default/single.html:3:7: executing "main" at <partial "post-header.html" (dict "page" . "pageIndex" 0)>: error calling partial: "C:\Hugo\test\layouts\partials\post-header.html:40:9": execute of template failed: template: partials/post-header.html:40:9: executing "partials/post-header.html" at <partial "image.html" (dict "src" .page.Params.cover.src "alt" .page.Params.cover.alt "caption" .page.Params.cover.caption "page" .page "lazy" $lazy)>: error calling partial: "C:\Hugo\test\layouts\partials\image.html:55:28": execute of template failed: template: partials/image.html:55:28: executing "partials/image.html" at <$image.Resize>: error calling Resize: image "C:\Hugo\test\content\blog\image-optimization\alexandre-van-thuan-mr9FouttLGY-unsplash.jpg": this feature is not available in your current Hugo version, see https://goo.gl/YMrWcn for more information
Built in 6226 ms

I installed hugo just 2 days ago, so i don't know what the problem would be there

my hugo version:
hugo version

hugo v0.101.0-466fa43c16709b4483689930a4f9ac8add5c9f66 windows/amd64 BuildDate=2022-06-16T07:09:16Z VendorInfo=gohugoio

Implement tag cloud partial

  • Implement tag cloud
  • Add it to the 404 page
  • Display in sidebar
  • Add maxTagCount config param that limits the number of displayed tags

Support nested menus

The current implementation doesn't support menus with a lot of items or complex sub-menus

Execute Template failed

Awesome theme ❀️

However,I am unable to get the theme working with json-resume

I get this error or a variation of it, depending on what I put on data/json_resume/en.json

Error: error building site: render: failed to render pages: render of "page" failed: "/var/folders/1z/rkgl7bkd3572l8bv3y56y6rw0000gn/T/hugo_cache/modules/filecache/modules/pkg/mod/github.com/schnerring/[email protected]/layouts/_default/baseof.html:14:11": 
execute of template failed: template: _default/single.html:14:11: executing "_default/single.html" at <partial "sidebar.html" .>: error calling partial: "/var/folders/1z/rkgl7bkd3572l8bv3y56y6rw0000gn/T/hugo_cache/modules/filecache/modules/pkg/mod/github.com/schnerring/[email protected]/layouts/partials/sidebar.html:17:9": 
execute of template failed: template: partials/sidebar.html:17:9: executing "partials/sidebar.html" at <partial "json-resume/basics.html" .>: error calling partial: "/var/folders/1z/rkgl7bkd3572l8bv3y56y6rw0000gn/T/hugo_cache/modules/filecache/modules/pkg/mod/github.com/schnerring/[email protected]/layouts/partials/json-resume/basics.html:58:13": execute of template failed: template: partials/json-resume/basics.html:58:13: 
executing "partials/json-resume/basics.html" at <partial "simple-icon.html" (dict "url" .url "network" .network "username" .username)>: error calling partial: "/var/folders/1z/rkgl7bkd3572l8bv3y56y6rw0000gn/T/hugo_cache/modules/filecache/modules/pkg/mod/github.com/schnerring/[email protected]/layouts/partials/simple-icon.html:8:22": execute of template failed: template: partials/simple-icon.html:8:22: executing "partials/simple-icon.html" at <$path>: nil pointer evaluating resource.Resource.Content

To help you troubleshoot, this could help

"<>/pkg/mod/github.com/schnerring/hugo-mod-json-resume@<>/layouts/partials/json-resume/basics.html:58:13": execute of template failed: template: partials/json-resume/basics.html:58:13: 
executing "partials/json-resume/basics.html" at <partial "simple-icon.html" (dict "url" .url "network" .network "username" .username)>: error calling partial: "<>pkg/mod/github.com/schnerring/hugo-mod-json-resume@v<>/layouts/partials/simple-icon.html:8:22": execute of template failed: template: partials/simple-icon.html:8:22: executing "partials/simple-icon.html" at <$path>: nil pointer evaluating 

Updating the modules does not solve the problem

I can get the site to work with empty data/json_resume/en.json but the issue with that is content is not centered(this could be a nice addition if one does not wish to add json_resume)

Improve README

The README is out-of-date and needs an update:

  • Installation instructions
  • Contribution guidelines
  • Architecture Overview: explain toolchain (npm, esbuild, PostCSS, linters)

Katex support

Hey, great work on the theme! I plan on using a lot of math equations so I was wondering whether you could add LaTeX rendering support. I could only get it working by editing the theme itself, but if there is a way without editing the theme directly, please let me know.

Search on localhost only works for non-1313 Ports

Hi Michael, I encountered a strange scenario for this theme's Search functionality while testing on my local machine.

I followed the Install The Theme in the README.

In my new Hugo site, I created a new blog post with hugo new blog/name-of-post-here/index.md and started the Hugo server on localhost.

Somehow Search only succeeds if the Hugo server is started on a non-1313 Port.
Search fails if the Hugo server starts on the default 1313 Port.

As far as I can tell only Search is affect by the Port being 1313.

Please see screenshots.

Port_1313_Search_Fails Non_Port_1313_Search_Succeeds

Improve module configuration

Currently, to use this theme, a site needs a config like this:

[module]
  [[module.imports]]
    path = "github.com/schnerring/hugo-gruvbox"
  [[module.mounts]]
    source = "assets"
    target = "assets"
  [[module.mounts]]
    source = "layouts"
    target = "layouts"
  [[module.mounts]]
    source = "static"
    target = "static"
  [[module.mounts]]
    source = "node_modules/prismjs"
    target = "assets/prismjs"
  [[module.mounts]]
    source = "node_modules/prism-themes/themes"
    target = "assets/prism-themes"
  [[module.mounts]]
    source = "node_modules/typeface-fira-code/files"
    target = "static/fonts"
  [[module.mounts]]
    source = "node_modules/typeface-roboto-slab/files"
    target = "static/fonts"
  [[module.mounts]]
    source = "node_modules/@tabler/icons/icons"
    target = "assets/tabler-icons"
  [[module.mounts]]
    source = "node_modules/simple-icons/icons"
    target = "assets/simple-icons"

A configuration like this would be more desirable:

[module]
  _merge = "deep"
  [[module.imports]]
    path = "github.com/schnerring/hugo-gruvbox"

This might be possible, but needs investigation. See the following Hugo issue:

gohugoio/hugo#8933 (comment)

Question about search

Hi,
I just ported my small blog/site from Wordpress to a github site using hugo/gruvbox.

Firstly, very cool - I like it a lot!

My question related to the search option - it only seems to search/index blog/post items.
Ideally I'd like it to search all my content.

I checked your personal site and it seems to behave the same.

Wondering if this line of code is pointing to some config that can be added/tweaked to add extra sections to index?

{{ $list := (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }}

Thanks again - your theme is awesome.

setting defaultTheme has no effect

Setting params.defaultTheme in ./config/_default/config.toml has no effect.
No matter whether set to "dark" or "light", the theme is always dark.

On the other hand, setting params.themeColor and params.themeContrast have the desired effects.

Any way to remove the sidebar with the profile and bio?

I'd love to be able to use this as just a blog without my big head, socials, and bio on the side. Any way to remove it via the config? I can tear up the layout manually on my own locally, but I feel like there should be a better way.

Critical CSS not being included in production builds

I have a custom css file with the path assets/css/critical/01_giscus.css. When running Hugo as a server, it is included in the HTML, but when running hugo by itself for production builds it is not included.

I know this because when I run hugo server --renderToDisk I can view the generated files in public and see that the CSS is there. I also set relativeURLs = true in Hugo.toml with no effect. Not sure if I'm doing something wrong or if it's a bug.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.