Live data from Hacker News

How to start a blog using Hugo

flaviocopes.com

41–50 of 111 posts

Re: How to start a blog using Hugo

#41
Off-topic: Any advise on how to migrate a Jekyll blog to Hugo?

Is it practical to keep the rendered HTML as static pages, and just use hugo/markdown for new posts?

Migrating the markdown files to hugo looks like a pain. Header files need to be migrated. Also jekyll plugins will obviously not work.

Might be better to just leave the old stuff as-is...

Re: How to start a blog using Hugo

#43

Off-topic: Any advise on how to migrate a Jekyll blog to Hugo? Is it practical to keep the rendered HTML as static pages, and just use hugo/markdown for new posts? Migrating the markdown files to hugo looks like a pain. Header files need to be migrated. Also jekyll plugins will obviously not work. Might be better to just leave the old stuff as-is...

We did that on our project were using markdown in jekyll and kept it in hugo. Hugo has its own plugins, not that hard really.

EDIT: Hugo has a plugin to import a jekyll project, you can check maybe it will do most of the work for you. Link https://gohugo.io/commands/hugo_import_jekyll/

Re: How to start a blog using Hugo

#44

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.

What is the business justification for creating a blog on your website?

In general I would think that it is to create contents and SEO, in which case I believe that it is better to host it under the website's domain. On the other hand you may be targeting a different audience from your main site/product. For example Uber, Netflix at al have "engineering blogs" these days, which clearly have no relation to their product but perhaps rather aimed at being a recruitment tool. In such case you might want to use different domains (which incidentally is what both Uber and Netflix do).

I see people commenting on the technical aspects but the differences are minor and the business goals should be driving the decision.

Re: How to start a blog using Hugo

#46
post #24

Earlier quoted context omitted.

Yes this is where I got blocked on this too. I like using the WP Android app to upload photos when travelling. Obviously a static site by its very nature cannot interact with a phone app, so this seems like a difficult/intractable problem.

I have the same use case and have been wondering about solutions too. I'm hosting on Netlify, and when I push to my gitlab repository, Netlify's CI fetches, builds and deploys the site. I've wondered if I can run a script somewhere that periodically checks a private Instagram account (so not my main one), and when it sees a new post, it would download the photo and caption, creates a Markdown post and pushes everythi…

You could potentially use a regularly scheduled pipeline in GitLab CI to do this. You'd need to use a user token instead of the pipeline token since you want to push back into the repository, but this should be possible. Then, when GitLab CI updates the repo, Netlify CI should jump in.

Re: How to start a blog using Hugo

#48

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.

From a cloud perspective, it's easier (by a tiny bit of work) to point a subdomain to a service over pointing a folder.

E.g. blog.example.com pointing to a static website while project.example.com points to a server.

If you want both to be under the same domain and use a CDN for only one of them, you still have to configure the pass through of all others... But if it's only one subdomain, CloudFront no longer needs to know about non-Cloudfront endpoints.

I run my Hugo site on S3+CloudFront for a be penny a month (if that), despite also having a $5/month server... It protects my site from going down if one if the 5 WP sites I lazily host for friends gets directly attacked and someone pops a shell + container break out.

Re: How to start a blog using Hugo

#50

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.

If you host PHP software like phpBB on a VPS on forum.example.com and have your static website hosted on Netlify under blog.example.com, it's easier to do this with subdomains.

Of course, you can have a load balancer under example.com that acts as a reverse proxy for your forum unter example.com/forum, but the easier setup with different languages/software/servers is to use subdomains imho.

Post reply on HN