News for hackers. Stuff that matters.
Re:Using Hugo, Gitlab Pages, and Cloudflare to Create and Ru... by usgroup on Saturday June 01, 2019 @10:51AM (#20069469)
So far as I can see github pages supports ssl termination with let’s encrypt certificates all by itself:

https://github.blog/2018-05-01-github-pages-custom-domains-h...

Re:Using Hugo, Gitlab Pages, and Cloudflare to Create and Ru... by iamnothere on Sunday June 02, 2019 @12:07AM (#20073419)
Let's Encrypt for GitLab pages should be coming in the next release though (finally). It's been in the works forever.

Edit: source https://gitlab.com/gitlab-org/gitlab-ce/issues/28996

Re:Using Hugo, Gitlab Pages, and Cloudflare to Create and Ru... by tkainrad on Saturday June 01, 2019 @02:19PM (#20070600)
Interesting, seems that this is indeed an advantage of GitHub Pages. With GitLab Pages, you have to setup Let's Encrypt certificates for custom domains manually.
Re:Using Hugo, Gitlab Pages, and Cloudflare to Create and Ru... by aleks_me2 on Saturday June 01, 2019 @02:32PM (#20070684)
I have also chosen gitlab, hugo and netlify. Netlify because they have the nice feature to use forms in the site. My setup is described in this post. https://www.me2digital.com/blog/2017/09/move-from-wp-hugo-an...
Re:Using Hugo, Gitlab Pages, and Cloudflare to Create and Ru... by infominer on Saturday June 01, 2019 @03:34PM (#20071083)
Nice Work! I'd will check out GitLab pages soon!

I just wrote a guide on how to migrate from Jekyll-HPSTR to HPSTR-Hugo.

This in-detail guide should help anyone switch from Jekyll to Hugo or even Hugo to Jekyll.

I didn't notice this before posting:

https://news.ycombinator.com/item?id=20070203

Direct Link- Migrating from Jekyll-HPSTR to HPSTR-Hugo:

https://infominer.id/web-work/posts/migrate-jekyll-hpstr-hug...

Re:Using Hugo, Gitlab Pages, and Cloudflare to Create and Ru... by bilal4hmed on Saturday June 01, 2019 @10:06AM (#20069239)
What is a good way to get analytics and comments in such a set up ?
Re:Using Hugo, Gitlab Pages, and Cloudflare to Create and Ru... by infominer on Saturday June 01, 2019 @03:43PM (#20071162)
I'm really interested to try staticman to run from a pi, but I found a bunch of different ways that I'll experiment with and have listed here.

That page is geared towards GitHub Pages\Jekyll, however a number of the solutions are SSG agnostic.

https://staticman.net/

https://github.com/aioobe/dead-simple-jekyll-comments

https://infominer.id/web-work/posts/github-pages-starter-pac...

Re:Using Hugo, Gitlab Pages, and Cloudflare to Create and Ru... by tkainrad on Saturday June 01, 2019 @01:08PM (#20070161)
Op here, I am using Disqus for comments. This is very easy to setup. My template even supports this out-of-the-box. Google Analytics is even easier - the only thing you have to do is set your analytics ID in your hugo site configuration.
Re:Using Hugo, Gitlab Pages, and Cloudflare to Create and Ru... by JonLim on Saturday June 01, 2019 @10:12AM (#20069277)
Not OP, but you can embed Google Analytics (or Tag Manager) into your Hugo template, and it's fairly straightforward to do.

Comments I'm not entirely sure of, because I never wanted them on my site in the first place!

Re:Using Hugo, Gitlab Pages, and Cloudflare to Create and Ru... by pmtarantino on Saturday June 01, 2019 @10:20AM (#20069318)
For comments you can embed an external service, like Disqus.
Re:Using Hugo, Gitlab Pages, and Cloudflare to Create and Ru... by JonLim on Saturday June 01, 2019 @10:22AM (#20069329)
Agree! And I'm sure it's also another script to add to the templates, at the footer of a post template, probably?
Re:Using Hugo, Gitlab Pages, and Cloudflare to Create and Ru... by abdusco on Saturday June 01, 2019 @11:10AM (#20069542)
For comments, check out https://commento.io
Re:Using Hugo, Gitlab Pages, and Cloudflare to Create and Ru... by tkainrad on Saturday June 01, 2019 @02:26PM (#20070639)
Thanks for the input, I will do some reading regarding Disqus VS commento.
Re:Using Hugo, Gitlab Pages, and Cloudflare to Create and Ru... by KajMagnus on Sunday June 02, 2019 @02:09PM (#20077025)
Another Disqus alternative you maybe haven't heard about? https://www.talkyard.io/blog-comments (this too with privacy, no ads etc. I'm developing it. Feedback & feature wishes = welcome)
Re:Using Hugo, Gitlab Pages, and Cloudflare to Create and Ru... by JonLim on Saturday June 01, 2019 @09:54AM (#20069180)
Guess it's having connectivity issues?

Haven't read the post yet, but any advantages to using Gitlab Pages and Cloudflare with Hugo over using Netlify?

My personal blog[0] is Hugo + Netlify, and it's been a pretty great experience, so I'm always curious about alternatives! (I'm not a fan of the Netlify CMS though.)

[0] https://jonlim.ca/

Re:Using Hugo, Gitlab Pages, and Cloudflare to Create and Ru... by jvns on Saturday June 01, 2019 @10:01AM (#20069217)
the main advantage for me is that Cloudflare's free tier has no bandwidth limit. Netlify's free tier has a 100GB/month limit (https://www.netlify.com/blog/2019/02/26/netlify-and-bandwidt...). I put Cloudflare in front of my Netlify site because of that.
Re:Using Hugo, Gitlab Pages, and Cloudflare to Create and Ru... by JonLim on Saturday June 01, 2019 @10:07AM (#20069252)
Ah, you know for some reason I was thinking Cloudflare was also doing some hosting, and now I realize I shouldn't make comments on things without having consumed a coffee to start the day.

I also have Cloudflare in front of my site, but that was there before I made the switch, and it's great!

Re:Using Hugo, Gitlab Pages, and Cloudflare to Create and Ru... by jopsen on Saturday June 01, 2019 @10:07AM (#20069253)
What are your odds of hitting 100GB/month

Assuming you're just hosting your personal blog?

Re:Using Hugo, Gitlab Pages, and Cloudflare to Create and Ru... by jvns on Saturday June 01, 2019 @10:40AM (#20069416)
I used about 350GB in the last month according to Cloudflare (over about 3.5 million requests), probably because I serve a lot of 5-10MB PDFs. Being able to not worry about bandwidth fees for a medium sized personal site is really amazing.
Re:Using Hugo, Gitlab Pages, and Cloudflare to Create and Ru... by Gys on Saturday June 01, 2019 @10:09AM (#20069262)
Or instead spend some time to optimize your website a little (like not hosting yourself standard stuff like jquery, Bootstrap and such, compress images, etc). So you can serve 10s of 1000s visitors without hitting a 100 GB free tier ;-)
Re:Using Hugo, Gitlab Pages, and Cloudflare to Create and Ru... by detaro on Saturday June 01, 2019 @10:47AM (#20069443)
You're responding to someone running one of the more well-known developer blogs and hosting PDFs, it's not exactly surprising she might need a bit more bandwidth.
Re:Using Hugo, Gitlab Pages, and Cloudflare to Create and Ru... by doliveira on Saturday June 01, 2019 @02:35PM (#20070703)
That does not follow, though. It's not like people are generally optimizing their bundle sizes when they are in services where that costs money like AWS or there's a quota like Netlify.

Not having a limit liberates you to deliver other types of content and you have something less to worry about. It does not imply not worrying about optimizing your users' experience

Re:Using Hugo, Gitlab Pages, and Cloudflare to Create and Ru... by tkainrad on Saturday June 01, 2019 @02:18PM (#20070595)
One advantage with GitLab Pages is that you don't even need any other service. You have everything in one (free) place (repository, CI/CD, static site hosting, ...). Cloudflare is already only for convenience. Page speed for a static site should be fine also without it. I use Cloudflare mainly for simplifying HTTPS setup and page forwarding rules.
Re:Using Hugo, Gitlab Pages, and Cloudflare to Create and Ru... by the_duke on Saturday June 01, 2019 @10:19AM (#20069313)
I used to rely on Github + Cloudflare, but now services like netlify.com are a a simpler/better alternative.

EG netlify gives you a Docker based build environment + CDN, all you need is a a Github/lab repo with a config file.

Re:Using Hugo, Gitlab Pages, and Cloudflare to Create and Ru... by mikro2nd on Saturday June 01, 2019 @10:47AM (#20069444)
Gitlab gives you a build environment with a choice of several static website builders. Personally I'm using Hexo rather than Hugo and it "just works".
Re:Using Hugo, Gitlab Pages, and Cloudflare to Create and Ru... by aries1980 on Saturday June 01, 2019 @02:57PM (#20070827)
How can you avoid content dupe for search engines?
Re:Using Hugo, Gitlab Pages, and Cloudflare to Create and Ru... by dredmorbius on Saturday June 01, 2019 @08:13PM (#20072621)
What do you mean?
Re:Using Hugo, Gitlab Pages, and Cloudflare to Create and Ru... by aries1980 on Monday June 03, 2019 @10:15AM (#20083263)
Gitlab (this is where you host the content) Gitlab Pages and Cloudflare are public-facing. If e.g. Google starts caching, for Gitlab Pages you might be able to set the canonical tag to point to the CloudFlare-served hostname, but I am not aware how to do it for the Gitlab UI.