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
4 changes: 2 additions & 2 deletions e2e/support/siteContracts.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getProjectPath } from 'app/routePaths';
import { PROJECTS } from 'features/Projects/projectsData';
import { getProjectRoutePath } from 'features/Projects/projectUtils';

export type TopLevelPageContract = {
route: string;
Expand Down Expand Up @@ -119,7 +119,7 @@ export const PROJECT_ROUTE_CONTRACTS: readonly ProjectRouteContract[] =
PROJECTS.map((project) => ({
name: project.name,
repo: project.repo,
route: getProjectRoutePath(project.repo),
route: getProjectPath(project.repo),
})).sort((left, right) => left.route.localeCompare(right.route));

export const PROJECT_ROUTES = PROJECT_ROUTE_CONTRACTS.map(({ route }) => route);
Expand Down
3 changes: 3 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,10 @@ export default defineConfig(
},
{
files: [
'src/utils/build/cspCompatibility.ts',
'src/utils/build/fetchGithubData.ts',
'src/utils/build/inlineCss.ts',
'src/utils/build/transformImagePaths.ts',
'src/utils/build/validateBuiltHtmlCsp.ts',
'e2e/support/serveDistClient.ts',
],
Expand Down
5 changes: 0 additions & 5 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ for = "/media/projects/*.webm"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"

[[redirects]]
from = "/robots.txt"
to = "/robots.txt"
status = 200

# Redirects for legacy portfolio routes to support old links
[[redirects]]
from = "/portfolio"
Comment on lines 42 to 47
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the explicit /robots.txt rewrite may cause /robots.txt to be caught by the generic /:path 301 redirects later in this file (depending on Netlify’s redirect precedence) and end up redirecting to / instead of serving the static public/robots.txt. Please verify Netlify still serves the file as-is in production; if not, reintroduce a higher-priority rule for /robots.txt (status 200 rewrite) or adjust the catch-all redirects to exclude it.

Copilot uses AI. Check for mistakes.
Expand Down
41 changes: 41 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"@testing-library/dom": "^10.4.1",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.2",
"@types/jsdom": "^28.0.1",
"@types/node": "^25.5.0",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
Expand Down
7 changes: 6 additions & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ const ciWorkerCount = parseWorkerCount(
process.env.PLAYWRIGHT_CI_WORKERS,
4,
);
const localWorkerCount = parseWorkerCount(
'PLAYWRIGHT_LOCAL_WORKERS',
process.env.PLAYWRIGHT_LOCAL_WORKERS,
4,
);
const remoteCiWorkerCount = parseWorkerCount(
'PLAYWRIGHT_REMOTE_CI_WORKERS',
process.env.PLAYWRIGHT_REMOTE_CI_WORKERS,
Expand All @@ -82,7 +87,7 @@ export default defineConfig({
: 1
: process.env.CI
? ciWorkerCount
: undefined,
: localWorkerCount,
reporter: reporters,
use: {
baseURL: E2E_BASE_URL,
Expand Down
2 changes: 2 additions & 0 deletions src/app/appConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ export const PRODUCTION_OG_IMAGES_DIRECTORY =
'https://piech.dev/media/projects/og_images/';

export const SILENT_CAPTIONS_TRACK_PATH = '/media/captions/silent.vtt';

export const PROJECT_DATE_FORMAT = 'MMMM yyyy';
8 changes: 6 additions & 2 deletions src/app/siteLinks.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
export const GITHUB_OWNER = 'Tenemo';

const GITHUB_BASE_URL = `https://github.com/${GITHUB_OWNER}`;

export const SITE_LINKS = {
home: 'https://piech.dev/',
emailAddress: 'piotr@piech.dev',
email: 'mailto:piotr@piech.dev',
githubProfile: 'https://github.com/Tenemo',
githubRepo: 'https://github.com/Tenemo/piech.dev',
githubProfile: GITHUB_BASE_URL,
githubRepo: `${GITHUB_BASE_URL}/piech.dev`,
linkedin: 'https://www.linkedin.com/in/ppiech',
telegram: 'https://t.me/tenemo',
} as const;
11 changes: 7 additions & 4 deletions src/features/Projects/ProjectCard/ProjectCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ import React from 'react';
import { Link } from 'react-router';

import type { ProjectPreviewAsset } from '../projectsData';
import { getProjectRoutePath } from '../projectUtils';
import type { TechnologyName } from '../technologies';

import styles from './projectCard.module.scss';
import ProjectTechnologies from './ProjectTechnologies/ProjectTechnologies';

import { SILENT_CAPTIONS_TRACK_PATH } from 'app/appConstants';
import {
PROJECT_DATE_FORMAT,
SILENT_CAPTIONS_TRACK_PATH,
} from 'app/appConstants';
import { getProjectPath } from 'app/routePaths';
import { OpenInNewIcon } from 'components/Icons';
import { repositoriesData } from 'utils/data/githubData';

Expand All @@ -30,11 +33,11 @@ const ProjectCard = ({
prioritizePreview = false,
technologies,
}: ProjectCardProps): React.JSX.Element => {
const projectPath = getProjectRoutePath(repo);
const projectPath = getProjectPath(repo);
const repositoryInfo = repositoriesData[repo];
const createdIso = repositoryInfo?.createdDatetime;
const createdLabel = createdIso
? format(new Date(createdIso), 'MMMM yyyy')
? format(new Date(createdIso), PROJECT_DATE_FORMAT)
: undefined;

const previewSrc = `/media/projects/${projectPreview.fileName}`;
Expand Down
4 changes: 2 additions & 2 deletions src/features/Projects/ProjectItem/ProjectItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import ProjectMarkdown from './ProjectMarkdown/ProjectMarkdown';

import { MAIN_CONTENT_ID } from 'app/accessibility';
import { PROJECTS_PATH } from 'app/routePaths';
import { SITE_LINKS } from 'app/siteLinks';
import { GITHUB_OWNER, SITE_LINKS } from 'app/siteLinks';
import { ArrowBackIcon, GitHubIcon } from 'components/Icons';
import { repositoriesData } from 'utils/data/githubData';

Expand Down Expand Up @@ -37,7 +37,7 @@ const ProjectItemDetails: React.FC = (): React.JSX.Element => {
target="_blank"
title={`View ${repo} on GitHub`}
>
<GitHubIcon /> github.com/tenemo/{repo}
<GitHubIcon /> github.com/{GITHUB_OWNER}/{repo}
</a>
</div>
<ProjectMarkdown markdown={markdown} repo={repo} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import ProjectMarkdown from './ProjectMarkdown';
import styles from './projectMarkdown.module.scss';

import { SILENT_CAPTIONS_TRACK_PATH } from 'app/appConstants';
import { GITHUB_OWNER } from 'app/siteLinks';

describe('ProjectMarkdown', () => {
it('renders basic markdown content', () => {
Expand Down Expand Up @@ -86,11 +87,11 @@ describe('ProjectMarkdown', () => {

expect(screen.getByAltText('Test Image')).toHaveAttribute(
'src',
'https://github.com/tenemo/test-repo/blob/main/media/test.webp?raw=true',
`https://github.com/${GITHUB_OWNER}/test-repo/blob/main/media/test.webp?raw=true`,
);
expect(screen.getByText('Test Link')).toHaveAttribute(
'href',
'https://github.com/tenemo/test-repo/blob/main/src/index.ts',
`https://github.com/${GITHUB_OWNER}/test-repo/blob/main/src/index.ts`,
);
});

Expand Down Expand Up @@ -187,7 +188,7 @@ describe('ProjectMarkdown', () => {
expect(container.querySelector('script')).not.toBeInTheDocument();
expect(screen.getByAltText('Safe image')).toHaveAttribute(
'src',
'https://github.com/tenemo/test-repo/blob/main/media/test.webp?raw=true',
`https://github.com/${GITHUB_OWNER}/test-repo/blob/main/media/test.webp?raw=true`,
);
expect(screen.getByAltText('Safe image')).not.toHaveAttribute(
'onerror',
Expand Down
Loading
Loading