koanf
Hugo
koanf | Hugo | |
---|---|---|
12 | 549 | |
2,370 | 72,657 | |
- | 1.0% | |
7.6 | 9.8 | |
16 days ago | 2 days ago | |
Go | Go | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
koanf
-
Nees help install knadh/koanf
LINK: https://github.com/knadh/koanf
-
App init and graceful watch lib recommendations ?
For configuration, I like Koanf.
-
Two ways to provide configuration: command-line, yaml file.
Of course. You should always use a good config package. caarlos0/env is okay but https://github.com/knadh/koanf is a better all around solution imo.
- Simplify Your Configurations in Go
-
Golang equivalent of Python’s click (CLT framework)
You can also use Viper with urfave/cli, or you can replace Viper with knadh/koanf, which I personally prefer.
-
Viper – Go Configuration with Fangs
Use viper with care. It has some dangerous fundamental flaws [1]. We got bitten hard, submitted a PR [2] and followed up for a year and a half to no avail, before I went ahead and reinvented the wheel and wrote koanf (plug), specifically to avoid viper's flaws.
Most importantly:
- Breaks JSON, YAML, TOML etc. language specs by forcibly lowercasing all keys internally. Dangerous because it can silently merge differently cased config keys into lowercase.
- Hard codes big unnecessary dependencies into the core, significantly bloating build sizes. No separation or abstraction.
[1] https://github.com/spf13/viper/pull/635
[2] https://github.com/knadh/koanf#alternative-to-viper
-
Extracting embedded files
It's not hard to a) look for a key in an environment variable b) accept a key as a parameter c) load a key from a file d) all of the above with something like koanf
- What are some good open source project to read when learning Go?
-
Coral, a friendly Cobra fork with nearly all its features, but only 4 dependencies
Came across this the other day https://github.com/knadh/koanf as an alternative to Viper.
-
What are your favorite packages to use?
https://github.com/knadh/koanf for config management. Readme contains why it's a good alternative to viper.
Hugo
-
Building static websites
At one point though I realized there is a scaling problem with my build minutes. I knew that golang has considerably faster builds and in my case the easy fix is swapping over to Hugo.
-
Creating excerpts in Astro
This blog is running on Hugo. It had previously been running on Jekyll. Both these SSGs ship with the ability to create excerpts from your markdown content in 1 line or thereabouts.
-
Craft Your GitHub Profile Page in 60 Seconds with Zero Code, Absolutely Free
Hugo
- Release v0.123.0 · Gohugoio/Hugo
-
Top 5 Open-Source Documentation Development Platforms of 2024
Hugo is a popular static site generator specifically designed to create websites and documentation lightning-fast. Its minimalist approach, emphasis on speed, and ease of use have made it popular among developers, technical writers, and anybody looking to construct high-quality websites without the complexity of typical CMS platforms.
-
Ask HN: Looking for lightweight personal blogging platform
As per many other comments, it sounds like a static site generator like Hugo (https://gohugo.io/) or Jekyll (https://jekyllrb.com/), hosted on GitHub Pages (https://pages.github.com/) or GitLab Pages (https://about.gitlab.com/stages-devops-lifecycle/pages/), would be a good match. If you set up GitHub Actions or GitLab CI/CD to do the build and deploy (see e.g. https://gohugo.io/hosting-and-deployment/hosting-on-github/), your normal workflow will simply be to edit markdown and do a git push to make your changes live. There are a number of pre-built themes (e.g. https://themes.gohugo.io/) you can use, and these are realtively straightforward to tweak to your requirements.
-
Get People Interested in Contributing to Your Open Project
Create the technical documentation of your project You can use any of the following options: * A wiki, like the ArchWiki that uses MediaWiki * Read the Docs, used by projects like Setuptools. Check Awesome Read the Docs for more examples. * Create a website * Create a blog, like the documentation of Blowfish, a theme for Hugo.
-
Writing a SSG in Go
Doing this made me appreciate existing SSGs like Hugo and Next.js even more👏👏
- Hugo 0.122 supports LaTeX or TeX typesetting syntax directly from Markdown
-
Why Blogging Platforms Suck
I suggest hugo: https://gohugo.io/
Generates a completely static website from MD (and other formats) files; also handles themes (including a lot of them rendering well on mobile), and different types of content - posts, articles, etc. - depending on the theme.
It's open source and, being completely static, cheap as fuck to self host.
What are some alternatives?
viper - Go configuration with fangs
astro - The web framework for content-driven websites. ⭐️ Star to support our work!
config - JSON or YAML configuration wrapper with convenient access methods.
MkDocs - Project documentation with Markdown.
konfig - Composable, observable and performant config handling for Go for the distributed processing era
Pelican - Static site generator that supports Markdown and reST syntax. Powered by Python.
cleanenv - ✨Clean and minimalistic environment configuration reader for Golang
eleventy 🕚⚡️ - A simpler site generator. Transforms a directory of templates (of varying types) into HTML.
kelseyhightower/envconfig - Golang library for managing configuration data from environment variables
Hexo - A fast, simple & powerful blog framework, powered by Node.js.
go-simple-config - open source for accessing and storing configuration
obsidian-export - Rust library and CLI to export an Obsidian vault to regular Markdown