16 ms·
Simpler GitHub Pages publishing
- dstroot 10y agoFabulous. As it should have been from day one - this is great.
- fuzionmonkey 10y agoFor generated HTML docs or websites, this is still not ideal because you have to commit generated code into your master branch. You can even use Travis to automatically generate and deploy your docs/website, which I find much cleaner and convenient than manually publishing or committing generated code. https://github.com/L33T-KR3W/push-dir https://github.com/L33T-KR3W/push-dir makes it easy to publish a directory to gh-pages (even .gitignored directories i.e. build/).
- saghul 10y agoAgreed. I use https://readthedocs.org https://readthedocs.org to take care of building and hosting documentation, and it's really handy.
- transfire 10y agoThe generated code is going to be "committed" somewhere, so I am not sure this is much of a down side. I suppose one might worry about storing too much history. Is there a way to pair down history for everything in docs/ ?
- aorth 10y agoSlightly related, I push my site's generated code from the `public` directory of my repo directly to the `gh-pages` branch using git's subtree push: $ git subtree push --prefix=public origin gh-pages
- geraldbauer 10y agoFantastic news. Makes static sites publishing way easier. Looking forward to the upcoming gem-packaged themes (in Jekyll) on GitHub pages too. PS: Anyone interested in static (web)site builder news (e.g. GitHub Pages, Jekyll, Middleman, Gatsby, Metalsmith, and friends)? Follow along @statictimes on twitter -> https://twitter.com/statictimes https://twitter.com/statictimes PPS: Anyone interested in Jekyll - I've put together an Awesome Jekyll page -> https://github.com/planetjekyll/awesome-jekyll https://github.com/planetjekyll/awesome-jekyll (incl. a history on GitHub Pages updates/news).
- aeharding 10y agoI recently switched to gitlab because they have a much more straightforward pages publishing system. It works by setting up a (free) pipeline which can run arbitrary code (docker-ized) that you set up in a .gitlab-ci.yml file that outputs build artifacts (static assets). These assets are then copied to gitlab's pages system. Keeps your git repo clear of compiled stuff. Works the same for public/private repos, too. Also has option for a custom domain SSL cert and 404 pages.
- ktta 10y agoYou can use SSL with GitHub pages if you're using CloudFlare. https://blog.cloudflare.com/secure-and-fast-github-pages-with-cloudflare/ https://blog.cloudflare.com/secure-and-fast-github-pages-wit... And I think it works only if you're using CloudFlare. I've always heard that you can't use custom domains and SSL but this works perfectly for me. But can anyone say why? Since my website is now hosted by github, I'm not so paranoid about my website going down or DoS attacks, and would like to not depend on CF anymore.
- daenney 10y agoIt doesn't only work with Cloudflare but if you want to use a custom domain + SSL you need to use a provider that can proxy the request for you. GitHub and their Fastly setup won't serve custom certificates for you and the *.github.io certificate wouldn't be valid for your custom domain.
- ktta 10y agoThe last sentence didn't really make sense to me. I assume Fastly is some kind of backend tool? So why is it only working with CF? when I visit my custom domain, I get a cert from sni75146.cloudflaressl.com but no cert related to github to be seen anywhere. I'm assuming the cert I'm seeing is valid because I'm viewing the page on CF's CDN, or am I wrong? Well, I think I'm better off asking objective questions, so: 1. Can I change by DNS provider to something else and have SSL work? 2. Can I keep using CF and use my own cert, say from LetsEncrypt? 3. Do GitHub and CF have something in common/mutual agreement so this works?
- deleted 10y ago[deleted]
- simplehuman 10y agoSo, does this mean that the folder is always "live" ?
- mintplant 10y agoWhy make this such a limited set of options? Why not let me enter a path, for example, instead of hardcoding "/docs"? What if I want to serve my docs from a stable release branch or tag instead of "master"?
- andruby 10y agoThe benefit of limiting options is to keep it standardised for most OSS projects, which I like.
- benbalter 10y agoWe may make things more flexible down the line, but for now, it was motivated by two primary reasons: 1. The overwhelming majority of users use one of those three design patterns. For example, I can tell you that more than 98% of GitHub Pages sites use either `master` or `gh-pages` as their primary branch (with only about one tenth of one percent of sites using the `stable` branch). 2. Our experience tells us that every option we add to GitHub Pages increases the learning curve for newer developers. With only those three options, if you're just learning HTML, you don't need to understand Git's branching model before you can create your first website. We chose these options to start because we thought they struck a good balance between supporting collaborative documentation workflows for open source projects and encouraging "hello world" experimentation among new developers, but as with most features at GitHub, this is just the start.
- sn0v 10y agoPersonally speaking, I think this is a great idea. Great job!
- brandonbloom 10y agoGreat! Please don't give in to the demand for added flexibility without strong justification. Just as it did with README.md, GitHub has an opportunity to drive successful conventions and global simplifications that virtually no other organization in open source can.
- 10y ago
- ecesena 10y agoI would love to see a short guide on how to organize your open source website on github (say a react website, since it's pretty popular), i.e. a recommended workflow to store sources, implement new features, build artifacts/assets and publish them on gh pages. I did it in multiple ways, lately I had master with the code, and was pulling gh-pages into the build/ directory, but I always wondered how other workflows look like. And this changes/hopefully simplifies a ton.
- andruby 10y agoThere's a great Ember addon for this: https://github.com/poetic/ember-cli-github-pages https://github.com/poetic/ember-cli-github-pages
- bsimpson 10y agoIt'd also be nice if there was a way to specify an HTML page that is served for every path on the domain. That way, you could use an SPA architecture (a container HTML file and a JS bundle that manages the URL) without breaking deep links or needing to generate redundant pages to match every path in your SPA.
- kevin_thibedeau 10y agoThey should also add a way to turn off Jekyll processing so you don't have to remember to add a .nojekyll file.
- hk__2 10y agoWell, adding a .nojekyll file is a way to turn off Jekyll processing ;)
- jerluc 10y agoThis is great news for me, maybe now I can finally merge my documentation repository with my code repository and have it make sense again :) On another note, I wonder how I could change my Nanoc deploy to support this new kind of Github Pages setup (currently, it follows this process: http://nanoc.ws/doc/deploying/#with-github-pages-or-bitbucket http://nanoc.ws/doc/deploying/#with-github-pages-or-bitbucke...).
- munificent 10y agoOh, God. This is truly the best thing out of all the things. Managing a gh-pages branch was always a pain.
- heyrhett 10y agoI love github pages. Here is a web game I helped make, hosted entirely on github pages (made for the terrible ideas hackathon) http://scrollscore.com/ http://scrollscore.com/ "the more you scroll, the more you win!" https://github.com/amberrayh/scrollscore/tree/gh-pages https://github.com/amberrayh/scrollscore/tree/gh-pages Thanks, Github, for making pages even better!
- r3bl 10y agoYou're requesting people to put their credit card info without having HTTPS enforced by default? Doesn't sound suspicious at all. What year is this? How is this still a thing?
- chestervonwinch 10y agoThis needs a few layers of obnoxious javascript to put it over the top. Funny idea.
- rexpop 10y agoThis is great. I mean, it's lousy and I am over it, but it is somehow perfect, in a Kantian way, as a thing unto itself. 1. concerns about HTTPS are legit. 2. I'd really rather see the $$$ you're making as my score, than this arbitrary number on the side. 3. let's get more/different ads up there!
- 1wheel 10y agoIs there anyway to make readme.md publish to github pages? I'd like to put talk slide in readme.md, then load client side. Like this, but without the duplicated file: https://github.com/1wheel/talks/tree/master/graphical-web https://github.com/1wheel/talks/tree/master/graphical-web
- r3bl 10y agoI agree with you. I think that at the very minimum automatic page generation should convert the README file to HTML by default. I would love to see an option to sync the README file with the site without playing with Git hooks.
- deleted 10y ago[deleted]
- deleted 10y ago[deleted]
- lettergram 10y agoI'm ecstatic for this! I was getting real sick of keeping the separate branches up to date, when I wanted to make a minor change.
- tomphoolery 10y agoThis is exactly how I wanted GitHub Pages to work since it was introduced. Thank you!
- artf 10y agoThanks GitHub and thanks for your Pages. I'm maintaining a web template editor http://grapesjs.com/demo.html http://grapesjs.com/demo.html Where you can design, store and even export to zip responsive templates without much effort and totally free. Really, thank you
- transfire 10y agoYEAH!!!!!!!!!!!!!!!!! Good job guys, you did it! Ok, one small peeve: I think a directory name like `site` would have been better than `docs` because it has a more generally applicable meaning. But hey, I can live with `docs`, even if it means having a `docs/docs` path. I'm just glad this is finally a feature! Kudos.
- kannonboy 10y agoAerobatic (https://www.aerobatic.com/ https://www.aerobatic.com/) takes a similar, though slightly more flexible, approach with their static site deployments for Bitbucket. You pick a branch then (optionally) specify a sub-directory of your repository to deploy. (full disclosure: I'm at Atlassian)
- voiper1 10y agoTL;DR: For serving pages, you can now use `/docs` in your master branch instead of needing a `gh-pages` branch.
- wildpeaks 10y agoBeyond not managing an extra branch, the best benefit imho is when you work on a feature branch, you can also update the docs while working on the feature, so the docs are part of the pull requests and only merged once the new code is merged, so it stays in sync without an extra step.