TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

How to start a blog using Hugo

182 pointsby flaviocopesover 5 years ago

26 comments

ealexhudsonover 5 years ago
I recently moved my blog over from Wordpress to Hugo. I think it must be a lot easier to start out from scratch than to migrate something existing; some parts of Hugo are substantially less than straightforward.<p>I certainly don&#x27;t regret the move - much happier having a static site than WP in place - but some of this is much more complex than I had hoped it would be. Amongst other issues;<p>* error messages can be extremely opaque (although usually easy to google, at least) * upgrading to new versions is not always straightforward<p>I deploy my site via rsync, but got bitten immediately by a very odd bug with respect to file timestamps (#6161) where a bunch of my files were warped back to the 1750&#x27;s.<p>I personally am happy with hugo. I probably wouldn&#x27;t recommend it at this point though...
评论 #21978724 未加载
评论 #21978812 未加载
评论 #21979917 未加载
cyberferretover 5 years ago
The author seems adamant that blog.domain.com is a worse setup than domain.com&#x2F;blog - I&#x27;ve seen this argument go back and forth a lot, with both sides claiming advantages and disadvantages.<p>I am interested to hear the consensus from HN users as to which is better, and why.
评论 #21979274 未加载
评论 #21979098 未加载
评论 #21979115 未加载
评论 #21979112 未加载
评论 #21979255 未加载
评论 #21979289 未加载
评论 #21979105 未加载
评论 #21979406 未加载
评论 #21979923 未加载
ThinkBeatover 5 years ago
I keep wanting to use Hugo, and I have made a few attempts. Moving away from Wordpress and its problems would be good.<p>I do think a few features are missing that I find valuable:<p>* Search (you can add it as an external service I haven&#x27;t found one I trust and like yet. * Comments, there are several third-party comment providers that I can use, I tried out Disqus for a while but I didnt like nor trust them. I look at using forum software for the comments but then I have to run that and I might as well stay in WP<p>Then there are a few plug-ins I use and like.<p>The worst part of using WP is of course security. I have switched to fully managed WP hosting so I dont have to worry too much about that. I do still worry about plugins but my provider does not allow a lot of plug-ins due to issues and I can totally appreciate that.
评论 #21978989 未加载
评论 #21979141 未加载
评论 #21979197 未加载
评论 #21978904 未加载
koevetover 5 years ago
There is no lack of technical choices when it comes to starting a blog. I can start five blogs in the next 30 minutes, each one on a different platform&#x2F;infrastructure.<p>What I <i>do lack</i> is something interesting to write about, in a consistent manner. I have been writing code for a long time. I did build some interesting stuff. I&#x27;m currently working on a startup that does use some blog-worthy tech: any attempt ends up with very long essay-shaped posts, which are extremely time-consuming to write and frankly not so interesting.<p>Any suggestion on how to find a niche and consistently write about it?
评论 #21979636 未加载
评论 #21979491 未加载
评论 #21983382 未加载
评论 #21979617 未加载
评论 #21979816 未加载
评论 #21979499 未加载
评论 #21982597 未加载
评论 #21980032 未加载
评论 #21980065 未加载
评论 #21979611 未加载
评论 #21979462 未加载
评论 #21983069 未加载
评论 #21979684 未加载
bjarnehover 5 years ago
&gt; Don’t try to be clever by using a localized domain, don’t use .io. .com just gives a better impression...<p><a href="https:&#x2F;&#x2F;gohugo.io" rel="nofollow">https:&#x2F;&#x2F;gohugo.io</a> - Hugo website<p>&gt; My suggestion is to avoid subdomains completely.<p><a href="https:&#x2F;&#x2F;themes.gohugo.io" rel="nofollow">https:&#x2F;&#x2F;themes.gohugo.io</a> - Hugo themes<p><a href="https:&#x2F;&#x2F;discourse.gohugo.io" rel="nofollow">https:&#x2F;&#x2F;discourse.gohugo.io</a> - Hugo forum<p>Hmm
评论 #21979429 未加载
评论 #21979567 未加载
评论 #21979298 未加载
feistypharitover 5 years ago
Anyone looking for a static blog but that wants a decent interface for editing, check out forestry.io. once setup, it commits to GitHub for you, your user is none the wiser. If the service ever goes away, you still have your blog in GitHub. And you can deploy anywhere (s3, netlify, etc). I use this setup for my non technical wife.
评论 #21979445 未加载
thomasedwardsover 5 years ago
Hugo is super, but the official docs make it look a lot scarier than it is. It’s a solid static site builder with a lot of power under the hood.
Tepixover 5 years ago
Is there a web-based editor that can be used together with these static site generators?<p>This editor should be small, self-contained and secure and could be located in a separate access-restricted area of the site.
评论 #21979631 未加载
评论 #21982607 未加载
评论 #21979613 未加载
评论 #21979913 未加载
评论 #21979627 未加载
_emacsomancer_over 5 years ago
And if you want to do it from inside Emacs&#x2F;using org-mode, see: <a href="https:&#x2F;&#x2F;ox-hugo.scripter.co&#x2F;" rel="nofollow">https:&#x2F;&#x2F;ox-hugo.scripter.co&#x2F;</a>
ripley12over 5 years ago
I&#x27;ve been using Hugo for a few years. I like it generally, but I have mixed feelings about using Go for templating. Compilation and generation is blazing fast, which is great for short edit-compile-debug cycles.<p>On the other hand, Go&#x27;s lack of generics makes working with collections harder than it should be... and much of templating involves working with collections.<p>To give a concrete example, I wanted to create a page where I group categories by post count. Hugo has methods to group <i>pages</i>, but not categories, so I rolled my own imperative grouping code. It wasn&#x27;t difficult, but it would have been simpler to do declaratively in many other ecosystems (say, .NET with LINQ).
stock_toasterover 5 years ago
I used hugo for a while, but found myself struggling against it more often than I liked. I have since moved on to using other options.
评论 #21978947 未加载
Kovahover 5 years ago
I moved from WordPress to Hugo last year and dont regret it. If you search for some configuration examples for multi-language blogs and some shortcodes for image generation and so on, feel free to check out the blog post about it. <a href="https:&#x2F;&#x2F;blog.kovah.de&#x2F;en&#x2F;2019&#x2F;static-blog-with-hugo&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blog.kovah.de&#x2F;en&#x2F;2019&#x2F;static-blog-with-hugo&#x2F;</a> Source is available on Github: <a href="https:&#x2F;&#x2F;github.com&#x2F;Kovah&#x2F;blog.kovah.de" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Kovah&#x2F;blog.kovah.de</a>
jelgerover 5 years ago
I like the idea of static blogs. However, I didn&#x27;t accomplish to find a great workflow to use hugo from my android phone while traveling. Using git on a phone is a pain
评论 #21979195 未加载
评论 #21979018 未加载
PMan74over 5 years ago
I&#x27;ve a few sites on Hugo. If you&#x27;re not an active developer (like me) you can deploy a site from a Netlify template and tweak from there. So pretty much the opposite of &quot;zero to deployment&quot; - gives you something working to start with.<p><a href="https:&#x2F;&#x2F;templates.netlify.com&#x2F;template&#x2F;hugo-starter-blog-theme-kaldi&#x2F;" rel="nofollow">https:&#x2F;&#x2F;templates.netlify.com&#x2F;template&#x2F;hugo-starter-blog-the...</a>
tkainradover 5 years ago
Very nice and detailed tutorial! I like also other content on your page and bookmarked your blog :)<p>I created a similar post a while ago, might be interesting for some who want to use GitLab instead of GitHub + Netlify:<p><a href="https:&#x2F;&#x2F;tkainrad.dev&#x2F;posts&#x2F;using-hugo-gitlab-pages-and-cloudflare-to-create-and-run-this-website&#x2F;" rel="nofollow">https:&#x2F;&#x2F;tkainrad.dev&#x2F;posts&#x2F;using-hugo-gitlab-pages-and-cloud...</a>
saagarjhaover 5 years ago
&gt; It’s too easy to get trapped in making things perfectly like you want, but the important thing is the content.<p>Where&#x27;s the fun in that :)
sacado2over 5 years ago
I&#x27;ve been using Hugo for a few years now. Pretty long to set up if you want to addapt one of the available templates to suit your needs, but then it&#x27;s really great!<p>I would not advise it to a non-programmer&#x2F;tech savvy person though.
tuesday20over 5 years ago
Those using static site generators - how do you handle search?
评论 #21983313 未加载
评论 #21979272 未加载
评论 #21979320 未加载
throwaway0x77over 5 years ago
When comes to static site, I found that MkDocs[1] is easier to use. I like when I use it with Material theme[2].<p>[1]: <a href="https:&#x2F;&#x2F;www.mkdocs.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.mkdocs.org&#x2F;</a> [2]: <a href="https:&#x2F;&#x2F;squidfunk.github.io&#x2F;mkdocs-material&#x2F;" rel="nofollow">https:&#x2F;&#x2F;squidfunk.github.io&#x2F;mkdocs-material&#x2F;</a>
评论 #21979540 未加载
dablwebover 5 years ago
I use Hugo for my website too! Highly recommend.<p>I also put together a video tutorial of how I set up my CI&#x2F;CD pipeline to deploy to AWS using Terraform.<p><a href="https:&#x2F;&#x2F;devbrett.com&#x2F;videos&#x2F;2018-07-22-static-website-terraform&#x2F;" rel="nofollow">https:&#x2F;&#x2F;devbrett.com&#x2F;videos&#x2F;2018-07-22-static-website-terraf...</a><p>The whole site costs me about 50c a month on S3 + Cloudfront.
lewis1028282over 5 years ago
I run my blog <a href="https:&#x2F;&#x2F;www.lewis8s.codes" rel="nofollow">https:&#x2F;&#x2F;www.lewis8s.codes</a> on AWS Amplify. It connects to a GitHub repo and builds it every time there is a commit to master. Uses CloudFront on the backend too.<p>Costs me around $0.01 per build which isn&#x27;t bad. Just easier than writing my own script.
heinrichhartmanover 5 years ago
Off-topic: Any advise on how to migrate a Jekyll blog to Hugo?<p>Is it practical to keep the rendered HTML as static pages, and just use hugo&#x2F;markdown for new posts?<p>Migrating the markdown files to hugo looks like a pain. Header files need to be migrated. Also jekyll plugins will obviously not work.<p>Might be better to just leave the old stuff as-is...
评论 #21979252 未加载
bar_deover 5 years ago
Hugo is a great tool. I use it with my small project&#x27;s websites for easily changing the content and getting hosting for nearly free.<p>Just adding new posts, push the repo and let the build and deployment scripts do their thing.<p>And - don&#x27;t forget - the less dynamic your site is the less attractive it becomes for the bad guys.
heycesrover 5 years ago
Shameless plug: I built <a href="https:&#x2F;&#x2F;typehut.com" rel="nofollow">https:&#x2F;&#x2F;typehut.com</a> as a simpler alternative to classic blog and publishing systems. It&#x27;s super easy to get started and it has some nice things like email subscriptions built-in.<p>If anybody tries it out let me know!
评论 #21980287 未加载
stilisstukover 5 years ago
Are Hugo really substantially better than say pelican or Nikola or all the other &#x27;established&#x27; SSG?
评论 #21979741 未加载
评论 #21979139 未加载
flagpackover 5 years ago
I am currently moving from WordPress to Hugo, so your tutorial arrived just in time. Are your posts part of the content of your ebook series? Just asking in admiration of your frequency of daily new posts.
评论 #21978787 未加载