most in Chinese, rest in English

0%

Jekyll 搭建个人网站 - al-folio模板

Github Pages al-folio 其源代码和生成的网页效果比较适用于偏学术风格的个人网站。

安装Ruby 和 Bundler

1
2
3
brew install ruby // ruby其实应该默认已经安装在Mac系统上了,以防万一可以再用brew 安装下
gem install bundler // gem 是ruby的打包系统
brew install rbenv ruby-build //更好的管理ruby gems

第一次安装Ruby之后,需要把以下加入路径中:

1
echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' >> ~/.zshrc

页面内容更改

在每个pages folder里面的md 文档,可以通过nav_order 来更改顺序, blog页面除外。

about.md

  • Modify the major content in this page.
  • The news is in under news folder.
  • You can modify Social integration section in config.yml, which allows to provide you a list of social media icons.
  • contact_note “Free feel to reach out to me via email.” in the bottom can be modified in config.yml as well.
  • profile image should be stored at assets/img folder.

blog.md

blog的页面默认是在第二栏的,可以在config.yml里面进行修改或者删除。因为本人的blog页面是托管在另外一个网站,并且想把blog页面放在最后,所以笔者新建了一个blog.md文件,然后把nav_order的值放在最后。

publication.md

  • config.yml 文件中定义好对应的papers.bib。这样可以自动读取bib文档生成文章信息。具体一些参数(比如filtered_bibtex_keywords)也可以在这里改。
  • 在pages/publications.md中写好对应的内容。比如years这种变量。
  • /bibliography/papers.bib里面填写paper的bib信息.
  • 如果想改publications里面的button的话,可以首先在config.yml里filtered_bibtex_keywords中填上对应名称,i.e. video,然后再layouts/bib.html里面参考其他button添加对应代码,比如:
1
2
3
{%- if entry.video %}
<a href="{{ entry.video }}" class="btn btn-sm z-depth-0" role="button">Video</a>
{%- endif %}

button在此文件中的顺序将会影响其在publication页面中的顺序。

cv.md

cv的内容主要存放在data/cv.yml文件中。可以直接在里面进行修改。

Git commit

如果用git clone https://github.com/RoyZhengGao/RoyZhengGao.github.io.git 的方式来下载项目的话,最后git push的时候需要用户名和密码。用户名为RoyZhengGao,而密码是之前设置的一个personal access token。参考链接

Deployment

自动deployment(目前不清楚怎么弄):

  1. Click on Actions tab and Enable GitHub Actions; do not worry about creating any workflows as everything has already been set for you.
  2. Make any other changes to your webpage, commit, and push. This will automatically trigger the Deploy action.
  3. Wait for a few minutes and let the action complete. You can see the progress in the Actions tab. If completed successfully, in addition to the master branch, your repository should now have a newly built gh-pages branch.
  4. Finally, in the Settings of your repository, in the Pages section, set the branch to gh-pages (NOT to master). For more details, see Configuring a publishing source for your GitHub Pages site.

手动deployment,在master branch运行:

1
$ ./bin/deploy

参考文献