a simple way to create a website with a simple way to
play

A simple way to create a website with A simple way to create a - PowerPoint PPT Presentation

A simple way to create a website with A simple way to create a website with Blogdown Blogdown R Qubec Workshop R Qubec Workshop Mamadou Yauck & Sergio Ewane Ebouele Mamadou Yauck & Sergio Ewane Ebouele 2019-05-13


  1. A simple way to create a website with A simple way to create a website with Blogdown Blogdown R à Québec Workshop R à Québec Workshop Mamadou Yauck & Sergio Ewane Ebouele Mamadou Yauck & Sergio Ewane Ebouele 2019-05-13 2019-05-13 1 / 31 1 / 31

  2. Étapes de la présentation Créer un répertoire GitHub; Établir la communication entre une session Rstudio et un répertoire GitHub ; Transférer les documents d’un projet RStudio dans un répertoire GitHub ; Créer un projet BlogDown avec RStudio et le connecter à un répertoire GitHub ; Charger un thème de la plateforme HUGO avec Blogdown ; Créer un compte sur Netlify; Établir le lien entre un compte GitHub et un compte Netlify ; Déployer un site web développé sous RStudio , avec Netlify , à partir d’un répertoire GitHub . 2 / 31

  3. GitHub 3 / 31

  4. Create a GitHub repository 1. Open your GitHub account and create a new repository (initialize with a README but don't add .gitignore for now). 2. Go to the main page of the repository, and under the repository name, click the Clone or download button. 3. In the Clone with HTTPs section, click on the clipboard icon to copy the clone URL for the new repository (we will paste this text into the terminal in the next section.) 4 / 31

  5. Command line/Terminal 5 / 31

  6. Clone the GitHub repository We are going to create a local copy of the repository on your computer so you can make the two locations communicate (using the command line tool for Windows or the Terminal for Mac OS X). 1. Use cd to indicate the directory where you want your repository to be located 2. Type: git clone [paste] . 3. Close the command line/terminal. For more details, see clone your remote repository. 6 / 31

  7. RStudio 7 / 31

  8. What is Blogdown ? 8 / 31

  9. Blogdown and Hugo Install the package blogdown from RStudio or use install.packages("devtools") devtools::install_github("rstudio/blogdown") Install Hugo: blogdown::install_hugo() library(blogdown) install_hugo() Use the File button in RStudio to select File -> New Project -> Existing Directory , then browse to the directory on your computer where your GitHub repository is and click on Create Project. Edit the *gitignore �le. If you want to use Netlify to deploy your website, you should add the public/ line (for more info.) .Rproj.user .Rhistory .RData .Ruserdata blogdown .DS_Store # Thumbs.db for Windows users public/ # for Netlify 9 / 31

  10. Build your site 10 / 31

  11. Choose a theme ! To choose a theme, see Hugo themes. To save time, see Bookdown suggested themes. You can use the default lithium theme: blogdown::new_site() If you choose a theme, you can specify it while calling the new_site function. If you choose the academic theme: blogdown::new_site(theme = "gcushen/hugo-academic", theme_example = TRUE) If you want to add a theme later: library(blogdown) new_site() # default theme install_theme("gcushen/hugo-academic", theme_example = TRUE, update_config = TRUE) 11 / 31

  12. Some basic edits Update project options by doing Tools -> Project Options and following Bookdown instructions. Edit the baseurl in your config.toml �le. The URL should always end with a / : baseurl = "https://website.com/" baseurl = "/" Feel free to edit other elements of the config.toml �le ! For more details on con�guration settings, read Bookdown chapter on con�guration. To view your new site locally, use the Serve Site button, or run blogdown::serve_site 12 / 31

  13. Explore your new site Explore your new site 13 / 31 13 / 31

  14. Hugo directory structure . ├── archetypes ├── config ├── config.toml ├── content ├── public ├── static ├── themes 14 / 31

  15. Hugo directory structure . ├── archetypes ├── config ├── config.toml ├── content ├── public ├── static ├── themes 15 / 31

  16. Hugo directory structure . ├── archetypes ├── config ├── config.toml ├── content ├── public ├── static ├── themes 16 / 31

  17. Hugo directory structure . ├── archetypes ├── config ├── config.toml ├── content └── author └── home └── post ├── public ├── static ├── themes 17 / 31

  18. Hugo directory structure . ├── archetypes ├── config ├── config.toml ├── content ├── public ├── static └── img ├── themes 18 / 31

  19. Serve your site (locally) Console blogdown::serve_site() The RStudio Addin Serve Site 19 / 31

  20. Edit your new site Edit your new site For more details, see For more details, see Academic's page builder Academic's page builder 20 / 31 20 / 31

  21. Edit your new site Edit your new site Edit your home page Edit your home page 21 / 31 21 / 31

  22. Change your bio . ├── archetypes ├── config ├── config.toml ├── content └── author └── admin └── index.md ├── public ├── static ├── themes 22 / 31

  23. Update your CV . ├── archetypes ├── config ├── config.toml ├── content └── home └── accomplishments.md └── experience.md └── skills.md └── ... ├── public ├── static ├── themes 23 / 31

  24. Edit the navigation bar . ├── archetypes ├── config └── .default └── menus.toml ├── config.toml ├── content ├── public ├── static ├── themes 24 / 31

  25. Create a new post Create a new post 25 / 31 25 / 31

  26. New post Console blogdown::new_post() From the R menu: Addins -> New Post 26 / 31

  27. Deploy your new site Deploy your new site 27 / 31 27 / 31

  28. Deploy your site in Netlify 28 / 31

  29. Steps to deploy your site Commit your changes and push to GitHub . Go to Netlify and Sign Up using your GitHub account. Log in and click on: New site from Git -> Continuous Deployment: GitHub . Select the GitHub repository already in use with blogdown , then specify the build command and the publish directory (to public ). Your website is now deployed ! Netlify will assign you a subdomain name of the form somethingbizarre.netlify.com . You can change the subdomai name, for example to mamadouyauck.netlify.com . When you change your subdomain name, you must update the baseurl in your config.toml �le,for example to baseurl = "https://mamadouyauck.netlify.com/" . For more details, see Bookdown deployment instructions, or deploy with Netlify through GitHub. 29 / 31

  30. Reference Alison Hill's Up and running with Blogdown 30 / 31

  31. Contact me Contact me Personal website Personal website GitHub repository GitHub repository Twitter page Twitter page 31 / 31 31 / 31

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend