Skip to content

Commit

Permalink
Merge pull request #67 from alerezaaa/main
Browse files Browse the repository at this point in the history
Main
  • Loading branch information
alerezaaa authored Nov 12, 2024
2 parents 3b39844 + 018557d commit fbb4c3e
Show file tree
Hide file tree
Showing 39 changed files with 22,776 additions and 42,019 deletions.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/1_bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ body:
value: >
Before you go any further. Is this really a **🐛 bug**?
If it's a question about how al-folio works, have a look at our [documentation](https://github.com/alshedivat/al-folio/blob/master/README.md),
[frequently asked questions](https://github.com/alshedivat/al-folio/blob/master/FAQ.md),
If it's a question about how al-folio works, have a look at our [documentation](https://github.com/alshedivat/al-folio/blob/main/README.md),
[frequently asked questions](https://github.com/alshedivat/al-folio/blob/main/FAQ.md),
[past questions](https://github.com/alshedivat/al-folio/discussions/categories/q-a),
or [ask a question](https://github.com/alshedivat/al-folio/discussions/new?category=q-a).
Expand All @@ -20,7 +20,7 @@ body:
Please check if somebody else has already filed the same issue.
If you find a similar issue, please add a 👍 reaction or comment on the original post.
options:
- label: I read through [FAQ](https://github.com/alshedivat/al-folio/blob/master/FAQ.md) and searched through the [past issues](https://github.com/alshedivat/al-folio/issues), none of which addressed my issue.
- label: I read through [FAQ](https://github.com/alshedivat/al-folio/blob/main/FAQ.md) and searched through the [past issues](https://github.com/alshedivat/al-folio/issues), none of which addressed my issue.
required: true
- label: Yes, I have checked that this issue isn't already filed.
required: true
Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/2_feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ body:
value: >
Before you go any further, are you sure that this feature is not already implemented?
If it's a question about how al-folio works, have a look at our [documentation](https://github.com/alshedivat/al-folio/blob/master/README.md),
[frequently asked questions](https://github.com/alshedivat/al-folio/blob/master/FAQ.md),
If it's a question about how al-folio works, have a look at our [documentation](https://github.com/alshedivat/al-folio/blob/main/README.md),
[frequently asked questions](https://github.com/alshedivat/al-folio/blob/main/FAQ.md),
[past questions](https://github.com/alshedivat/al-folio/discussions/categories/q-a),
or [ask a question](https://github.com/alshedivat/al-folio/discussions/new?category=q-a).
Expand All @@ -20,7 +20,7 @@ body:
Please check if somebody else has already filed the same 🚀 feature request.
If you find a similar feature request, please add a 👍 reaction or comment on the original post.
options:
- label: I read through [FAQ](https://github.com/alshedivat/al-folio/blob/master/FAQ.md) and searched through the [past issues](https://github.com/alshedivat/al-folio/issues), none of which addressed my feature request.
- label: I read through [FAQ](https://github.com/alshedivat/al-folio/blob/main/FAQ.md) and searched through the [past issues](https://github.com/alshedivat/al-folio/issues), none of which addressed my feature request.
required: true
- label: Yes, I have checked that this feature request isn't already filed.
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ contact_links:
url: https://github.com/alshedivat/al-folio/discussions/categories/q-a
about: Ask and answer al-folio related questions.
- name: 📖 Read the documentation
url: https://github.com/alshedivat/al-folio/blob/master/README.md
url: https://github.com/alshedivat/al-folio/blob/main/README.md
about: Please consult the documentation before opening any issues!
11 changes: 8 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,16 @@ jobs:

- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Setup Ruby
- name: Setup Ruby 💎
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2.2"
ruby-version: "3.3.5"
bundler-cache: true
- name: Setup Python 🐍
uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: "pip" # caching pip dependencies

- name: Update _config.yml ⚙️
uses: fjogeleit/yaml-update-action@main
Expand All @@ -96,7 +101,7 @@ jobs:

- name: Install and Build 🔧
run: |
pip3 install --upgrade jupyter
pip3 install --upgrade nbconvert
export JEKYLL_ENV=production
bundle exec jekyll build --lsi
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/schedule-posts.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Checkout main branch
uses: actions/checkout@v4
with:
ref: master
ref: main

- name: Get the date for today
id: date
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ assets/plotly/demo.html
lighthouse_results/**
_posts/2015-10-20-math.md
_sass/font-awesome/*.scss
_sass/tabler-icons/*.scss
67 changes: 50 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,42 +1,75 @@
FROM ruby:latest

# uncomment these if you are having this issue with the build:
# /usr/local/bundle/gems/jekyll-4.3.4/lib/jekyll/site.rb:509:in `initialize': Permission denied @ rb_sysopen - /srv/jekyll/.jekyll-cache/.gitignore (Errno::EACCES)
# ARG GROUPID=901
# ARG GROUPNAME=ruby
# ARG USERID=901
# ARG USERNAME=jekyll

ENV DEBIAN_FRONTEND noninteractive

Label MAINTAINER Amir Pourmand
LABEL authors="Amir Pourmand,George Araújo" \
description="Docker image for al-folio academic template" \
maintainer="Amir Pourmand"

RUN apt-get update -y && apt-get install -y --no-install-recommends \
locales \
imagemagick \
build-essential \
zlib1g-dev \
python3-pip \
inotify-tools procps && \
apt-get clean && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* && \
pip install nbconvert --break-system-packages
# uncomment these if you are having this issue with the build:
# /usr/local/bundle/gems/jekyll-4.3.4/lib/jekyll/site.rb:509:in `initialize': Permission denied @ rb_sysopen - /srv/jekyll/.jekyll-cache/.gitignore (Errno::EACCES)
# add a non-root user to the image with a specific group and user id to avoid permission issues
# RUN groupadd -r $GROUPNAME -g $GROUPID && \
# useradd -u $USERID -m -g $GROUPNAME $USERNAME

# install system dependencies
RUN apt-get update -y && \
apt-get install -y --no-install-recommends \
build-essential \
curl \
imagemagick \
inotify-tools \
locales \
nodejs \
procps \
python3-pip \
zlib1g-dev && \
pip --no-cache-dir install --upgrade --break-system-packages nbconvert

# clean up
RUN apt-get clean && \
apt-get autoremove && \
rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* /tmp/*

# set the locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen


ENV LANG=en_US.UTF-8 \
# set environment variables
ENV EXECJS_RUNTIME=Node \
JEKYLL_ENV=production \
LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8 \
JEKYLL_ENV=production
LC_ALL=en_US.UTF-8

# create a directory for the jekyll site
RUN mkdir /srv/jekyll

# copy the Gemfile and Gemfile.lock to the image
ADD Gemfile.lock /srv/jekyll
ADD Gemfile /srv/jekyll

# set the working directory
WORKDIR /srv/jekyll

# install jekyll and dependencies
RUN gem install jekyll bundler

RUN gem install --no-document jekyll bundler
RUN bundle install --no-cache
# && rm -rf /var/lib/gems/3.1.0/cache

EXPOSE 8080

COPY bin/entry_point.sh /tmp/entry_point.sh

# uncomment this if you are having this issue with the build:
# /usr/local/bundle/gems/jekyll-4.3.4/lib/jekyll/site.rb:509:in `initialize': Permission denied @ rb_sysopen - /srv/jekyll/.jekyll-cache/.gitignore (Errno::EACCES)
# set the ownership of the jekyll site directory to the non-root user
# USER $USERNAME

CMD ["/tmp/entry_point.sh"]
14 changes: 7 additions & 7 deletions FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Here are some frequently asked questions. If you have a different question, plea
- [My site doesn't work when I enable `related_blog_posts`. Why?](#my-site-doesnt-work-when-i-enable-related_blog_posts-why)
- [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?](#when-trying-to-deploy-its-asking-for-github-login-credentials-which-github-disabled-password-authentication-and-it-exits-with-an-error-how-to-fix)
- [When I manually run the Lighthouse Badger workflow, it fails with `Error: Input required and not supplied: token`. How do I fix that?](#when-i-manually-run-the-lighthouse-badger-workflow-it-fails-with-error-input-required-and-not-supplied-token-how-do-i-fix-that)
- [My code runs fine locally, but when I create a commit and submit it, it fails with `prettier code formatter workflow run failed for master branch`. How do I fix that?](#my-code-runs-fine-locally-but-when-i-create-a-commit-and-submit-it-it-fails-with-prettier-code-formatter-workflow-run-failed-for-master-branch-how-do-i-fix-that)
- [My code runs fine locally, but when I create a commit and submit it, it fails with `prettier code formatter workflow run failed for main branch`. How do I fix that?](#my-code-runs-fine-locally-but-when-i-create-a-commit-and-submit-it-it-fails-with-prettier-code-formatter-workflow-run-failed-for-main-branch-how-do-i-fix-that)
- [After I update my site with some new content, even a small change, the GitHub action throws an error or displays a warning. What happened?](#after-i-update-my-site-with-some-new-content-even-a-small-change-the-github-action-throws-an-error-or-displays-a-warning-what-happened)
- [I am trying to deploy my site, but it fails with `Could not find gem 'jekyll-diagrams' in locally installed gems`. How do I fix that?](#i-am-trying-to-deploy-my-site-but-it-fails-with-could-not-find-gem-jekyll-diagrams-in-locally-installed-gems-how-do-i-fix-that)
- [How can I update Font Awesome version on the template](#how-can-i-update-font-awesome-version-on-the-template)
Expand All @@ -26,7 +26,7 @@ Yes, if you are using release `v0.3.5` or later, the website will automatically

### 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?

You need to add `CNAME` file to the `master` or `source` branch of your repository. The file should contain your custom domain name. (Relevant issue: [130](https://github.com/alshedivat/al-folio/issues/130).)
You need to add `CNAME` file to the `main` or `source` branch of your repository. The file should contain your custom domain name. (Relevant issue: [130](https://github.com/alshedivat/al-folio/issues/130).)

---

Expand Down Expand Up @@ -74,15 +74,15 @@ You need to [create a personal access token](https://docs.github.com/en/authenti

---

### My code runs fine locally, but when I create a commit and submit it, it fails with `prettier code formatter workflow run failed for master branch`. How do I fix that?
### My code runs fine locally, but when I create a commit and submit it, it fails with `prettier code formatter workflow run failed for main branch`. How do I fix that?

We implemented support for [Prettier code formatting](https://prettier.io/) in [#2048](https://github.com/alshedivat/al-folio/pull/2048). It basically ensures that your code is [well formatted](https://prettier.io/docs/en/). If you want to ensure your code is compliant with `Prettier`, you have a few options:

- if you are running locally with `Docker` and using [development containers](https://github.com/alshedivat/al-folio/blob/master/INSTALL.md#local-setup-with-development-containers), `Prettier` is already included
- if you are running locally with `Docker` and using [development containers](https://github.com/alshedivat/al-folio/blob/main/INSTALL.md#local-setup-with-development-containers), `Prettier` is already included
- if you don't use `Docker`, it is simple to integrate it with your preferred IDE using an [extension](https://prettier.io/docs/en/editors)
- if you want to run it manually, you can follow the first 2 steps in [this tutorial](https://george-gca.github.io/blog/2023/slidev_for_non_web_devs/) (`Installing node version manager (nvm)` and `Installing Node (latest version)`), then, install it using `npm install prettier` inside the project directory, or install it globally on your computer using `npm install -g prettier`. To run `Prettier` on your current directory use `npx prettier . --write`.

You can also disable it for your repo. For this, just delete the file [.github/workflows/prettier.yml](https://github.com/alshedivat/al-folio/blob/master/.github/workflows/prettier.yml).
You can also disable it for your repo. For this, just delete the file [.github/workflows/prettier.yml](https://github.com/alshedivat/al-folio/blob/main/.github/workflows/prettier.yml).

---

Expand Down Expand Up @@ -134,6 +134,6 @@ Currently we have the following workflows:
- `deploy-image.yml`: deploys a new docker image with the latest changes to Docker Hub
- `deploy.yml`: deploys the website to GitHub Pages
- `docker-slim.yml`: deploys a smaller version of the docker image to Docker Hub with the [docker-slim-action](https://github.com/kitabisa/docker-slim-action)
- `lighthouse-badger.yml`: runs a [lighthouse](https://github.com/GoogleChrome/lighthouse) test for your site with the [lighthouse-badger-action](https://github.com/MyActionWay/lighthouse-badger-action), saving the results in the repository for easy inspecting, as can be seen [here](https://github.com/alshedivat/al-folio?tab=readme-ov-file#lighthouse-pagespeed-insights). For more information on how to enable this workflow, check our [FAQ question about it](https://github.com/alshedivat/al-folio/blob/master/FAQ.md#when-i-manually-run-the-lighthouse-badger-workflow-it-fails-with-error-input-required-and-not-supplied-token-how-do-i-fix-that)
- `lighthouse-badger.yml`: runs a [lighthouse](https://github.com/GoogleChrome/lighthouse) test for your site with the [lighthouse-badger-action](https://github.com/MyActionWay/lighthouse-badger-action), saving the results in the repository for easy inspecting, as can be seen [here](https://github.com/alshedivat/al-folio?tab=readme-ov-file#lighthouse-pagespeed-insights). For more information on how to enable this workflow, check our [FAQ question about it](https://github.com/alshedivat/al-folio/blob/main/FAQ.md#when-i-manually-run-the-lighthouse-badger-workflow-it-fails-with-error-input-required-and-not-supplied-token-how-do-i-fix-that)
- `prettier-comment-on-pr.yml`: not working. For now, this action is disabled. It was supposed to run prettier on the PRs and comment on them with the changes needed. For more information, check [issue 2115](https://github.com/alshedivat/al-folio/issues/2115)
- `prettier.yml`: runs [prettier](https://prettier.io/) on the code to ensure it is well formatted. For more information, check our [FAQ question about it](https://github.com/alshedivat/al-folio/blob/master/FAQ.md#my-code-runs-fine-locally-but-when-i-create-a-commit-and-submit-it-it-fails-with-prettier-code-formatter-workflow-run-failed-for-master-branch-how-do-i-fix-that)
- `prettier.yml`: runs [prettier](https://prettier.io/) on the code to ensure it is well formatted. For more information, check our [FAQ question about it](https://github.com/alshedivat/al-folio/blob/main/FAQ.md#my-code-runs-fine-locally-but-when-i-create-a-commit-and-submit-it-it-fails-with-prettier-code-formatter-workflow-run-failed-for-main-branch-how-do-i-fix-that)
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ group :jekyll_plugins do
gem 'jekyll-toc'
gem 'jekyll-twitter-plugin'
gem 'jemoji'
gem 'mini_racer'
gem 'unicode_utils'
gem 'webrick'
end
Expand Down
72 changes: 52 additions & 20 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (7.2.1)
activesupport (7.2.1.1)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1)
Expand Down Expand Up @@ -36,7 +36,7 @@ GEM
rexml
csl-styles (1.0.1.11)
csl (~> 1.0)
css_parser (1.19.0)
css_parser (1.19.1)
addressable
cssminify2 (2.0.1)
csv (3.3.0)
Expand All @@ -52,17 +52,29 @@ GEM
loofah (>= 2.3.1, < 3)
sax-machine (>= 1.0, < 2)
ffi (1.17.0-aarch64-linux-gnu)
ffi (1.17.0-aarch64-linux-musl)
ffi (1.17.0-arm-linux-gnu)
ffi (1.17.0-arm-linux-musl)
ffi (1.17.0-arm64-darwin)
ffi (1.17.0-x86-linux-gnu)
ffi (1.17.0-x86-linux-musl)
ffi (1.17.0-x86_64-darwin)
ffi (1.17.0-x86_64-linux-gnu)
ffi (1.17.0-x86_64-linux-musl)
forwardable-extended (2.6.0)
gemoji (4.1.0)
google-protobuf (4.28.2)
bigdecimal
rake (>= 13)
google-protobuf (4.28.2-aarch64-linux)
bigdecimal
rake (>= 13)
google-protobuf (4.28.2-arm64-darwin)
bigdecimal
rake (>= 13)
google-protobuf (4.28.2-x86-linux)
bigdecimal
rake (>= 13)
google-protobuf (4.28.2-x86_64-darwin)
bigdecimal
rake (>= 13)
Expand Down Expand Up @@ -147,10 +159,6 @@ GEM
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
latex-decode (0.4.0)
libv8-node (22.7.0.4-aarch64-linux)
libv8-node (22.7.0.4-arm64-darwin)
libv8-node (22.7.0.4-x86_64-darwin)
libv8-node (22.7.0.4-x86_64-linux)
liquid (4.0.4)
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
Expand All @@ -162,17 +170,19 @@ GEM
matrix (0.4.2)
mercenary (0.4.0)
mini_mime (1.1.5)
mini_racer (0.15.0)
libv8-node (~> 22.7.0.1)
minitest (5.25.1)
multi_xml (0.7.1)
bigdecimal (~> 3.1)
namae (1.2.0)
racc (~> 1.7)
nokogiri (1.16.7-aarch64-linux)
racc (~> 1.4)
nokogiri (1.16.7-arm-linux)
racc (~> 1.4)
nokogiri (1.16.7-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.7-x86-linux)
racc (~> 1.4)
nokogiri (1.16.7-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.7-x86_64-linux)
Expand All @@ -185,17 +195,29 @@ GEM
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
rexml (3.3.7)
rexml (3.3.8)
rouge (4.4.0)
safe_yaml (1.0.5)
sass-embedded (1.79.3-aarch64-linux-gnu)
google-protobuf (~> 4.27)
sass-embedded (1.79.3-arm64-darwin)
google-protobuf (~> 4.27)
sass-embedded (1.79.3-x86_64-darwin)
google-protobuf (~> 4.27)
sass-embedded (1.79.3-x86_64-linux-gnu)
google-protobuf (~> 4.27)
sass-embedded (1.80.3-aarch64-linux-gnu)
google-protobuf (~> 4.28)
sass-embedded (1.80.3-aarch64-linux-musl)
google-protobuf (~> 4.28)
sass-embedded (1.80.3-arm-linux-gnueabihf)
google-protobuf (~> 4.28)
sass-embedded (1.80.3-arm-linux-musleabihf)
google-protobuf (~> 4.28)
sass-embedded (1.80.3-arm64-darwin)
google-protobuf (~> 4.28)
sass-embedded (1.80.3-x86-linux-gnu)
google-protobuf (~> 4.28)
sass-embedded (1.80.3-x86-linux-musl)
google-protobuf (~> 4.28)
sass-embedded (1.80.3-x86_64-darwin)
google-protobuf (~> 4.28)
sass-embedded (1.80.3-x86_64-linux-gnu)
google-protobuf (~> 4.28)
sass-embedded (1.80.3-x86_64-linux-musl)
google-protobuf (~> 4.28)
sax-machine (1.3.2)
securerandom (0.3.1)
terminal-table (3.0.2)
Expand All @@ -210,9 +232,20 @@ GEM

PLATFORMS
aarch64-linux
aarch64-linux-gnu
aarch64-linux-musl
arm-linux
arm-linux-gnu
arm-linux-gnueabihf
arm-linux-musl
arm-linux-musleabihf
arm64-darwin
x86-linux
x86-linux-gnu
x86-linux-musl
x86_64-darwin
x86_64-linux
x86_64-linux-gnu
x86_64-linux-musl

DEPENDENCIES
classifier-reborn
Expand All @@ -236,9 +269,8 @@ DEPENDENCIES
jekyll-toc
jekyll-twitter-plugin
jemoji
mini_racer
unicode_utils
webrick

BUNDLED WITH
2.5.7
2.5.18
Loading

0 comments on commit fbb4c3e

Please sign in to comment.