Home Comments Thread
New Thread

Consider Netlify instead of GitHub Pages for Your Static Websites - GitHub Pages is Dead, Long Live Netlify! | /en/2017/06/netlify-instead-of-github-pages/

yihui yihui 2022-12-17 01:24:39

Consider Netlify instead of GitHub Pages for Your Static Websites - GitHub Pages is Dead, Long Live Netlify!

https://yihui.org/en/2017/06/netlify-instead-of-github-pages/

👍 1

17 Comments

giscus-bot giscus-bot 2022-12-17 01:24:40
Guest *homerhanumat* @ 2017-06-08 02:23:18 originally posted:

Agree. Kinda stuck with my *.github.io, but Netlify is great and I'll be using it for future projects.

giscus-bot giscus-bot 2022-12-17 01:24:40
Guest *Sungpil Han* @ 2017-06-08 03:08:08 originally posted:

I am leaving my github.io after reading this. Thanks.

giscus-bot giscus-bot 2022-12-17 01:24:41
Guest *Daijiang Li* @ 2017-06-08 04:21:22 originally posted:

If you already have your github.io and want to leave, remember to rename the repository to avoid possible problems.

@daijiang

giscus-bot giscus-bot 2022-12-17 01:24:42
Guest *Florian Privé* @ 2017-06-08 20:07:50 originally posted:

You say that "Github Pages only supports Jekyll", but actually, R Markdown websites don't use Jekyll. Can you be more precise?
Also, could the pkgdown pipeline be as easy with Netlify as with GitHub pages?

giscus-bot giscus-bot 2022-12-17 01:24:52
Guest *Daijiang Li* @ 2017-06-09 02:02:17 originally posted:

Yes, Netlify is easier than GitHub pages. You can put your repository in GitHub and just tell Netlify where is your source code and which command (Hugo, Jekyll, etc.) to build your website. Then whenever you push to GitHub, Netlify will automatically re-build your website in seconds.

To host your website at GitHub pages, you are constrained to use Jekyll only; and the rebuilding speed is not really great.

@daijiang

yihui yihui 2022-12-17 01:24:53

Sure. I added a footnote #3.

If you have prebuilt websites, Netlify is even easier than Github pages. Drag and drop. Done. Of course, you can still use GIT if you prefer and do deploy-on-push.

Originally posted on 2017-06-09 02:25:50

giscus-bot giscus-bot 2022-12-17 01:24:43
Guest *Tal Galili* @ 2017-06-08 20:40:36 originally posted:

BTW, wordpress allows for a flat xml file (called WXR) which you can easily export from your blog. I assume most (all?) modern blogging platforms allow themselves to import that content.

yihui yihui 2022-12-17 01:24:54

First, the Hugo authors have said everything I wanted to say about WordPress: https://gohugo.io/overview/introduction/ (except that they didn't say the awkwardness of embedding R code chunks or writing math expressions in WordPress, not to mention many other R Markdown/bookdown features).

Second, yes, you could export all posts to a plain-text XML file (that is exactly how one could possibly escape from WordPress), but I'd argue it would be much easier to start with plain-text files than going to WordPress and then trying to escape. I have yet to see a convincing case where it is more beneficial for a personal website to use a PHP application like WordPress than static website generators. There are many great PHP applications and I still watch a few closely. Web forums and e-commerce websites are good examples of dynamic websites. For personal websites and blogs, I have my faith in static website generators.

Even with the exported XML file, it is still quite painful to convert it to other platforms. One part of the pain is that the content is often not clean: tons of weird HTML tags that you have to clean up. Again, as I said, start with Markdown, there is a lot of freedom; start with HTML/LaTeX/Word, endless tears.

Originally posted on 2017-06-09 02:46:33

giscus-bot giscus-bot 2022-12-17 01:24:44
Guest *Dong* @ 2017-06-10 21:13:15 originally posted:

Inspired by you, I have created my website with blogdown. Thanks for your great work on blogdown.

giscus-bot giscus-bot 2022-12-17 01:24:44
Guest *Aaron Simumba* @ 2017-06-16 16:00:06 originally posted:

Great work on the blogdown package. Though I am still working around it, so far the prospects are great. Not to mention the easy work flow aided by netlify.

giscus-bot giscus-bot 2022-12-17 01:24:45
Guest *Iris Yanfang Guo* @ 2017-06-20 18:37:05 originally posted:

Thanks for introducing such a cool tool!

giscus-bot giscus-bot 2022-12-17 01:24:46
Guest *Maximilian Held* @ 2017-07-17 08:54:22 originally posted:

I'm all for Netlify, I'm just still confused about one aspect: Netlify cannot compile the actual R parts of some bookdown/blogdown project, correct?

So to compile everything down to HTML (bookdown) or Markdown + Hugo (blogdown), I still need to run R somewhere, right? I'm guessing this would happen in one of two workflows:

  1. Compile R locally and commit HTML / Markdown to /docs or some deploy-branch.

  2. Only commit source and have Travis CI or similar compile R and deploy results to Netlify.

  3. seems ugly to me because I don't like to bloat my repos with compiled stuff.

  4. Seems ok, though not that much simpler than the old gh-pages approach, except, of course, that Netlify has HTTPS and is generally better.

Am I getting this right or am I missing a crucial part?

Ps.: I wish RStudio offered a CI/CD SaaS product; I am so tired of setting up Travis and some webhost. I know Connect goes some of the way, but it doesn't have Git integration, or a real CI/CD interface. Would be happy to pay for RStudio CI/CD SaaS.

yihui yihui 2022-12-17 01:24:55

You are absolutely correct, and I totally understand your concerns. You have said everything I could say, so I don't have much to add. Generally I prefer compiling books/blogs by myself locally instead of using a cloud service, and I wrote my reasons here: http://selbydavid.com/2017/06/22/blogdown-travis/#comment-3381669932

RE: RStudio CI/CD, I think it is an interesting idea but I don't much weight in deciding whether RStudio wants to do it. We do have RStudio Connect now, which makes it possible to build any of your R-related stuff on the cloud, but there is no continuous integration yet. Actually I have poked the team a few times about this. Integration with Github (or GitLab or any other version control hosts) will be really awesome.

Originally posted on 2017-07-19 05:01:55

yihui yihui 2022-12-17 01:24:56

With the latest version of RStudio Connect and Plumber, I think CI/CD should be possible now: https://blog.rstudio.com/2017/08/03/rstudio-connect-v1-5-4-plumber/ I have not tried it, though.

Originally posted on 2017-08-08 13:41:01

giscus-bot giscus-bot 2022-12-17 01:25:00
Guest *Maximilian Held* @ 2017-08-11 21:01:17 originally posted:

sorry, I'm a bit dense – that's something that (I) would have to build on top RStudio Connect via Plumber, or what approach would you suggest?

When I think of CI/CD via RStudio Connect, I'm always hoping that I could use it much like Netlify (or Heroku?); connect it to some repo, and have each commit checked and deployed.

I always feel a little stupid wrangling with the Travis CI build environment, because it seems to me shiny server (and RStudio Connect?) already maintain such a canonical R build environment (the workers!), and they also already deal dependency management (via the "manifest" and packrat, I think?).

Anyway, I might be a little too loose in my thinking about this.

It's actually a thing that keeps me from using RStudio Connect though; I just fear the extra complexity it would add on top of a git(hub) workflow.

yihui yihui 2022-12-17 01:25:01

I see your points and agree that native CI/CD support would be much better. I hate the fact that I have to deploy a Plumber API and invent a webhook for Github by myself. All I was trying to say that it is not impossible now. We are one step closer, but not quite there yet for general users.

Originally posted on 2017-08-12 02:23:13

giscus-bot giscus-bot 2022-12-17 01:24:47
Guest *Chris Handy* @ 2017-08-06 20:36:02 originally posted:

Great post. I am looking to launch a project with R Markdown. I have an open question. I'd like the flexibility to use R when needed, but not to be tied to my work machine to write posts. e.g I often write simple blog posts from my phone.

If we launch with R Markdown, but want to write a simple .md regular blog post (that doesnt have R code in it.) Can we add that .md to git through other apps or github.com manually and not disturb the R code or packages?

yihui yihui 2022-12-17 01:24:57

Good question. You can create new files from Github, but this feature is only available to its desktop version of their website. The fonts of the desktop version are probably too small on a mobile device. I think there should be many mobile apps that allows you to create/edit content on Github.

Originally posted on 2017-08-08 13:47:19

giscus-bot giscus-bot 2022-12-17 01:24:58
Guest *Chris Handy* @ 2017-08-08 14:14:37 originally posted:

Got it. This won't disturb the "R" factor at all? Also looking at integrating Netlify CMS for my team to write non-R posts.

yihui yihui 2022-12-17 01:24:58

No, not at all. Your team members are free to write non-R posts using .md files.

Originally posted on 2017-08-08 16:14:56

giscus-bot giscus-bot 2022-12-17 01:24:48
Guest *Robert* @ 2017-08-09 15:47:04 originally posted:

So I do not get the advantage. Is there one over Github Pages with a custom domain? If I stick to jekyll, Github Pages builds my site on a git push just fine.

yihui yihui 2022-12-17 01:24:59

I guess you didn't read the section I referred to in the blogdown book: https://bookdown.org/yihui/blogdown/github-pages.html

Originally posted on 2017-08-09 18:17:10

giscus-bot giscus-bot 2022-12-17 01:24:49
Guest *yihan* @ 2017-09-02 09:53:02 originally posted:

Thanks for introducing Netlify, but I think you might have missed some advantages that Github Page offers. I just built my own website a month ago with Github Page using the github.io domain name. For a beginner, I consider using well-established domain names much better than registering one's own, because 1) brandy domains tend to be ranked higher by search engines as they are considered more authoritative (see https://moz.com/learn/seo/domain-authority) 2) they are also much easier to remember for readers (anyone can remember ***@gmail.com) 3) emails sent from those domains will likely to be seen as less spammy (most people will reply to an enquiry sent from an email address like ***@harvard.edu.

@yihanxu

giscus-bot giscus-bot 2022-12-17 01:24:50
Guest *Blueh* @ 2017-09-16 18:13:26 originally posted:

so, should I use hugo or jekyll?, and what do you think of hexo ^-^

yihui yihui 2022-12-17 01:25:02

Any of these works. Hugo is best supported in blogdown, but you can also use Jekyll/Hexo with blogdown and Netlify. Please see https://bookdown.org/yihui/blogdown/other-generators.html

Originally posted on 2017-09-17 02:45:38

giscus-bot giscus-bot 2022-12-17 01:24:51
Guest *Henrik* @ 2018-03-04 17:56:24 originally posted:

What do you think about Django? I took some time last year several weeks to learn the basics of Django. I have a very simple website running but it is not yet finished due to other projects. I plan to work on that coming summer. I am not sure now if I should stick with Django or if I should switch to static website building learning a new tool. I think that I can build a simple website with Django as well but in case I ever want to do more than that I may be more flexible than if I use a static website. Plus I know the basics which means that likely the effort to create the website I want will be the same if I would switch to static. On the other hand, in the near future I will likely write about data analysis hoot's as a self learning habit + maybe blog about research projects. I would appreciate your thoughts.

yihui yihui 2022-12-17 01:25:03

I'm not familiar with Django. Sorry.

Originally posted on 2018-03-04 21:30:30

giscus-bot giscus-bot 2022-12-17 01:24:52
Guest *Lizzy Mendivil* @ 2018-06-17 21:23:00 originally posted:

Hello!
What do u mean when saying static website?

yihui yihui 2022-12-17 01:25:04

Thanks for sharing! Then I'll just wait for Github Pages to support 301 redirect. That's the main thing missing for me.

Originally posted on 2021-05-27 15:54:40

yihui yihui 2022-12-17 01:25:05

I have already used a large number of redirects on my personal website: https://github.com/rbind/yihui/blob/1342f2f30118f5934f1a6c3eb478ba71d07e9d3b/vercel.json#L11-L149 I started this website in 2007 and have changed the backend several times. I hate broken links, so I use 301 whenever possible. The meta tag cannot solve all problems, e.g., you cannot redirect an RSS feed or any non-HTML files, and the meta tag only works for web browsers but not other agents (e.g., curl), so 301 is the most robust solution.

Originally posted on 2021-05-28 19:08:59

Sign in to join the discussion

Sign in with GitHub