Nice, thanks for posting. I'm using Gitlab Pages right now, and it's fine, but having my deploy process depend on Git is kind of weird. Plus Gitlab isn't really a web host: they're a Git host. I'll definitely check this out soon.
If you don't like to play with CLI and want to host files on Amazon's S3, go with the Sheetsu Pages [1] (I'm co-founder).
- It's uses Amazon's S3 CDN, actually your site is deployed to their all edge locations
- supports https
- you can add your custom domain
- you upload files to Google Drive, click sync button and it's done
> pages.sheetsu.com uses an invalid security certificate. The certificate is only valid for the following names: sheetsu.com, www.sheetsu.com Error code: SSL_ERROR_BAD_CERT_DOMAIN
Replying to the child comment from whorleater - that's a good catch! Our mistake with the domain redirects and certs. Will fix it ASAP. Thanks for spotting this bug.
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 easiest solution (as a developer) I've come across where I just commit to Github and my blog is updated, and Caddy deals with my cert renewals.
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 interest to HN anyway? I see many people do it constantly, even when it's not relevant to the article or discussion at hand.
Edit 2: I don't generally care where a post is but this went from -2 to +6 pretty quickly. Weird?
"Edit 2: I don't generally care where a post is but this went from -2 to +6 pretty quickly. Weird?"
Probably I can answer that :) I noticed that when one of my posts get down voted even when having a neutral comment, it swings back to positive fast when touching -1 or -2. I guess that the gray comment takes a while for HN'ers to notice as down voted. And when they find that there is nothing wrong with it or they actually like it, many people simultaneously click the upvote swinging it back wildly to positive zone. It is HN's own version of 'universe making right what it deems as correct' :D
I think we need to clarify what a down vote is... My assumption was it was to flag something mean or off topic. Now People seem to use it to say "I disagree with your opinion but am too lazy to express my own".
"Defensive upvoting," you might call it. I've certainly done it.
I've also seen many of my own comments go up and down quite a lot as the upvoters & downvoters battle it out. (Eventually they tend to settle on a solid "meh.")
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.
I, for example, speak english as second language, and frequently a comment of mine is read more aggressively than I meant it, so it ends up at -10 or worse, even when being factually correct.
So I’m reducing my activity on HN in general as far as possible, and only post as uncontroversial opinions as possible, because I fear that going against the established opinion would just get me downvoted again.
> frequently a comment of mine is read more aggressively than I meant it
This is a common occurrence. Written communication involves both the writer and the reader(s), and unfortunately that results in losing other channels of communication such as intonation and body language. I think written communication is a skill that can be improved with purposeful practice if you think it's worth your time (and to be fair, whether or not one considers posting on HN personally valuable is not a given :).
It sounds like it's at least a little important to you. I personally think the effort is worthwhile in general, as it's useful to know how one comes across in various media, and particularly if you feel you have something valuable to contribute.
I've got a few resources in my profile that I find useful to return to—and have, repeatedly done so to deepen my internalization of them. I'd encourage you to take a look and see if they might be useful to you as well.
Edit to add: I hadn't read this entire thread before responding. 'mikekchar has captured a lot of what I also think about in their comment here:
Where is the reason that ever of my comments in that comment chain was originally voted to -4?
I jist don't get it. It's not attacking anyone, providing additional information about the parent comment, and factually correct (as another user even provides a cdc source later on)
Dangerous territory, here :) To be very clear, this is my speculation on what's going on in other people's minds. It can be useful to think about (as it's an exercise in empathy) but often dangerous to explicitly list everything publicly, as one has to evaluate charitable and uncharitable readings, and in general expressing the uncharitable ones, while realistic, tend to draw the most attention (it's just human nature), and in effective communication one should strive to act on the charitable interpretations while seeking to avoid the uncharitable ones. So, please be gentle ;)
The primary issue I see here is that it's an iPhone thread on the day of an announcement. Emotions are going to be even higher than normal and I always take extra care when entering such waters. I remind myself that effective communication takes two parties, and this particular ground is already seeded with land mines.
Questions I'd ask myself, even of facts:
Is this worth saying? Does it add to the discussion? How much does it add to the discussion even if I am able to couch it in the best possible way? Am I correcting someone? How do people react to correction, even if I'm right? What is the reaction to the least charitable reading of what I'm posting? Am I on topic (both in the subthread and the submission)?
Putting on my most uncharitable hat here, I'd say this subthread starting with 'xvolter's comment was doomed from the start.
It can be read as nitpicky, needlessly negative, and incendiary (likely to evoke a strong, defensive emotional response). The lead-in "Are they aware" can be read as very condescending. I haven't read up on the iPhone release, but I suspect Apple used the phrase "surgical steel" to describe some component of the iPhone. To take them to task for that is pedantic. It's marketing speak. You have to expect some level of exaggeration. Even if it's technically correct, what is this correction going to contribute to the thread on iPhone X? Is it likely to create constructive discussion? From what I've observed, some HN members will down-vote such comments and those in the subthread even if they're correct because it's not constructive to the overall discussion. And flame wars not only are destructive in their own thread, they tend to poison the entire forum as it promotes needless argumentation. Don't get me wrong: it's easy to get caught up in such a thread, thinking "Look, once I point out this, it'll be resolved. It's just a clarification. I'm just trying to help." I know, because I've been there.
Also note that even if this is not exactly what was going on in any one down-voter's head, it's useful in that it gets me thinking about how it might be received and generally how I can improve my comment—which might mean not commenting at all.
To put this even more personally, thoughts that have been going through my mind while composing this post:
- Gosh, this is getting long. I'd really like to tighten it up. Is it worth the effort? How much time should I take reviewing and editing it before posting? (After writing but before posting I'll be sure to review the entire comment, but I know I'm not going to tighten it up much because I'm tired.)
- What I've written can easily be misconstrued, particularly because I've written things that are uncharitable, even though I've put in the disclaimer that's what I'm doing on purpose as an exercise. It's late, and I know I haven't thought through everything or the entire thing very thoroughly. I know that in and of itself opens it up to misunderstanding. Are people going to misread what I've written because I've left something out? Is the possibility of that miscommunication greater than the value the post is contributing?
- I'm particularly concerned about my explicit, uncharitable reading of 'xvolter's comment and the response to the entire subthread. Is it necessary to include this for my comment as a whole to be effective? Can I write the comment while excluding it? How much time would that take? I'm leaving it in because I think it is useful and on balance, really, what does it matter in this single instance? (But it does matter, on some level. It's a reflection on me.)
I'll end up clicking "reply" because I think you've put yourself out there and sound like you're sincerely looking to improve your writing, and that's worth the effort. I also think that it's clear that my intent is clear and good, and I'm know I myself am still learning: if there's some negative reaction to this, I'll take that and use it to improve my writing next time. I certainly know I've got more to learn :)
In sum: it's a volatile submission, it's an off-topic subthread, and getting involved is fraught with danger.
Wow. Did I really need all of those words if that short summary is all there is to it?
I always feel insecure of my own opinions but I do support HN's no bs-approach or joking anyway. That's why I try to be anonymous on here but don't attack people, but seldomly blurt out what I initially think. I do get hurt by downvotes hahaha.
edit: I'm working on being able to handle being wrong... usually flip out, like WHAT!!! You disagree with me?! (Contrary to my initial point about no bs)
> Are you feeling picked-on because of what you're saying, or how you're saying it?
That's impossible to answer without telepathy.
(Aside from topics that generate lots of discussion that weighs one particular way, I find it impossible to determine a priori whether a particular viewpoint is controversial on HN. For instance I have recently and wrongly predicted that transhumanism would be uncontroversial; and while I've noted this as evidence for future predictions, I am unable to explain it logically.)
I often use HN to practice writing. Good writing resonates with people. A post that is well thought out, well researched, communicates clearly and doesn't assume anything of the reader will often get up votes in my experience.
For me, the vast majority of down votes come from me being wrong (that is, I post something that I think is correct; I get down votes; I do more research and discover that I am, indeed, incorrect). In fact, this is such a good flag for my writing that when I get a down vote I immediately assume I must have made a mistake somewhere and start looking for it.
The next most common source of down votes (for me) is being argumentative. If I get a down vote, but decide that I am correct, I often discover that the tone of my writing is derisive. In all honesty, I never intend to have this tone of writing, but I am human and sometimes (either through lack of writing skill, or by unconsciously being an ass) it happens. My guess is that the person I'm responding too gets pissed off and down votes me. This has led me to have a kind of rule to try very hard never to piss off the parent poster, even if I think they are wrong. If I can't think of a way to comment without pissing off the parent, I try not to post. As a huge bonus, this avoids me getting dragged into >90% of trolling efforts (a statistic that I made up).
The next most common cause of down votes for me is lack of coherency in the comment. Sometimes people simply don't understand what I'm saying. It is important to realise that as a writer, you can't assume the readers understand what you are thinking, so this is completely down to you. Trying to put yourself into the role of a random reader and figuring out what they might think when they read your post is hard. However, this is what being a good writer is about. Again, if I write a post and upon reviewing it, I don't think most people will understand, I don't submit it.
Related to the last point, there are lots of times where I have relatively unique ideas. Very frequently people will not know what to think about them because they have never really explored that way of thinking. If I write in a way that makes it clear that I assume that the reader will find what I'm saying is obvious, I will get down votes. In a way it's insulting to say something that is not mainstream and assume that others will instantly understand/agree. Sometimes, if I feel the idea is interesting, I'll still post, but I'll try to broach the subject gently/apologetically. People are doing me a favour by getting out of their comfort zone and considering a different way of thinking.
Finally, when I'm posting, I often pick someone to respond to and try my best to help them. If I am successful, I find that the post is usually highly regarded by many people, even though my focus is only on helping one person. YMMV!
Well said. I've found this to be the case for me personally as well. It also reinforces for me that honest reflection can lead to better understanding (of others and how one comes across) and better communication. You've also underscored how productive communication is more than just laying out facts or correcting mistakes. How one does so strongly affects its effectiveness. And I generally feel happier as a result. In turn, writing when feeling happier results in better comments. A virtuous circle.
There are times when I feel I've done my best and the thread doesn't seem to be progressing well. When that happens I take even more time to see whether there's any way I could have approached it better, and restrain myself from having to put in the last word. Effective communication does take effort on the part of both parties. If I feel I've done my best and conclude it's not working, setting it aside is often better than persisting and possibly making the discussion worse.
> You've also underscored how productive communication is more than just laying out facts or correcting mistakes. How one does so strongly affects its effectiveness.
If someone can't understand a simple list of facts unless it's couched in ... literature-course fluff, I suppose it could be called? ... then that's their problem and they're accomplishing precious little by foisting it onto everyone else.
> And I generally feel happier as a result. In turn, writing when feeling happier results in better comments. A virtuous circle.
Interesting. I find that happiness tends to dull my wit, make me less observant, etc. While it's not unusual for me to recall a long-past conversation (from any medium) and suddenly formulate a much better response at some particular junction ... feeling happy or contented tends to increase the probability that a current conversation will result in this sort of after-the-fact second-guessing.
Effective communication is more than just transferring a simple list of facts. You're correct that communication takes two people. If my goal is have someone accept my point of view (and while it may seem counter-intuitive, that includes facts), I have to take into account how it will be received by my audience.
If they don't take it in the way I'm presenting it, it's my responsibility to evaluate if there's a better way I can present it. Upon reflection (and that can be short or long, depending on how important it is to me), I can reasonably decide it's not worth the effort or time to do so. I can also come to the conclusion that perhaps the audience isn't really open to listening to what I have to say. That said, laying all of that on the audience without reflection in my experience is a recipe for failure and frustration.
> The next most common source of down votes (for me) is being argumentative.
Interesting. The main thing that motivates me to comment here - other than when someone touches the surface of a topic that piques my curiosity - is when I see something that is either blatantly wrong, or seems to be missing an obvious piece of clarifying information.
(Examples of wrongness: C# is the best language one can learn, any random non-MBA-holder can be given a loan and expected to make a successful business of it, random 6-year-olds can understand CS, one person without political office can make a difference among our population of 300 million, etc.)
> It's the easiest solution (as a developer) I've come across where I just commit to Github and my blog is updated
I'm not sure how that's easier than GH Pages or Netlify and both of those have the bonus of being free, HA and don't require that you monitor anything for uptime.
- 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.
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, and you never have to touch it again — Amazon's engineers will deal with hiccups and bugs instead of you. It's no more convenient than CloudFlare, but I like to minimize the number of services my dependency graph.
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).
I see both Jekyll and Hugo mentioned frequently in the "Using GitHub and X to host your website" space. Do you have any practical our technical reasons for preferring one over the other?
If you're not already set up with a Ruby development environment, I'd use pick Hugo over Jekyll. Jekyll is nice but getting all the Ruby junk going was annoying, IMO. Maybe it's trivial for someone better than me.
Having used both quite a lot, I much prefer Jekyll's template language as it's easier to use and more readable. It's a lot easier to install plugins to extend Jekyll as well. However, Hugo coming in a single binary makes it easy to get working when you come back to a site you've not updated in a while (my Jekyll toolchain was a combination of Ruby + Node + Gulp that felt brittle but could be improved with some work), it's suppose to be significantly faster (I've seen people saying it takes Hugo seconds to generate thousands of posts compared to minutes with Jekyll) and I've had less issues with Hugo's watch feature (Jekyll doesn't refresh when you change files sometimes for me). I don't use a lot of plugins or complex templates so the speed and simplicity of Hugo is a big factor for me.
It honestly doesn't really matter. Both ingest Markdown, apply a theme, and spit out HTML which you then copy to your HTTP server. It's sort of like asking "which version control do you prefer? Mercurial or Git" or "which build tool do you prefer? clang or gcc." Your choice in the matter doesn't really impact the end result, just your own workflow. Jekyll is probably more popular simply because GitHub has it integrated with GitHub Pages.
From the outset it is version controlled, CDN'd, available over HTTPS, and would withstand being linked from the front page of HN just fine.
It's not just a static site, it's one that is easy to grow and modify, and that can withstand a lot of traffic immediately with no investment in infrastructure for the author.
(evidenced by the fact that it is withstanding a HN front page set of traffic)
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.
We routed console direct to disk in PR1MOS, and if you made a mistake, you had to start all over. But you never knew if you made a mistake until it was done because you couldn't see the output as you typed.
Of course, you didn't end up with a web site, but the result was globally networked. As long as you didn't mind that e-mail took several days to get across the country and a week to go from Illinois to Sweden.
This is how I remember website development. Those were extremely fun and exciting times. 1997 was my freshman year of high school. Geocities and Anglefire FTW.
On my university, you do the same thing to get a website up. (Except the web server is actually a different server than the main server, so you have to ssh there, and you replace vi with vim and Solaris with Linux.)
The trickery is in the use of the words "static site" which has become a buzzword (buzzphrase? buzzwords?)for sites generated using a "static site" generator or tool, in this case Hugo is used. The rest of the process is considered the "building" part of a "static site" even though to those of us making sites just a few years ago static site meant open up notepad and write some HTML to push somewhere, that or Freewebs to others (or webs as it is now).
I solved this problem a long time ago. Once solved, it did not take three hours to get a web side on-line (well may be, if you bought your own domain and set up your own server to host it).
That's how we do it in 2017. Want to handle an on-click? You need dozens of NPM modules and webpack. Look at Docker's cowsay "hello world" example - it has to satisfy several (dozens?) of perl dependencies just to render ASCII art.
This image installs the cowsay utility and then adds its own "cow" file. This is the default installation of the cowsay utility, not something created by Docker. This is clear from reading the Dockerfile on that page:
# install cowsay, and move the "default.cow" out of the way so we can overwrite it with "docker.cow"
Using Hugo adds a lot of complexity. I'm using Surge.sh and raw html/css, I can have a site up in under 2 minutes. I think I spent less than an hour on my blog (it has a very simple layout).
What does it look like/is it customizable? I've been looking to host a math/CS blog somewhere outside of Tumblr (which is great for getting an audience and interacting with people, but totally useless for actually being able to write math, unless you want to embed JPEGs everywhere) and make it as simple as possible.
This article seemed like a good start, but I'd love to know more about how you built your blog in a way that's easily maintainable.
I'll PM you a link to my blog if you send an email to rug3y@teknik.io. It's still a work in progress but I think it looks alright. If you decide you want to do something similar, I can help you do what I've done.
You can still do that. Nobody bothers, though. Knowing how to write your own HTML, CSS and Javascript is starting to feel like knowing how to carve your own canoe.
Note that in this setup, the connection between Cloudflare and GitHub is plaintext / not secure, because by default Cloudflare uses "Flexible SSL".
It is possible to make it more secure by changing the setting to "Full SSL (non-strict)", which encrypts the connection between Cloudflare and GitHub against passive attacks but not active interception. Unfortunately, GitHub pages does not work with Cloudflare's "Full SSL (strict)" option.
After many different iterations, I'm now using netlify (with middleman). Really hard to beat.
GitHub pages are amazingly fast and a pretty good default choice. With cloudflare it's a pretty solid combo.
But netlify's awareness/integration between the content and the cdn is really compelling. Imagine they'll be able to do a lot more with it down the line too.
Me too. My personal site is in Middleman hosted on a digital ocean instance so I can have more control of that side (also wanted to learn more about nginx and SSL) but lately I've been using Middleman with Netlify - it's unbeatable for getting projects up and running fast.
Built-in continuous integration and automatic SSL, you can even get your domain through them. Their CMS makes creating a fully featured blog ridiculously easy. 10/10 would Netlify again.
I've been developing front-end apps for so long I was out of the loop when a friend asked me, "How can I upload a website folder to a domain".
Turns out, the easiest path is Netlify. It provides you with a CDN and storage for free, and has a nice drag-and-drop deploy interface for basic static sites.
The author has done a great job of documenting all the low-level details about even how to use git to push stuff to the GitHub repo. Kudos for the excellent documentation.
I use Hugo + Gitlab + Netlify (free https). I use Emacs as my development environment, and Magit (https://magit.vc) has come as a boon to me. All the git shell scripting mentioned in this post reduce to few key strokes with the help of Magit. I'm not intending to divert the topic, but couldn't help mentioning that the Magit Kickstarter [1] needs some love.
Coming back to the Hugo topic, I believe that the 3 hours is a good practical estimate for someone who has never dabbled with git/github, domain control tweaks, CNAME, etc.
So don't take that 3 hour mention as a negative, and jump right into the post. Once you have the whole setup, updating your site is a simple git commit + git push (hardly a minute -- not counting the time it takes to gather content for a new post :)).
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.
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.
Bit surprised to see this advertised as 3 hours (how long can it take to dump HTML into a gh_pages branch & push?). After reading, I see that there's a huge overhead in setup and configuration. The complexity seems way out of line with the result!
Looks like it's all mainly to do with the static site generation though. You can certainly still dump some handmade html into a gh-pages branch and have a (non-generated) static site in less than ten minutes.
Or you can just use Gitlabs pages which can handle Hugo generation for you. I do that and I definitely did not spend so much time by it. I can also add new posts directly from Gitlabs UI, which is nice.
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 <500ms load times.
Octopress was getting to be a pain in my butt due to ruby dependencies being awful to deal with.
Is there a piece of software that creates nice looking static photo galleries? I have used a few and they all seem to suffer from design that is 10-15 years old.
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.
Yes, but cloudflare issues only shared certificates (that are shared across multiple domains) on their free plan [1]. If I wanted to use a dedicated certificate I'd have to upgrade to a paid plan.
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.
Right, but Cloudflare doesn't actually check if the cert is valid, unless you enable Strict mode, which you can't because you'd need Github to serve a cert for your own domain.
Are there any walkthroughs from zero to all done of best practices to setup a _product website_ using a static generator (Jekyll, Hugo, or whatever) rather than a _blog_?
I will see what is required to swap something like the kube theme into this guide:
"There are a few concepts this theme employs to make a personal documentation site.
It’s important to read this as you may not see what you expect upon launching."
I really like the speed of Hugo but I find the template language unintuitive and hard to read e.g. "if or condition1 condition2" and "lt 1 2". I wish you could swap it out for something else like Liquid templates...is that possible?
I'd just go for Netlify as well for hosting. It'll build Hugo sites for you when you push commits, they have a CMS you can connect with most static site generators, they deal with SSL setup for you and tons more features. Self-hosting anything eats up time and it wouldn't be as robust.
Netlify + Hugo is an pretty amazing combo. If you want to try a different CMS, my team is building https://forestry.io/. It's a CMS for Hugo and Jekyll sites that commits all changes back to your repo.
Just to make mention in the comments in case people haven't seen the product, I've found Amazon's Lightsail (https://amazonlightsail.com) incredibly easy and cheap to launch a simple website upon, along with using their Route53 for DNS hosting.
Even though I know all the ins and outs of AWS, I really like this product for simple projects.
This is the path I choose for most of my websites nowadays.
Usually a combination of static generated website (I created my own generator), Firebase hosting (which offers the same free autogenerated SSL + url rewriting), and Cloudflare.
Like this, it's fast, SEO friendly and most of all completely free.
I only need to install superstatic[2] locally if I want to debug a rewrite rule or redirect otherwise clean URLs work pretty well with a simple setting.
Has Hugo made any progress with intergrating Jupyter Notebooks as a blog post? The latest version of Blogdown was just realeased and the R community has now an even better way of writing blog posts.
Another nice feature on top of this type of setup is to set up CI hooks on your repo to check for broken links on every push, e.g. with https://github.com/gjtorikian/html-proofer.
Checking for broken links is probably something you want to run every X days or something like that, rather when you push your update, unless you only want to check if you accidentally wrote a link wrong, rather than if the link itself broke.
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?
If you have multiple HTML pages, using a templating engine saves a lot of copy/pasting when you change headers, menus etc. (in the article they're using Hugo).
You can automate the uploading of files by writing a script to upload the files to the bucket so you can deploy in a single command (it gets trickier if you want to do a sync and delete files).
Personally I use rake [0] to create build and deploy tasks so I can do `rake build` and `rake deploy:prod`.
I have nearly 0 experience with web-dev. I'd like to add some minimal user tracking to my static site on Github; just when & where the requests are coming from (geographically), which posts they're looking at and maybe a referrer.
I don't want to use Google Analytics (seems unfair given that I block it). Is there an easy way to do this?
Honestly, I do use Google analytics on one of my sites. If figure, anyone who cares even a little bit about privacy will have it blocked. Using something more rare means that they might not be blocking it even if they would want to if they knew about it.
Cloudflare is also a great free CDN and has a crap ton of edge servers to make your static content serve quickly around the world. Has a lot of other great features too.
Just need to remember to turn off caching when updating or set the time to update cached data at an interval that works for you. I keep forgetting that sometimes like why isn't the site changing?! Oh right...
This is a neat tutorial. I use github pages with their built in Jekyll stuff which I'm semi happy with but I found Jekyll a big learning curve compared to Blogger which I was using before.
Curious why people want to serve static sites to users over https though.
Writing the template and the content in HTML is easy enough for me, but I'm still struggling to make post lists, feeds and other things out of it without a lot of administrative effort.
... and I get it, one of our webdevs spits out static sites from some PHP code he wrote that builds them. As the guy that has to administer that crap I much prefer to hoist static HTML... but like so many things in the SV tech scene, these stupid "engineers" have to build a thousand different little frameworks with a thousand new buzzwords for a thousand unoriginal, rehashed ideas. Many of them forsaking old techniques that worked well, and in many cases better the cheesy little framework some fresh-off-the-boat bootcamp-grad "envisioned" because he didn't want to learn $UNFASHIONABLELANGUAGEORTECHNIQUE
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 may be expensive relative to your costs, but relative to the average programmer income and monthly bills in the United States – it's nothing. You'll spend three times that cost on a local cup of coffee every morning.
S3 static hosting is far easier to manage than a virtual server; it's a trade-off of convenience vs savings.
I've used digital ocean droplets for some things for a similar $5 a month price, but it hardly seems necessary for a static site. It's much less faffery to just upload some files to S3 and click some buttons in the AWS console to configure everything.
I'm really conscious about the resource usage of my server processes. Most sites are static websites, but I also have Gitea, Prosody and Matrix Synapse running on that box, plus some small Go webapps for my own consumption.
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.
This is exactly what I decided to do. Adding some posts manually to an html file is really not onerous, and the setup time and complexity of the project directory are near zero. Plus, I don't have to take the time to understand someone else's theme in order to make changes. Whipping up a simple css theme is really not difficult.
I would simply install nginx and write HTML by hand.
If I felt fancy, markdown + pandoc. But if you feel like you need to put some content online, you don't need much more than a text file with some links.
IMO this guide is great, but uses some unnecessarily complex terminal commands. You don't need to use `git worktree` and `git submodule` to set up your hugo site. There are more self-explanatory ways of doing the same things.
I would pay couple bucks per month for any vps just only for not using Cloudflare. Why anyone concerned about security and not just about green lock would use Cloudflare over LetsEncrypt.
Really good because it walks you through every step and explains what's going on. The result is a version-controlled, robust, easy to maintain site that scales beautifully.
That's still pretty complicated IMHO. Write some markdown files in a directory structure, run mkdocs over it. Voilà... indexed, searchable static website.
- It's free (though you can become a supporter and get some extra benefits) [1]
- It's fast, since it uses it's own CDN. [2]
- It's secure, all pages support SSL, even with custom domains. [3]
- It has a command line tool [4] that can be wrapped to automate upload of pages, or used in a Git hook.
- It has a plethora of learning resources [5].
[0] https://neocities.org
[1] https://neocities.org/supporter
[2] https://www.youtube.com/watch?v=-i6wvix6buI
[3] https://blog.neocities.org/default-ssl.html
[4] https://neocities.org/cli
[5] https://neocities.org/tutorials