Dear all,
This week we’ll lear how to let GitHub render your html files, how to host a free, easily maintainable personal web page and how to deploy ‘simple’ webapps.
Best,
Gerko
GitHub Pages with JekyllGitHub Pages is a facility to host websites directly from your GitHub repositories. The content can be served amongst other formats as standard html or as markdown and GitHub Pages will take care of rendering the content to the device. This makes it very straightforward for developers to publish and maintain personal websites or project websites directly from the GitHub repository. Moreover, when GitHub project repositories contain html files, by default, these files will be shown as raw user content. When a repository is published as a GitHub Page, the html or markdown content is automatically rendered and served as a compiled document - please note that rmarkdown specific facilities, such as rendering R-code, can only be compiled from within R-studio.
The GitHub Pages site walks you through creating personal and project sites from scratch. The back-end of GitHub Pages is Jekyll, an open-source static site generator. Jekyll allows for advanced customization and styling through themes. The standard Jekyll functionality and theming that is offered by GitHub will serve most users fine. However, Jekyll is written in Ruby and customizing your websites beyond the standard functionality offerd by GitHub requires some effort in coding Ruby. Both GitHub and Jekyll walk you through many of these codes executions in step-by-step instructions. Have a look at this link to view some examples of great GitHub pages.
To learn about using GitHub Pages, I suggest you take the following steps
this link to create a personal website (a username.github.io page)same linkFor more advanced customizibility, have a look at the following links
Jekyll theme [requires some Ruby coding]GitHub Pages site locally with Jekyll, which comes in very handy if you like to code, test and develop your site in an offline clone. [requires some Ruby coding]GitHub PagesJekyllI personally prefer hugo over Jekyll for personal webpages. hugo is even more minimalistic to maintain as it is fully markdown and yaml (e.g. rmarkdown’s header is yaml) based. Best of all, hugo integrates seamlessly into the git workflow. Use the hugo quickstart to set up your first hugo page locally.
Shiny web appsShiny is an R package that makes it easy to build interactive web apps straight from R. You can host standalone apps on a webpage or embed them in rmarkdown documents and dashboards. If you like to browse around in the wonderful world that is Shiny, this link provides you with a great overview.
To publish your Shiny app in a simple manner, there are two classes of options: one class that requires the user to have Shiny installed on their machine (e.g. on GitHub) and one class that does not require the user to have Shiny installed (e.g. shinyapps.io). Of course, there are more options to deploy Shiny web apps, but they require you to host your own Shiny server on your personal domain.
To create a Shiny app from R, you need to provide two documents: a user-interface (ui) component and a server instruction set. With the Shiny package in R, the ui and server components are combined and the corresponding html code is generated and compiled for you. Normally, this would require you to have advanced knowledge and skills about servers, interfaces and html, but with Shiny this process is extremely simplified into an R programming scenario.
To learn about using Shiny to create web-apps, I suggest you take the following steps
RStudio offers a quiz that tests your R proficiency yo see whether you are ready for Shiny. I suggest you take it and, if you do not know all the answers, use that knowledge later on to debug problems with Shiny.shinyapps.io account - a free one will doshinyapps.io to connect your RStudio installation to shinyapps throught the rsconnect package in RShiny app and publish it to shinyapps.ioDo the following before January 14, 2019:
Page on GitHub that showcases you. Pay attention to e.g.GitHub, Company page, facebook, G+, twitter, etc.)Shiny app. If your app is subject to sensitive data or non-disclosure, I suggest you use a private GitHub repo to host your app. Otherwise, use shinyapps.io.I’ve set the deadline to January 15th to allow you to work towards the final deliveries for this course such that you can avoid duplicate work. Do not hesitate to ask for help.
All the best,
Gerko