Live data from Hacker News

Building a fast, secured and free static site in less than three hours

fillmem.com

21–30 of 201 posts

Re: Building a fast, secured and free static site in less than three hours

#22
post #18

Earlier quoted context omitted.

I have learnt that you can throw in parentheses for readability.. if (or cond1 cond2)

The next logical step is to mark with parentheses the two branches of the if expression: (if (or cond1 cond2) (then) (else)) although i suppose it's not really hugo anymore..

Going along with the joke, that's almost how elisp (most of the other lisps too, I believe) works:

    (if (or cond1 .. condn)
        (progn
          (true1)
          (true2))
      (false1)
      (false2))
But in Go templates, it would be:

{{ if (or cond1 .. condn) }} true1 true2 {{ else }} false1 false2 {{ endif }}

Re: Building a fast, secured and free static site in less than three hours

#23
post #3

As far as I know, Github pages doesn't support https for custom domains [1]. A better option for free hosting would be netlify, which supports Let's encrypt for custom domains. [1] https://github.com/isaacs/github/issues/156

We use cloudflare on our Github pages custom domain, so you can easily get https support that way.

But doing that won't protect the route between Cloudflare and Github pages, only the route between the user and Cloudflare.

Re: Building a fast, secured and free static site in less than three hours

#24
post #23

Earlier quoted context omitted.

We use cloudflare on our Github pages custom domain, so you can easily get https support that way.

But doing that won't protect the route between Cloudflare and Github pages, only the route between the user and Cloudflare.

Wouldn't SSL via GitHub's cert protect that part?

Re: Building a fast, secured and free static site in less than three hours

#25
I had really hoped that this was about building a static site, but again you'll end up with a blog.

I've created an actual static site myself, but it takes a bit extra - especially from the theme.

Also, I don't understand why you'd use Hugo with Github when it already supports Jekyll?

Re: Building a fast, secured and free static site in less than three hours

#26
Might be a little off-topic but hopefully relevant enough. I'm rather new to web dev but currently have a static website hosted on AWS S3. My current workflow is to code the HTML and CSS files using Sublime Text then upload these files into a bucket manually via the AWS console. Is there a more efficient way to do this? And is there a simple way to enable HTTPS?

Re: Building a fast, secured and free static site in less than three hours

#28
post #18

Earlier quoted context omitted.

The next logical step is to mark with parentheses the two branches of the if expression: (if (or cond1 cond2) (then) (else)) although i suppose it's not really hugo anymore..

Is there a reason something more standard like "if cond1 or cond2 then x else y" isn't supported? Parsing speed?

Maybe. It looks like Reverse Polish Notation.

Re: Building a fast, secured and free static site in less than three hours

#29
post #23

Earlier quoted context omitted.

But doing that won't protect the route between Cloudflare and Github pages, only the route between the user and Cloudflare.

Wouldn't SSL via GitHub's cert protect that part?

Yes. It will.
Post reply on HN