Live data from Hacker News

How to start a blog using Hugo

flaviocopes.com

51–60 of 111 posts

Re: How to start a blog using Hugo

#51
post #42

> Don’t try to be clever by using a localized domain, don’t use .io. .com just gives a better impression... https://gohugo.io - Hugo website > My suggestion is to avoid subdomains completely. https://themes.gohugo.io - Hugo themes https://discourse.gohugo.io - Hugo forum Hmm

It’s a shame there we are so whipped to .com

Re: How to start a blog using Hugo

#53

The author seems adamant that blog.domain.com is a worse setup than domain.com/blog - I've seen this argument go back and forth a lot, with both sides claiming advantages and disadvantages. I am interested to hear the consensus from HN users as to which is better, and why.

I feel like x.example.com is preferred over example.com/x because it is simpler to move the files around (when you want the same app/bundle of static files to be y.example.com). Browsers by default will make into x.example.com/foo/bar.html when served from x.example.com, but it won't make it into example.com/x/foo/bar.html when served from example.com/x/; something else has to make sure the URLs are correct. The opti…

Reverse proxies do pass the host header which is all you need.

Re: How to start a blog using Hugo

#55
post #6
post #5

Earlier quoted context omitted.

Similar issues from my side. Cryptic documentation, bad dissorganized forum and configuration,... I love the hugo idea but to find one detail you will get into chaos of strange wording and noise. I am using it but I try to configure as small amount as possible as I always get into some undesired behaviour. It seems like it was from begining build with idea and then continued by patch over patch over patch. Cant recom…

I decided I would make a static site the old fashioned way on neocities.org and happily got started. And then I remembered all the double work you have to do linking and making lists and repeating headers/footers (or use frames) and so on. Now I'm back to looking for some simple script that can output static sites without having to spend a month learning a new tool...

It's a mess, and evokes abject horror in some people, but I'll continue to defend the merit of just writing a shell script. I moved it to hugo years ago (ironically) but my old site worked like that: https://github.com/japanoise/website/blob/cdf728d4ebea75cbc9...

It's not pretty to look at, but it can be read, understood, and maintained by one person.

Re: How to start a blog using Hugo

#56
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/infrastructure.

What I do lack 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'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.

Any suggestion on how to find a niche and consistently write about it?

Re: How to start a blog using Hugo

#57

The author seems adamant that blog.domain.com is a worse setup than domain.com/blog - I've seen this argument go back and forth a lot, with both sides claiming advantages and disadvantages. I am interested to hear the consensus from HN users as to which is better, and why.

blog.domain.com is much better from a security perspective since logged-in session cookies from your main domain won't be sent in blog requests (different origin).

That provides protection for if someone manages to get a malicious script into your blog, they can't start making authenticated requests (since it isn't the same origin).

Re: How to start a blog using Hugo

#58
post #42

> Don’t try to be clever by using a localized domain, don’t use .io. .com just gives a better impression... https://gohugo.io - Hugo website > My suggestion is to avoid subdomains completely. https://themes.gohugo.io - Hugo themes https://discourse.gohugo.io - Hugo forum Hmm

It really depends if you want them connected or not.

In the Hugo example, completely agree. But sometimes it can make sense:

Example.com vs members.example.com vs login.example.com

Example.com can be a static website, while login attempts go to the login domain (which also helps for auth/postback config), and members might be the dynamic content that is viewable once logged in. separates infrastructure in an easy way that has no real impact on SEO

Re: How to start a blog using Hugo

#59
Is there a web-based editor that can be used together with these static site generators?

This editor should be small, self-contained and secure and could be located in a separate access-restricted area of the site.

Re: How to start a blog using Hugo

#60
post #6

Earlier quoted context omitted.

I decided I would make a static site the old fashioned way on neocities.org and happily got started. And then I remembered all the double work you have to do linking and making lists and repeating headers/footers (or use frames) and so on. Now I'm back to looking for some simple script that can output static sites without having to spend a month learning a new tool...

It's a mess, and evokes abject horror in some people, but I'll continue to defend the merit of just writing a shell script. I moved it to hugo years ago (ironically) but my old site worked like that: https://github.com/japanoise/website/blob/cdf728d4ebea75cbc9... It's not pretty to look at, but it can be read, understood, and maintained by one person.

I'm pretty sure my problem with everything I tried so far was that it wasn't me building it so I guess I just have to make some simple script to do it for me some day.
Post reply on HN