Dasher Supply > {brand.name} Store
+-
+ {brandProducts.map((product, id) => (
+
+
Dasher Supply is not endorsed by or affiliated with DoorDash. As an Amazon Associate I earn from qualifying purchases.
+ About this site. +diff --git a/public/assets/brands/coast.jpg b/public/assets/brands/coast.jpg new file mode 100644 index 0000000..8f14a11 --- /dev/null +++ b/public/assets/brands/coast.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b32b6721caa3d07c1e0788f0f5c521ad72e8ef0cce7636143be4d995a8cc1bb5 +size 3069 diff --git a/public/assets/brands/first-aid-only.png b/public/assets/brands/first-aid-only.png new file mode 100644 index 0000000..985cdfe --- /dev/null +++ b/public/assets/brands/first-aid-only.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:66aa9b12ff98d2c993cd6bb3ec0d51805cc5731c4df32cdf7bb3dd0b23ac827d +size 1246 diff --git a/public/assets/brands/rubbermaid.svg b/public/assets/brands/rubbermaid.svg new file mode 100644 index 0000000..8ae8a8a --- /dev/null +++ b/public/assets/brands/rubbermaid.svg @@ -0,0 +1,14 @@ + diff --git a/public/assets/brands/vortex-optics.svg b/public/assets/brands/vortex-optics.svg new file mode 100644 index 0000000..e700f74 --- /dev/null +++ b/public/assets/brands/vortex-optics.svg @@ -0,0 +1,9 @@ + diff --git a/src/components/BrandCard.astro b/src/components/BrandCard.astro new file mode 100644 index 0000000..01d2157 --- /dev/null +++ b/src/components/BrandCard.astro @@ -0,0 +1,59 @@ +--- +import type { Brand } from '../data/brands/brand'; + +interface Props { + brand: Brand +} + +const { brand } = Astro.props; +--- + +
- My name is David A. Ball. I'm also an expert at making web sites in my spare time. As such, I am uniquely qualified as an expert of both fields. My gift to you is a quick and simple, curated shopping list of things I believe are the most practical and best in-class products. + My name is David A. Ball. I'm also an expert at making web sites in my spare time. As such, I am uniquely qualified as an expert of both fields. My gift to you is a thoughtful, curated shopping list of things I believe are the most practical and best in-class products.
- Dasher Supply strives to document the latest and best quality accesories to help you along your route. I have hand-picked each of these products because I believe each one of these are indispensible tools of the trade. I've shopped ahead so you don't have to. Cut through the noise. Begin all of your shopping journies here. + Dasher Supply strives to document the latest and best quality accesories to help you along your route. I have hand-picked each of these products because I believe each one of these are indispensible tools of the trade from brands you can trust. I've shopped ahead so you don't have to. Cut through the noise. Begin all of your shopping journies here.
diff --git a/src/pages/brand/[brandLookup].astro b/src/pages/brand/[brandLookup].astro
new file mode 100644
index 0000000..6a25d4e
--- /dev/null
+++ b/src/pages/brand/[brandLookup].astro
@@ -0,0 +1,170 @@
+---
+import Layout from '../../layouts/Layout.astro';
+// import { useState, useEffect } from 'react';
+import { type Brand, ALL_BRANDS } from '../../data/brands';
+import { type Product, ALL_PRODUCTS } from '../../data/products';
+import ProductCard from '../../components/ProductCard.astro';
+import markdownIt from 'markdown-it';
+import markdownItAttrs from 'markdown-it-attrs';
+const md = markdownIt({
+ html: true,
+ linkify: true,
+ typographer: true,
+}).use(
+ markdownItAttrs, {
+ // optional, these are default options
+ leftDelimiter: '{',
+ rightDelimiter: '}',
+ allowedAttributes: [] // empty array = all attributes are allowed
+ }
+);
+
+type BrandStaticPath = { params: { brandLookup: string }};
+
+export function getStaticPaths() {
+ return ALL_BRANDS.map Dasher Supply is not endorsed by or affiliated with DoorDash. As an Amazon Associate I earn from qualifying purchases.Dasher Supply > {brand.name} Store
+
+ {brandProducts.map((product, id) => (
+
+
+
+
+ We choose brand names you can trust. +
+Dasher Supply is not endorsed by or affiliated with DoorDash. As an Amazon Associate I earn from qualifying purchases.
About this site. @@ -93,6 +105,10 @@ import { allCategories } from '../data/categories'; gap: 2rem; padding: 0; } + .link-card-grid.brands { + display: flex; + place-items: center; + } a, a:link, a:visited { text-decoration: none; color: #fff } a:hover { text-decoration: underline; color: #fff } diff --git a/src/scraper/amazon.ts b/src/scraper/amazon.ts index 7394665..98719fa 100644 --- a/src/scraper/amazon.ts +++ b/src/scraper/amazon.ts @@ -3,7 +3,7 @@ */ import cheerio, { type CheerioAPI } from 'cheerio'; -import { type ProductDetails } from '../data/products/product-details'; +import { type ProductDetails } from '../data/products/amazon-product-details'; import { type ProductAttribute } from '../data/products/product-attribute'; import { parseNumberFromSelector } from './utils';