diff --git a/.forgejo/workflows/deploy.yml b/.forgejo/workflows/deploy.yml index a83df4a..07a7185 100644 --- a/.forgejo/workflows/deploy.yml +++ b/.forgejo/workflows/deploy.yml @@ -38,7 +38,7 @@ jobs: - name: Typecheck run: npm run typecheck - - name: Build, Astro Audit & QA + - name: Build & QA run: | npx playwright install chromium npm run qa @@ -49,10 +49,3 @@ jobs: apt update && apt install -y rsync mkdir -p /pages rsync -a --delete dist/ /pages/schmelczer-dev - - - name: Copy build to staging pages mount - if: github.event_name == 'pull_request' - run: | - apt update && apt install -y rsync - mkdir -p /pages - rsync -a --delete dist/ /pages/schmelczer-dev-staging diff --git a/README.md b/README.md index 64893ae..26b3a2e 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,16 @@ # schmelczer.dev -Engineering writeups by Andras Schmelczer: finished projects with the design constraints left in. Built with Astro, no required client JavaScript. +A static personal blog for Andras Schmelczer, built with Astro. -Articles live in `src/content/posts`, project index entries in `src/content/projects`, and normal pages are rendered as static HTML. +The site is article-first: articles live in `src/content/posts`, project index entries +live in `src/content/projects`, and normal pages are rendered as static HTML with no +required client JavaScript. ## Setup ```sh npm ci -npx playwright install --with-deps chromium # required before Playwright QA checks +npx playwright install --with-deps chromium # required before `npm run qa:overflow` ``` ## Commands diff --git a/astro.config.mjs b/astro.config.mjs index 93a9357..56c2b91 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -62,20 +62,8 @@ export default defineConfig({ ], image: { service: { entrypoint: 'astro/assets/services/sharp' }, - // SVG sources in src/content/**/_assets are author-controlled. - dangerouslyProcessSVG: true, }, vite: { - // Pre-bundle the analytics tracker during dev server startup. It is only - // referenced from a client ` diff --git a/src/components/ArticleList.astro b/src/components/ArticleList.astro index d2d3f9e..791686e 100644 --- a/src/components/ArticleList.astro +++ b/src/components/ArticleList.astro @@ -8,28 +8,19 @@ interface Props { posts: CollectionEntry<'posts'>[]; showYear?: boolean; tagLimit?: number; - timeline?: boolean; - // Opt-in: eagerly load thumbnails that are reliably above the fold. Lists - // below substantial content (related, about, 404) should leave this at zero. + // Opt-in: eagerly load the first thumbnail. Only set when the list is + // reliably above the fold (home, tag pages). Lists below substantial + // content (related, archives by year, 404) should leave this off. eagerFirstThumbnail?: boolean; - eagerThumbnailCount?: number; } -const { - posts, - showYear = true, - tagLimit = 3, - timeline = false, - eagerFirstThumbnail = false, - eagerThumbnailCount = eagerFirstThumbnail ? 1 : 0, -} = Astro.props; +const { posts, showYear = true, tagLimit = 3, eagerFirstThumbnail = false } = Astro.props; --- -
    +
      { posts.map((post, index) => { const href = articlePath(post); - const eager = index < eagerThumbnailCount; return (
    1. @@ -52,8 +43,8 @@ const { widths={ARTICLE_THUMBNAIL.widths} sizes={ARTICLE_THUMBNAIL.sizes} ariaLabel={`Open article: ${post.data.title}`} - loading={eager ? 'eager' : 'lazy'} - fetchpriority={eager && index === 0 ? 'high' : undefined} + loading={eagerFirstThumbnail && index === 0 ? 'eager' : 'lazy'} + fetchpriority={eagerFirstThumbnail && index === 0 ? 'high' : undefined} />
    2. ); diff --git a/src/components/EntryThumbnail.astro b/src/components/EntryThumbnail.astro index 750de48..90eae9e 100644 --- a/src/components/EntryThumbnail.astro +++ b/src/components/EntryThumbnail.astro @@ -49,7 +49,6 @@ const isDecorativeLink = Boolean(href) && decorative; fallbackFormat="jpg" widths={widths} sizes={sizes} - quality="high" loading={loading} decoding="async" fetchpriority={fetchpriority} diff --git a/src/components/Footer.astro b/src/components/Footer.astro index 8834892..45f2c8f 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -1,17 +1,27 @@ --- -import { site } from '../lib/site'; +import { navItems, site } from '../lib/site'; const year = new Date().getFullYear(); + +// Footer shows all nav items except Home (which is implicit via the site title). +const footerNavItems = navItems.filter((item) => item.href !== '/'); ---