Live data from Hacker News

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

fillmem.com

101–110 of 201 posts

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

#101

I use Pelican and host on NearlyFreeSpeech.net behind Cloudflare. I really like using Pelican. I'm hardly a front-end dev and I found it easy to create a custom minimalistic theme that I'm quite happy with. No JS required! Fire up your network monitor and head to https://brashear.me/blog/2017/07/30/migration-from-octopress... It's pretty easy to see Octopress was getting to be a pain in my butt due to ruby dependenci…

Compare that to downloading one statically built Hugo binary :)

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

#102
post #83

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 also deploy to S3 largely for operational reasons — it costs nothing unless it's getting pretty significant traffic, and it easily scales up to handle ~infinite volume in case I'm not (unlike say running on Digital Ocean or something). Another very nice piece of the puzzle is TLS certificate management using Amazon's ACM. It's no cheaper than Let's Encrypt, but it's a lot more convenient. You put it in place once,…

Letsencrypt is free And you can automate the renewal process.

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

#103

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!

None of the static-site generators I looked at really competed with WordPress on a feature-by-feature basis.

WordPress is easy to set up, supports users and comments (if you want them) and has a lot of really nice features and plugins. WordPress is also slow and a pain in the neck to maintain, but I can understand why people might think the tradeoff is worth it.

I also run my site[1] using my own custom-built generator and I haven't looked back, but even I sometimes miss the ease-of-use that my old WordPress site provided.

[1] https://sheep.horse/

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

#104
post #94
post #59

Earlier quoted context omitted.

I made my first website using vi to make an index.html file in the ~/public_html directory in the home directory of my account on a university Solaris server back in 1997. FTP was a luxury. Kids today.

Can we avoid the ageism?

It's called humorous nostalgia. You must be young if you're so easily offended.

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

#106
post #94
post #59

Earlier quoted context omitted.

I made my first website using vi to make an index.html file in the ~/public_html directory in the home directory of my account on a university Solaris server back in 1997. FTP was a luxury. Kids today.

Can we avoid the ageism?

You could make a website with vi and host it on Solaris today if you felt like it. I'm not sure why would want to though. Things have improved.

Now I use vim.

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

#107

I also used Hugo for my site - https://testloop.co.uk It's so simple.. and FAST. It's hosted on AWS S3 with CloudFront & Route53 so it's not free, but at a cost of around $1.20 per month, it's not far off.

$1.20 a month is really expensive. I have a whole virtual server for €5 a month (and there are smaller ones) that hosts 10+ sites/apps. EDIT: I just realized that's a question I should ask: Does your price include the domain?

What service do you use? 5/mo is really cheap for 10+sites/apps

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

#108
post #79
post #47

Earlier quoted context omitted.

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.

Right, that's why I recently started checking people's profiles before posting a dissenting reply, and not making the reply if they've enough karma to downvote me.

You couldn't have been about to say something substantial and constructive if the mere worry of being downvoted once is enough to silence your voice.

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

#109
Benefit above and beyond writing your own html and css? (Serious question). I see a lot of the example tutorials show a simple blog example. In this case why not just html and css and your favourite text editor? With css you can separate style from content, you can "change themes" etc.

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

#110
I rolled my own static site generator for very little effort. As it stands, the generator (which isn't public so you'll have to take my word on it) is ~100sloc plus templates, CSS, etc. The process has been interesting and educational, and I recommend it on those grounds. Adding and modifying features is very easy since it's so little code to work with. Currently:

- posts are rendered from markdown with syntax highlighting for code

- safe links to other domains (noopener and _blank)

- bundled CSS, which look good (or as bad) on mobile

- a PWA (the service worker is the only JS run client-side)

- pre-populated links out to twitter (with a card) and mastodon with tags drawn from markdown metadata

- HTTPS using a letsencrypt cert and a one-liner in cron.daily to update it when close to expiry

- a smallish nginx config focussed on security to serve files

Much of the generator is just glue code around some good modules. Some important things like safe links were hacked together by me.

(if you're interested, https://qubyte.codes, but I need to post more often)

Post reply on HN