Skip to content

Commit e37b453

Browse files
authored
Merge pull request #500 from webstackdev/infrastructure/add-check-links-integration
Infrastructure/add check links integration
2 parents 575f9db + b387643 commit e37b453

110 files changed

Lines changed: 1471 additions & 1469 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cache/pages.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,25 @@
2525
"privacy": ["my-data"]
2626
},
2727
{
28-
"services": ["create-custom-font-sets", "overview"]
28+
"services": ["consulting", "overview", "web-development"]
2929
},
3030
{
3131
"tags": [
3232
"apiDesign",
33+
"aws",
34+
"ci",
3335
"cms",
3436
"code",
3537
"crm",
38+
"databaseNormalization",
39+
"deployment",
40+
"devPortals",
3641
"graphql",
3742
"online-learning",
3843
"react",
44+
"restful",
3945
"services",
46+
"sqlOptimization",
4047
"typescript"
4148
]
4249
}

.github/instructions/general.instructions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ applyTo: "**"
1919
- Always create TypeScript files, not JavaScript files.
2020
- Prefer destructured imports over namespace imports when importing specific functions from modules (e.g., `import { resolve } from 'path'` instead of `import * as path from 'path'`).
2121
- Do not access nanostore observables (e.g., `$consent`) directly from components; expose helper/action methods in `@components/scripts/store` and import those instead.
22+
- Preact exists only for the Markdown E2E harness under `src/lib/markdown/__tests__/e2e`; all production UI components must use Lit web components instead of Preact.
2223

2324
# Code Organization and Directory Structure
2425

.github/workflows/test.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,9 @@ jobs:
7979
- name: Install dependencies
8080
run: npm ci --legacy-peer-deps
8181

82-
- name: Sync Astro types
83-
run: npm run sync
84-
85-
- name: Run Astro check
86-
run: npm run check
82+
# Astro build runs sync, check, and integrations including verify links
83+
- name: Verify green build
84+
run: npm run build
8785

8886
- name: Run unit tests (Vitest — coverage with GitHub Actions reporter)
8987
id: vitest

.husky/pre-commit

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ fi
1818
# Run lint suite (includes TypeScript check + ESLint + Stylelint + JSON formatting)
1919
npm run lint
2020

21+
# Make sure types are sync'ed before commit
22+
npm run sync
23+
2124
# Verify branch naming convention
2225
.husky/scripts/check-branch-name.sh
2326

.vscode/settings.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,14 @@
3131
"Fedibird",
3232
"Fediverse",
3333
"finnadie",
34+
"firko",
3435
"Flink",
3536
"FNAME",
3637
"fosstodon",
3738
"FOUC",
39+
"fprintf",
3840
"glidejs",
41+
"gomodule",
3942
"GSAP",
4043
"hocho",
4144
"Hudi",
@@ -76,7 +79,12 @@
7679
"pleroma",
7780
"Poslovski",
7881
"Postg",
82+
"postgrest",
83+
"psql",
84+
"qpart",
85+
"qparts",
7986
"Qualys",
87+
"redigo",
8088
"registrator",
8189
"repost",
8290
"reposts",
@@ -103,11 +111,13 @@
103111
"tsdoc",
104112
"tseslint",
105113
"tshirt",
114+
"Turso",
106115
"tydata",
107116
"unspaced",
108117
"unstub",
109118
"uppy",
110119
"uuidv",
120+
"valyala",
111121
"Veeam",
112122
"vercel",
113123
"virt",

_TODO.md

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
<!-- markdownlint-disable-file -->
22
# TODO
33

4+
## Fix E2E mock container test runner, migrate DB providers
5+
6+
Refactor from using Suprabase and Upstash to using Astro DB + Turso
7+
8+
[Astro DB](https://docs.astro.build/en/guides/astro-db/)
9+
10+
## Mobile Social Shares
11+
12+
See the example image in Social Shares.
13+
414
## Performance
515

616
Implement mitigations in test/e2e/specs/07-performance/PERFORMANCE.md
@@ -38,10 +48,6 @@ Lunr is a JS search library using an inverted index. Client-side search for stat
3848

3949
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.
4050

41-
## @TODO: Provide button to turn off animation in Hero
42-
43-
"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. "
44-
4551
## Color vars
4652

4753
brand primary: #001733
@@ -101,12 +107,35 @@ cat.structure: Rules related to the document's overall structure, like the prope
101107
cat.tables: Rules for data tables, including headers and associations.
102108
cat.text-alternatives: Rules for ensuring that text alternatives are provided for non-text content, such as images.
103109

110+
## Privacy policy errors
111+
112+
fatal: /home/kevin/Repos/Webstack: '/home/kevin/Repos/Webstack' is outside repository at '/home/kevin/Repos/Webstack Builders/Corporate Website/astro.webstackbuilders.com'
113+
114+
[privacy-policy-version] Could not get privacy policy version from git: Command failed: git log -1 --format=%cd --date=format:%Y-%m-%d -- /home/kevin/Repos/Webstack Builders/Corporate Website/astro.webstackbuilders.com/src/pages/privacy/index.astro
115+
116+
fatal: /home/kevin/Repos/Webstack: '/home/kevin/Repos/Webstack' is outside repository at '/home/kevin/Repos/Webstack Builders/Corporate Website/astro.webstackbuilders.com'
117+
118+
⚠️ Privacy policy version fallback applied: 2025-12-08
119+
104120
## @TODO: Add Check HTML Links to test workflow
105121

106122
npm i -D check-html-links
107123
npx check-html-links _site
108124
`https://github.com/modernweb-dev/rocket/tree/main/packages/check-html-links`
109125

126+
22:38:43 [ERROR] [astro-link-validator] ❌ Found 2 broken links:
127+
\n📄 index.html:
128+
🔗 /services/web-development
129+
File not found: services/web-development
130+
Text: "Improve Your Product"
131+
🔗 /services/consulting
132+
File not found: services/consulting
133+
Text: "Start from scratch"
134+
135+
## Tags
136+
137+
Can we add a markdown page to explain what each tag is, and use those pages instead of src/content/_tagList.ts to define the tags available?
138+
110139
## Social Media Preview Cards
111140

112141
Looking at the social-card endpoint implementation, it's designed to work with third-party screenshot services, not the social networks themselves.

astro.config.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import AstroPWA from '@vite-pwa/astro'
22
import icon from 'astro-icon'
3+
import linkValidator from 'astro-link-validator'
34
import lit from '@semantic-ui/astro-lit'
45
import mdx from '@astrojs/mdx'
56
import sentry from '@sentry/astro'
@@ -8,6 +9,7 @@ import tailwindcss from '@tailwindcss/vite'
89
import vercelStatic from '@astrojs/vercel'
910
import vtbot from 'astro-vtbot'
1011
import { defineConfig } from 'astro/config'
12+
import type { AstroUserConfig } from 'astro'
1113
import { fileURLToPath } from 'node:url'
1214
import type { PluginOption } from 'vite'
1315
/**
@@ -22,6 +24,7 @@ import {
2224
environmentalVariablesConfig,
2325
getSentryAuthToken,
2426
getSiteUrl,
27+
isGitHub,
2528
isUnitTest,
2629
isVercel,
2730
markdownConfig,
@@ -70,6 +73,13 @@ const standardIntegrations = [
7073
exclude: ['downloads', 'social-shares', '/articles/demo', 'testing'],
7174
}),
7275
}),
76+
/** Validate links in built site output on astro:build:done integration hook */
77+
linkValidator({
78+
checkExternal: isGitHub(),
79+
failOnBrokenLinks: false,
80+
verbose: true,
81+
}),
82+
/** Integration to write pages.json after build so E2E tests can discover what pages exist */
7383
pagesJsonWriter(),
7484
/** Debugging tools for Astro View Transition API */
7585
vtbot(),
@@ -81,6 +91,7 @@ export default defineConfig({
8191
enabled: false,
8292
},
8393
env: environmentalVariablesConfig,
94+
markdown: markdownConfig as AstroUserConfig['markdown'],
8495
/**
8596
* Astro sets substantial Vite config internally in the framework. When you use Vitest
8697
* in an Astro project, you use Astro's getViteConfig helper to get the resolved internal

0 commit comments

Comments
 (0)