Compare commits
45 Commits
6305482fc1
...
website-co
| Author | SHA1 | Date | |
|---|---|---|---|
| 6ff2249955 | |||
| ec6cfba9ba | |||
| 22b6a06b32 | |||
| dac9e80efd | |||
| 8fd744118f | |||
| adcbce68c8 | |||
| 33fbbe96b3 | |||
| 076618784a | |||
| 91ce9aa6c6 | |||
| 52eac520e8 | |||
| 2583e4e99b | |||
| 1b1db88a2a | |||
| 028637fdd3 | |||
| 649b596c7c | |||
| 25c08f7a1d | |||
| c320190a8d | |||
| e17d28914e | |||
| 95c9f186bb | |||
| 4f571b3ae1 | |||
| c5fdcf6b10 | |||
| a38cd26894 | |||
| 37e7b3617a | |||
| 87224a6dbb | |||
| 4b5f65bfdd | |||
| f9a837f0fa | |||
| 4847e9f172 | |||
| 3aa75e1a10 | |||
| 91cd9af0f8 | |||
| 4a59e44716 | |||
| 67eb549ed2 | |||
| 8fd009ffda | |||
| 4b1eb3777f | |||
| 7858d95f58 | |||
| b91d37db45 | |||
| 109996989e | |||
| 96151d6512 | |||
| ac266b98ec | |||
| 8fa3c0b3ab | |||
| cef1b3381f | |||
| 049861c255 | |||
| ba948e4181 | |||
| 68b6d7f785 | |||
| 1f9264a409 | |||
| 7774e31c36 | |||
| c9f921ba5b |
@@ -1,7 +1,17 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
.idea
|
.gitea/
|
||||||
.astro
|
.astro/
|
||||||
|
.idea/
|
||||||
|
|
||||||
|
*/dist/
|
||||||
*/build/
|
*/build/
|
||||||
*/node_modules/
|
*/node_modules/
|
||||||
|
*/playwright-report/
|
||||||
|
*/test-results/
|
||||||
|
|
||||||
|
.gitignore
|
||||||
|
Dockerfile
|
||||||
|
Makefile
|
||||||
|
new-words.txt
|
||||||
|
README.md
|
||||||
7
.editorconfig
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
insert_final_newline = true
|
||||||
|
end_of_line = lf
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
max_line_length = 80
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
name: Playwright Tests
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ main, master ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ main, master ]
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
timeout-minutes: 60
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: lts/*
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
- name: Install Playwright Browsers
|
|
||||||
run: npx playwright install --with-deps
|
|
||||||
- name: Run Playwright tests
|
|
||||||
run: npx playwright test
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
if: ${{ !cancelled() }}
|
|
||||||
with:
|
|
||||||
name: playwright-report
|
|
||||||
path: playwright-report/
|
|
||||||
retention-days: 30
|
|
||||||
@@ -12,16 +12,24 @@ jobs:
|
|||||||
project_version: ${{ steps.project_metadata.outputs.PROJECT_VERSION }}
|
project_version: ${{ steps.project_metadata.outputs.PROJECT_VERSION }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Setup Node Environment
|
- name: Setup Node Environment
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v6
|
||||||
|
with:
|
||||||
|
node-version: ">=22.20"
|
||||||
|
|
||||||
- name: Setup Project Dependencies
|
- name: Setup Project Dependencies
|
||||||
run: |
|
run: |
|
||||||
npm ci
|
npm ci
|
||||||
npx playwright install --with-deps
|
npx playwright install --with-deps
|
||||||
|
|
||||||
|
- name: Code Formatting Check
|
||||||
|
run: npx prettier . --check
|
||||||
|
|
||||||
|
- name: Spelling Check
|
||||||
|
run: npx cspell .
|
||||||
|
|
||||||
- name: Build Project
|
- name: Build Project
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
@@ -42,28 +50,32 @@ jobs:
|
|||||||
needs: test
|
needs: test
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout caperren-com Repository
|
- name: Checkout caperren-com Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
path: caperren-com
|
path: caperren-com
|
||||||
|
|
||||||
- name: Login to Docker Registry
|
- name: Login to Docker Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: gitea.perren.cloud
|
registry: 192.168.1.36:30008
|
||||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
password: ${{ secrets.ACTIONS_TOKEN }}
|
password: ${{ secrets.ACTIONS_TOKEN }}
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
with:
|
||||||
|
buildkitd-config-inline: |
|
||||||
|
[registry."192.168.1.36:30008"]
|
||||||
|
http = true
|
||||||
|
|
||||||
- name: Build and Push
|
- name: Build and Push
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: caperren-com
|
context: caperren-com
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
gitea.perren.cloud/caperren/${{ needs.test.outputs.repo_name }}:${{ needs.test.outputs.repo_version_hash }}
|
192.168.1.36:30008/caperren/${{ needs.test.outputs.repo_name }}:${{ needs.test.outputs.repo_version_hash }}
|
||||||
gitea.perren.cloud/caperren/caperren-com:latest
|
192.168.1.36:30008/caperren/caperren-com:latest
|
||||||
build-args: |
|
build-args: |
|
||||||
REPO_VERSION_HASH=${{ needs.test.outputs.repo_version_hash }}
|
REPO_VERSION_HASH=${{ needs.test.outputs.repo_version_hash }}
|
||||||
BUILD_ENVIRONMENT=production
|
BUILD_ENVIRONMENT=production
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
name: Build and Test - Staging
|
name: Build and Test - Staging
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [ opened, synchronize, reopened ]
|
types: [opened, synchronize, reopened]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
@@ -12,16 +12,24 @@ jobs:
|
|||||||
project_version: ${{ steps.project_metadata.outputs.PROJECT_VERSION }}
|
project_version: ${{ steps.project_metadata.outputs.PROJECT_VERSION }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Setup Node Environment
|
- name: Setup Node Environment
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v6
|
||||||
|
with:
|
||||||
|
node-version: ">=22.20"
|
||||||
|
|
||||||
- name: Setup Project Dependencies
|
- name: Setup Project Dependencies
|
||||||
run: |
|
run: |
|
||||||
npm ci
|
npm ci
|
||||||
npx playwright install --with-deps
|
npx playwright install --with-deps
|
||||||
|
|
||||||
|
- name: Code Formatting Check
|
||||||
|
run: npx prettier . --check
|
||||||
|
|
||||||
|
- name: Spelling Check
|
||||||
|
run: npx cspell .
|
||||||
|
|
||||||
- name: Build Project
|
- name: Build Project
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
@@ -42,29 +50,33 @@ jobs:
|
|||||||
needs: test
|
needs: test
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout caperren-com Repository
|
- name: Checkout caperren-com Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
path: caperren-com
|
path: caperren-com
|
||||||
|
|
||||||
- name: Login to Docker Registry
|
- name: Login to Docker Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: gitea.perren.cloud
|
registry: 192.168.1.36:30008
|
||||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
password: ${{ secrets.ACTIONS_TOKEN }}
|
password: ${{ secrets.ACTIONS_TOKEN }}
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
with:
|
||||||
|
buildkitd-config-inline: |
|
||||||
|
[registry."192.168.1.36:30008"]
|
||||||
|
http = true
|
||||||
|
|
||||||
- name: Build and Push
|
- name: Build and Push
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: caperren-com
|
context: caperren-com
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
gitea.perren.cloud/caperren/caperren-com:latest-staging
|
192.168.1.36:30008/caperren/caperren-com:latest-staging
|
||||||
build-args: |
|
build-args: |
|
||||||
REPO_VERSION_HASH=${{ needs.determine_version.outputs.repo_version_hash }}
|
REPO_VERSION_HASH=${{ needs.test.outputs.repo_version_hash }}
|
||||||
BUILD_ENVIRONMENT=staging
|
BUILD_ENVIRONMENT=staging
|
||||||
|
|
||||||
deploy_staging:
|
deploy_staging:
|
||||||
|
|||||||
9
.gitignore
vendored
@@ -1,9 +1,3 @@
|
|||||||
# Ignore everything under src/content, as they are dynamically added from obsidian
|
|
||||||
src/content/*
|
|
||||||
|
|
||||||
# Do not ignore config.ts in src/content since that necessary to import the dynamic content
|
|
||||||
!src/content/config.ts
|
|
||||||
|
|
||||||
# build output
|
# build output
|
||||||
dist/
|
dist/
|
||||||
|
|
||||||
@@ -35,3 +29,6 @@ pnpm-debug.log*
|
|||||||
/blob-report/
|
/blob-report/
|
||||||
/playwright/.cache/
|
/playwright/.cache/
|
||||||
/playwright/.auth/
|
/playwright/.auth/
|
||||||
|
|
||||||
|
# Local temporary storage files
|
||||||
|
new-words.txt
|
||||||
|
|||||||
34
.prettierignore
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
# build output
|
||||||
|
dist/
|
||||||
|
|
||||||
|
# generated types
|
||||||
|
.astro/
|
||||||
|
|
||||||
|
# dependencies
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# logs
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
pnpm-debug.log*
|
||||||
|
|
||||||
|
# environment variables
|
||||||
|
.env
|
||||||
|
.env.production
|
||||||
|
|
||||||
|
# macOS-specific files
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
|
# jetbrains setting folder
|
||||||
|
.idea/
|
||||||
|
|
||||||
|
# Playwright
|
||||||
|
/test-results/
|
||||||
|
/playwright-report/
|
||||||
|
/blob-report/
|
||||||
|
/playwright/.cache/
|
||||||
|
/playwright/.auth/
|
||||||
|
|
||||||
|
# Local temporary storage files
|
||||||
|
new-words.txt
|
||||||
29
.prettierrc
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"astroOrganizeImportsMode": "All",
|
||||||
|
"importOrder": [
|
||||||
|
"^@core/(.*)$",
|
||||||
|
"^@server/(.*)$",
|
||||||
|
"^@ui/(.*)$",
|
||||||
|
"^@layouts/(.*)$",
|
||||||
|
"^@components/(.*)$",
|
||||||
|
"^@interfaces/(.*)$",
|
||||||
|
"^@assets/(.*)$",
|
||||||
|
"^[./]"
|
||||||
|
],
|
||||||
|
"importOrderSeparation": true,
|
||||||
|
"importOrderSortSpecifiers": true,
|
||||||
|
"plugins": [
|
||||||
|
"prettier-plugin-astro",
|
||||||
|
"prettier-plugin-tailwindcss",
|
||||||
|
"@trivago/prettier-plugin-sort-imports",
|
||||||
|
"prettier-plugin-astro-organize-imports"
|
||||||
|
],
|
||||||
|
"overrides": [
|
||||||
|
{
|
||||||
|
"files": "*.astro",
|
||||||
|
"options": {
|
||||||
|
"parser": "astro"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
31
Dockerfile
@@ -5,12 +5,27 @@ WORKDIR /app
|
|||||||
# Therefore, the `-deps` steps will be skipped if only the source code changes.
|
# Therefore, the `-deps` steps will be skipped if only the source code changes.
|
||||||
COPY package.json package-lock.json tsconfig.json astro.config.mjs ./
|
COPY package.json package-lock.json tsconfig.json astro.config.mjs ./
|
||||||
|
|
||||||
|
CMD [ "/bin/bash" ]
|
||||||
|
|
||||||
FROM base AS prod-deps
|
FROM base AS prod-deps
|
||||||
RUN npm install --omit=dev
|
RUN npm install --omit=dev
|
||||||
|
|
||||||
|
FROM prod-deps AS test-base
|
||||||
|
|
||||||
|
RUN npm ci
|
||||||
|
RUN npx playwright install --with-deps
|
||||||
|
|
||||||
FROM prod-deps AS build
|
FROM prod-deps AS build
|
||||||
|
|
||||||
COPY . .
|
COPY --exclude=test \
|
||||||
|
--exclude=test-e2e \
|
||||||
|
--exclude=playwright.config.ts \
|
||||||
|
--exclude=vitest.config.ts \
|
||||||
|
--exclude=.prettierrc \
|
||||||
|
--exclude=.prettierignore \
|
||||||
|
--exclude=cspell.json \
|
||||||
|
--exclude=project-words.txt \
|
||||||
|
. .
|
||||||
|
|
||||||
ARG REPO_VERSION_HASH
|
ARG REPO_VERSION_HASH
|
||||||
ARG BUILD_ENVIRONMENT
|
ARG BUILD_ENVIRONMENT
|
||||||
@@ -19,6 +34,16 @@ RUN echo "PUBLIC_REPO_VERSION_HASH=\"${REPO_VERSION_HASH}\" \n\
|
|||||||
PUBLIC_BUILD_ENVIRONMENT=\"${BUILD_ENVIRONMENT}\"" >> .env
|
PUBLIC_BUILD_ENVIRONMENT=\"${BUILD_ENVIRONMENT}\"" >> .env
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
|
FROM test-base AS test
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
COPY --from=build /app/dist /app/dist
|
||||||
|
|
||||||
|
RUN npx prettier . --check
|
||||||
|
RUN npx cspell .
|
||||||
|
RUN npm run test
|
||||||
|
RUN npm run e2e-test
|
||||||
|
|
||||||
FROM nginx:alpine AS runtime
|
FROM nginx:alpine AS runtime
|
||||||
|
|
||||||
COPY ./nginx/nginx.conf /etc/nginx/nginx.conf
|
COPY ./nginx/nginx.conf /etc/nginx/nginx.conf
|
||||||
@@ -26,8 +51,4 @@ COPY --from=build /app/dist /usr/share/nginx/html
|
|||||||
|
|
||||||
RUN chown -R nginx:nginx /usr/share/nginx/html
|
RUN chown -R nginx:nginx /usr/share/nginx/html
|
||||||
|
|
||||||
#COPY entrypoint.sh /entrypoint.sh
|
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
#ENTRYPOINT ["/entrypoint.sh"]
|
|
||||||
72
Makefile
@@ -6,7 +6,17 @@
|
|||||||
astro_upgrade \
|
astro_upgrade \
|
||||||
build \
|
build \
|
||||||
dev \
|
dev \
|
||||||
dev-hosted
|
dev-hosted \
|
||||||
|
test \
|
||||||
|
_spelling-generate-new-words \
|
||||||
|
spelling-find-new-words \
|
||||||
|
spelling-add-new-words \
|
||||||
|
spelling-check \
|
||||||
|
cleanup-check \
|
||||||
|
cleanup-code \
|
||||||
|
convert_video \
|
||||||
|
convert_video_times \
|
||||||
|
generate_asset_imports
|
||||||
|
|
||||||
default: dev
|
default: dev
|
||||||
|
|
||||||
@@ -28,3 +38,63 @@ dev:
|
|||||||
dev-hosted:
|
dev-hosted:
|
||||||
npm run dev-hosted
|
npm run dev-hosted
|
||||||
|
|
||||||
|
test: spelling-check
|
||||||
|
@npx playwright install --with-deps
|
||||||
|
npm run test --ui
|
||||||
|
npx playwright test --ui
|
||||||
|
|
||||||
|
_spelling-generate-new-words:
|
||||||
|
@cspell --words-only --unique . 2>/dev/null | sort --ignore-case -o new-words.txt
|
||||||
|
|
||||||
|
spelling-find-new-words: _spelling-generate-new-words
|
||||||
|
@echo "Found the following new words:"
|
||||||
|
@cat new-words.txt
|
||||||
|
@rm -f new-words.txt
|
||||||
|
|
||||||
|
spelling-add-new-words: _spelling-generate-new-words
|
||||||
|
@echo "Adding to project-words.txt"
|
||||||
|
@cat new-words.txt >> project-words.txt
|
||||||
|
@rm -f new-words.txt
|
||||||
|
@cat project-words.txt | sort --ignore-case -o project-words.txt
|
||||||
|
|
||||||
|
spelling-check:
|
||||||
|
npx cspell .
|
||||||
|
|
||||||
|
cleanup-check:
|
||||||
|
npx prettier . --check
|
||||||
|
|
||||||
|
cleanup-code:
|
||||||
|
npx prettier . --write
|
||||||
|
|
||||||
|
convert_video:
|
||||||
|
ffmpeg \
|
||||||
|
-init_hw_device vaapi=va:/dev/dri/renderD128 \
|
||||||
|
-filter_hw_device va \
|
||||||
|
-i $(input) \
|
||||||
|
-vf 'format=nv12,hwupload,scale_vaapi=-2:720' \
|
||||||
|
-c:v h264_vaapi \
|
||||||
|
-rc_mode CQP \
|
||||||
|
-qp 28 \
|
||||||
|
-an \
|
||||||
|
$(extra_args) \
|
||||||
|
$(output)
|
||||||
|
|
||||||
|
convert_video_times:
|
||||||
|
ffmpeg \
|
||||||
|
-init_hw_device vaapi=va:/dev/dri/renderD128 \
|
||||||
|
-filter_hw_device va \
|
||||||
|
-i $(input) \
|
||||||
|
-ss $(start) \
|
||||||
|
-to $(end) \
|
||||||
|
-vf 'format=nv12,hwupload,scale_vaapi=-2:720' \
|
||||||
|
-c:v h264_vaapi \
|
||||||
|
-rc_mode CQP \
|
||||||
|
-qp 28 \
|
||||||
|
-an \
|
||||||
|
$(output)
|
||||||
|
|
||||||
|
generate_asset_imports:
|
||||||
|
@for assets_path in `find "src/assets/${assets_relative_path}" -maxdepth 1 -type f -printf "%f\n"`; do \
|
||||||
|
without_extension=$${assets_path/%.*}; \
|
||||||
|
echo "import $${without_extension//-/_} from \"@assets/${assets_relative_path}/$$assets_path\";"; \
|
||||||
|
done;
|
||||||
|
|||||||
49
README.md
@@ -1,48 +1,3 @@
|
|||||||
# Astro Starter Kit: Basics
|
# Corwin Perren's Personal Portfolio Website
|
||||||
|
|
||||||
```sh
|
Check the Makefile and/or package.json for the commands needed to build and run this project.
|
||||||
npm create astro@latest -- --template basics
|
|
||||||
```
|
|
||||||
|
|
||||||
[](https://stackblitz.com/github/withastro/astro/tree/latest/examples/basics)
|
|
||||||
[](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/basics)
|
|
||||||
[](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/basics/devcontainer.json)
|
|
||||||
|
|
||||||
> 🧑🚀 **Seasoned astronaut?** Delete this file. Have fun!
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## 🚀 Project Structure
|
|
||||||
|
|
||||||
Inside of your Astro project, you'll see the following folders and files:
|
|
||||||
|
|
||||||
```text
|
|
||||||
/
|
|
||||||
├── public/
|
|
||||||
│ └── favicon.svg
|
|
||||||
├── src/
|
|
||||||
│ ├── layouts/
|
|
||||||
│ │ └── Layout.astro
|
|
||||||
│ └── pages/
|
|
||||||
│ └── index.astro
|
|
||||||
└── package.json
|
|
||||||
```
|
|
||||||
|
|
||||||
To learn more about the folder structure of an Astro project, refer to [our guide on project structure](https://docs.astro.build/en/basics/project-structure/).
|
|
||||||
|
|
||||||
## 🧞 Commands
|
|
||||||
|
|
||||||
All commands are run from the root of the project, from a terminal:
|
|
||||||
|
|
||||||
| Command | Action |
|
|
||||||
| :------------------------ | :----------------------------------------------- |
|
|
||||||
| `npm install` | Installs dependencies |
|
|
||||||
| `npm run dev` | Starts local dev server at `localhost:4321` |
|
|
||||||
| `npm run build` | Build your production site to `./dist/` |
|
|
||||||
| `npm run preview` | Preview your build locally, before deploying |
|
|
||||||
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
|
|
||||||
| `npm run astro -- --help` | Get help using the Astro CLI |
|
|
||||||
|
|
||||||
## 👀 Want to learn more?
|
|
||||||
|
|
||||||
Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
|
|
||||||
|
|||||||
@@ -1,25 +1,32 @@
|
|||||||
// @ts-check
|
// @ts-check
|
||||||
import {defineConfig} from 'astro/config';
|
|
||||||
import sitemap from "@astrojs/sitemap";
|
import sitemap from "@astrojs/sitemap";
|
||||||
import tailwindcss from "@tailwindcss/vite";
|
import tailwindcss from "@tailwindcss/vite";
|
||||||
|
import { defineConfig } from "astro/config";
|
||||||
|
|
||||||
import {siteLayout, getPaths} from "./src/data/site-layout.ts";
|
// We don't have access to short imports this early in the build chain
|
||||||
|
// noinspection ES6PreferShortImport
|
||||||
|
import { getPaths, siteLayout } from "./src/data/site-layout.ts";
|
||||||
|
|
||||||
const disabledPaths = getPaths(siteLayout, [], true)
|
const disabledPaths = getPaths(siteLayout, [], true);
|
||||||
|
|
||||||
// https://astro.build/config
|
// https://astro.build/config
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
site: "https://caperren.com",
|
site: "https://caperren.com",
|
||||||
prefetch: {
|
trailingSlash: "never",
|
||||||
prefetchAll: true
|
prefetch: {
|
||||||
},
|
prefetchAll: true,
|
||||||
integrations: [
|
},
|
||||||
sitemap({
|
integrations: [
|
||||||
filter: (pagePath) =>
|
sitemap({
|
||||||
!disabledPaths.some(disabledPath => pagePath.includes(disabledPath))
|
filter: (pagePath) =>
|
||||||
})
|
!disabledPaths.some((disabledPath) => pagePath.includes(disabledPath)),
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
vite: {
|
||||||
|
plugins: [
|
||||||
|
// @ts-ignore
|
||||||
|
tailwindcss(),
|
||||||
],
|
],
|
||||||
vite: {
|
},
|
||||||
plugins: [tailwindcss()],
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
23
cspell.json
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
|
||||||
|
"version": "0.2",
|
||||||
|
"dictionaryDefinitions": [
|
||||||
|
{
|
||||||
|
"name": "project-words",
|
||||||
|
"path": "./project-words.txt",
|
||||||
|
"addWords": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"dictionaries": ["project-words"],
|
||||||
|
"ignorePaths": [
|
||||||
|
".astro",
|
||||||
|
".idea",
|
||||||
|
"dist",
|
||||||
|
"node_modules",
|
||||||
|
"playwright-report",
|
||||||
|
"test-results",
|
||||||
|
"new-words.txt",
|
||||||
|
"playwright.config.ts",
|
||||||
|
"/project-words.txt"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Generate a unique token per container launch
|
|
||||||
TOKEN="$(cat /proc/sys/kernel/random/uuid)" # or: TOKEN="$(date +%s%N)"
|
|
||||||
|
|
||||||
# Write it into a file NGINX will include
|
|
||||||
cat >/etc/nginx/conf.d/_release_token.conf <<EOF
|
|
||||||
# auto-generated at container start
|
|
||||||
set \$release_token "$TOKEN";
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# Then exec nginx
|
|
||||||
exec nginx -g 'daemon off;'
|
|
||||||
@@ -14,12 +14,6 @@ http {
|
|||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
index index.html index.htm;
|
index index.html index.htm;
|
||||||
include /etc/nginx/mime.types;
|
include /etc/nginx/mime.types;
|
||||||
#include /etc/nginx/conf.d/_release_token.conf;
|
|
||||||
|
|
||||||
#etag off;
|
|
||||||
|
|
||||||
#add_header ETag "\"W/$release_token\"" always;
|
|
||||||
#add_header Cache-Control "max-age=0, must-revalidate" always;
|
|
||||||
|
|
||||||
gzip on;
|
gzip on;
|
||||||
gzip_proxied any;
|
gzip_proxied any;
|
||||||
|
|||||||
2078
package-lock.json
generated
@@ -1,7 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "caperren-com",
|
"name": "caperren-com",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "0.0.1",
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "astro dev",
|
"dev": "astro dev",
|
||||||
"dev-hosted": "astro dev --host",
|
"dev-hosted": "astro dev --host",
|
||||||
@@ -14,7 +13,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@astrojs/sitemap": "^3.6.0",
|
"@astrojs/sitemap": "^3.6.0",
|
||||||
"@tailwindcss/vite": "^4.1.11",
|
"@tailwindcss/vite": "^4.1.11",
|
||||||
"astro": "^5.15.4",
|
"astro": "^5.16.3",
|
||||||
"flowbite": "^3.1.2",
|
"flowbite": "^3.1.2",
|
||||||
"leader-line-new": "^1.1.9",
|
"leader-line-new": "^1.1.9",
|
||||||
"luxon": "^3.7.2",
|
"luxon": "^3.7.2",
|
||||||
@@ -23,8 +22,14 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@playwright/test": "^1.56.1",
|
"@playwright/test": "^1.56.1",
|
||||||
|
"@trivago/prettier-plugin-sort-imports": "^6.0.0",
|
||||||
"@types/luxon": "^3.7.1",
|
"@types/luxon": "^3.7.1",
|
||||||
"@types/node": "^24.10.0",
|
"@types/node": "^24.10.0",
|
||||||
|
"cspell": "^9.3.2",
|
||||||
|
"prettier": "3.7.3",
|
||||||
|
"prettier-plugin-astro": "0.14.1",
|
||||||
|
"prettier-plugin-astro-organize-imports": "^0.4.11",
|
||||||
|
"prettier-plugin-tailwindcss": "0.7.1",
|
||||||
"vitest": "^4.0.7"
|
"vitest": "^4.0.7"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import {defineConfig, devices} from '@playwright/test';
|
import { defineConfig, devices } from "@playwright/test";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read environment variables from file.
|
* Read environment variables from file.
|
||||||
@@ -12,69 +12,69 @@ import {defineConfig, devices} from '@playwright/test';
|
|||||||
* See https://playwright.dev/docs/test-configuration.
|
* See https://playwright.dev/docs/test-configuration.
|
||||||
*/
|
*/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
testDir: './test-e2e',
|
testDir: "./test-e2e",
|
||||||
/* Run tests in files in parallel */
|
/* Run tests in files in parallel */
|
||||||
fullyParallel: true,
|
fullyParallel: true,
|
||||||
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
||||||
forbidOnly: !!process.env.CI,
|
forbidOnly: !!process.env.CI,
|
||||||
/* Retry on CI only */
|
/* Retry on CI only */
|
||||||
retries: process.env.CI ? 2 : 0,
|
retries: process.env.CI ? 2 : 0,
|
||||||
/* Opt out of parallel tests on CI. */
|
/* Opt out of parallel tests on CI. */
|
||||||
workers: process.env.CI ? 1 : undefined,
|
workers: process.env.CI ? 1 : undefined,
|
||||||
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
||||||
reporter: 'html',
|
reporter: "html",
|
||||||
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
||||||
use: {
|
use: {
|
||||||
/* Base URL to use in actions like `await page.goto('')`. */
|
/* Base URL to use in actions like `await page.goto('')`. */
|
||||||
baseURL: 'http://localhost:4321',
|
baseURL: "http://localhost:4321",
|
||||||
|
|
||||||
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
||||||
trace: 'on-first-retry',
|
trace: "on-first-retry",
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Configure projects for major browsers */
|
||||||
|
projects: [
|
||||||
|
{
|
||||||
|
name: "chromium",
|
||||||
|
use: { ...devices["Desktop Chrome"] },
|
||||||
},
|
},
|
||||||
|
|
||||||
/* Configure projects for major browsers */
|
{
|
||||||
projects: [
|
name: "firefox",
|
||||||
{
|
use: { ...devices["Desktop Firefox"] },
|
||||||
name: 'chromium',
|
|
||||||
use: {...devices['Desktop Chrome']},
|
|
||||||
},
|
|
||||||
|
|
||||||
// {
|
|
||||||
// name: 'firefox',
|
|
||||||
// use: { ...devices['Desktop Firefox'] },
|
|
||||||
// },
|
|
||||||
//
|
|
||||||
// {
|
|
||||||
// name: 'webkit',
|
|
||||||
// use: { ...devices['Desktop Safari'] },
|
|
||||||
// },
|
|
||||||
|
|
||||||
/* Test against mobile viewports. */
|
|
||||||
{
|
|
||||||
name: 'Mobile Chrome',
|
|
||||||
use: {...devices['Pixel 5']},
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// name: 'Mobile Safari',
|
|
||||||
// use: { ...devices['iPhone 12'] },
|
|
||||||
// },
|
|
||||||
|
|
||||||
/* Test against branded browsers. */
|
|
||||||
// {
|
|
||||||
// name: 'Microsoft Edge',
|
|
||||||
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: 'Google Chrome',
|
|
||||||
// use: { ...devices['Desktop Chrome'], channel: 'chrome' },
|
|
||||||
// },
|
|
||||||
],
|
|
||||||
|
|
||||||
/* Run your local dev server before starting the tests */
|
|
||||||
webServer: {
|
|
||||||
command: 'npm run preview',
|
|
||||||
url: 'http://localhost:4321',
|
|
||||||
timeout: 120 * 1000,
|
|
||||||
reuseExistingServer: !process.env.CI,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name: "webkit",
|
||||||
|
use: { ...devices["Desktop Safari"] },
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Test against mobile viewports. */
|
||||||
|
{
|
||||||
|
name: "Mobile Chrome",
|
||||||
|
use: { ...devices["Pixel 5"] },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Mobile Safari",
|
||||||
|
use: { ...devices["iPhone 12"] },
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Test against branded browsers. */
|
||||||
|
// {
|
||||||
|
// name: 'Microsoft Edge',
|
||||||
|
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'Google Chrome',
|
||||||
|
// use: { ...devices['Desktop Chrome'], channel: 'chrome' },
|
||||||
|
// },
|
||||||
|
],
|
||||||
|
|
||||||
|
/* Run your local dev server before starting the tests */
|
||||||
|
webServer: {
|
||||||
|
command: "npm run preview",
|
||||||
|
url: "http://localhost:4321",
|
||||||
|
timeout: 120 * 1000,
|
||||||
|
reuseExistingServer: !process.env.CI,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
96
project-words.txt
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
ADCP
|
||||||
|
Altium
|
||||||
|
ASSEM
|
||||||
|
astrojs
|
||||||
|
Atmel
|
||||||
|
automations
|
||||||
|
barebones
|
||||||
|
beaglebone
|
||||||
|
Bitwarden
|
||||||
|
Candian
|
||||||
|
caperren
|
||||||
|
CEOAS
|
||||||
|
COMSC
|
||||||
|
Concours
|
||||||
|
CONSERV
|
||||||
|
Corwin
|
||||||
|
dangerousthings
|
||||||
|
dechorionation
|
||||||
|
Dechorionator
|
||||||
|
dechorionators
|
||||||
|
dockerization
|
||||||
|
dockerizing
|
||||||
|
drumheller
|
||||||
|
ebox
|
||||||
|
ELMI
|
||||||
|
fhhs
|
||||||
|
flowbite
|
||||||
|
flowrate
|
||||||
|
gcode
|
||||||
|
gerbers
|
||||||
|
Gitea
|
||||||
|
HDFS
|
||||||
|
headshot
|
||||||
|
Homelab
|
||||||
|
hwupload
|
||||||
|
iceops
|
||||||
|
ITAR
|
||||||
|
Jetson
|
||||||
|
KFSK
|
||||||
|
Labjack
|
||||||
|
leconte
|
||||||
|
Loctite
|
||||||
|
luxon
|
||||||
|
MGMT
|
||||||
|
microcontroller
|
||||||
|
microcontroller's
|
||||||
|
Micropumps
|
||||||
|
Millis
|
||||||
|
modbus
|
||||||
|
Mokai
|
||||||
|
Multimeters
|
||||||
|
nixos
|
||||||
|
nvme
|
||||||
|
offroad
|
||||||
|
Onshape
|
||||||
|
OSSM
|
||||||
|
OSURC
|
||||||
|
panelized
|
||||||
|
Passthroughs
|
||||||
|
pcbs
|
||||||
|
Perren
|
||||||
|
Perren's
|
||||||
|
Pixhawk
|
||||||
|
Protocase
|
||||||
|
pubpath
|
||||||
|
RFID
|
||||||
|
Rito
|
||||||
|
RSSI
|
||||||
|
SARL
|
||||||
|
SCARA
|
||||||
|
showerheads
|
||||||
|
Shuttlebox
|
||||||
|
simplemotion
|
||||||
|
sinnhuber
|
||||||
|
sitemapindex
|
||||||
|
Smartsheet
|
||||||
|
solderable
|
||||||
|
ssds
|
||||||
|
Starlink
|
||||||
|
steller
|
||||||
|
Steller
|
||||||
|
Tanguay
|
||||||
|
Teamcenter
|
||||||
|
timelapse
|
||||||
|
touchoff
|
||||||
|
triaging
|
||||||
|
trivago
|
||||||
|
Truong
|
||||||
|
Ubiquiti
|
||||||
|
Unstow
|
||||||
|
uuidv
|
||||||
|
vaapi
|
||||||
|
vitest
|
||||||
|
Waterjet
|
||||||
|
Zebrafish
|
||||||
|
zscan
|
||||||
BIN
public/16x16-favicon.png
Normal file
|
After Width: | Height: | Size: 308 B |
BIN
public/180x180-favicon.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
public/192x192-favicon.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
public/32x32-favicon.png
Normal file
|
After Width: | Height: | Size: 500 B |
BIN
public/48x48-favicon.png
Normal file
|
After Width: | Height: | Size: 785 B |
BIN
public/512x512-favicon.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 662 B |
BIN
src/assets/about/headshot.jpg
Normal file
|
After Width: | Height: | Size: 3.2 MiB |
|
Before Width: | Height: | Size: 956 KiB |
|
After Width: | Height: | Size: 3.1 MiB |
|
After Width: | Height: | Size: 2.6 MiB |
|
After Width: | Height: | Size: 4.2 MiB |
|
After Width: | Height: | Size: 4.1 MiB |
|
After Width: | Height: | Size: 2.6 MiB |
|
After Width: | Height: | Size: 5.1 MiB |
|
After Width: | Height: | Size: 2.5 MiB |
|
After Width: | Height: | Size: 4.1 MiB |
|
After Width: | Height: | Size: 5.1 MiB |
|
After Width: | Height: | Size: 6.8 MiB |
|
After Width: | Height: | Size: 5.0 MiB |
|
After Width: | Height: | Size: 2.7 MiB |
|
After Width: | Height: | Size: 3.3 MiB |
|
After Width: | Height: | Size: 3.9 MiB |
|
After Width: | Height: | Size: 851 KiB |
|
After Width: | Height: | Size: 3.9 MiB |
|
After Width: | Height: | Size: 1.2 MiB |
|
After Width: | Height: | Size: 2.6 MiB |
|
After Width: | Height: | Size: 3.9 MiB |
|
After Width: | Height: | Size: 902 KiB |
|
After Width: | Height: | Size: 2.3 MiB |
|
Before Width: | Height: | Size: 2.7 MiB After Width: | Height: | Size: 2.7 MiB |
|
After Width: | Height: | Size: 10 MiB |
|
After Width: | Height: | Size: 1.9 MiB |
|
After Width: | Height: | Size: 3.3 MiB |
|
After Width: | Height: | Size: 10 MiB |
|
After Width: | Height: | Size: 1.9 MiB |
|
After Width: | Height: | Size: 10 MiB |
|
After Width: | Height: | Size: 14 MiB |
|
After Width: | Height: | Size: 12 MiB |
|
After Width: | Height: | Size: 1.2 MiB |
|
After Width: | Height: | Size: 4.7 MiB |
|
After Width: | Height: | Size: 1.8 MiB |
|
After Width: | Height: | Size: 4.0 MiB |
|
After Width: | Height: | Size: 3.5 MiB |
|
After Width: | Height: | Size: 4.0 MiB |
|
After Width: | Height: | Size: 3.1 MiB |
|
After Width: | Height: | Size: 3.6 MiB |
|
After Width: | Height: | Size: 4.2 MiB |
|
After Width: | Height: | Size: 3.7 MiB |
|
After Width: | Height: | Size: 7.7 MiB |
|
After Width: | Height: | Size: 7.3 MiB |
|
After Width: | Height: | Size: 8.3 MiB |
|
After Width: | Height: | Size: 7.6 MiB |
|
After Width: | Height: | Size: 4.4 MiB |
|
After Width: | Height: | Size: 3.5 MiB |
|
After Width: | Height: | Size: 3.8 MiB |
|
After Width: | Height: | Size: 4.1 MiB |
|
After Width: | Height: | Size: 166 KiB |
|
After Width: | Height: | Size: 239 KiB |
|
After Width: | Height: | Size: 3.8 MiB |
|
After Width: | Height: | Size: 3.9 MiB |
|
After Width: | Height: | Size: 4.6 MiB |
|
After Width: | Height: | Size: 4.2 MiB |
|
After Width: | Height: | Size: 4.2 MiB |
|
After Width: | Height: | Size: 4.3 MiB |
|
After Width: | Height: | Size: 4.4 MiB |
|
After Width: | Height: | Size: 4.4 MiB |
|
After Width: | Height: | Size: 6.4 MiB |
|
After Width: | Height: | Size: 7.9 MiB |
|
After Width: | Height: | Size: 8.9 MiB |
|
After Width: | Height: | Size: 8.7 MiB |
|
After Width: | Height: | Size: 7.8 MiB |
|
After Width: | Height: | Size: 5.9 MiB |
|
After Width: | Height: | Size: 9.2 MiB |