Merge branch 'main' into v9

This commit is contained in:
Zach Leatherman 2024-03-07 08:19:33 -06:00
commit 2296dc9ae2
5 changed files with 53 additions and 3 deletions

45
.github/workflows/deploy-pages.yml vendored Normal file
View File

@ -0,0 +1,45 @@
name: Deploy to GitHub Pages
on:
push:
branches:
- main
pull_request:
jobs:
deploy:
runs-on: ubuntu-22.04
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Cache npm
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
- name: Cache Eleventy .cache
uses: actions/cache@v3
with:
path: ./.cache
key: ${{ runner.os }}-eleventy-fetch-cache
- run: npm install
- run: npm run build-ghpages
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_site

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
_site/
node_modules/
package-lock.json
.cache

View File

@ -56,6 +56,6 @@
<footer></footer>
<!-- Current page: {{ page.url | htmlBaseUrl }} -->
<!-- This page `{{ page.url | htmlBaseUrl }}` was built on {% currentBuildDate %} -->
</body>
</html>

View File

@ -14,7 +14,7 @@ export default function(eleventyConfig) {
// e.g. <img loading decoding> assigned on the HTML tag will override these values.
defaultAttributes: {
loading: "lazy",
decoding: "async"
}
decoding: "async",
},
});
};

View File

@ -94,6 +94,10 @@ export default async function(eleventyConfig) {
});
});
eleventyConfig.addShortcode("currentBuildDate", () => {
return (new Date()).toISOString();
})
// Features to make your build faster (when you need them)
// If your passthrough copy gets heavy and cumbersome, add this line