Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 1 addition & 20 deletions .github/workflows/preflight.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Preflight (Check Links + Lighthouse Reports)
name: Preflight (Check Links)

on:
pull_request:
Expand Down Expand Up @@ -51,25 +51,6 @@ jobs:
--exclude '^tel:' \
http://127.0.0.1:8080

- name: Generate Lighthouse HTML reports
if: always()
run: |
OUTDIR="${GITHUB_WORKSPACE}/.lighthouseci"
mkdir -p "$OUTDIR"

npx -y lighthouse http://127.0.0.1:8080/ \
--output=html \
--output-path="$OUTDIR/lighthouse.html" \
--chrome-flags="--headless --no-sandbox"

- name: Upload Lighthouse reports
if: always()
uses: actions/upload-artifact@v4
with:
name: lighthouse-reports
path: ${{ github.workspace }}/.lighthouseci/lighthouse.html
if-no-files-found: error

- name: Stop server
if: always()
run: |
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.DS_Store
node_modules
dist
public
public
8 changes: 3 additions & 5 deletions eleventy.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,15 @@ export default function(eleventyConfig) {

// Copy js assets
eleventyConfig.addPassthroughCopy({"src/assets/js": "/js"});
if (!production) {
eleventyConfig.addPassthroughCopy({"src/assets/scripts": "/js"});
} else {
if (production) {
// If production, minify js and html
eleventyConfig.addPlugin(minify);
}

// Add compiler for scss into css
eleventyConfig.addPlugin(sass);

// Run pre- and post-build events for dev workflow
// Run pre- and post-build events for dev workflow
eleventyConfig.addPlugin(events);

// Add shortcodes
Expand Down
25 changes: 24 additions & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,27 @@
publish = "public/"

# Default build command.
command = "npm run build"
command = "npm run build"

## Caching
# Long cache for static assets (fingerprinted or versioned output)
[[headers]]
for = "/css/*"
[headers.values]
cache-control = "public, max-age=31536000, immutable"

[[headers]]
for = "/js/*"
[headers.values]
cache-control = "public, max-age=31536000, immutable"

[[headers]]
for = "/img/*"
[headers.values]
cache-control = "public, max-age=31536000, immutable"

# No-cache for HTML
[[headers]]
for = "/*"
[headers.values]
cache-control = "public, max-age=0, must-revalidate"
Loading