GitHub
;RStudio
dans un répertoire GitHub
;RStudio
et le connecter à un répertoire GitHub
;Blogdown
;GitHub
et un compte Netlify
;RStudio
, avec Netlify
, à partir d’un répertoire GitHub
.–
README
but don’t add .gitignore
for now).–
–
–
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).
–
cd
to indicate the directory where you want your repository to be located–
git clone [paste]
.–
–
For more details, see clone your remote repository.
–
blogdown
from RStudio or use install.packages("devtools") devtools::install_github("rstudio/blogdown")
–
blogdown::install_hugo()
library(blogdown)
install_hugo()
–
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.–
*gitignore
file. 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
–
To choose a theme, see Hugo themes. To save time, see Bookdown suggested themes.
–
lithium
theme:blogdown::new_site()
–
new_site
function. If you choose the academic
theme:blogdown::new_site(theme = "gcushen/hugo-academic", theme_example = TRUE)
–
library(blogdown)
new_site() # default theme
install_theme("gcushen/hugo-academic", theme_example = TRUE, update_config = TRUE)
–
Tools -> Project Options
and following Bookdown instructions.–
baseurl
in your config.toml
file. The URL should always end with a /
:baseurl = "https://website.com/"
baseurl = "/"
Feel free to edit other elements of the config.toml
file ! For more details on configuration settings, read Bookdown chapter on configuration.
–
blogdown::serve_site
class: inverse, center, middle
.
├── archetypes
{{├── config}}
├── config.toml
├── content
├── public
├── static
├── themes
.
├── archetypes
├── config
├── config.toml
{{├── content}}
└── author
└── home
└── post
├── public
├── static
├── themes
–
blogdown::serve_site()
–
class: inverse, center, middle
.
├── archetypes
├── config
├── config.toml
{{├── content}}
└── home
└── accomplishments.md
└── experience.md
└── skills.md
└── ...
├── public
├── static
├── themes
class: inverse, center, middle
class: inverse, center, middle
–
Commit
your changes and push
to GitHub
.–
GitHub
account.–
New site from Git -> Continuous Deployment: GitHub
.–
GitHub
repository already in use with blogdown
, then specify the build
command and the publish directory
(to public
).–
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
file,for example to baseurl = "https://mamadouyauck.netlify.com/"
.
For more details, see Bookdown deployment instructions, or deploy with Netlify through GitHub.