forked from alshedivat/al-folio
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'alshedivat:master' into master
- Loading branch information
Showing
227 changed files
with
49,499 additions
and
2,875 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/jekyll | ||
{ | ||
"name": "Jekyll", | ||
"image": "mcr.microsoft.com/devcontainers/jekyll", | ||
|
||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
"features": { | ||
"ghcr.io/rocker-org/devcontainer-features/apt-packages:1": { | ||
"packages": "build-essential,imagemagick,inotify-tools,jupyter-nbconvert,procps,ruby-full,zlib1g-dev" | ||
}, | ||
"ghcr.io/devcontainers-contrib/features/prettier:1": {} | ||
}, | ||
|
||
// Optionally: run jekyll serve automatically on container entering using the Docker entrypoint | ||
"postAttachCommand": "./bin/entry_point.sh", | ||
|
||
"customizations": { | ||
"vscode": { | ||
"extensions": ["esbenp.prettier-vscode", "sissel.shopify-liquid", "yzhang.markdown-all-in-one"], | ||
"settings": { | ||
// use prettier code formatter as default formatter | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"prettier.configPath": ".prettierrc", | ||
"editor.formatOnSave": true | ||
} | ||
} | ||
}, | ||
|
||
"remoteUser": "vscode" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 "actions@github.com" | ||
git add . | ||
git commit -m "Formatted HTML files" || echo "No changes to commit" | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Publish posts scheduled for today | ||
|
||
on: | ||
schedule: | ||
# Run every day at 23:30 UTC or manually run | ||
- cron: "30 23 * * *" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
publish_scheduled: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout main branch | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: master | ||
|
||
- name: Get the date for today | ||
id: date | ||
run: echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | ||
|
||
- name: Check for scheduled posts and move to posts | ||
run: | | ||
echo "Today is $TODAY" | ||
shopt -s nullglob | ||
for file in _scheduled/${TODAY}-*.md; do | ||
echo "Found scheduled: $file" | ||
mv "$file" "_posts/" | ||
echo "Moved $file to _posts/" | ||
done | ||
|
||
- name: Commit and push changes | ||
run: | | ||
git config user.name "github-actions" | ||
git config user.email "actions@github.com" | ||
git add _posts/ | ||
git add _scheduled/ | ||
git commit -m "Posted Scheduled Drafts on $TODAY" || echo "No changes to commit" | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,5 +7,7 @@ _site | |
.ruby-version | ||
.tweet-cache | ||
Gemfile.lock | ||
assets/libs/ | ||
node_modules/ | ||
vendor | ||
vendor | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
**/*.map | ||
**/*.min.css | ||
**/*.min.js | ||
assets/css/main.scss | ||
assets/js/search-data.js | ||
assets/js/distillpub/template.v2.js | ||
assets/js/search/*.js | ||
assets/plotly/demo.html | ||
lighthouse_results/** | ||
_posts/2015-10-20-math.md | ||
_sass/font-awesome/*.scss |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.