News for hackers. Stuff that matters.
Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by hobarrera on Thursday September 22, 2016 @02:44PM (#12559120)
You can also use GitLab for the same thing.

Just chiming in to promote this a bit. GitLab is a well-known open source alternative to GitHub, which actually offers more features than GitHub nowadays.

https://pages.gitlab.io/

Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by lnrdgmz on Thursday September 22, 2016 @03:59PM (#12559839)
And Gitlab Pages supports https for custom domains, which Github Pages does not yet support.
Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by aeharding on Thursday September 22, 2016 @04:14PM (#12559956)
And Gitlab Pages supports free CI for building your static HTML assets however you like, upon code push, without cluttering your repo with compiled assets. Run code through Metalsmith? No problem. Run through Jekyll? Can do. Anything that's Dockerized.

This is perhaps my favorite distinction between Github and Gitlab pages.

Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by sytse on Thursday September 22, 2016 @04:16PM (#12559985)
Glad to hear that! Examples for many static sites generators can be found on https://gitlab.com/groups/pages
Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by iamnothere on Thursday September 22, 2016 @04:11PM (#12559933)
There are also several in-progress feature requests related to Let's Encrypt automation, which should make HTTPS much easier. (Right now it's possible to use Let's Encrypt, but you have to manually renew the cert every 90 days.)
Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by seanwilson on Thursday September 22, 2016 @04:17PM (#12559998)
Does GitLab support setting custom response headers (e.g. X-Frame-Options) for static sites? I know GitHub doesn't but Netlify does for paid accounts.
Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by iamnothere on Thursday September 22, 2016 @02:43PM (#12559108)
I just moved from this setup to GitLab. GitLab Pages is similar, but much more flexible. For instance, you can use Hugo, Metalsmith, etc, and you can use CI scripts to test before deploymemt. You can also avoid Cloudflare by using Let's Encrypt (or other) certs, and they're working to include smooth Let's Encrypt integration for easy renewals.

Of course, flexibility comes at a cost: GitLab is much more complicated, and the documentation kinda sucks. OTOH, the setup process is a good learning experience.

Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by sytse on Thursday September 22, 2016 @04:18PM (#12560006)
Thanks for using GitLab! Can you maybe elaborate on how we can improve the documentation?
Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by bobfunk on Thursday September 22, 2016 @02:30PM (#12559012)
Check out Netlify (https://www.netlify.com) for a simpler setup that's also free and lets you use Jekyll plugins, enables very aggressive caching on the CDN level, but with instant cache invalidation and atomic deploys, and brings features like deploy previews (a unique preview URL for any pull request), form processing, redirects, rewrite rules, proxying, etc, etc...

[Disclaimer, I'm one of the founders]

Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by le-mark on Thursday September 22, 2016 @02:38PM (#12559066)
Is it appropriate to use this thread to promote your (well established) service, when others get down voted to oblivion for doing the same thing?

Serious question, this post is nothing more than marketing blurb, contributes nothing to the discussion. What's the site policy?

Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by bobfunk on Thursday September 22, 2016 @02:46PM (#12559142)
As long as I've been reading HackerNews (all the way back since it was called StartupNews), it's been common to see founders chime in about their startups when they are clearly relevant to the topic and it's not done by a marketing drone posting on their behalf, and with a clear disclaimer.

Whether people gets downvoted or upvoted for it depends on whether readers see the comment as legitimate and relevant or as spam...

Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by iancarroll on Thursday September 22, 2016 @02:46PM (#12559139)
I don't think HN has any specific rules about self-promotion in comments, but their service seems relevant given all the extra features it offers in comparison to the blog post's suggested host of GH Pages.
Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by ohitsdom on Thursday September 22, 2016 @02:38PM (#12559064)
OT: I like Jekyll for blogs, but I'm looking for something simpler to better fit a simple use case.

I want to generate static HTML files, the simplest example being a 5 page website that uses the same header and footer template across all pages. I want static files for simple scaling, not PHP or JS templating. Ideally this tool would be node based for simple automation with gulp. Anything out there that fits the bill? Handelbars.js with precompiler looks like a good fit, but I'm curious what others use in this scenario.

Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by robterrin on Thursday September 22, 2016 @03:45PM (#12559718)
You might want to try Hexo (https://hexo.io/) or Wintersmith (http://wintersmith.io/). I use Hexo for my personal website and have really enjoyed it.

I tried Jekyll before, but between Ruby, some bugs and template choice overload I dropped it. Moved to Hexo a few months ago and built a couple projects with it. It's worked great for writing but also building a reviews website.

Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by eric_bullington on Thursday September 22, 2016 @03:04PM (#12559313)
Nunjucks is an excellent JS template engine for this kind of work, since it permits template inheritance. It's quite similar to Jinja in Python, if you're familiar with it.

Other options would be Middleman or Metalsmith. I've used both of them successfully for relatively complex static sites. But I wouldn't call them simpler than Jekyll.

Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by jbott on Thursday September 22, 2016 @03:21PM (#12559460)
I've used Middleman in the past, but I actually just switched to Jekyll for my personal single page website.

I found Jekyll to work very well out of box. All of my content is in a markdown file, with styling broken out to layout HTML and CSS.

IMO, I find the community around Jekyll, along with the understandability of Ruby to outweigh using a simpler solution.

Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by ohitsdom on Thursday September 22, 2016 @03:37PM (#12559654)
Fair enough. My only experience with Ruby was to get Jekyll running so it wasn't as familiar to me, but the community and support is a pretty strong point.
Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by qwertyuiop924 on Thursday September 22, 2016 @02:59PM (#12559264)
Metalsmith? http://www.metalsmith.io/

It takes a bit of configuring, but seems like it would be exactly what you want.

Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by ohitsdom on Thursday September 22, 2016 @03:36PM (#12559642)
I looked at it before but I'm not sure why I moved on, it does seem to fit really well. Thanks!
Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by Theizestooke on Thursday September 22, 2016 @02:50PM (#12559185)
I use Hugo for my blog, but I'm not familiar with Jekyll so can't comment on simplicity.
Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by munawwar on Thursday September 22, 2016 @05:55PM (#12560667)
Use any templating library that gives "template inheritance" as feature. I use Nunjucks (from Mozilla)
Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by gshakir on Thursday September 22, 2016 @03:34PM (#12559613)
Using Jekyll, S3 and Cloudfront is another popular option. I found great themes on http://jekyllthemes.org/ . Also, Jekyll has support for seo etc.
Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by omouse on Thursday September 22, 2016 @02:44PM (#12559116)
Say no to CloudFlare, it messes up Tor.
Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by bergie on Thursday September 22, 2016 @02:47PM (#12559160)
You can configure CloudFlare to allow Tor visitors without CAPTCHA:

https://support.cloudflare.com/hc/en-us/articles/203306930-D...

Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by noer on Thursday September 22, 2016 @02:08PM (#12558812)
Two of the cons listed aren't totally correct: > You don’t have a WYSIWYG editor so you have to use Markdown or similar languages to write your posts. You can use a service like siteleaf to add a WYSIWYG backend to jekyll

> You have to deal with a Terminal to push your changes using GIT Github's desktop application is actually pretty easy to use, much more so than using git from terminal

Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by pwenzel on Thursday September 22, 2016 @02:16PM (#12558878)
See also http://prose.io, a nice little interface to your Github repos and Jekyll sites.
Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by foxylion on Thursday September 22, 2016 @02:36PM (#12559051)
It is also possible to edit all the Jekyll files from the GitHub web interface. So no Git is required to change contents.
Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by SCdF on Thursday September 22, 2016 @03:54PM (#12559788)
Is there a way to have HTTPS working on your own domain if you host your content on github pages? Last time I looked it wasn't possible.
Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by joelg236 on Thursday September 22, 2016 @04:44PM (#12560213)
Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by SCdF on Friday September 23, 2016 @04:03AM (#12563039)
Oh sweet, looks like GitLab does. Time to migrate.
Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by marktangotango on Thursday September 22, 2016 @02:26PM (#12558974)
Really, really wish there was a database backend available via CORS for my static github pages hosted site...

Is there such a thing?

Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by qwertyuiop924 on Thursday September 22, 2016 @03:01PM (#12559289)
...Any HTTP-based database?

I mean, you can use Couch, or Redis, or whatever. You'd just have to host the server yourself. And since CORS isn't enabled AFAIK, you'd have to use some kind of hack, like JSONP or whatever.

Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by morgante on Thursday September 22, 2016 @02:38PM (#12559058)
Firebase is a general backend you can use from JS.

For content, you could look at Prismic.

Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by adregan on Thursday September 22, 2016 @03:00PM (#12559282)
You could make use of AWS's API gateway which would in turn activate a lambda function which would communicate with a database.
Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by noahtkoch on Thursday September 22, 2016 @02:27PM (#12558983)
Can someone ELI5 me what the appeal is to something like Jekyll, seems a lot easier to just setup a Posthaven account (or something similar) given you also get a WYSIWYG.
Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by seanwilson on Thursday September 22, 2016 @04:20PM (#12560016)
From my point of view, you're trading ease of editing but gaining speed, security and scalability. If the only thing on the site is static files behind a CDN, it's going to be fast and hard to hack.
Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by piratebroadcast on Thursday September 22, 2016 @02:33PM (#12559032)
Jekyll created static websites, with no database for an attack vector. I learned this the hard way after having a few digital ocean droplets compromised, no backups, etc. Thats one advantage.
Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by qwertyuiop924 on Thursday September 22, 2016 @03:03PM (#12559306)
-Static Website

-Easy config

-No need to leave Emacs

-Easy automation (no WYSIWYG)

-Potential for a WYSIWYG if you want one (Lektor, for instance, another static site generator, provides one)

Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by Theizestooke on Thursday September 22, 2016 @02:53PM (#12559208)
Does Github have any rules for what type of content you can share? Can I show off my graphic novels if they feature occasional nudity?
Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by kowdermeister on Thursday September 22, 2016 @02:58PM (#12559257)
They MIGHT remove it.

"We may, but have no obligation to, remove Content and Accounts containing Content that we determine in our sole discretion are unlawful, offensive, threatening, libelous, defamatory, pornographic, obscene or otherwise objectionable or violates any party's intellectual property or these Terms of Service."

https://help.github.com/articles/github-terms-of-service/

Re:Put Yourself on Internet with Jekyll, GitHub and Cloudflare by qwertyuiop924 on Thursday September 22, 2016 @03:07PM (#12559342)
Yeah, this is pretty common thing. I definitely like Jekyll for its simplicity compared to other static site generators.