Live data from Hacker News

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

fillmem.com

41–50 of 201 posts

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

#41

Earlier quoted context omitted.

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

People need to stop calling Cloudflare's offering HTTPS support. It's snake oil.

This is the first time I've heard such claims. Do you have any more details about this?

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

#42

Earlier quoted context omitted.

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

People need to stop calling Cloudflare's offering HTTPS support. It's snake oil.

How so? Shared SSL cert is still an SSL cert. Not snake oil.

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

#43
I wrote a similar blog post: https://tberra.com/aws/amazon/meta/2016/11/12/the-birth-of-a...

The main differences on mine are:

- I use Jekyll, which is ranked #1 in the static site generator space.

- Hosted on AWS S3.

- CloudFront in front of S3.

- Routing and aliases handled by Route53.

- Deployed using a tool called s3_websites (change detection only uploading generated files AND cloud front cache invalidation for only the changed objects).

- Coded in a Docker container via a cloud IDE called c9.io using the Ruby template.

- Generator and site files committed to a GIT repository hosted on AWS CodeCommit.

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

#44

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?

Free certs in AWS. https://aws.amazon.com/certificate-manager/

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

#45

Earlier quoted context omitted.

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

Yes. It will.

Not really. They have two options for protecting the "back" connection: Full SSL and Full SSL (Strict).

Full SSL doesn't really protect you since Cloudflare won't check if the certificate is valid, an attacker could make their own self-signed cert and MITM you.

Full SSL (Strict) requires a valid cert for the domain being requested. If you had that, you wouldn't need Cloudflare in the first place.

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

#46
post #35

I host mine on Digital Ocean. I commit the code to github, dev branch is deployed to stg.mydomain and master is deployed to mydomain. In terms of deployment, I use Caddy which, with ~3 lines of config will auto-TLS your site using Lets Encrypt, and handle renewing the certs for you each month. Caddy also automatically pulls your changes, builds them with hugo and deploys them with ~2 more lines of config. It's the ea…

Assuming your blog is technical, this would have been a good chance to get some more traffic by at least mentioning the actual domain, linking to the github repo, or having one or both of those in your profile. Edit: Not sure why this has been met with a stream of downvotes. Is there something wrong with saying "I use a different approach to publish this blog: [link]," especially if it's technical and would be of int…

How do you down vote on HN?

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

#47
post #35

Earlier quoted context omitted.

Assuming your blog is technical, this would have been a good chance to get some more traffic by at least mentioning the actual domain, linking to the github repo, or having one or both of those in your profile. Edit: Not sure why this has been met with a stream of downvotes. Is there something wrong with saying "I use a different approach to publish this blog: [link]," especially if it's technical and would be of int…

How do you down vote on HN?

There is a karma threshold before you can see the down vote arrow (underneath the up vote arrow). It was 200 when I got it, it may be up to 500 by now? I don't think they publish the number.

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

#48

I wrote a similar blog post: https://tberra.com/aws/amazon/meta/2016/11/12/the-birth-of-a... The main differences on mine are: - I use Jekyll, which is ranked #1 in the static site generator space. - Hosted on AWS S3. - CloudFront in front of S3. - Routing and aliases handled by Route53. - Deployed using a tool called s3_websites (change detection only uploading generated files AND cloud front cache invalidation for…

I still remember that IRC conversation somehow haha.

I still use Jekyll too. It's awesome. It powers my main site (about 100 posts) and builds "fast enough" where it doesn't get in the way.

Although I use DigitalOcean and use Ansible to build / deploy the site. A couple of lines of yaml lets me deploy a new site with HTTPS (using Let's Encrypt).

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

#49
I wonder why people (many devs included) use stuff like wordpress to host simple blogs. static site generators are a blessing :)

I built my own custom static site generator (python + jinja2) for running my side project[1]

I just git push and Netlify picks it up. Simple, to the point and no JS.

[1] I run https://discoverdev.io , a "product hunt" for top engineering blog posts!

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

#50
I'm using React Gatsby on my blog.

I have access to all the npm ecosystem. Is fast. No bloatware or weird code.

Styles with styled-components for easy maintenance. https://mateom.io

Deployed to an S3 bucket connected to CloudFlare.

I just type 'yarn deploy' and it builds my blog and pushed it. And I can commit everything to source control as they keys are in aws-cli

Post reply on HN