-
Notifications
You must be signed in to change notification settings - Fork 1
GetStarted
In this section we explain how to run the blog locally.
This blog is created with blogdown that basically use Hugo and Rmarkdown to generate a blog (see 'blogdown: Creating Websites with R Markdown' for more details). To build the website, on top of blogdown
, several packages are required, they are listed in the DESCRIPTION
file. One quick way to install those packages is to use the remotes
package. First, clone this repository
git clone https://github.com/inSileco/inSileco.github.io.git
then open an R console with the root of the website as your working directory, then do
install.packages("remotes")
remotes::install_deps()
If you don't have Hugo install, then do
blogdown::install_hugo()
Some icons available via the icons
are also required, to use them, do
icons::download_fontawesome()
You should be ready to go now, that said, a few checks would help you find if something is wrong with your installation.
blogdown::check_config()
blogdown::check_content()
blogdown::build_site()
Once you are done, you can serve the blog like so
# this command is verbose and run in the background
blogdown::serve_site()
-
Make sure you have the last commit of the
main
branch of the inSileco.github.io repository; -
Create a new branch, a name that reflects your post is better, e.g.
git branch yourpost
; -
Switch branch:
git switch yourpost
; -
Run the server locally (see above);
-
Work on your post:
- to create a new empty, use
blogdown::new_post('MY_TITLE')
; alternatively, use dohugo new post/yourpost.Rmarkdown
in a console which will use the archetypepost.Rmarkdown
; - check the writing guidelines in the Contributing section;
- if any changes are made on one of the source files, the site will be
auto-generated and changes will be displayed at the
localhost
address (e.g.http://127.0.0.1:4321
), so you can locally visualize the final rendering.
- to create a new empty, use
-
Once you are done with your changes, commit and push your changes (push your branch
yourpost
on the GitHub repository); -
Open a Pull Request (PR) and assign a reviewer;
-
Opening a PR will trigger a GitHub Actions workflow that will check the blog on the three main platform.
-
Once your post is reviewed and the build is passing, the reviewer (that might be yourself) will be able to merge your post (for a post, if there are several commits, a squash and merge is preferred);
-
Once the PR is merged, do not forget to pull the
dev
branch for your next post!