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
26 changes: 23 additions & 3 deletions .cache/pages.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,49 @@
"contact",
"offline",
{
"privacy": ["my-data"]
"privacy": [
"my-data"
]
},
{
"services": ["consulting", "overview", "web-development"]
"services": [
"consulting",
"overview",
"web-development"
]
},
{
"tags": [
"adTech",
"apiDesign",
"articles",
"aws",
"case-studies",
"cd",
"ci",
"cms",
"code",
"contact",
"crm",
"databaseNormalization",
"deployment",
"devPortals",
"express",
"graphql",
"home",
"Joomla!",
"laravel",
"marTech",
"online-learning",
"rails",
"react",
"restful",
"scss",
"services",
"site",
"sqlOptimization",
"testimonials",
"typescript"
]
}
]
]
17 changes: 5 additions & 12 deletions _TODO.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<!-- markdownlint-disable-file -->
# TODO

continue

## Refactor API Endpoints to Astro Actions

### Action / Domain / Responder Pattern
Expand Down Expand Up @@ -143,24 +145,15 @@ cat.structure: Rules related to the document's overall structure, like the prope
cat.tables: Rules for data tables, including headers and associations.
cat.text-alternatives: Rules for ensuring that text alternatives are provided for non-text content, such as images.

## Privacy policy errors

fatal: /home/kevin/Repos/Webstack: '/home/kevin/Repos/Webstack' is outside repository at '/home/kevin/Repos/Webstack Builders/Corporate Website/astro.webstackbuilders.com'

[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

fatal: /home/kevin/Repos/Webstack: '/home/kevin/Repos/Webstack' is outside repository at '/home/kevin/Repos/Webstack Builders/Corporate Website/astro.webstackbuilders.com'
## Tags

⚠️ Privacy policy version fallback applied: 2025-12-08
- Sitemap
- E2E all pages helper

## Build output errors

00:19:09 [WARN] [vite] [plugin:astro:assets:esm] context method emitFile() is not supported in serve mode. This plugin is likely not vite-compatible.

## Tags

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?

## Use Confetti on CTA forms

`canvas-confetti`
Expand Down
42 changes: 41 additions & 1 deletion src/content.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
*/
import { defineCollection, reference, z, type SchemaContext } from 'astro:content'
import { glob, file } from 'astro/loaders'
import { validTags } from '@content/_tagList'
import { existsSync, readdirSync } from 'node:fs'
import { fileURLToPath } from 'node:url'
/**
* Wraps a collection schema with a refinement that enforces breadcrumb title length limits */
import { withBreadcrumbTitleWarning } from '@lib/helpers/breadcrumbTitleLengthRefinement'
Expand All @@ -21,6 +22,28 @@ import { withBreadcrumbTitleWarning } from '@lib/helpers/breadcrumbTitleLengthRe
/** Only load markdown and MDX files that do not start with an underscore */
const pattern = '**\/[^_]*.{md,mdx}'

const tagContentDir = fileURLToPath(new URL('./content/tags', import.meta.url))
const tagSlugs = readdirSync(tagContentDir, { withFileTypes: true })
.filter(entry => entry.isDirectory() && !entry.name.startsWith('_'))
.filter(entry => {
const indexMd = new URL(`./content/tags/${entry.name}/index.md`, import.meta.url)
const indexMdx = new URL(`./content/tags/${entry.name}/index.mdx`, import.meta.url)
return fsExists(indexMd) || fsExists(indexMdx)
})
.map(entry => entry.name)
.sort((a, b) => a.localeCompare(b, 'en'))

if (tagSlugs.length === 0) {
throw new Error('No tags found. Add markdown files under src/content/tags.')
}

type ZodEnumType = [string, ...string[]]
const validTags = tagSlugs as ZodEnumType

function fsExists(url: URL) {
return existsSync(fileURLToPath(url))
}

const createBaseCollectionSchema = ({ image }: SchemaContext) =>
z.object({
title: z.string(),
Expand Down Expand Up @@ -121,6 +144,22 @@ const downloadsCollection = defineCollection({
* =================================================================================
*/

/**
* Tags
*/
const tagsCollection = defineCollection({
loader: glob({ pattern: '**/index.{md,mdx}', base: './src/content/tags' }),
schema: ({ image }) =>
z.object({
slug: z.string(),
displayName: z.string(),
description: z.string(),
cover: image(),
coverAlt: z.string(),
featured: z.boolean().default(false),
}),
})

/**
* About
*/
Expand Down Expand Up @@ -223,5 +262,6 @@ export const collections = {
contactData: contactDataCollection,
downloads: downloadsCollection,
services: servicesCollection,
tags: tagsCollection,
testimonials: testimonialCollection,
}
60 changes: 0 additions & 60 deletions src/content/_tagList.ts

This file was deleted.

Binary file added src/content/tags/Joomla!/cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/content/tags/Joomla!/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
slug: "Joomla!"
displayName: "Joomla!"
description: "Content tagged with Joomla!."
cover: "./cover.png"
coverAlt: "Joomla!"
featured: false
---

Joomla! content will be curated here.
6 changes: 6 additions & 0 deletions src/content/tags/Joomla!/joomla.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/content/tags/adTech/cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/content/tags/adTech/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
slug: "adTech"
displayName: "Ad Tech"
description: "Content tagged with Ad Tech."
cover: "./cover.png"
coverAlt: "Ad Tech"
featured: false
---

Ad Tech content will be curated here.
6 changes: 6 additions & 0 deletions src/content/tags/apiDesign/apidesign.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/content/tags/apiDesign/cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/content/tags/apiDesign/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
slug: "apiDesign"
displayName: "API Design"
description: "Content tagged with API Design."
cover: "./cover.png"
coverAlt: "API Design"
featured: false
---

API Design content will be curated here.
6 changes: 6 additions & 0 deletions src/content/tags/articles/articles.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/content/tags/articles/cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/content/tags/articles/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
slug: "articles"
displayName: "articles"
description: "Content tagged with articles."
cover: "./cover.png"
coverAlt: "articles"
featured: false
---

articles content will be curated here.
6 changes: 6 additions & 0 deletions src/content/tags/aws/aws.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/content/tags/aws/cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/content/tags/aws/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
slug: "aws"
displayName: "AWS"
description: "Content tagged with AWS."
cover: "./cover.png"
coverAlt: "AWS"
featured: false
---

AWS content will be curated here.
6 changes: 6 additions & 0 deletions src/content/tags/case-studies/case-studies.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/content/tags/case-studies/cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/content/tags/case-studies/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
slug: "case-studies"
displayName: "Case Studies"
description: "Content tagged with Case Studies."
cover: "./cover.png"
coverAlt: "Case Studies"
featured: false
---

Case Studies content will be curated here.
6 changes: 6 additions & 0 deletions src/content/tags/cd/cd.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/content/tags/cd/cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/content/tags/cd/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
slug: "cd"
displayName: "CD"
description: "Content tagged with CD."
cover: "./cover.png"
coverAlt: "CD"
featured: false
---

CD content will be curated here.
6 changes: 6 additions & 0 deletions src/content/tags/ci/ci.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/content/tags/ci/cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/content/tags/ci/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
slug: "ci"
displayName: "CI"
description: "Content tagged with CI."
cover: "./cover.png"
coverAlt: "CI"
featured: false
---

CI content will be curated here.
6 changes: 6 additions & 0 deletions src/content/tags/cms/cms.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/content/tags/cms/cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/content/tags/cms/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
slug: "cms"
displayName: "CMS"
description: "Content tagged with CMS."
cover: "./cover.png"
coverAlt: "CMS"
featured: false
---

CMS content will be curated here.
6 changes: 6 additions & 0 deletions src/content/tags/code/code.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/content/tags/code/cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/content/tags/code/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
slug: "code"
displayName: "code"
description: "Content tagged with code."
cover: "./cover.png"
coverAlt: "code"
featured: false
---

code content will be curated here.
Loading