Compare commits
1 Commits
website-co
...
e9dd38ca6a
| Author | SHA1 | Date | |
|---|---|---|---|
| e9dd38ca6a |
@@ -1,17 +1,7 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
.gitea/
|
.idea
|
||||||
.astro/
|
.astro
|
||||||
.idea/
|
|
||||||
|
|
||||||
*/dist/
|
|
||||||
*/build/
|
*/build/
|
||||||
*/node_modules/
|
*/node_modules/
|
||||||
*/playwright-report/
|
|
||||||
*/test-results/
|
|
||||||
|
|
||||||
.gitignore
|
|
||||||
Dockerfile
|
|
||||||
Makefile
|
|
||||||
new-words.txt
|
|
||||||
README.md
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
[*]
|
|
||||||
charset = utf-8
|
|
||||||
insert_final_newline = true
|
|
||||||
end_of_line = lf
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 2
|
|
||||||
max_line_length = 80
|
|
||||||
@@ -4,7 +4,7 @@ on:
|
|||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
determine_version:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
repo_name: ${{ steps.project_metadata.outputs.REPO_NAME }}
|
repo_name: ${{ steps.project_metadata.outputs.REPO_NAME }}
|
||||||
@@ -12,74 +12,57 @@ 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@v5
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Node Environment
|
- name: Setup Node Environment
|
||||||
uses: actions/setup-node@v6
|
uses: actions/setup-node@v4
|
||||||
with:
|
|
||||||
node-version: ">=22.20"
|
|
||||||
|
|
||||||
- name: Setup Project Dependencies
|
- name: Acquire Project Metadata
|
||||||
run: |
|
|
||||||
npm ci
|
|
||||||
npx playwright install --with-deps
|
|
||||||
|
|
||||||
- name: Code Formatting Check
|
|
||||||
run: npx prettier . --check
|
|
||||||
|
|
||||||
- name: Spelling Check
|
|
||||||
run: npx cspell .
|
|
||||||
|
|
||||||
- name: Build Project
|
|
||||||
run: npm run build
|
|
||||||
|
|
||||||
- name: Run Unit Tests
|
|
||||||
run: npm run test
|
|
||||||
|
|
||||||
- name: Run E2E Tests
|
|
||||||
run: npm run e2e-test
|
|
||||||
|
|
||||||
- name: Set Project Metadata
|
|
||||||
id: project_metadata
|
id: project_metadata
|
||||||
run: |
|
run: |
|
||||||
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT
|
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT
|
||||||
echo REPO_VERSION_HASH=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT
|
echo REPO_VERSION_HASH=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT
|
||||||
|
echo PROJECT_VERSION=$(npm pkg get version --workspaces=false | tr -d \") >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
build_and_push:
|
build_and_push:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: test
|
needs: determine_version
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout caperren-com Repository
|
- name: Checkout caperren-com Repository
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
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: 192.168.1.36:30008
|
registry: gitea.perren.cloud
|
||||||
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@v6
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: caperren-com
|
context: caperren-com
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
192.168.1.36:30008/caperren/${{ needs.test.outputs.repo_name }}:${{ needs.test.outputs.repo_version_hash }}
|
gitea.perren.cloud/caperren/${{ needs.determine_version.outputs.repo_name }}:${{ needs.determine_version.outputs.repo_version_hash }}
|
||||||
192.168.1.36:30008/caperren/caperren-com:latest
|
gitea.perren.cloud/caperren/${{ needs.determine_version.outputs.repo_name }}:${{ needs.determine_version.outputs.project_version }}
|
||||||
|
gitea.perren.cloud/caperren/caperren-com:latest
|
||||||
build-args: |
|
build-args: |
|
||||||
REPO_VERSION_HASH=${{ needs.test.outputs.repo_version_hash }}
|
REPO_VERSION_HASH=${{ needs.determine_version.outputs.repo_version_hash }}
|
||||||
|
PROJECT_VERSION=${{ needs.determine_version.outputs.project_version }}
|
||||||
BUILD_ENVIRONMENT=production
|
BUILD_ENVIRONMENT=production
|
||||||
|
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build_and_push
|
||||||
|
steps:
|
||||||
|
- run: echo "Placeholder"
|
||||||
|
|
||||||
deploy_production:
|
deploy_production:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: test
|
needs: test
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
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:
|
determine_version:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
repo_name: ${{ steps.project_metadata.outputs.REPO_NAME }}
|
repo_name: ${{ steps.project_metadata.outputs.REPO_NAME }}
|
||||||
@@ -12,73 +12,55 @@ 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@v5
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Node Environment
|
- name: Setup Node Environment
|
||||||
uses: actions/setup-node@v6
|
uses: actions/setup-node@v4
|
||||||
with:
|
|
||||||
node-version: ">=22.20"
|
|
||||||
|
|
||||||
- name: Setup Project Dependencies
|
- name: Acquire Project Metadata
|
||||||
run: |
|
|
||||||
npm ci
|
|
||||||
npx playwright install --with-deps
|
|
||||||
|
|
||||||
- name: Code Formatting Check
|
|
||||||
run: npx prettier . --check
|
|
||||||
|
|
||||||
- name: Spelling Check
|
|
||||||
run: npx cspell .
|
|
||||||
|
|
||||||
- name: Build Project
|
|
||||||
run: npm run build
|
|
||||||
|
|
||||||
- name: Run Unit Tests
|
|
||||||
run: npm run test
|
|
||||||
|
|
||||||
- name: Run E2E Tests
|
|
||||||
run: npm run e2e-test
|
|
||||||
|
|
||||||
- name: Set Project Metadata
|
|
||||||
id: project_metadata
|
id: project_metadata
|
||||||
run: |
|
run: |
|
||||||
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT
|
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT
|
||||||
echo REPO_VERSION_HASH=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT
|
echo REPO_VERSION_HASH=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT
|
||||||
|
echo PROJECT_VERSION=$(npm pkg get version --workspaces=false | tr -d \") >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
build_and_push:
|
build_and_push:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: test
|
needs: determine_version
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout caperren-com Repository
|
- name: Checkout caperren-com Repository
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
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: 192.168.1.36:30008
|
registry: gitea.perren.cloud
|
||||||
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@v6
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: caperren-com
|
context: caperren-com
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
192.168.1.36:30008/caperren/caperren-com:latest-staging
|
gitea.perren.cloud/caperren/caperren-com:latest-staging
|
||||||
build-args: |
|
build-args: |
|
||||||
REPO_VERSION_HASH=${{ needs.test.outputs.repo_version_hash }}
|
REPO_VERSION_HASH=${{ needs.determine_version.outputs.repo_version_hash }}
|
||||||
|
PROJECT_VERSION=${{ needs.determine_version.outputs.project_version }}
|
||||||
BUILD_ENVIRONMENT=staging
|
BUILD_ENVIRONMENT=staging
|
||||||
|
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build_and_push
|
||||||
|
steps:
|
||||||
|
- run: echo "Placeholder"
|
||||||
|
|
||||||
deploy_staging:
|
deploy_staging:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: test
|
needs: test
|
||||||
|
|||||||
16
.gitignore
vendored
@@ -1,3 +1,9 @@
|
|||||||
|
# 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/
|
||||||
|
|
||||||
@@ -22,13 +28,3 @@ pnpm-debug.log*
|
|||||||
|
|
||||||
# jetbrains setting folder
|
# jetbrains setting folder
|
||||||
.idea/
|
.idea/
|
||||||
|
|
||||||
# Playwright
|
|
||||||
/test-results/
|
|
||||||
/playwright-report/
|
|
||||||
/blob-report/
|
|
||||||
/playwright/.cache/
|
|
||||||
/playwright/.auth/
|
|
||||||
|
|
||||||
# Local temporary storage files
|
|
||||||
new-words.txt
|
|
||||||
|
|||||||
@@ -1,34 +0,0 @@
|
|||||||
# 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
@@ -1,29 +0,0 @@
|
|||||||
{
|
|
||||||
"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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
42
Dockerfile
@@ -5,50 +5,30 @@ 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
|
FROM base AS build-deps
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
RUN npm ci
|
FROM build-deps AS build
|
||||||
RUN npx playwright install --with-deps
|
|
||||||
|
|
||||||
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
|
||||||
|
ARG PROJECT_VERSION
|
||||||
|
|
||||||
RUN echo "PUBLIC_REPO_VERSION_HASH=\"${REPO_VERSION_HASH}\" \n\
|
RUN echo "PUBLIC_REPO_VERSION_HASH=\"${REPO_VERSION_HASH}\" \n\
|
||||||
PUBLIC_BUILD_ENVIRONMENT=\"${BUILD_ENVIRONMENT}\"" >> .env
|
PUBLIC_BUILD_ENVIRONMENT=\"${BUILD_ENVIRONMENT}\" \n\
|
||||||
|
PUBLIC_PROJECT_VERSION=\"${PROJECT_VERSION}\"" >> .env
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
FROM test-base AS test
|
FROM httpd:latest AS runtime
|
||||||
|
WORKDIR /usr/local/apache2/htdocs
|
||||||
|
|
||||||
COPY . .
|
RUN rm index.html
|
||||||
COPY --from=build /app/dist /app/dist
|
|
||||||
|
|
||||||
RUN npx prettier . --check
|
COPY --from=build /app/dist .
|
||||||
RUN npx cspell .
|
|
||||||
RUN npm run test
|
|
||||||
RUN npm run e2e-test
|
|
||||||
|
|
||||||
FROM nginx:alpine AS runtime
|
|
||||||
|
|
||||||
COPY ./nginx/nginx.conf /etc/nginx/nginx.conf
|
|
||||||
COPY --from=build /app/dist /usr/share/nginx/html
|
|
||||||
|
|
||||||
RUN chown -R nginx:nginx /usr/share/nginx/html
|
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
76
Makefile
@@ -5,18 +5,7 @@
|
|||||||
fix \
|
fix \
|
||||||
astro_upgrade \
|
astro_upgrade \
|
||||||
build \
|
build \
|
||||||
dev \
|
dev
|
||||||
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
|
||||||
|
|
||||||
@@ -35,66 +24,3 @@ build:
|
|||||||
dev:
|
dev:
|
||||||
npm run dev
|
npm run dev
|
||||||
|
|
||||||
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,3 +1,48 @@
|
|||||||
# Corwin Perren's Personal Portfolio Website
|
# Astro Starter Kit: Basics
|
||||||
|
|
||||||
Check the Makefile and/or package.json for the commands needed to build and run this project.
|
```sh
|
||||||
|
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,32 +1,18 @@
|
|||||||
// @ts-check
|
// @ts-check
|
||||||
import sitemap from "@astrojs/sitemap";
|
import { defineConfig } from 'astro/config';
|
||||||
|
import rehypeAstroRelativeMarkdownLinks from "astro-rehype-relative-markdown-links";
|
||||||
|
|
||||||
import tailwindcss from "@tailwindcss/vite";
|
import tailwindcss from "@tailwindcss/vite";
|
||||||
import { defineConfig } from "astro/config";
|
|
||||||
|
|
||||||
// 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);
|
|
||||||
|
|
||||||
// https://astro.build/config
|
// https://astro.build/config
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
site: "https://caperren.com",
|
integrations: [],
|
||||||
trailingSlash: "never",
|
|
||||||
prefetch: {
|
markdown: {
|
||||||
prefetchAll: true,
|
rehypePlugins: [rehypeAstroRelativeMarkdownLinks],
|
||||||
},
|
},
|
||||||
integrations: [
|
|
||||||
sitemap({
|
|
||||||
filter: (pagePath) =>
|
|
||||||
!disabledPaths.some((disabledPath) => pagePath.includes(disabledPath)),
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
vite: {
|
vite: {
|
||||||
plugins: [
|
plugins: [tailwindcss()],
|
||||||
// @ts-ignore
|
|
||||||
tailwindcss(),
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
23
cspell.json
@@ -1,23 +0,0 @@
|
|||||||
{
|
|
||||||
"$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,35 +0,0 @@
|
|||||||
worker_processes 4;
|
|
||||||
|
|
||||||
events {
|
|
||||||
worker_connections 1024;
|
|
||||||
}
|
|
||||||
|
|
||||||
http {
|
|
||||||
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=my_cache:10m max_size=1g inactive=60m use_temp_path=off;
|
|
||||||
|
|
||||||
server {
|
|
||||||
listen 80;
|
|
||||||
server_name _;
|
|
||||||
|
|
||||||
root /usr/share/nginx/html;
|
|
||||||
index index.html index.htm;
|
|
||||||
include /etc/nginx/mime.types;
|
|
||||||
|
|
||||||
gzip on;
|
|
||||||
gzip_proxied any;
|
|
||||||
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
|
||||||
|
|
||||||
error_page 404 /404.html;
|
|
||||||
location = /404.html {
|
|
||||||
root /usr/share/nginx/html;
|
|
||||||
internal;
|
|
||||||
}
|
|
||||||
|
|
||||||
location / {
|
|
||||||
proxy_cache my_cache;
|
|
||||||
proxy_cache_valid 200 1h;
|
|
||||||
|
|
||||||
try_files $uri $uri/index.html =404;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
4308
package-lock.json
generated
29
package.json
@@ -1,35 +1,18 @@
|
|||||||
{
|
{
|
||||||
"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",
|
|
||||||
"build": "astro build",
|
"build": "astro build",
|
||||||
"preview": "astro preview",
|
"preview": "astro preview",
|
||||||
"astro": "astro",
|
"astro": "astro"
|
||||||
"test": "vitest",
|
|
||||||
"e2e-test": "playwright test"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@astrojs/sitemap": "^3.6.0",
|
|
||||||
"@tailwindcss/vite": "^4.1.11",
|
"@tailwindcss/vite": "^4.1.11",
|
||||||
"astro": "^5.16.3",
|
"astro": "^5.11.0",
|
||||||
"flowbite": "^3.1.2",
|
"astro-navbar": "^2.4.0",
|
||||||
"leader-line-new": "^1.1.9",
|
"astro-rehype-relative-markdown-links": "^0.18.1",
|
||||||
"luxon": "^3.7.2",
|
"tailwindcss": "^4.1.11"
|
||||||
"tailwindcss": "^4.1.11",
|
|
||||||
"uuid": "^13.0.0"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@playwright/test": "^1.56.1",
|
|
||||||
"@trivago/prettier-plugin-sort-imports": "^6.0.0",
|
|
||||||
"@types/luxon": "^3.7.1",
|
|
||||||
"@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"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,80 +0,0 @@
|
|||||||
import { defineConfig, devices } from "@playwright/test";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Read environment variables from file.
|
|
||||||
* https://github.com/motdotla/dotenv
|
|
||||||
*/
|
|
||||||
// import dotenv from 'dotenv';
|
|
||||||
// import path from 'path';
|
|
||||||
// dotenv.config({ path: path.resolve(__dirname, '.env') });
|
|
||||||
|
|
||||||
/**
|
|
||||||
* See https://playwright.dev/docs/test-configuration.
|
|
||||||
*/
|
|
||||||
export default defineConfig({
|
|
||||||
testDir: "./test-e2e",
|
|
||||||
/* Run tests in files in parallel */
|
|
||||||
fullyParallel: true,
|
|
||||||
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
|
||||||
forbidOnly: !!process.env.CI,
|
|
||||||
/* Retry on CI only */
|
|
||||||
retries: process.env.CI ? 2 : 0,
|
|
||||||
/* Opt out of parallel tests on CI. */
|
|
||||||
workers: process.env.CI ? 1 : undefined,
|
|
||||||
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
|
||||||
reporter: "html",
|
|
||||||
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
|
||||||
use: {
|
|
||||||
/* Base URL to use in actions like `await page.goto('')`. */
|
|
||||||
baseURL: "http://localhost:4321",
|
|
||||||
|
|
||||||
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
|
||||||
trace: "on-first-retry",
|
|
||||||
},
|
|
||||||
|
|
||||||
/* Configure projects for major browsers */
|
|
||||||
projects: [
|
|
||||||
{
|
|
||||||
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,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
@@ -1,96 +0,0 @@
|
|||||||
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
|
|
||||||
|
Before Width: | Height: | Size: 308 B |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 500 B |
|
Before Width: | Height: | Size: 785 B |
|
Before Width: | Height: | Size: 18 KiB |
BIN
public/favicon.png
Normal file
|
After Width: | Height: | Size: 662 B |
|
Before Width: | Height: | Size: 3.2 MiB |
|
Before Width: | Height: | Size: 3.7 MiB |
|
Before Width: | Height: | Size: 5.0 MiB |
|
Before Width: | Height: | Size: 3.1 MiB |
|
Before Width: | Height: | Size: 2.6 MiB |
|
Before Width: | Height: | Size: 4.2 MiB |
|
Before Width: | Height: | Size: 4.1 MiB |
|
Before Width: | Height: | Size: 2.6 MiB |
|
Before Width: | Height: | Size: 5.1 MiB |
|
Before Width: | Height: | Size: 2.5 MiB |
|
Before Width: | Height: | Size: 4.1 MiB |
|
Before Width: | Height: | Size: 5.1 MiB |
|
Before Width: | Height: | Size: 6.8 MiB |
|
Before Width: | Height: | Size: 5.0 MiB |
|
Before Width: | Height: | Size: 2.7 MiB |
|
Before Width: | Height: | Size: 3.3 MiB |
|
Before Width: | Height: | Size: 3.9 MiB |
|
Before Width: | Height: | Size: 851 KiB |
|
Before Width: | Height: | Size: 3.9 MiB |
|
Before Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 2.6 MiB |
|
Before Width: | Height: | Size: 3.9 MiB |
|
Before Width: | Height: | Size: 902 KiB |
|
Before Width: | Height: | Size: 2.3 MiB |
|
Before Width: | Height: | Size: 2.7 MiB |
|
Before Width: | Height: | Size: 10 MiB |
|
Before Width: | Height: | Size: 1.9 MiB |
|
Before Width: | Height: | Size: 3.3 MiB |
|
Before Width: | Height: | Size: 10 MiB |
|
Before Width: | Height: | Size: 1.9 MiB |
|
Before Width: | Height: | Size: 10 MiB |
|
Before Width: | Height: | Size: 14 MiB |
|
Before Width: | Height: | Size: 12 MiB |
|
Before Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 4.7 MiB |
|
Before Width: | Height: | Size: 1.8 MiB |
|
Before Width: | Height: | Size: 4.0 MiB |
|
Before Width: | Height: | Size: 3.5 MiB |
|
Before Width: | Height: | Size: 4.0 MiB |
|
Before Width: | Height: | Size: 3.1 MiB |
|
Before Width: | Height: | Size: 3.6 MiB |
|
Before Width: | Height: | Size: 4.2 MiB |
|
Before Width: | Height: | Size: 3.7 MiB |
|
Before Width: | Height: | Size: 7.7 MiB |
|
Before Width: | Height: | Size: 7.3 MiB |
|
Before Width: | Height: | Size: 8.3 MiB |
|
Before Width: | Height: | Size: 7.6 MiB |
|
Before Width: | Height: | Size: 4.4 MiB |
|
Before Width: | Height: | Size: 3.5 MiB |
|
Before Width: | Height: | Size: 3.8 MiB |
|
Before Width: | Height: | Size: 4.1 MiB |
|
Before Width: | Height: | Size: 166 KiB |
|
Before Width: | Height: | Size: 239 KiB |
|
Before Width: | Height: | Size: 3.8 MiB |
|
Before Width: | Height: | Size: 3.9 MiB |
|
Before Width: | Height: | Size: 4.6 MiB |
|
Before Width: | Height: | Size: 4.2 MiB |
|
Before Width: | Height: | Size: 4.2 MiB |
|
Before Width: | Height: | Size: 4.3 MiB |
|
Before Width: | Height: | Size: 4.4 MiB |
|
Before Width: | Height: | Size: 4.4 MiB |
|
Before Width: | Height: | Size: 6.4 MiB |
|
Before Width: | Height: | Size: 7.9 MiB |
|
Before Width: | Height: | Size: 8.9 MiB |
|
Before Width: | Height: | Size: 8.7 MiB |
|
Before Width: | Height: | Size: 7.8 MiB |
|
Before Width: | Height: | Size: 5.9 MiB |
|
Before Width: | Height: | Size: 9.2 MiB |
|
Before Width: | Height: | Size: 4.2 MiB |