Set up your personal academic website with academicpages Jekyll Theme+Github.io.
Local jekyll
1. download academic Theme and install required software
Jekyll is a static site generator with built-in support for GitHub Pages.
Assume you already have github account.
|
|
upzip and you may want to change the name, for example, from academicpages.github.io
to myblog.github.io
.
change your working directory via: ```cd myblog.github.io````
Most of the time, Mac has ruby
and nodejs
installed already.
|
|
2. run a quick local test
|
|
If the installation was successful, bundle exec jekyll liveserve
would generate the HTML and you could visit it via localhost:4000
or http://127.0.0.1:4000/
. This local server will automatically rebuild and refresh the pages on change. Quit via ctrl+c
.
An example page:
Sync to Github
- create an new repo with the name
[username].github.io
with your github account online. - in your local folder
myblog.github.io
, init git and commit changes You may need to modify the_config.yml
file to make it compatible with Github
In my case (pay attention to url
and repository
)
|
|
|
|
- visit your github pages via
https://[username].github.io/
Customization
Locations of key files/directories
- Basic config options: _config.yml
- Top navigation bar config: _data/navigation.yml
- Single pages: _pages/
- Collections of pages are .md or .html files in:
- _publications/
- _portfolio/
- _posts/
- _teaching/
- _talks/
- Static files (like PDFs): /files/
- Profile image (can set in _config.yml): images/profile.png
In my case, I modified _config.yml
and navigation.yml
, and several xx.html
files in _pages/
.
publish Rmarkdowns to Jekyll website
Generate a xx.html
file with Rmarkdown as usuall.
Edit the xx.html
by adding contents as below to the very begining of this file:
|
|
An Rmarkdown example file can be found here, with visual effect as: R color scheme
check local server before sync
If you wrote a new blog and would like to have a look locally (on your own laptop) before sync to github.
- modify
_config.yml
|
|
-
run
bundle exec jekyll liveserve
-
modify back
_config.yml
and sync.