From 48946aba2aadd17b0fc76d0138f32879eb8f71e1 Mon Sep 17 00:00:00 2001 From: Kevin Brown Date: Sun, 7 Dec 2025 16:45:07 +0300 Subject: [PATCH 01/21] Lint fixes --- .vscode/settings.json | 8 + _TODO.md | 148 +++++++++++++++++- src/components/Avatar/README.md | 51 ------ src/components/Brand/index.astro | 2 +- .../Layout/Markdown/Tags/index.astro | 2 +- src/content/articles/demo/index.mdx | 2 +- .../getting-started-with-astro/index.md | 2 +- src/layouts/BaseLayout.astro | 3 +- src/lib/config/markdown.ts | 72 +++++++-- src/pages/about/index.astro | 82 +++++----- src/pages/articles/[...slug].astro | 7 +- .../upstash/local-proxy/internal/rest.go | 8 +- 12 files changed, 263 insertions(+), 124 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 85a9a09d0..3dd3ddb00 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -31,11 +31,13 @@ "Fedibird", "Fediverse", "finnadie", + "firko", "Flink", "FNAME", "fosstodon", "FOUC", "glidejs", + "gomodule", "GSAP", "hocho", "Hudi", @@ -76,7 +78,12 @@ "pleroma", "Poslovski", "Postg", + "postgrest", + "psql", + "qpart", + "qparts", "Qualys", + "redigo", "registrator", "repost", "reposts", @@ -108,6 +115,7 @@ "unstub", "uppy", "uuidv", + "valyala", "Veeam", "vercel", "virt", diff --git a/_TODO.md b/_TODO.md index 203f11f57..173510204 100644 --- a/_TODO.md +++ b/_TODO.md @@ -38,10 +38,6 @@ Lunr is a JS search library using an inverted index. Client-side search for stat Right now we're using string literals to define HTML email templates for site mails. We should use Nunjucks with the rule-checking for valid CSS in HTML emails like we have in the corporate email footer repo. -## @TODO: Provide button to turn off animation in Hero - -"Scaling/zooming animations are problematic for accessibility, as they are a common trigger for certain types of migraine. If you need to include such animations on your website, you should provide a control to allow users to turn off animations, preferably site-wide. Also, consider making use of the prefers-reduced-motion media feature β€” use it to write a media query that will turn off animations if the user has reduced animation specified in their system preferences. " - ## Color vars brand primary: #001733 @@ -107,6 +103,150 @@ npm i -D check-html-links npx check-html-links _site `https://github.com/modernweb-dev/rocket/tree/main/packages/check-html-links` +14:58:58 [ERROR] [astro-link-validator] ❌ Found 41 broken links: +\nπŸ“„ articles/demo/index.html: + πŸ”— /sections/Technology + File not found: sections/Technology + Text: "Technology" + πŸ“¦ ./demo-image.jpg + File not found: articles/demo/demo-image.jpg + Text: "Demo slide 1" + πŸ“¦ ./demo-image.jpg + File not found: articles/demo/demo-image.jpg + Text: "Demo slide 2" + πŸ“¦ ./demo-image.jpg + File not found: articles/demo/demo-image.jpg + Text: "Demo slide 3" +\nπŸ“„ articles/getting-started-with-astro/index.html: + πŸ”— /sections/Technology + File not found: sections/Technology + Text: "Technology" +\nπŸ“„ articles/typescript-best-practices/index.html: + πŸ”— /sections/Technology + File not found: sections/Technology + Text: "Technology" +\nπŸ“„ articles/useful-vs-code-extensions/index.html: + πŸ”— /sections/Technology + File not found: sections/Technology + Text: "Technology" +\nπŸ“„ articles/writing-library-code/index.html: + πŸ”— /sections/Technology + File not found: sections/Technology + Text: "Technology" +\nπŸ“„ case-studies/division-15/index.html: + πŸ”— /sections/Case Studies + File not found: sections/Case Studies + Text: "Case Studies" +\nπŸ“„ case-studies/ecommerce-modernization/index.html: + πŸ”— /sections/Case Studies + File not found: sections/Case Studies + Text: "Case Studies" +\nπŸ“„ case-studies/english-first/index.html: + πŸ”— /sections/Case Studies + File not found: sections/Case Studies + Text: "Case Studies" +\nπŸ“„ case-studies/enterprise-api-platform/index.html: + πŸ”— /sections/Case Studies + File not found: sections/Case Studies + Text: "Case Studies" +\nπŸ“„ case-studies/labcorp/index.html: + πŸ”— /sections/Case Studies + File not found: sections/Case Studies + Text: "Case Studies" +\nπŸ“„ case-studies/us-logistics/index.html: + πŸ”— /sections/Case Studies + File not found: sections/Case Studies + Text: "Case Studies" +\nπŸ“„ downloads/api-tool-consolidation-whitepaper/index.html: + πŸ”— /tags/devPortals + File not found: tags/devPortals + Text: "devPortals" + πŸ”— /tags/restful + File not found: tags/restful + Text: "restful" + πŸ”— /sections/Resources + File not found: sections/Resources + Text: "Resources" + πŸ“¦ /assets/images/downloads/api-tool-consolidation.jpg + File not found: assets/images/downloads/api-tool-consolidation.jpg + Text: "API Tool Consolidation Guide cover with modern design showing connected tools and APIs" +\nπŸ“„ downloads/identity-security-for-dummies/index.html: + πŸ”— /tags/aws + File not found: tags/aws + Text: "aws" + πŸ”— /tags/devPortals + File not found: tags/devPortals + Text: "devPortals" + πŸ”— /sections/Resources + File not found: sections/Resources + Text: "Resources" + πŸ“¦ /assets/images/downloads/identity-security-dummies.jpg + File not found: assets/images/downloads/identity-security-dummies.jpg + Text: "Identity Security for Dummies book cover with friendly design and security icons" +\nπŸ“„ downloads/lakehouse-analytics-guide/index.html: + πŸ”— /tags/aws + File not found: tags/aws + Text: "aws" + πŸ”— /tags/databaseNormalization + File not found: tags/databaseNormalization + Text: "databaseNormalization" + πŸ”— /tags/sqlOptimization + File not found: tags/sqlOptimization + Text: "sqlOptimization" + πŸ”— /sections/Resources + File not found: sections/Resources + Text: "Resources" + πŸ“¦ /assets/images/downloads/lakehouse-analytics-guide.jpg + File not found: assets/images/downloads/lakehouse-analytics-guide.jpg + Text: "Lakehouse Analytics Guide cover showing unified data architecture diagram" +\nπŸ“„ downloads/observability-benefits-guide/index.html: + πŸ”— /tags/aws + File not found: tags/aws + Text: "aws" + πŸ”— /tags/deployment + File not found: tags/deployment + Text: "deployment" + πŸ”— /tags/devPortals + File not found: tags/devPortals + Text: "devPortals" + πŸ”— /sections/Resources + File not found: sections/Resources + Text: "Resources" + πŸ“¦ /assets/images/downloads/observability-benefits.jpg + File not found: assets/images/downloads/observability-benefits.jpg + Text: "End-to-End Observability ebook cover with distributed systems visualization" +\nπŸ“„ downloads/ransomware-recovery-kit/index.html: + πŸ”— /tags/aws + File not found: tags/aws + Text: "aws" + πŸ”— /tags/deployment + File not found: tags/deployment + Text: "deployment" + πŸ”— /tags/ci + File not found: tags/ci + Text: "ci" + πŸ”— /sections/Resources + File not found: sections/Resources + Text: "Resources" + πŸ“¦ /assets/images/downloads/ransomware-recovery-kit.jpg + File not found: assets/images/downloads/ransomware-recovery-kit.jpg + Text: "Ransomware Recovery Kit cover showing security shield and data protection elements" +\nπŸ“„ index.html: + πŸ”— /services/web-development + File not found: services/web-development + Text: "Improve Your Product" + πŸ”— /services/consulting + File not found: services/consulting + Text: "Start from scratch" +\nπŸ“„ services/create-custom-font-sets/index.html: + πŸ”— /sections/Services + File not found: sections/Services + Text: "Services" +\nπŸ“„ services/overview/index.html: + πŸ”— /sections/Services + File not found: sections/Services + Text: "Services" + ## Social Media Preview Cards Looking at the social-card endpoint implementation, it's designed to work with third-party screenshot services, not the social networks themselves. diff --git a/src/components/Avatar/README.md b/src/components/Avatar/README.md index 4c014627a..7ed480e3b 100644 --- a/src/components/Avatar/README.md +++ b/src/components/Avatar/README.md @@ -2,16 +2,6 @@ A reusable Avatar component for displaying user/author avatar images with automatic fallback to initials. -## Features - -- βœ… Displays avatar images from the avatars directory -- βœ… Automatic name normalization (e.g., "Chris Southam" β†’ "chris-southam") -- βœ… Automatic fallback to initial placeholder if image doesn't exist -- βœ… Renders nothing if name is not provided -- βœ… Singleton pattern for efficient image loading -- βœ… Type-safe with TypeScript -- βœ… Lazy loading by default - ## Usage ```astro @@ -32,13 +22,6 @@ import Avatar from '@components/Avatar/index.astro' /> ``` -## Props - -| Prop | Type | Required | Description | -|---------|----------|----------|------------------------------------------------------------------| -| `name` | `string` | Yes | The person's name (automatically normalized for filename lookup) | -| `class` | `string` | No | Additional CSS classes to apply to the container | - ## Name Normalization The component automatically normalizes names to match avatar filenames: @@ -54,43 +37,9 @@ The normalization process: 3. Replaces spaces with hyphens 4. Removes non-alphanumeric characters (except hyphens) -## File Structure - -```text -src/components/Avatar/ -β”œβ”€β”€ index.astro # Main Avatar component -β”œβ”€β”€ avatars.ts # Avatar Manager singleton for loading images -└── README.md # This file -``` - ## Adding New Avatars 1. Add image files to `src/assets/images/avatars/` 2. Supported formats: `.webp`, `.jpg`, `.png` 3. Naming convention: Use kebab-case (e.g., `kevin-brown.webp`) 4. The Avatar Manager will automatically detect and load them - -## Styling - -The component renders with the following structure: - -```html -
- - Photo of Name - - -
- K -
-
-``` - -You can style these classes in your CSS or pass custom Tailwind classes via the `class` prop. - -## Performance - -- **Singleton Pattern**: The `import.meta.glob` operation runs only once -- **Lazy Loading**: Images are lazy-loaded by default -- **Immutable Cache**: Avatar map is frozen to prevent accidental modifications -- **Efficient Lookups**: O(1) lookup time for avatar images diff --git a/src/components/Brand/index.astro b/src/components/Brand/index.astro index ca4fd2c96..b37e870aa 100644 --- a/src/components/Brand/index.astro +++ b/src/components/Brand/index.astro @@ -14,7 +14,7 @@ import WordmarkWebstack from '@components/Brand/WordmarkWebstack.astro' aria-label="Go To Homepage" > diff --git a/src/components/Layout/Markdown/Tags/index.astro b/src/components/Layout/Markdown/Tags/index.astro index d30f3ba3d..d611d5a54 100644 --- a/src/components/Layout/Markdown/Tags/index.astro +++ b/src/components/Layout/Markdown/Tags/index.astro @@ -13,7 +13,7 @@ const { tags } = Astro.props href={`/tags/${tag}`} rel="tag" itemprop="keywords" - class="inline-block px-2 py-0.5 bg-[var(--color-surface-raised)] rounded text-xs no-underline transition-colors hover:bg-[var(--color-primary)] hover:text-[var(--color-on-primary)] focus:bg-[var(--color-primary)] focus:text-[var(--color-on-primary)]" + class="inline-block px-2 py-0.5 bg-surface-raised rounded text-xs no-underline transition-colors hover:bg-primary hover:text-primary focus:bg-primary focus:text-primary" > {tag} diff --git a/src/content/articles/demo/index.mdx b/src/content/articles/demo/index.mdx index c54196c75..0e7bcb4a0 100644 --- a/src/content/articles/demo/index.mdx +++ b/src/content/articles/demo/index.mdx @@ -11,7 +11,7 @@ isDraft: true featured: false --- -## Welcome to the Demo Article +## Introduction This article serves as a comprehensive demonstration of all available components in our markdown system. Each section below showcases a different component with example usage. diff --git a/src/content/articles/getting-started-with-astro/index.md b/src/content/articles/getting-started-with-astro/index.md index 03aaa2341..b1b65e0d0 100644 --- a/src/content/articles/getting-started-with-astro/index.md +++ b/src/content/articles/getting-started-with-astro/index.md @@ -38,7 +38,7 @@ Follow the prompts to set up your project with your preferred configuration. A typical Astro project structure looks like this: -``` +```bash / β”œβ”€β”€ public/ β”‚ └── favicon.svg diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index 3ca8ec0ef..a9b2394e0 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -89,11 +89,10 @@ const {
- {/* Main page content */} + {/* SLOT: default (unnamed) - Main page content */} - {/* Site footer - Preact component */}