Static website generator for the personal website of Aven Arlington. Modified from the excellent alshedivat/al-folio template.
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! ๐ฌ ๐ฟ
The preferred way of using this template is by clicking in Use this template above the file list.
Then, create a new repository at github.com:<your-username>/<your-repo-name>
. If you plan to upload your site to <your-github-username>.github.io
,
note that the name of your repository must be <your-github-username>.github.io
or <your-github-orgname>.github.io
, as stated in the GitHub pages docs.
For more information on how to deploy your site, check the Deployment section below. After you created your new repository, just download it to your machine:
$ git clone [email protected]:<your-username>/<your-repo-name>.git
$ cd <your-repo-name>
Using Docker to install Jekyll and Ruby dependencies is the easiest way.
You need to take the following steps to get al-folio
up and running on your local machine:
- First, install docker and docker-compose.
- Finally, run the following command that will pull the latest pre-built image from DockerHub and will run your website.
$ docker compose pull
$ docker compose up
Note that when you run it for the first time, it will download a docker image of size 400MB 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 (docker compose up
) to render the webpage with all you changes. Also, make sure to commit your final changes.
To change port number, you can edit
docker-compose.yml
file.
(click to expand) Build your own docker image:
Note: this approach is only necessary if you would like to build an older or very custom version of al-folio.
Build and run a new docker image using:
$ docker compose up --build
If you want to update jekyll, install new ruby packages, etc., all you have to do is build the image again using
--force-recreate
argument at the end of the previous command! It will download Ruby and Jekyll and install all Ruby packages again from scratch.
If you want to use a specific docker version, you can do so by changing latest
tag to your_version
in docker-compose.yaml
. For example, you might have created your website on v0.10.0
and you want to stick with that.
- Beta You can also change the docker image tag to slim! It is a slimmed docker image with a size of below 100MBs (same functionality).
Assuming you have Ruby and Bundler installed on your system (hint: for ease of managing ruby gems, consider using rbenv), and also Python and pip (hint: for ease of managing python packages, consider using a virtual environment, like venv or conda. If you will use only jupyter
, you can use pipx).
$ bundle install
# assuming pip is your Python package manager
$ pip install jupyter
$ bundle exec jekyll serve --lsi
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:
- The name of your repository MUST BE
<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.
- Go to Settings -> Actions -> General -> Workflow permissions, and give Read and write permissions to GitHub Actions
- 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.
If you keep your site on another branch, open .github/workflows/deploy.yml
on the branch you keep your website on and change on->push->branches and on->pull_request->branches to the branch you keep your website on. This will trigger the action on pulls/pushes on that branch. The action will then deploy the website on the branch it was triggered from.
(click to expand) Manual deployment to GitHub Pages:
If you need to manually re-deploy your website to GitHub pages, go to Actions, click "Deploy" in the left sidebar, then "Run workflow."
(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 --lsi
which will (re-)generate the static webpage in the _site/
folder.
Then simply copy the contents of the _site/
directory to your hosting server.
If you also want to remove unused css classes from your file, run:
$ purgecss -c purgecss.config.js
which will replace the css files in the _site/assets/css/
folder with the purged css files.
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 deploying 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
subdirectory 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 --lsi --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 behavior, 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
.
Here are some frequently asked questions. If you have a different question, please ask using Discussions.
-
Q: After I create a new repository from this template 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 fails to build and throws
Unknown tag 'toc'
. How do I fix that?
A: Make sure you followed through the deployment instructions in the previous section. You should have set the deployment branch togh-pages
. (Related issue: 1438.) -
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>/
. If all previous steps were done correctly, all is missing is for your browser to fetch again the site stylesheet. -
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. -
Q: My site doesn't work when I enable
related_blog_posts
. Why?
A: This is probably due to the classifier reborn plugin, which is used to calculate related posts. If the error statesLiquid Exception: Zero vectors can not be normalized...
, it means that it could not calculate related posts for a specific post. This is usually caused by empty or minimal blog posts without meaningful words (i.e. only stop words) or even specific characters you used in your posts. Also, the calculus for similar posts are made for everypost
, which means every page that useslayout: post
, including the announcements. To change this behavior, simply addrelated_posts: false
to the front matter of the page you don't want to display related posts on. -
Q: When trying to deploy, it's asking for github login credentials, which github disabled password authentication and it exits with an error. How to fix?
A: Open .git/config file using your preferred editor. Change thehttps
portion of theurl
variable tossh
. Try deploying again.
This Jekyll theme implements collections
to let you break up your work into categories.
The theme comes with two default collections: news
and projects
.
Items from the news
collection are automatically displayed on the home page.
Items from the projects
collection are displayed on a responsive grid on projects page.
You can easily create your own collections, apps, short stories, courses, or whatever your creative work is.
To do this, edit the collections in the _config.yml
file, create a corresponding folder, and create a landing page for your collection, similar to _pages/projects.md
.
al-folio comes with stylish layouts for pages and blog posts.
The theme allows you to create blog posts in the distill.pub style.
For more details on how to create distill-styled posts using <d-*>
tags, please refer to the example.
al-folio supports fast math typesetting through MathJax and code syntax highlighting using GitHub style:
Photo formatting is made simple using Bootstrap's grid system. Easily create beautiful grids within your blog posts and project pages:
al-folio uses github-readme-stats and github-profile-trophy
to display GitHub repositories and user stats on the /repositories/
page.
Edit the _data/repositories.yml
and change the github_users
and github_repos
lists to include your own GitHub profile and repositories to the /repositories/
page.
You may also use the following codes for displaying this in any other pages.
<!-- code for GitHub users -->
{% if site.data.repositories.github_users %}
<div class="repositories d-flex flex-wrap flex-md-row flex-column justify-content-between align-items-center">
{% for user in site.data.repositories.github_users %}
{% include repository/repo_user.html username=user %}
{% endfor %}
</div>
{% endif %}
<!-- code for GitHub trophies -->
{% if site.repo_trophies.enabled %}
{% for user in site.data.repositories.github_users %}
{% if site.data.repositories.github_users.size > 1 %}
<h4>{{ user }}</h4>
{% endif %}
<div class="repositories d-flex flex-wrap flex-md-row flex-column justify-content-between align-items-center">
{% include repository/repo_trophies.html username=user %}
</div>
{% endfor %}
{% endif %}
<!-- code for GitHub repositories -->
{% if site.data.repositories.github_repos %}
<div class="repositories d-flex flex-wrap flex-md-row flex-column justify-content-between align-items-center">
{% for repo in site.data.repositories.github_repos %}
{% include repository/repo.html repository=repo %}
{% endfor %}
</div>
{% endif %}
A variety of beautiful theme colors have been selected for you to choose from.
The default is purple, but you can quickly change it by editing the
--global-theme-color
variable in the _sass/_themes.scss
file.
Other color variables are listed there as well.
The stock theme color options available can be found at _sass/_variables.scss
.
You can also add your own colors to this file assigning each a name for ease of
use across the template.
By default, there will be a related posts section on the bottom of the blog posts.
These are generated by selecting the max_related
most recent posts that share at least min_common_tags
tags with the current post.
If you do not want to display related posts on a specific post, simply add related_posts: false
to the front matter of the post.
If you want to disable it for all posts, simply set enabled
to false in the related_blog_posts
section in _config.yml
.
The theme is available as open source under the terms of the template theme's creator MIT License.