Skip to content

Commit

Permalink
Merge branch 'alshedivat:master' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
george-gca authored May 17, 2024
2 parents 5e49ece + 8fe4bee commit 314ae2a
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/axe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
run: |
pip3 install --upgrade jupyter
export JEKYLL_ENV=production
bundle exec jekyll build --lsi
bundle exec jekyll build
- name: Purge unused CSS 🧹
run: |
npm install -g purgecss
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/broken-links-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
run: |
pip3 install --upgrade jupyter
export JEKYLL_ENV=production
bundle exec jekyll build --lsi
bundle exec jekyll build
- name: Purge unused CSS 🧹
run: |
npm install -g purgecss
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ on:
- "**.liquid"
- "**/**.md"
- "**.yml"
- "Gemfile"
- "Gemfile.lock"
- "!.github/workflows/axe.yml"
- "!.github/workflows/broken-links.yml"
- "!.github/workflows/deploy-docker-tag.yml"
Expand All @@ -36,6 +38,8 @@ on:
- "**.liquid"
- "**/**.md"
- "**.yml"
- "Gemfile"
- "Gemfile.lock"
- "!.github/workflows/axe.yml"
- "!.github/workflows/broken-links.yml"
- "!.github/workflows/deploy-docker-tag.yml"
Expand Down Expand Up @@ -77,7 +81,7 @@ jobs:
run: |
pip3 install --upgrade jupyter
export JEKYLL_ENV=production
bundle exec jekyll build --lsi
bundle exec jekyll build
- name: Purge unused CSS 🧹
run: |
npm install -g purgecss
Expand Down
2 changes: 1 addition & 1 deletion CUSTOMIZE.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ The configuration file [\_config.yml](_config.yml) contains the main configurati

> Note that the `url` and `baseurl` settings are used to generate the links of the website, as explained in the [install instructions](INSTALL.md).
All changes made to this file are only visible after you rebuild the website. That means that you need to run `bundle exec jekyll serve --lsi` again if you are running the website locally or push your changes to GitHub if you are using GitHub Pages. All other changes are visible immediately, you only need to refresh the page.
All changes made to this file are only visible after you rebuild the website. That means that you need to run `bundle exec jekyll serve` again if you are running the website locally or push your changes to GitHub if you are using GitHub Pages. All other changes are visible immediately, you only need to refresh the page.

## Displaying countries flags

Expand Down
2 changes: 1 addition & 1 deletion FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Make sure to correctly specify the `url` and `baseurl` paths in `_config.yml`. R

#### My site doesn't work when I enable `related_blog_posts`. Why?

This is probably due to the [classifier reborn](https://github.com/jekyll/classifier-reborn) plugin, which is used to calculate related posts. If the error states `Liquid Exception: Zero vectors can not be normalized...` or `sqrt': Numerical argument is out of domain - "sqrt"`, it means that it could not calculate related posts for a specific post. This is usually caused by [empty or minimal blog posts](https://github.com/jekyll/classifier-reborn/issues/64) without meaningful words (i.e. only [stop words](https://en.wikipedia.org/wiki/Stop_words)) or even [specific characters](https://github.com/jekyll/classifier-reborn/issues/194) you used in your posts. Also, the calculus for similar posts are made for every `post`, which means every page that uses `layout: post`, including the announcements. To change this behavior, simply add `related_posts: false` to the front matter of the page you don't want to display related posts on. Another solution is to disable the lsi (latent semantic indexing) entirely by removing the `--lsi` flag in the code. Related issue: [#1828](https://github.com/alshedivat/al-folio/issues/1828).
This is probably due to the [classifier reborn](https://github.com/jekyll/classifier-reborn) plugin, which is used to calculate related posts. If the error states `Liquid Exception: Zero vectors can not be normalized...` or `sqrt': Numerical argument is out of domain - "sqrt"`, it means that it could not calculate related posts for a specific post. This is usually caused by [empty or minimal blog posts](https://github.com/jekyll/classifier-reborn/issues/64) without meaningful words (i.e. only [stop words](https://en.wikipedia.org/wiki/Stop_words)) or even [specific characters](https://github.com/jekyll/classifier-reborn/issues/194) you used in your posts. Also, the calculus for similar posts are made for every `post`, which means every page that uses `layout: post`, including the announcements. To change this behavior, simply add `related_posts: false` to the front matter of the page you don't want to display related posts on. Another solution is to disable the lsi (latent semantic indexing) entirely by setting the `lsi` flag to `false` in `_config.yml`. Related issue: [#1828](https://github.com/alshedivat/al-folio/issues/1828).

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

Expand Down
4 changes: 3 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,16 @@ GEM
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.6)
rexml (3.2.8)
strscan (>= 3.0.9)
rouge (4.2.1)
safe_yaml (1.0.5)
sass-embedded (1.77.0-aarch64-linux-gnu)
google-protobuf (>= 3.25, < 5.0)
sass-embedded (1.77.0-x86_64-linux-gnu)
google-protobuf (>= 3.25, < 5.0)
sax-machine (1.3.2)
strscan (3.1.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
tzinfo (2.0.6)
Expand Down
10 changes: 5 additions & 5 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
- [Table of Contents](#table-of-contents)
- [Installing and Deploying](#installing-and-deploying)
- [Recommended Approach](#recommended-approach)
- [Local Setup on Windows](#local-setup-on-windows)
- [Local Setup using Docker (Recommended)](#local-setup-using-docker-recommended)
- [Local setup on Windows](#local-setup-on-windows)
- [Local setup using Docker (Recommended)](#local-setup-using-docker-recommended)
- [Build your own docker image](#build-your-own-docker-image)
- [Local Setup with Development Containers](#local-setup-with-development-containers)
- [Local Setup (Legacy, no longer supported)](#local-setup-legacy-no-longer-supported)
Expand Down Expand Up @@ -91,7 +91,7 @@ Assuming you have [Ruby](https://www.ruby-lang.org/en/downloads/) and [Bundler](
$ bundle install
# assuming pip is your Python package manager
$ pip install jupyter
$ bundle exec jekyll serve --lsi
$ bundle exec jekyll serve
```

To see the template running, open your browser and go to `http://localhost:4000`. You should see a copy of the theme's [demo website](https://george-gca.github.io/multi-language-al-folio/). Now, feel free to customize the theme however you like. After you are done, remember to **commit** your final changes.
Expand Down Expand Up @@ -135,7 +135,7 @@ If you need to manually re-deploy your website to GitHub pages, go to Actions, c
If you decide to not use GitHub Pages and host your page elsewhere, simply run:

```bash
$ bundle exec jekyll build --lsi
$ bundle exec jekyll build
```

which will (re-)generate the static webpage in the `_site/` folder.
Expand Down Expand Up @@ -163,7 +163,7 @@ Firstly, from the deployment repo dir, checkout the git branch hosting your publ
Then from the website sources dir (commonly your multi-language-al-folio fork's clone):

```bash
$ bundle exec jekyll build --lsi --destination $HOME/repo/publishing-source
$ bundle exec jekyll build --destination $HOME/repo/publishing-source
```

This will instruct jekyll to deploy the website under `$HOME/repo/publishing-source`.
Expand Down
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ bing_site_verification: # out your bing-site-verification ID (Bing Webmaster)
# -----------------------------------------------------------------------------

permalink: /blog/:year/:title/
lsi: true # produce an index for related posts

# Pagination
pagination:
Expand Down
2 changes: 1 addition & 1 deletion bin/cibuild
Original file line number Diff line number Diff line change
@@ -1 +1 @@
bundle exec jekyll build --lsi
bundle exec jekyll build
2 changes: 1 addition & 1 deletion bin/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ git checkout -b $DEPLOY_BRANCH
export JEKYLL_ENV=production

# Build site
bundle exec jekyll build --lsi
bundle exec jekyll build

# Purge unused css
purgecss -c purgecss.config.js
Expand Down

0 comments on commit 314ae2a

Please sign in to comment.