Skip to content

Commit a3fbf89

Browse files
committed
Merge branch 'al-folio-main'
2 parents 67c8b4c + 9ca1d52 commit a3fbf89

File tree

16 files changed

+303
-186
lines changed

16 files changed

+303
-186
lines changed

.gitattibutes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Force LF line endings, needed for Docker to work on Windows
2+
*.sh text eol=lf

.github/workflows/codeql.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL Advanced"
13+
14+
on:
15+
push:
16+
branches: ["main"]
17+
pull_request:
18+
branches: ["main"]
19+
schedule:
20+
- cron: "45 4 * * 3"
21+
22+
jobs:
23+
analyze:
24+
name: Analyze (${{ matrix.language }})
25+
# Runner size impacts CodeQL analysis time. To learn more, please see:
26+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
27+
# - https://gh.io/supported-runners-and-hardware-resources
28+
# - https://gh.io/using-larger-runners (GitHub.com only)
29+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
30+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
31+
permissions:
32+
# required for all workflows
33+
security-events: write
34+
35+
# required to fetch internal or private CodeQL packs
36+
packages: read
37+
38+
# only required for workflows in private repositories
39+
actions: read
40+
contents: read
41+
42+
strategy:
43+
fail-fast: false
44+
matrix:
45+
include:
46+
- language: javascript-typescript
47+
build-mode: none
48+
- language: ruby
49+
build-mode: none
50+
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
51+
# Use `c-cpp` to analyze code written in C, C++ or both
52+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
53+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
54+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
55+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
56+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
57+
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
58+
steps:
59+
- name: Checkout repository
60+
uses: actions/checkout@v4
61+
62+
# Initializes the CodeQL tools for scanning.
63+
- name: Initialize CodeQL
64+
uses: github/codeql-action/init@v3
65+
with:
66+
languages: ${{ matrix.language }}
67+
build-mode: ${{ matrix.build-mode }}
68+
# If you wish to specify custom queries, you can do so here or in a config file.
69+
# By default, queries listed here will override any specified in a config file.
70+
# Prefix the list here with "+" to use these queries and those in the config file.
71+
72+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
73+
# queries: security-extended,security-and-quality
74+
75+
# If the analyze step fails for one of the languages you are analyzing with
76+
# "We were unable to automatically build your code", modify the matrix above
77+
# to set the build mode to "manual" for that language. Then modify this step
78+
# to build your code.
79+
# ℹ️ Command-line programs to run using the OS shell.
80+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
81+
- if: matrix.build-mode == 'manual'
82+
shell: bash
83+
run: |
84+
echo 'If you are using a "manual" build mode for one or more of the' \
85+
'languages you are analyzing, replace this with the commands to build' \
86+
'your code, for example:'
87+
echo ' make bootstrap'
88+
echo ' make release'
89+
exit 1
90+
91+
- name: Perform CodeQL Analysis
92+
uses: github/codeql-action/analyze@v3
93+
with:
94+
category: "/language:${{matrix.language}}"

CUSTOMIZE.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,92 @@ You can add a newsletter subscription form by adding the specified information a
162162

163163
Depending on your specified footer behavior, the sign up form either will appear at the bottom of the `About` page and at the bottom of blogposts if `related_posts` are enabled, or in the footer at the bottom of each page.
164164

165+
## Removing content
166+
167+
Since this template have a lot of content, you may want to remove some of it. The easiest way to achieve this and avoid merge conflicts when updating your code (as [pointed by CheariX ](https://github.com/alshedivat/al-folio/pull/2933#issuecomment-2571271117)) is to add the unwanted files to the `excludes` section in your `_config.yml` file instead of actually deleting them, for example:
168+
169+
```yml
170+
excludes:
171+
...
172+
- _news/announcement_*.md
173+
- _pages/blog.md
174+
- _posts/
175+
- _projects/?_project.md
176+
- assets/jupyter/blog.ipynb
177+
```
178+
179+
Here is a list of the main components that you may want to delete, and how to do it. Don't forget if you delete a page to update the `nav_order` of the remaining pages.
180+
181+
### Removing the blog page
182+
183+
To remove the blog, you have to:
184+
185+
- delete [\_posts](_posts/) directory
186+
- delete blog page [\_pages/blog.md](_pages/blog.md)
187+
- remove reference to blog page in our [\_pages/dropdown.md](_pages/dropdown.md)
188+
- remove the `Blog` section in the [\_config.yml](_config.yml) file and the related parts, like the `jekyll-archives` and `latest_posts`
189+
190+
You can also:
191+
192+
- delete [\_includes/latest_posts.liquid](_includes/latest_posts.liquid)
193+
- delete [\_includes/related_posts.liquid](_includes/related_posts.liquid)
194+
- delete [\_layouts/archive-category.liquid](_layouts/archive-category.liquid)
195+
- delete [\_layouts/archive-tag.liquid](_layouts/archive-tag.liquid)
196+
- delete [\_layouts/archive-year.liquid](_layouts/archive-year.liquid)
197+
- delete [\_plugins/external-posts.rb](_plugins/external-posts.rb)
198+
- remove the `jekyll-archives` gem from the [Gemfile](Gemfile) and the `plugins` section in [\_config.yml](_config.yml)
199+
- remove the `classifier-reborn` gem from the [Gemfile](Gemfile)
200+
201+
### Removing the news section
202+
203+
To remove the news section, you can:
204+
205+
- delete the [\_news](_news/) directory
206+
- delete the file [\_includes/news.liquid](_includes/news.liquid) and the references to it in the [\_pages/about.md](_pages/about.md)
207+
- remove the `announcements` part in [\_config.yml](_config.yml)
208+
- remove the news part in the `Collections` section in the [\_config.yml](_config.yml) file
209+
210+
### Removing the projects page
211+
212+
To remove the projects, you can:
213+
214+
- delete the [\_projects](_projects/) directory
215+
- delete the projects page [\_pages/projects.md](_pages/projects.md)
216+
- remove reference to projects page in our [\_pages/dropdown.md](_pages/dropdown.md)
217+
- remove projects part in the `Collections` section in the [\_config.yml](_config.yml) file
218+
219+
You can also:
220+
221+
- delete [\_includes/projects_horizontal.liquid](_includes/projects_horizontal.liquid)
222+
- delete [\_includes/projects.liquid](_includes/projects.liquid)
223+
224+
### Removing the publications page
225+
226+
To remove the publications, you can:
227+
228+
- delete the [\_bibliography](_bibliography/) directory
229+
- delete the publications page [\_pages/publications.md](_pages/publications.md)
230+
- remove reference to publications page in our [\_pages/dropdown.md](_pages/dropdown.md)
231+
- remove `Jekyll Scholar` section in the [\_config.yml](_config.yml) file
232+
233+
You can also:
234+
235+
- delete the [\_layouts/bib.liquid](_layouts/bib.liquid) file
236+
- delete [\_includes/bib_search.liquid](_includes/bib_search.liquid)
237+
- delete [\_includes/citation.liquid](_includes/citation.liquid)
238+
- delete [\_includes/selected_papers.liquid](_includes/selected_papers.liquid)
239+
- delete [\_plugins/google-scholar-citations.rb](_plugins/google-scholar-citations.rb)
240+
- delete [\_plugins/hide-custom-bibtex.rb](_plugins/hide-custom-bibtex.rb)
241+
- delete [\_plugins/inspirehep-citations.rb](_plugins/inspirehep-citations.rb)
242+
- remove the `jekyll-scholar` gem from the [Gemfile](Gemfile) and the `plugins` section in [\_config.yml](_config.yml)
243+
244+
### Removing the repositories page
245+
246+
To remove the repositories, you can:
247+
248+
- delete the repositories page [\_pages/repositories.md](_pages/repositories.md)
249+
- delete [\_includes/repository/](_includes/repository/) directory
250+
165251
## Adding Token for Lighthouse Badger
166252

167253
To add secrets for [lighthouse-badger](https://github.com/alshedivat/al-folio/actions/workflows/lighthouse-badger.yml), create a [personal access token (PAT)](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token) and add it as a [secret](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions#creating-encrypted-secrets-for-a-repository) named `LIGHTHOUSE_BADGER_TOKEN` to your repository. The [lighthouse-badger documentation](https://github.com/MyActionWay/lighthouse-badger-workflows#lighthouse-badger-easyyml) specifies using an environment variable, but using it as a secret is more secure and appropriate for a PAT.

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ruby:latest
1+
FROM ruby:slim
22

33
# uncomment these if you are having this issue with the build:
44
# /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)
@@ -24,6 +24,7 @@ RUN apt-get update -y && \
2424
apt-get install -y --no-install-recommends \
2525
build-essential \
2626
curl \
27+
git \
2728
imagemagick \
2829
inotify-tools \
2930
locales \

FAQ.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ If your question is related to localization, please check if it was not already
2020
- [How can I update Font Awesome version on the template](#how-can-i-update-font-awesome-version-on-the-template)
2121
- [How can I update Tabler Icons version on the template](#how-can-i-update-tabler-icons-version-on-the-template)
2222
- [What do all these GitHub actions/workflows mean?](#what-do-all-these-github-actionsworkflows-mean)
23+
- [How can I use Google Search Console ID on the template?](#how-can-i-use-google-search-console-id-on-the-template)
2324

2425
---
2526

@@ -154,3 +155,15 @@ Currently we have the following workflows:
154155
- `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)
155156
- `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)
156157
- `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)
158+
159+
---
160+
161+
### How can I use Google Search Console ID on the template?
162+
163+
In the configuration file `_config.yml` the tag `google-site-verification` should be updated to use this functionality. Here is how you can proceed,
164+
165+
- Generate your HTML tag by following [https://support.google.com/webmasters/answer/9008080?hl=en#meta_tag_verification&zippy=%2Chtml-tag](https://support.google.com/webmasters/answer/9008080?hl=en#meta_tag_verification&zippy=%2Chtml-tag) with URL prefix option.
166+
- In the verify ownership option choose HTML tag and copy the tag contents which should look like `<meta name="google-site-verification" content="GoogleSearchConsoleID" />`.
167+
- The string against `content` is the Google Search Console ID that can be used in the template. e.g. `google-site-verification: GoogleSearchConsoleID`. Now set the property `enable_google_verification: true`.
168+
169+
It looks like the Domain type property in the Google Search Console to verify the ownership of all URLs across all subdomains with GitHub Pages does not work.

Gemfile

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
source 'https://rubygems.org'
2+
3+
gem 'jekyll'
4+
5+
# Core plugins that directly affect site building
26
group :jekyll_plugins do
3-
gem 'classifier-reborn'
4-
gem 'jekyll'
57
gem 'jekyll-archives'
68
gem 'jekyll-email-protect'
79
gem 'jekyll-feed'
@@ -16,15 +18,22 @@ group :jekyll_plugins do
1618
gem 'jekyll-scholar'
1719
gem 'jekyll-sitemap'
1820
gem 'jekyll-tabs'
21+
gem 'jekyll-terser', :git => "https://github.com/RobertoJBeltran/jekyll-terser.git"
1922
gem 'jekyll-toc'
2023
gem 'jekyll-twitter-plugin'
2124
gem 'jemoji'
22-
gem 'terser'
23-
gem 'unicode_utils'
24-
gem 'webrick'
25+
26+
gem 'classifier-reborn' # used for content categorization during the build
2527
end
28+
29+
# Gems for development or external data fetching (outside :jekyll_plugins)
2630
group :other_plugins do
2731
gem 'css_parser'
2832
gem 'feedjira'
2933
gem 'httparty'
34+
gem 'observer' # used by jekyll-scholar
35+
gem 'ostruct' # used by jekyll-twitter-plugin
36+
gem 'terser' # used by jekyll-terser
37+
# gem 'unicode_utils' -- should be already installed by jekyll
38+
# gem 'webrick' -- should be already installed by jekyll
3039
end

0 commit comments

Comments
 (0)