Skip to content

Commit

Permalink
Update .lycheeignore and .gitattributes
Browse files Browse the repository at this point in the history
  • Loading branch information
pufanyi committed Feb 1, 2025
1 parent 954441a commit b0bda23
Show file tree
Hide file tree
Showing 295 changed files with 28,313 additions and 219,655 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Force LF line endings, needed for Docker to work on Windows
*.sh text eol=lf
9 changes: 5 additions & 4 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 Expand Up @@ -81,7 +81,8 @@ body:
description: select all environments where you have experienced this issue
multiple: true
options:
- "Running locally with Docker"
- "Running locally with Docker (docker compose)"
- "Running locally with Docker (devcontainer)"
- "Running locally without Docker"
- "Deployed site"
validations:
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!
12 changes: 0 additions & 12 deletions .github/dependabot.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/axe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
}
- name: Install and Build 🔧
run: |
sudo apt-get update && sudo apt-get install -y imagemagick
pip3 install --upgrade jupyter
export JEKYLL_ENV=production
bundle exec jekyll build
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/broken-links-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ jobs:
with:
ruby-version: "3.2.2"
bundler-cache: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Update _config.yml ⚙️
uses: fjogeleit/yaml-update-action@main
with:
Expand All @@ -35,6 +31,7 @@ jobs:
}
- name: Install and Build 🔧
run: |
sudo apt-get update && sudo apt-get install -y imagemagick
pip3 install --upgrade jupyter
export JEKYLL_ENV=production
bundle exec jekyll build
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/broken-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Check for broken links

on:
push:
branches:
- master
- main
paths:
- "assets/**"
- "**.html"
- "**.js"
- "**.liquid"
- "**/*.md"
- "**.yml"
- "!.github/workflows/axe.yml"
- "!.github/workflows/deploy-docker-tag.yml"
- "!.github/workflows/deploy-image.yml"
- "!.github/workflows/docker-slim.yml"
- "!.github/workflows/lighthouse-badger.yml"
- "!.github/workflows/prettier.yml"
- "!lighthouse_results/**"
pull_request:
branches:
- master
- main
paths:
- "assets/**"
- "**.html"
- "**.js"
- "**.liquid"
- "**/*.md"
- "**.yml"
- "!.github/workflows/axe.yml"
- "!.github/workflows/deploy-docker-tag.yml"
- "!.github/workflows/deploy-image.yml"
- "!.github/workflows/docker-slim.yml"
- "!.github/workflows/lighthouse-badger.yml"
- "!.github/workflows/prettier.yml"
- "!lighthouse_results/**"

jobs:
link-checker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Link Checker 🔗
uses: lycheeverse/[email protected]
with:
fail: true
# removed md files that include liquid tags
args: --user-agent 'curl/7.54' --exclude-path README.md --exclude-path _pages/404.md --exclude-path _pages/blog.md --exclude-path _posts/2018-12-22-distill.md --exclude-path _posts/2023-04-24-videos.md --verbose --no-progress './**/*.md' './**/*.html'
94 changes: 94 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL Advanced"

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
schedule:
- cron: "45 4 * * 3"

jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

# only required for workflows in private repositories
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: javascript-typescript
build-mode: none
- language: ruby
build-mode: none
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# 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
steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# 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
# queries: security-extended,security-and-quality

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
1 change: 0 additions & 1 deletion .github/workflows/deploy-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ on:
jobs:
build:
runs-on: ubuntu-latest
if: github.repository_owner == 'pufanyi'

steps:
- name: Checkout
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,16 @@ jobs:
steps:
- 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: Set up Python
- name: Setup Python 🐍
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.13"
cache: "pip" # caching pip dependencies
- name: Update _config.yml ⚙️
uses: fjogeleit/yaml-update-action@main
with:
Expand All @@ -85,7 +86,8 @@ jobs:
value: ${{ github.repository }}
- name: Install and Build 🔧
run: |
pip3 install --upgrade jupyter
sudo apt-get update && sudo apt-get install -y imagemagick
pip3 install --upgrade nbconvert
export JEKYLL_ENV=production
bundle exec jekyll build
- name: Purge unused CSS 🧹
Expand Down
19 changes: 4 additions & 15 deletions .github/workflows/docker-slim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
jobs:
build:
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-a-workflow-based-on-the-conclusion-of-another-workflow
if: ${{ github.event.workflow_run.conclusion == 'success' && github.repository_owner == 'pufanyi' }}
if: ${{ github.event.workflow_run.conclusion == 'success' && github.repository_owner == 'alshedivat' }}
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -43,26 +43,15 @@ jobs:
sed -i "s|\.:|${{ github.workspace }}:|g" ${{ github.workspace }}/docker-compose.yml
cat ${{ github.workspace }}/docker-compose.yml
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- uses: kitabisa/[email protected]
- uses: kitabisa/[email protected]
env:
DSLIM_PULL: true
DSLIM_COMPOSE_FILE: ${{ github.workspace }}/docker-compose.yml
DSLIM_TARGET_COMPOSE_SVC: jekyll
DSLIM_CONTINUE_AFTER: signal
with:
target: pufanyi/blog
target: amirpourmand/al-folio
tag: "slim"

# Push to the registry
- run: docker image push pufanyi/blog:slim
- run: docker image push amirpourmand/al-folio:slim
5 changes: 2 additions & 3 deletions .github/workflows/lighthouse-badger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ name: "Lighthouse Badger"
# DEFINE YOUR INPUTS AND TRIGGERS IN THE FOLLOWING
########################################################################

# INPUTS as environmental variables (env) for not manually triggered workflows
# INPUTS as Secrets (env) for not manually triggered workflows
env:
URLS: https://alshedivat.github.io/al-folio/
TOKEN_NAME: LIGHTHOUSE_BADGER_TOKEN
# If any of the following env is blank, a default value is used instead
REPO_BRANCH: "${{ github.repository }} master" # target repository & branch e.g. 'dummy/mytargetrepo main'
MOBILE_LIGHTHOUSE_PARAMS: "--only-categories=performance,accessibility,best-practices,seo --throttling.cpuSlowdownMultiplier=2"
Expand Down Expand Up @@ -50,7 +49,7 @@ jobs:
- uses: actions/checkout@v4
with:
repository: ${{ env.REPOSITORY }}
token: ${{ secrets[github.event.inputs.token_name] || secrets[env.TOKEN_NAME] }}
token: ${{ secrets.LIGHTHOUSE_BADGER_TOKEN }}
ref: ${{ env.BRANCH }}
- uses: actions/checkout@v4
with:
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/prettier-html.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Prettify gh-pages

on:
workflow_dispatch:

jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Checkout gh-pages branch
uses: actions/checkout@v4
with:
ref: gh-pages

- name: Find and Remove </source> Tags
run: find . -type f -name "*.html" -exec sed -i 's/<\/source>//g' {} +

- name: Set up Node.js
uses: actions/setup-node@v4

- name: Install Prettier
run: npm install -g prettier

- name: Check for Prettier
run: npx prettier --version || echo "Prettier not found"

- name: Run Prettier on HTML files
run: npx prettier --write '**/*.html'

- name: Commit and push changes
run: |
git config user.name "github-actions"
git config user.email "[email protected]"
git add .
git commit -m "Formatted HTML files" || echo "No changes to commit"
git push
Loading

0 comments on commit b0bda23

Please sign in to comment.