refactor: use YAML for products
Added YAML support as per https://docs.astro.build/en/recipes/add-yaml-support and converted products.json to products.yaml.
This commit is contained in:
parent
64a0f9e90b
commit
2e633d3a96
|
@ -1,8 +1,8 @@
|
|||
import mdx from "@astrojs/mdx";
|
||||
import tailwind from "@astrojs/tailwind";
|
||||
import { defineConfig } from "astro/config";
|
||||
|
||||
import sitemap from "@astrojs/sitemap";
|
||||
import tailwind from "@astrojs/tailwind";
|
||||
import yaml from "@rollup/plugin-yaml";
|
||||
import { defineConfig } from "astro/config";
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
|
@ -22,5 +22,8 @@ export default defineConfig({
|
|||
}
|
||||
}),
|
||||
],
|
||||
site: "https://www.oliverdavies.uk"
|
||||
site: "https://www.oliverdavies.uk",
|
||||
vite: {
|
||||
plugins: [yaml()],
|
||||
},
|
||||
});
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
"tailwindcss": "^3.3.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-yaml": "^4.1.2",
|
||||
"@types/lodash": "^4.14.200",
|
||||
"prettier": "^3.0.3",
|
||||
"prettier-plugin-astro": "^0.12.0",
|
||||
|
|
|
@ -55,6 +55,9 @@ dependencies:
|
|||
version: 3.3.3
|
||||
|
||||
devDependencies:
|
||||
'@rollup/plugin-yaml':
|
||||
specifier: ^4.1.2
|
||||
version: 4.1.2
|
||||
'@types/lodash':
|
||||
specifier: ^4.14.200
|
||||
version: 4.14.200
|
||||
|
@ -1149,6 +1152,34 @@ packages:
|
|||
aggregate-error: 3.1.0
|
||||
dev: false
|
||||
|
||||
/@rollup/plugin-yaml@4.1.2:
|
||||
resolution: {integrity: sha512-RpupciIeZMUqhgFE97ba0s98mOFS7CWzN3EJNhJkqSv9XLlWYtwVdtE6cDw6ASOF/sZVFS7kRJXftaqM2Vakdw==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
peerDependencies:
|
||||
rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0
|
||||
peerDependenciesMeta:
|
||||
rollup:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@rollup/pluginutils': 5.0.5
|
||||
js-yaml: 4.1.0
|
||||
tosource: 2.0.0-alpha.3
|
||||
dev: true
|
||||
|
||||
/@rollup/pluginutils@5.0.5:
|
||||
resolution: {integrity: sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
peerDependencies:
|
||||
rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0
|
||||
peerDependenciesMeta:
|
||||
rollup:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@types/estree': 1.0.3
|
||||
estree-walker: 2.0.2
|
||||
picomatch: 2.3.1
|
||||
dev: true
|
||||
|
||||
/@tailwindcss/aspect-ratio@0.4.2(tailwindcss@3.3.3):
|
||||
resolution: {integrity: sha512-8QPrypskfBa7QIMuKHg2TA7BqES6vhBrDLOv8Unb6FcFyd3TjKbc6lcmb9UPQHxfl24sXoJ41ux/H7qQQvfaSQ==}
|
||||
peerDependencies:
|
||||
|
@ -1244,7 +1275,6 @@ packages:
|
|||
|
||||
/@types/estree@1.0.3:
|
||||
resolution: {integrity: sha512-CS2rOaoQ/eAgAfcTfq6amKG7bsN+EMcgGY4FAFQdvSj2y1ixvOZTUA9mOtCai7E1SYu283XNw7urKK30nP3wkQ==}
|
||||
dev: false
|
||||
|
||||
/@types/hast@2.3.7:
|
||||
resolution: {integrity: sha512-EVLigw5zInURhzfXUM65eixfadfsHKomGKUakToXo84t8gGIJuTcD2xooM2See7GyQ7DRtYjhCHnSUQez8JaLw==}
|
||||
|
@ -1405,7 +1435,6 @@ packages:
|
|||
|
||||
/argparse@2.0.1:
|
||||
resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==}
|
||||
dev: false
|
||||
|
||||
/array-iterate@2.0.1:
|
||||
resolution: {integrity: sha512-I1jXZMjAgCMmxT4qxXfPXa6SthSoE8h6gkSI9BGGNv8mP8G/v0blc+qFnZu6K42vTOiuME596QaLO0TP3Lk0xg==}
|
||||
|
@ -2114,6 +2143,10 @@ packages:
|
|||
'@types/unist': 2.0.9
|
||||
dev: false
|
||||
|
||||
/estree-walker@2.0.2:
|
||||
resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==}
|
||||
dev: true
|
||||
|
||||
/estree-walker@3.0.3:
|
||||
resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==}
|
||||
dependencies:
|
||||
|
@ -2723,7 +2756,6 @@ packages:
|
|||
hasBin: true
|
||||
dependencies:
|
||||
argparse: 2.0.1
|
||||
dev: false
|
||||
|
||||
/jsesc@2.5.2:
|
||||
resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==}
|
||||
|
@ -3823,7 +3855,6 @@ packages:
|
|||
/picomatch@2.3.1:
|
||||
resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==}
|
||||
engines: {node: '>=8.6'}
|
||||
dev: false
|
||||
|
||||
/pify@2.3.0:
|
||||
resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==}
|
||||
|
@ -4640,6 +4671,11 @@ packages:
|
|||
is-number: 7.0.0
|
||||
dev: false
|
||||
|
||||
/tosource@2.0.0-alpha.3:
|
||||
resolution: {integrity: sha512-KAB2lrSS48y91MzFPFuDg4hLbvDiyTjOVgaK7Erw+5AmZXNq4sFRVn8r6yxSLuNs15PaokrDRpS61ERY9uZOug==}
|
||||
engines: {node: '>=10'}
|
||||
dev: true
|
||||
|
||||
/trim-lines@3.0.1:
|
||||
resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==}
|
||||
dev: false
|
||||
|
|
|
@ -3,10 +3,8 @@ layout: ~/layouts/PageLayout.astro
|
|||
title: Products and Services
|
||||
---
|
||||
|
||||
import ListingPage from "~/components/ListingPage.astro";
|
||||
import _ from "lodash";
|
||||
import priceFormatter from "~/price-formatter";
|
||||
import products from "~/products.json";
|
||||
import products from "~/products.yaml";
|
||||
|
||||
<div class="space-y-12">
|
||||
{products.map((product) => (
|
||||
|
|
|
@ -1,75 +0,0 @@
|
|||
[
|
||||
{
|
||||
"title": "Development team coaching",
|
||||
"description": "Do you want to upskill your in-house team or have someone provide oversight and guidance as they deliver a project? Does your company want to learn to contribute to open-source software? Get unlimited 1-on-1 private Slack access to me and regular check-in calls to ensure things are on track.",
|
||||
"perMonth": true,
|
||||
"isLimited": true,
|
||||
"price": 10000,
|
||||
"link": {
|
||||
"text": "Apply now",
|
||||
"href": "/team-coaching"
|
||||
}
|
||||
},
|
||||
{
|
||||
"title": "Drupal upgrade roadmap",
|
||||
"description": "Are you stuck on an already or soon-to-be unsupported version of Drupal? Get a personalised roadmap of your Drupal website, including details and actionable steps to upgrade it.",
|
||||
"price": 5000,
|
||||
"link": {
|
||||
"text": "Book your roadmap now",
|
||||
"href": "/drupal-upgrade"
|
||||
}
|
||||
},
|
||||
{
|
||||
"title": "Diagnosis",
|
||||
"description": "An in-depth investigation into a single issue where I'll provide a report with my findings and advice on the next steps. Once you've purchased, you can book a Zoom call with me to discuss what you want me to investigate.",
|
||||
"price": 2500,
|
||||
"link": {
|
||||
"text": "Book now",
|
||||
"href": "https://buy.stripe.com/00gbJs84G2jg8Vy9AJ"
|
||||
}
|
||||
},
|
||||
{
|
||||
"title": "Private talk or workshop",
|
||||
"description": "If you found one of my public speaking presentations or workshops useful, I'm available for private speaking engagements on a variety of topics to help your team succeed.",
|
||||
"price": 2000,
|
||||
"isFrom": true,
|
||||
"link": {
|
||||
"text": "Schedule a talk",
|
||||
"href": "https://buy.stripe.com/eVa4h0bgSaPM6NqcMU"
|
||||
}
|
||||
},
|
||||
{
|
||||
"title": "1-on-1 consulting call",
|
||||
"description": "Book a 1-on-1 video call, and I can help you by answering questions about software development, architecture and automation, helping you write your first automated test, or reviewing some of your code and giving advice and suggestions.",
|
||||
"price": 350,
|
||||
"link": {
|
||||
"text": "Book your call now",
|
||||
"href": "/call"
|
||||
}
|
||||
},
|
||||
{
|
||||
"title": "Pair program with me",
|
||||
"description": "Would you like another pair of eyes on your code, providing real-time suggestions and feedback rather than waiting for a code review? Book a 2-hour pair programming call and we can work on your code together.",
|
||||
"price": 499,
|
||||
"link": {
|
||||
"text": "Book your session now",
|
||||
"href": "/pair"
|
||||
}
|
||||
},
|
||||
{
|
||||
"title": "Introduction to automated testing in Drupal - 7-day email course",
|
||||
"description": "Register for my free upcoming email course on automated testing in Drupal.",
|
||||
"link": {
|
||||
"text": "Register now",
|
||||
"href": "/atdc"
|
||||
}
|
||||
},
|
||||
{
|
||||
"title": "Drupal module template",
|
||||
"description": "If you're creating a new Drupal module, try starting with my free module template for Drupal 9 and 10.",
|
||||
"link": {
|
||||
"text": "Download",
|
||||
"href": "https://github.com/opdavies/drupal-module-template"
|
||||
}
|
||||
}
|
||||
]
|
65
src/products.yaml
Normal file
65
src/products.yaml
Normal file
|
@ -0,0 +1,65 @@
|
|||
---
|
||||
- title: Development team coaching
|
||||
description: |
|
||||
Do you want to upskill your in-house team or have someone provide oversight and guidance as they deliver a project? Does your company want to learn to contribute to open-source software? Get unlimited 1-on-1 private Slack access to me and regular check-in calls to ensure things are on track.
|
||||
perMonth: true
|
||||
isLimited: true
|
||||
price: 10000
|
||||
link:
|
||||
text: Apply now
|
||||
href: /team-coaching
|
||||
|
||||
- title: Drupal upgrade roadmap
|
||||
description: |
|
||||
Are you stuck on an already or soon-to-be unsupported version of Drupal? Get a personalised roadmap of your Drupal website, including details and actionable steps to upgrade it.
|
||||
price: 5000
|
||||
link:
|
||||
text: Book your roadmap now
|
||||
href: /drupal-upgrade
|
||||
|
||||
- title: Diagnosis
|
||||
description: |
|
||||
An in-depth investigation into a single issue where I'll provide a report with my findings and advice on the next steps. Once you've purchased, you can book a Zoom call with me to discuss what you want me to investigate.
|
||||
price: 2500
|
||||
link:
|
||||
text: Book now
|
||||
href: https://buy.stripe.com/00gbJs84G2jg8Vy9AJ
|
||||
|
||||
- title: Private talk or workshop
|
||||
description: |
|
||||
If you found one of my public speaking presentations or workshops useful, I'm available for private speaking engagements on a variety of topics to help your team succeed.
|
||||
price: 2000
|
||||
isFrom: true
|
||||
link:
|
||||
text: Schedule a talk
|
||||
href: https://buy.stripe.com/eVa4h0bgSaPM6NqcMU
|
||||
|
||||
- title: 1-on-1 consulting call
|
||||
description: |
|
||||
Book a 1-on-1 video call, and I can help you by answering questions about software development, architecture and automation, helping you write your first automated test, or reviewing some of your code and giving advice and suggestions.
|
||||
price: 350
|
||||
link:
|
||||
text: Book your call now
|
||||
href: /call
|
||||
|
||||
- title: Pair program with me
|
||||
description: |
|
||||
Would you like another pair of eyes on your code, providing real-time suggestions and feedback rather than waiting for a code review? Book a 2-hour pair programming call and we can work on your code together.
|
||||
price: 499
|
||||
link:
|
||||
text: Book your session now
|
||||
href: /pair
|
||||
|
||||
- title: Introduction to automated testing in Drupal - 7-day email course
|
||||
description: |
|
||||
Register for my free upcoming email course on automated testing in Drupal.
|
||||
link:
|
||||
text: Register now
|
||||
href: /atdc
|
||||
|
||||
- title: Drupal module template
|
||||
description: |
|
||||
If you're creating a new Drupal module, try starting with my free module template for Drupal 9 and 10.
|
||||
link:
|
||||
text: Download
|
||||
href: https://github.com/opdavies/drupal-module-template
|
Loading…
Reference in a new issue