Powered by Jekyll with al-folio theme.
.
├── 404.html # 404 page
├── assets # assets folder, for images, css, js, etc.
│ └── img # put images here
├── _config.yml # Jekyll configuration file
├── _group # group members, "成员" page
│ ├── cc.md
│ └── gongyongtang.md
├── _includes # layout components
├── _layouts # layout templates
├── _news # news, "新闻" section on the index page
│ ├── announcement_1.md
│ ├── announcement_2.md
│ └── announcement_3.md
├── _pages # pages templates
│ ├── about.md # index page, "关于我们" page
│ ├── contact.md # "招生" page
│ ├── cv.md # hidden, cv
│ ├── dropdown.md # hidden, a dropdown menu
│ ├── group.md # "成员" page. Modify members in _group folder
│ ├── projects.md # "研究项目" page. Modify projects in _projects folder
│ ├── publications.md # "发表" page. Modify publications in _publications folder
│ └── repositories.md # hidden, github repositories
├── _projects # projects, "研究项目" page
│ ├── dataset.md
│ ├── kd.md
│ └── kd-tiho.md
├── _publications # publications, "发表" page
│ ├── 2020.md
│ ├── 2021.md
│ └── 2022.md
├── README_al-folio.md # al-folio README file
├── README.md # this file
├── _sass # css
│ ├── _base.scss
│ ├── _distill.scss
│ ├── _layout.scss
│ ├── _themes.scss
│ └── _variables.scss
└── _site # generated site
Below is detailed instructions on how to setup and deploy this website from the original al-folio README file "README_al-folio.md".
Want to learn more about Jekyll? Check out this tutorial. Why Jekyll? Read Andrej Karpathy's blog post!
For a hands-on walkthrough of al-folio installation, check out this cool video tutorial by one of the community members! 🎬 🍿
You need to take the following steps to get al-folio
up and running in your local machine:
- First, install docker
- Then, clone this repository to your machine:
$ git clone [email protected]:<your-username>/<your-repo-name>.git
$ cd <your-repo-name>
Finally, run the following command that will pull a pre-built image from DockerHub and will run your website.
$ ./bin/dockerhub_run.sh
Note that when you run it for the first time, it will download a docker image of size 300MB or so.
Now, feel free to customize the theme however you like (don't forget to change the name!). After you are done, you can use the same command (bin/dockerhub_run.sh
) to render the webpage with all you changes. Also, make sure to commit your final changes.
(click to expand) Build your own docker image (more advanced):
Note: this approach is only necessary if you would like to build an older or very custom version of al-folio.
First, download the necessary modules and install them into a docker image called al-folio:Dockerfile
(this command will build an image which is used to run your website afterwards. Note that you only need to do this step once. After you have the image, you no longer need to do this anymore):
$ ./bin/docker_build_image.sh
Run the website!
$ ./bin/docker_run.sh
To change port number, you can edit
docker_run.sh
file.
If you want to update jekyll, install new ruby packages, etc., all you have to do is build the image again using
docker_build_image.sh
! It will download ruby and jekyll and install all ruby packages again from scratch.
Assuming you have Ruby and Bundler installed on your system (hint: for ease of managing ruby gems, consider using rbenv), first fork the theme from github.com:alshedivat/al-folio
to github.com:<your-username>/<your-repo-name>
and do the following:
$ git clone [email protected]:<your-username>/<your-repo-name>.git
$ cd <your-repo-name>
$ bundle install
$ bundle exec jekyll serve
Now, feel free to customize the theme however you like (don't forget to change the name!). After you are done, commit your final changes.
Deploying your website to GitHub Pages is the most popular option. Starting version v0.3.5, al-folio will automatically re-deploy your webpage each time you push new changes to your repository! ✨
For personal and organization webpages:
- Rename your repository to
<your-github-username>.github.io
or<your-github-orgname>.github.io
. - In
_config.yml
, seturl
tohttps://<your-github-username>.github.io
and leavebaseurl
empty. - Set up automatic deployment of your webpage (see instructions below).
- Make changes, commit, and push!
- After deployment, the webpage will become available at
<your-github-username>.github.io
.
For project pages:
- In
_config.yml
, seturl
tohttps://<your-github-username>.github.io
andbaseurl
to/<your-repository-name>/
. - Set up automatic deployment of your webpage (see instructions below).
- Make changes, commit, and push!
- After deployment, the webpage will become available at
<your-github-username>.github.io/<your-repository-name>/
.
To enable automatic deployment:
- Click on Actions tab and Enable GitHub Actions; do not worry about creating any workflows as everything has already been set for you.
- Make any other changes to your webpage, commit, and push. This will automatically trigger the Deploy action.
- 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 builtgh-pages
branch. - Finally, in the Settings of your repository, in the Pages section, set the branch to
gh-pages
(NOT tomaster
). For more details, see Configuring a publishing source for your GitHub Pages site.
(click to expand) Manual deployment to GitHub Pages:
If you need to manually re-deploy your website to GitHub pages, run the deploy script from the root directory of your repository:
$ ./bin/deploy
uses the master
branch for the source code and deploys the webpage to gh-pages
.
(click to expand) Deployment to another hosting server (non GitHub Pages):
If you decide to not use GitHub Pages and host your page elsewhere, simply run:
$ bundle exec jekyll build
which will (re-)generate the static webpage in the _site/
folder.
Then simply copy the contents of the _site/
foder to your hosting server.
Note: Make sure to correctly set the url
and baseurl
fields in _config.yml
before building the webpage. If you are deploying your webpage to your-domain.com/your-project/
, you must set url: your-domain.com
and baseurl: /your-project/
. If you are deploing directly to your-domain.com
, leave baseurl
blank.
(click to expand) Deployment to a separate repository (advanced users only):
Note: Do not try using this method unless you know what you are doing (make sure you are familiar with publishing sources). This approach allows to have the website's source code in one repository and the deployment version in a different repository.
Let's assume that your website's publishing source is a publishing-source
sub-directory of a git-versioned repository cloned under $HOME/repo/
.
For a user site this could well be something like $HOME/<user>.github.io
.
Firstly, from the deployment repo dir, checkout the git branch hosting your publishing source.
Then from the website sources dir (commonly your al-folio fork's clone):
$ bundle exec jekyll build --destination $HOME/repo/publishing-source
This will instruct jekyll to deploy the website under $HOME/repo/publishing-source
.
Note: Jekyll will clean $HOME/repo/publishing-source
before building!
The quote below is taken directly from the jekyll configuration docs:
Destination folders are cleaned on site builds
The contents of
<destination>
are automatically cleaned, by default, when the site is built. Files or folders that are not created by your site will be removed. Some files could be retained by specifying them within the<keep_files>
configuration directive.Do not use an important location for
<destination>
; instead, use it as a staging area and copy files from there to your web server.
If $HOME/repo/publishing-source
contains files that you want jekyll to leave untouched, specify them under keep_files
in _config.yml
.
In its default configuration, al-folio will copy the top-level README.md
to the publishing source. If you want to change this behaviour, add README.md
under exclude
in _config.yml
.
Note: Do not run jekyll clean
on your publishing source repo as this will result in the entire directory getting deleted, irrespective of the content of keep_files
in _config.yml
.
If you installed al-folio as described above, you can upgrade to the latest version as follows:
# Assuming the current directory is <your-repo-name>
$ git remote add upstream https://github.com/alshedivat/al-folio.git
$ git fetch upstream
$ git rebase v0.3.5
If you have extensively customized a previous version, it might be trickier to upgrade.
You can still follow the steps above, but git rebase
may result in merge conflicts that must be resolved.
See git rebase manual and how to resolve conflicts for more information.
If rebasing is too complicated, we recommend to re-install the new version of the theme from scratch and port over your content and changes from the previous version manually.
Here are some frequently asked questions. If you have a different question, please ask using Discussions.
-
Q: After I fork and setup the repo, I get a deployment error. Isn't the website supposed to correctly deploy automatically?
A: Yes, if you are using releasev0.3.5
or later, the website will automatically and correctly re-deploy right after your first commit. Please make some changes (e.g., change your website info in_config.yml
), commit, and push. Make sure to follow deployment instructions in the previous section. (Relevant issue: 209.) -
Q: I am using a custom domain (e.g.,
foo.com
). My custom domain becomes blank in the repository settings after each deployment. How do I fix that?
A: You need to addCNAME
file to themaster
orsource
branch of your repository. The file should contain your custom domain name. (Relevant issue: 130.) -
Q: My webpage works locally. But after deploying, it is not displayed correctly (CSS and JS is not loaded properly). How do I fix that?
A: Make sure to correctly specify theurl
andbaseurl
paths in_config.yml
. Seturl
tohttps://<your-github-username>.github.io
or tohttps://<your.custom.domain>
if you are using a custom domain. If you are deploying a personal or organization website, leavebaseurl
blank. If you are deploying a project page, setbaseurl: /<your-project-name>/
. -
Q: Atom feed doesn't work. Why?
A: Make sure to correctly specify theurl
andbaseurl
paths in_config.yml
. RSS Feed plugin works with these correctly set up fields:title
,url
,description
andauthor
. Make sure to fill them in an appropriate way and try again.