Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

My personal website and blog, built with 11ty and Workbox.

License

NotificationsYou must be signed in to change notification settings

jackdbd/personal-website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HSTS preloadHSTS preloadHSTS preload

My personal website and blog, built with11ty andWorkbox. Hosted onCloudflare Pages.

Features

Installation

Clone the repo:

git clone git@github.com:jackdbd/personal-website.git

This project should work on Node.js >=20.0.0.

ℹ️What's thatdevenv.nix?

This project usesdevenv to create and manage a developer environment that has all the necessary dependencies. Thanks todevenv's automatic shell activation, this environment is activated automatically when you enter the root directory of this repository (you will just have to wait a few seconds).

If you don't use Nix, you can safely ignore thedevenv.nix file in the repository root.

In alternative to the Nix dev shell provided by this repository, you could use a Node.js version manager likenvm,asdf, orvolta.

If you want to run scrips/tests that rely onPlaywright, you will also need to install/update the browsers it uses:

npx playwright install

Development

Watch all templates, CSS, JS, and automatically refresh the browser:

npm run dev

Go tohttp://localhost:8080/ to visit the website.

In alternative, develop and preview the site withwrangler (this is useful when developing functions that will be deployed toCloudflare Pages Functions):

npm run wrangler

Go tohttp://localhost:8788/ to visit the website.

Test the production build locally

Build all templates, CSS, JS,_headers file and the service worker:

npm run build

Serve the production build:

npm run site:serve

Deploy

Just push to the remote repository.This GitHub workflow will automatically deploy the website to Cloudflare Pages.

  • Each push on themain branch will trigger a production deployment.
  • Each push on any other branch will trigger apreview deployment.

⚠️Node.js version on Cloudflare Pages

Don't forget to set the environment variablesNODE_ENV andNODE_VERSION in theCloudflare Pages dashboard. In particular,NODE_VERSION is used by theCloudflare Pages V2 build system.

Security

Run a security audit on the HTTP headers

Generate the_headers file which will be used by Cloudflare Pages:

node scripts/headers.mjs

Check theContent-Security-Policy and the other security headers with these online tools:

Security policy

SeeSECURITY.md.

Dependencies

Production dependencies

This project has53dependencies.

PackageVersion
@11ty/eleventy^3.0.0
@11ty/eleventy-fetch^4.0.1
@11ty/eleventy-navigation^0.3.5
@11ty/eleventy-plugin-rss^2.0.2
@11ty/eleventy-plugin-syntaxhighlight^5.0.0
@11ty/eleventy-plugin-webc^0.11.2
@11ty/is-land^4.0.0
@chrisburnell/eleventy-cache-webmentions^2.1.8
@google-cloud/storage^7.13.0
@google-cloud/text-to-speech^5.5.0
@jackdbd/content-security-policy^3.0.0
@jackdbd/eleventy-plugin-ensure-env-vars^1.2.0
@jackdbd/eleventy-plugin-telegram^2.2.0
@jackdbd/eleventy-plugin-text-to-speech^3.2.0
@jackdbd/hosting-utils^1.0.0
@jackdbd/permissions-policy^1.0.0
@thi.ng/transclude^0.1.108
autoprefixer^10.4.20
clean-css^5.3.3
cloudinary^2.5.1
cssnano^7.0.6
debug^4.3.7
eleventy-plugin-embed-cloudinary^1.0.2
eleventy-plugin-embed-twitter^1.4.1
eleventy-plugin-emoji^1.1.0
eleventy-plugin-helmet^0.2.2
eleventy-plugin-nesting-toc^1.3.0
eleventy-plugin-reading-time^0.0.1
eleventy-plugin-vimeo-embed^1.3.8
eleventy-plugin-youtube-embed^1.11.0
esbuild^0.24.0
globby^14.0.2
html-minifier-terser^7.2.0
instant.page^5.2.0
luxon^3.5.0
markdown-it^14.1.0
markdown-it-anchor^9.2.0
npm-run-all^4.1.5
pagefind^1.1.1
postcss^8.4.47
postcss-cli^11.0.0
sanitize-html^2.13.1
slugify^1.6.6
stripe^17.2.1
tailwindcss^3.4.14
terser^5.36.0
tsm^2.3.0
workbox-build^7.1.1
workbox-core^7.1.0
workbox-expiration^7.1.0
workbox-precaching^7.1.0
workbox-routing^7.1.0
zod^3.23.8

Development dependencies

This project has19devDependencies:@hint/hint-performance-budget,@jackdbd/checks,@types/yargs,form-data,himalaya,hint,lighthouse,linkedin-api-client,openpgp,playwright-chromium,playwright-start,prettier-plugin-tailwindcss,pretty-error,serve,snoowrap,taze,typescript,uuid,yargs.

Troubleshooting

Troubleshooting the service worker

When developing, open Chrome DevTools, go toApplication > Service Workers and check that:

  • Update on reload isenabled. This ensures that the latest service worker will beinstalled andactivated on the page.
  • Bypass for network isdisabled. This ensures that the route matchers, route handlers and runtime caches of the service worker will be used.

License

© 2020 - 2024Giacomo Debidda //MIT License

About

My personal website and blog, built with 11ty and Workbox.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp