TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Hugo: A Fast And Flexible Static Site Generator Built In GoLang

99 点作者 spf13将近 12 年前

15 条评论

jff将近 12 年前
I took a quick look at your main.go file and have a suggestion.<p>I strongly recommend against using external dependencies (e.g. bitbucket.org&#x2F;howeyc&#x2F;fsnotify) for something important. It&#x27;s fine for development, but if &quot;howeyc&quot; decides he&#x27;s sick of bitbucket and deletes his account, you&#x27;re now screwed.<p>If you want to use &quot;go get&quot; to install Hugo, make forks of the external dependencies. bitbucket.org&#x2F;spf13&#x2F;fsnotify and what not. You can then keep those updated at your own pace, rather than waking up to see that someone has changed their API and your code no longer compiles.<p>Remember the game &quot;Haunts&quot;? IIRC this was one of their problems--they failed to manage dependencies appropriately and got into major hell. Many C and C++ programs ship source to external libraries along with their own source for this exact reason. We&#x27;ve taken to doing the same.<p>Here&#x27;s what Brian Fitzpatrick has to say about &quot;go get&quot;:<p><i>&quot;Go get is nice, for you know, playing around, but if you&#x27;re doing something serious and you&#x27;re going to deploy binaries to production, your deploy to production script should not involve fetching some random dude&#x27;s stuff on Github&quot;</i><p>We have taken to making a go &quot;workspace&quot; in our repos, with a bash script at the top level and a src&#x2F; directory containing all the libraries and such we&#x27;ve written. The bash script sets GOPATH and compiles everything in src&#x2F;. It&#x27;s quick and you avoid dependency hell.
评论 #6163567 未加载
评论 #6163394 未加载
agentultra将近 12 年前
I like the idea of a static binary with no dependencies. It would be nice if my static blog generator fit in with my usual unix toolset. So good job.<p>Just one nitpick on the marketing copy: <i>why does it matter what it&#x27;s written in?</i> As a user it could be written in assembler for all I care. As long as it works as advertised on the tin and it&#x27;s what I&#x27;m looking for, who cares if it&#x27;s written in Go?<p>Anyway, I&#x27;m looking forward to checking it out and seeing if it&#x27;ll fit my use case.
评论 #6160443 未加载
评论 #6160426 未加载
评论 #6160457 未加载
评论 #6164292 未加载
piranha将近 12 年前
Well, here is mine: <a href="https://github.com/piranha/gostatic" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;piranha&#x2F;gostatic</a><p>Unfortunately it has no pretty documentation, only README on Github. On the other hand, Hugo seems to have a bit more hardcoded configuration, while gostatic was written with &#x27;whatever you want&#x27; idea in mind and is (maybe, I just skimmed though Hugo docs) a bit more tech-savvy people oriented.<p>Anyway, it would be interesting to compare performance. :)
评论 #6159986 未加载
jaredhanson将近 12 年前
Nice work! Here&#x27;s my Node.js-based static site generator, for interested users or devs who want to borrow ideas:<p><a href="https://github.com/jaredhanson/kerouac" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jaredhanson&#x2F;kerouac</a>
vanderZwan将近 12 年前
Dammit, already taken:<p><a href="http://hugo.neocities.org/" rel="nofollow">http:&#x2F;&#x2F;hugo.neocities.org&#x2F;</a><p>Would have been such a nice fit.
评论 #6160353 未加载
asdf3将近 12 年前
This looks great, nice work! A few things I&#x27;d recommend for the future:<p>- Theme plugins; text based as input to Hugo, not golang packages that would have to be compiled.<p>- Editor integration so others can make a WordPress-style site editor. Just conventions about layout, I think?
评论 #6159950 未加载
jimktrains2将近 12 年前
Just a plug for a similar tool I wrote in python. I feel it&#x27;s a bit more lightweight than Hugo.<p><a href="https://github.com/jimktrains/gus" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jimktrains&#x2F;gus</a>
评论 #6160471 未加载
trebor将近 12 年前
This&#x27;d work pretty well with git hooks. Pretty sure you could configure a server so that if you pushed to a repository on it it&#x27;d recompile the website. That&#x27;d be pretty handy.
benburleson将近 12 年前
Why in the world is there a static screenshot of the hugo website, with a button labeled &quot;Get Started&quot;, on the hugo website?
评论 #6161678 未加载
miroslec将近 12 年前
I&#x27;ve seen this a few days ago, and I&#x27;ve started building a Yeoman generator for it.<p>It&#x27;s at <a href="https://github.com/celsomiranda/generator-hugo" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;celsomiranda&#x2F;generator-hugo</a><p>There&#x27;s not much done yet, but all contributions&#x2F;ideas are welcome.
fosap将近 12 年前
So this depends on git, bzr and hg? Why?
评论 #6160319 未加载
trit将近 12 年前
Looks like the contribution guide link on <a href="http://hugo.spf13.com/doc/installing" rel="nofollow">http:&#x2F;&#x2F;hugo.spf13.com&#x2F;doc&#x2F;installing</a> is pointing to the wrong place (<a href="http://doc/contributing" rel="nofollow">http:&#x2F;&#x2F;doc&#x2F;contributing</a>)
评论 #6166980 未加载
joeblau将近 12 年前
This is awesome. I&#x27;ve been looking more and more into these types of generators for creating an OSS portal directory for Web, Mobile, Desktop, and Servers; Essentially a Kippt.<p>Also thanks to everyone posting their projects.
评论 #6161143 未加载
StavrosK将近 12 年前
What&#x27;s the advantage of something like Jekyll over Hugo? I&#x27;m thinking of using the latter, it looks nice.
phaedryx将近 12 年前
git, mercurial, and bazaar?<p>Those dependencies give me pause.
评论 #6160909 未加载
评论 #6160910 未加载