diff options
| author | Valentin Popov <valentin@popov.link> | 2025-06-12 02:20:36 +0300 | 
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2025-06-12 02:20:36 +0300 | 
| commit | 67f245a48faf6e89989aca2ea571b657fd4c8888 (patch) | |
| tree | 110c7f4f842d30ef1c79d916d40e143d30adec5a | |
| parent | 16fa8a3b5de7dd7c4fa763fecbba0063f6b4369b (diff) | |
| download | popov.link-67f245a48faf6e89989aca2ea571b657fd4c8888.tar.xz popov.link-67f245a48faf6e89989aca2ea571b657fd4c8888.zip | |
feat: integrate schema.org support and enhance component structure
- Added schema.org support by introducing `schema-dts` for structured data in components.
- Updated `Head`, `BaseLayout`, and various page components to accept and utilize schema props for better SEO.
- Created new utility schemas for blog posts and website to standardize structured data implementation.
- Enhanced the `SocialLinks` section by utilizing dedicated icon components for improved maintainability.
- Refactored the `Header` component to improve accessibility and structure.
- Introduced new icons for social links and integrated them into the layout.
| -rw-r--r-- | .github/workflows/ci.yml | 2 | ||||
| -rw-r--r-- | package-lock.json | 305 | ||||
| -rw-r--r-- | package.json | 2 | ||||
| -rw-r--r-- | src/components/Analytics.astro | 1 | ||||
| -rw-r--r-- | src/components/Head.astro | 8 | ||||
| -rw-r--r-- | src/components/Header.astro | 7 | ||||
| -rw-r--r-- | src/components/Icons/Email.astro | 20 | ||||
| -rw-r--r-- | src/components/Icons/GitHub.astro | 22 | ||||
| -rw-r--r-- | src/components/Icons/LinkedIn.astro | 21 | ||||
| -rw-r--r-- | src/components/Icons/RSS.astro | 17 | ||||
| -rw-r--r-- | src/components/JsonLd.astro | 12 | ||||
| -rw-r--r-- | src/components/Sections/LatestPosts.astro | 10 | ||||
| -rw-r--r-- | src/components/Sections/SocialLinks.astro | 42 | ||||
| -rw-r--r-- | src/components/Sections/Welcome.astro | 2 | ||||
| -rw-r--r-- | src/layouts/BaseLayout.astro | 6 | ||||
| -rw-r--r-- | src/pages/404.astro | 10 | ||||
| -rw-r--r-- | src/pages/blog/[...slug].astro | 24 | ||||
| -rw-r--r-- | src/pages/blog/index.astro | 24 | ||||
| -rw-r--r-- | src/pages/index.astro | 10 | ||||
| -rw-r--r-- | src/utils/schemas/blogPostSchema.ts | 21 | ||||
| -rw-r--r-- | src/utils/schemas/blogSchema.ts | 13 | ||||
| -rw-r--r-- | src/utils/schemas/websiteSchema.ts | 13 | 
22 files changed, 383 insertions, 209 deletions
| diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0333c75..94acbd6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,3 +24,5 @@ jobs:          run: npm ci        - name: Run checks          run: npm run check +      - name: Run type checks +        run: npm run typecheck diff --git a/package-lock.json b/package-lock.json index ae0f233..896a1d9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,6 +19,7 @@          "mdast-util-to-string": "^4.0.0",          "reading-time": "^1.5.0",          "sass": "^1.89.1", +        "schema-dts": "^1.1.5",          "typescript": "^5"        },        "devDependencies": { @@ -1441,9 +1442,9 @@        "license": "MIT"      },      "node_modules/@rollup/rollup-android-arm-eabi": { -      "version": "4.41.1", -      "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.41.1.tgz", -      "integrity": "sha512-NELNvyEWZ6R9QMkiytB4/L4zSEaBC03KIXEghptLGLZWJ6VPrL63ooZQCOnlx36aQPGhzuOMwDerC1Eb2VmrLw==", +      "version": "4.43.0", +      "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.43.0.tgz", +      "integrity": "sha512-Krjy9awJl6rKbruhQDgivNbD1WuLb8xAclM4IR4cN5pHGAs2oIMMQJEiC3IC/9TZJ+QZkmZhlMO/6MBGxPidpw==",        "cpu": [          "arm"        ], @@ -1454,9 +1455,9 @@        ]      },      "node_modules/@rollup/rollup-android-arm64": { -      "version": "4.41.1", -      "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.41.1.tgz", -      "integrity": "sha512-DXdQe1BJ6TK47ukAoZLehRHhfKnKg9BjnQYUu9gzhI8Mwa1d2fzxA1aw2JixHVl403bwp1+/o/NhhHtxWJBgEA==", +      "version": "4.43.0", +      "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.43.0.tgz", +      "integrity": "sha512-ss4YJwRt5I63454Rpj+mXCXicakdFmKnUNxr1dLK+5rv5FJgAxnN7s31a5VchRYxCFWdmnDWKd0wbAdTr0J5EA==",        "cpu": [          "arm64"        ], @@ -1467,9 +1468,9 @@        ]      },      "node_modules/@rollup/rollup-darwin-arm64": { -      "version": "4.41.1", -      "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.41.1.tgz", -      "integrity": "sha512-5afxvwszzdulsU2w8JKWwY8/sJOLPzf0e1bFuvcW5h9zsEg+RQAojdW0ux2zyYAz7R8HvvzKCjLNJhVq965U7w==", +      "version": "4.43.0", +      "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.43.0.tgz", +      "integrity": "sha512-eKoL8ykZ7zz8MjgBenEF2OoTNFAPFz1/lyJ5UmmFSz5jW+7XbH1+MAgCVHy72aG59rbuQLcJeiMrP8qP5d/N0A==",        "cpu": [          "arm64"        ], @@ -1480,9 +1481,9 @@        ]      },      "node_modules/@rollup/rollup-darwin-x64": { -      "version": "4.41.1", -      "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.41.1.tgz", -      "integrity": "sha512-egpJACny8QOdHNNMZKf8xY0Is6gIMz+tuqXlusxquWu3F833DcMwmGM7WlvCO9sB3OsPjdC4U0wHw5FabzCGZg==", +      "version": "4.43.0", +      "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.43.0.tgz", +      "integrity": "sha512-SYwXJgaBYW33Wi/q4ubN+ldWC4DzQY62S4Ll2dgfr/dbPoF50dlQwEaEHSKrQdSjC6oIe1WgzosoaNoHCdNuMg==",        "cpu": [          "x64"        ], @@ -1493,9 +1494,9 @@        ]      },      "node_modules/@rollup/rollup-freebsd-arm64": { -      "version": "4.41.1", -      "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.41.1.tgz", -      "integrity": "sha512-DBVMZH5vbjgRk3r0OzgjS38z+atlupJ7xfKIDJdZZL6sM6wjfDNo64aowcLPKIx7LMQi8vybB56uh1Ftck/Atg==", +      "version": "4.43.0", +      "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.43.0.tgz", +      "integrity": "sha512-SV+U5sSo0yujrjzBF7/YidieK2iF6E7MdF6EbYxNz94lA+R0wKl3SiixGyG/9Klab6uNBIqsN7j4Y/Fya7wAjQ==",        "cpu": [          "arm64"        ], @@ -1506,9 +1507,9 @@        ]      },      "node_modules/@rollup/rollup-freebsd-x64": { -      "version": "4.41.1", -      "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.41.1.tgz", -      "integrity": "sha512-3FkydeohozEskBxNWEIbPfOE0aqQgB6ttTkJ159uWOFn42VLyfAiyD9UK5mhu+ItWzft60DycIN1Xdgiy8o/SA==", +      "version": "4.43.0", +      "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.43.0.tgz", +      "integrity": "sha512-J7uCsiV13L/VOeHJBo5SjasKiGxJ0g+nQTrBkAsmQBIdil3KhPnSE9GnRon4ejX1XDdsmK/l30IYLiAaQEO0Cg==",        "cpu": [          "x64"        ], @@ -1519,9 +1520,9 @@        ]      },      "node_modules/@rollup/rollup-linux-arm-gnueabihf": { -      "version": "4.41.1", -      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.41.1.tgz", -      "integrity": "sha512-wC53ZNDgt0pqx5xCAgNunkTzFE8GTgdZ9EwYGVcg+jEjJdZGtq9xPjDnFgfFozQI/Xm1mh+D9YlYtl+ueswNEg==", +      "version": "4.43.0", +      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.43.0.tgz", +      "integrity": "sha512-gTJ/JnnjCMc15uwB10TTATBEhK9meBIY+gXP4s0sHD1zHOaIh4Dmy1X9wup18IiY9tTNk5gJc4yx9ctj/fjrIw==",        "cpu": [          "arm"        ], @@ -1532,9 +1533,9 @@        ]      },      "node_modules/@rollup/rollup-linux-arm-musleabihf": { -      "version": "4.41.1", -      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.41.1.tgz", -      "integrity": "sha512-jwKCca1gbZkZLhLRtsrka5N8sFAaxrGz/7wRJ8Wwvq3jug7toO21vWlViihG85ei7uJTpzbXZRcORotE+xyrLA==", +      "version": "4.43.0", +      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.43.0.tgz", +      "integrity": "sha512-ZJ3gZynL1LDSIvRfz0qXtTNs56n5DI2Mq+WACWZ7yGHFUEirHBRt7fyIk0NsCKhmRhn7WAcjgSkSVVxKlPNFFw==",        "cpu": [          "arm"        ], @@ -1545,9 +1546,9 @@        ]      },      "node_modules/@rollup/rollup-linux-arm64-gnu": { -      "version": "4.41.1", -      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.41.1.tgz", -      "integrity": "sha512-g0UBcNknsmmNQ8V2d/zD2P7WWfJKU0F1nu0k5pW4rvdb+BIqMm8ToluW/eeRmxCared5dD76lS04uL4UaNgpNA==", +      "version": "4.43.0", +      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.43.0.tgz", +      "integrity": "sha512-8FnkipasmOOSSlfucGYEu58U8cxEdhziKjPD2FIa0ONVMxvl/hmONtX/7y4vGjdUhjcTHlKlDhw3H9t98fPvyA==",        "cpu": [          "arm64"        ], @@ -1558,9 +1559,9 @@        ]      },      "node_modules/@rollup/rollup-linux-arm64-musl": { -      "version": "4.41.1", -      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.41.1.tgz", -      "integrity": "sha512-XZpeGB5TKEZWzIrj7sXr+BEaSgo/ma/kCgrZgL0oo5qdB1JlTzIYQKel/RmhT6vMAvOdM2teYlAaOGJpJ9lahg==", +      "version": "4.43.0", +      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.43.0.tgz", +      "integrity": "sha512-KPPyAdlcIZ6S9C3S2cndXDkV0Bb1OSMsX0Eelr2Bay4EsF9yi9u9uzc9RniK3mcUGCLhWY9oLr6er80P5DE6XA==",        "cpu": [          "arm64"        ], @@ -1571,9 +1572,9 @@        ]      },      "node_modules/@rollup/rollup-linux-loongarch64-gnu": { -      "version": "4.41.1", -      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.41.1.tgz", -      "integrity": "sha512-bkCfDJ4qzWfFRCNt5RVV4DOw6KEgFTUZi2r2RuYhGWC8WhCA8lCAJhDeAmrM/fdiAH54m0mA0Vk2FGRPyzI+tw==", +      "version": "4.43.0", +      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.43.0.tgz", +      "integrity": "sha512-HPGDIH0/ZzAZjvtlXj6g+KDQ9ZMHfSP553za7o2Odegb/BEfwJcR0Sw0RLNpQ9nC6Gy8s+3mSS9xjZ0n3rhcYg==",        "cpu": [          "loong64"        ], @@ -1584,9 +1585,9 @@        ]      },      "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { -      "version": "4.41.1", -      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.41.1.tgz", -      "integrity": "sha512-3mr3Xm+gvMX+/8EKogIZSIEF0WUu0HL9di+YWlJpO8CQBnoLAEL/roTCxuLncEdgcfJcvA4UMOf+2dnjl4Ut1A==", +      "version": "4.43.0", +      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.43.0.tgz", +      "integrity": "sha512-gEmwbOws4U4GLAJDhhtSPWPXUzDfMRedT3hFMyRAvM9Mrnj+dJIFIeL7otsv2WF3D7GrV0GIewW0y28dOYWkmw==",        "cpu": [          "ppc64"        ], @@ -1597,9 +1598,9 @@        ]      },      "node_modules/@rollup/rollup-linux-riscv64-gnu": { -      "version": "4.41.1", -      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.41.1.tgz", -      "integrity": "sha512-3rwCIh6MQ1LGrvKJitQjZFuQnT2wxfU+ivhNBzmxXTXPllewOF7JR1s2vMX/tWtUYFgphygxjqMl76q4aMotGw==", +      "version": "4.43.0", +      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.43.0.tgz", +      "integrity": "sha512-XXKvo2e+wFtXZF/9xoWohHg+MuRnvO29TI5Hqe9xwN5uN8NKUYy7tXUG3EZAlfchufNCTHNGjEx7uN78KsBo0g==",        "cpu": [          "riscv64"        ], @@ -1610,9 +1611,9 @@        ]      },      "node_modules/@rollup/rollup-linux-riscv64-musl": { -      "version": "4.41.1", -      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.41.1.tgz", -      "integrity": "sha512-LdIUOb3gvfmpkgFZuccNa2uYiqtgZAz3PTzjuM5bH3nvuy9ty6RGc/Q0+HDFrHrizJGVpjnTZ1yS5TNNjFlklw==", +      "version": "4.43.0", +      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.43.0.tgz", +      "integrity": "sha512-ruf3hPWhjw6uDFsOAzmbNIvlXFXlBQ4nk57Sec8E8rUxs/AI4HD6xmiiasOOx/3QxS2f5eQMKTAwk7KHwpzr/Q==",        "cpu": [          "riscv64"        ], @@ -1623,9 +1624,9 @@        ]      },      "node_modules/@rollup/rollup-linux-s390x-gnu": { -      "version": "4.41.1", -      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.41.1.tgz", -      "integrity": "sha512-oIE6M8WC9ma6xYqjvPhzZYk6NbobIURvP/lEbh7FWplcMO6gn7MM2yHKA1eC/GvYwzNKK/1LYgqzdkZ8YFxR8g==", +      "version": "4.43.0", +      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.43.0.tgz", +      "integrity": "sha512-QmNIAqDiEMEvFV15rsSnjoSmO0+eJLoKRD9EAa9rrYNwO/XRCtOGM3A5A0X+wmG+XRrw9Fxdsw+LnyYiZWWcVw==",        "cpu": [          "s390x"        ], @@ -1636,9 +1637,9 @@        ]      },      "node_modules/@rollup/rollup-linux-x64-gnu": { -      "version": "4.41.1", -      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.41.1.tgz", -      "integrity": "sha512-cWBOvayNvA+SyeQMp79BHPK8ws6sHSsYnK5zDcsC3Hsxr1dgTABKjMnMslPq1DvZIp6uO7kIWhiGwaTdR4Og9A==", +      "version": "4.43.0", +      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.43.0.tgz", +      "integrity": "sha512-jAHr/S0iiBtFyzjhOkAics/2SrXE092qyqEg96e90L3t9Op8OTzS6+IX0Fy5wCt2+KqeHAkti+eitV0wvblEoQ==",        "cpu": [          "x64"        ], @@ -1649,9 +1650,9 @@        ]      },      "node_modules/@rollup/rollup-linux-x64-musl": { -      "version": "4.41.1", -      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.41.1.tgz", -      "integrity": "sha512-y5CbN44M+pUCdGDlZFzGGBSKCA4A/J2ZH4edTYSSxFg7ce1Xt3GtydbVKWLlzL+INfFIZAEg1ZV6hh9+QQf9YQ==", +      "version": "4.43.0", +      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.43.0.tgz", +      "integrity": "sha512-3yATWgdeXyuHtBhrLt98w+5fKurdqvs8B53LaoKD7P7H7FKOONLsBVMNl9ghPQZQuYcceV5CDyPfyfGpMWD9mQ==",        "cpu": [          "x64"        ], @@ -1662,9 +1663,9 @@        ]      },      "node_modules/@rollup/rollup-win32-arm64-msvc": { -      "version": "4.41.1", -      "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.41.1.tgz", -      "integrity": "sha512-lZkCxIrjlJlMt1dLO/FbpZbzt6J/A8p4DnqzSa4PWqPEUUUnzXLeki/iyPLfV0BmHItlYgHUqJe+3KiyydmiNQ==", +      "version": "4.43.0", +      "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.43.0.tgz", +      "integrity": "sha512-wVzXp2qDSCOpcBCT5WRWLmpJRIzv23valvcTwMHEobkjippNf+C3ys/+wf07poPkeNix0paTNemB2XrHr2TnGw==",        "cpu": [          "arm64"        ], @@ -1675,9 +1676,9 @@        ]      },      "node_modules/@rollup/rollup-win32-ia32-msvc": { -      "version": "4.41.1", -      "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.41.1.tgz", -      "integrity": "sha512-+psFT9+pIh2iuGsxFYYa/LhS5MFKmuivRsx9iPJWNSGbh2XVEjk90fmpUEjCnILPEPJnikAU6SFDiEUyOv90Pg==", +      "version": "4.43.0", +      "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.43.0.tgz", +      "integrity": "sha512-fYCTEyzf8d+7diCw8b+asvWDCLMjsCEA8alvtAutqJOJp/wL5hs1rWSqJ1vkjgW0L2NB4bsYJrpKkiIPRR9dvw==",        "cpu": [          "ia32"        ], @@ -1688,9 +1689,9 @@        ]      },      "node_modules/@rollup/rollup-win32-x64-msvc": { -      "version": "4.41.1", -      "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.41.1.tgz", -      "integrity": "sha512-Wq2zpapRYLfi4aKxf2Xff0tN+7slj2d4R87WEzqw7ZLsVvO5zwYCIuEGSZYiK41+GlwUo1HiR+GdkLEJnCKTCw==", +      "version": "4.43.0", +      "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.43.0.tgz", +      "integrity": "sha512-SnGhLiE5rlK0ofq8kzuDkM0g7FN1s5VYY+YSMTibP7CqShxCQvqtNxTARS4xX4PFJfHjG0ZQYX9iGzI3FQh5Aw==",        "cpu": [          "x64"        ], @@ -1701,60 +1702,60 @@        ]      },      "node_modules/@shikijs/core": { -      "version": "3.5.0", -      "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-3.5.0.tgz", -      "integrity": "sha512-iycvvnVG7MWZHRNuoqpYkV3Qc8DNLU74Lxh/roDwUqJJoXRnCTbbVJGfSWAdBslUgJMsjSHwFL42i55voavDDg==", +      "version": "3.6.0", +      "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-3.6.0.tgz", +      "integrity": "sha512-9By7Xb3olEX0o6UeJyPLI1PE1scC4d3wcVepvtv2xbuN9/IThYN4Wcwh24rcFeASzPam11MCq8yQpwwzCgSBRw==",        "license": "MIT",        "dependencies": { -        "@shikijs/types": "3.5.0", +        "@shikijs/types": "3.6.0",          "@shikijs/vscode-textmate": "^10.0.2",          "@types/hast": "^3.0.4",          "hast-util-to-html": "^9.0.5"        }      },      "node_modules/@shikijs/engine-javascript": { -      "version": "3.5.0", -      "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-3.5.0.tgz", -      "integrity": "sha512-3MhSnVHEdGb4L4FS/HAPc7WtPmIfHjRZraObf6tKxQaGuQGZfBsoLVCGuoGfiqt/zy0MKpll3oiZiQ/maT/wlQ==", +      "version": "3.6.0", +      "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-3.6.0.tgz", +      "integrity": "sha512-7YnLhZG/TU05IHMG14QaLvTW/9WiK8SEYafceccHUSXs2Qr5vJibUwsDfXDLmRi0zHdzsxrGKpSX6hnqe0k8nA==",        "license": "MIT",        "dependencies": { -        "@shikijs/types": "3.5.0", +        "@shikijs/types": "3.6.0",          "@shikijs/vscode-textmate": "^10.0.2",          "oniguruma-to-es": "^4.3.3"        }      },      "node_modules/@shikijs/engine-oniguruma": { -      "version": "3.5.0", -      "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-3.5.0.tgz", -      "integrity": "sha512-DLM1VL+WvWFHQlikP8MTc8T2MdEGAOJhAi9+48wkQ7kO7c/99h4ALK0b0CPQBCeLMp37raoM1Ucuo3OTSjtUxA==", +      "version": "3.6.0", +      "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-3.6.0.tgz", +      "integrity": "sha512-nmOhIZ9yT3Grd+2plmW/d8+vZ2pcQmo/UnVwXMUXAKTXdi+LK0S08Ancrz5tQQPkxvjBalpMW2aKvwXfelauvA==",        "license": "MIT",        "dependencies": { -        "@shikijs/types": "3.5.0", +        "@shikijs/types": "3.6.0",          "@shikijs/vscode-textmate": "^10.0.2"        }      },      "node_modules/@shikijs/langs": { -      "version": "3.5.0", -      "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-3.5.0.tgz", -      "integrity": "sha512-kBJhmj0ZkULbf3O+Asr8Xs7hcFtQdPnqIld2kKrG9WhDpIvqMRWSj3L9LECi2TH7vV6ROrvJ78/1yEASL0d00w==", +      "version": "3.6.0", +      "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-3.6.0.tgz", +      "integrity": "sha512-IdZkQJaLBu1LCYCwkr30hNuSDfllOT8RWYVZK1tD2J03DkiagYKRxj/pDSl8Didml3xxuyzUjgtioInwEQM/TA==",        "license": "MIT",        "dependencies": { -        "@shikijs/types": "3.5.0" +        "@shikijs/types": "3.6.0"        }      },      "node_modules/@shikijs/themes": { -      "version": "3.5.0", -      "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-3.5.0.tgz", -      "integrity": "sha512-xr4bPmAORm2fhfVeaCDfRXiq0rxAxPRR0Bhiw+EaofgJ79Jj61fnVZDF40nJKvmMoKnC60TqCTpbr15ToTgTOA==", +      "version": "3.6.0", +      "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-3.6.0.tgz", +      "integrity": "sha512-Fq2j4nWr1DF4drvmhqKq8x5vVQ27VncF8XZMBuHuQMZvUSS3NBgpqfwz/FoGe36+W6PvniZ1yDlg2d4kmYDU6w==",        "license": "MIT",        "dependencies": { -        "@shikijs/types": "3.5.0" +        "@shikijs/types": "3.6.0"        }      },      "node_modules/@shikijs/types": { -      "version": "3.5.0", -      "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-3.5.0.tgz", -      "integrity": "sha512-VvqGHhS8BWClF7eVnEJLe0nAhQw/1L+xC5mp6uj+tVr3tjD2ASx2Mx9M9l7tZQO++1qwZeIIusvSRhz4aKODFQ==", +      "version": "3.6.0", +      "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-3.6.0.tgz", +      "integrity": "sha512-cLWFiToxYu0aAzJqhXTQsFiJRTFDAGl93IrMSBNaGSzs7ixkLfdG6pH11HipuWFGW5vyx4X47W8HDQ7eSrmBUg==",        "license": "MIT",        "dependencies": {          "@shikijs/vscode-textmate": "^10.0.2", @@ -1843,12 +1844,12 @@        }      },      "node_modules/@types/node": { -      "version": "22.15.30", -      "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.30.tgz", -      "integrity": "sha512-6Q7lr06bEHdlfplU6YRbgG1SFBdlsfNC4/lX+SkhiTs0cpJkOElmWls8PxDFv4yY/xKb8Y6SO0OmSX4wgqTZbA==", +      "version": "24.0.1", +      "resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.1.tgz", +      "integrity": "sha512-MX4Zioh39chHlDJbKmEgydJDS3tspMP/lnQC67G3SWsTnb9NeYVWOjkxpOSy4oMfPs4StcWHwBrvUb4ybfnuaw==",        "license": "MIT",        "dependencies": { -        "undici-types": "~6.21.0" +        "undici-types": "~7.8.0"        }      },      "node_modules/@types/sax": { @@ -1963,9 +1964,9 @@        "license": "MIT"      },      "node_modules/acorn": { -      "version": "8.14.1", -      "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", -      "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", +      "version": "8.15.0", +      "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", +      "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",        "license": "MIT",        "bin": {          "acorn": "bin/acorn" @@ -2412,9 +2413,9 @@        }      },      "node_modules/caniuse-lite": { -      "version": "1.0.30001721", -      "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001721.tgz", -      "integrity": "sha512-cOuvmUVtKrtEaoKiO0rSc29jcjwMwX5tOHDy4MgVFEWiUXj4uBMJkwI8MDySkgXidpMiHUcviogAvFi4pA2hDQ==", +      "version": "1.0.30001722", +      "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001722.tgz", +      "integrity": "sha512-DCQHBBZtiK6JVkAGw7drvAMK0Q0POD/xZvEmDp6baiMMP6QXXk9HpD6mNYBZWhOPG6LvIDb82ITqtWjhDckHCA==",        "funding": [          {            "type": "opencollective", @@ -3131,9 +3132,9 @@        }      },      "node_modules/electron-to-chromium": { -      "version": "1.5.165", -      "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.165.tgz", -      "integrity": "sha512-naiMx1Z6Nb2TxPU6fiFrUrDTjyPMLdTtaOd2oLmG8zVSg2hCWGkhPyxwk+qRmZ1ytwVqUv0u7ZcDA5+ALhaUtw==", +      "version": "1.5.166", +      "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.166.tgz", +      "integrity": "sha512-QPWqHL0BglzPYyJJ1zSSmwFFL6MFXhbACOCcsCdUMCkzPdS9/OIBVxg516X/Ado2qwAq8k0nJJ7phQPCqiaFAw==",        "license": "ISC"      },      "node_modules/emmet": { @@ -3159,9 +3160,9 @@        "license": "MIT"      },      "node_modules/entities": { -      "version": "6.0.0", -      "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.0.tgz", -      "integrity": "sha512-aKstq2TDOndCn4diEyp9Uq/Flu2i1GlLkc6XIDQSDMuaFE3OPW5OphLCyQ5SpSJZTb4reN+kTcYru5yIfXoRPw==", +      "version": "6.0.1", +      "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz", +      "integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==",        "license": "BSD-2-Clause",        "engines": {          "node": ">=0.12" @@ -3297,9 +3298,9 @@        "license": "BSD-3-Clause"      },      "node_modules/fast-xml-parser": { -      "version": "5.2.3", -      "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.2.3.tgz", -      "integrity": "sha512-OdCYfRqfpuLUFonTNjvd30rCBZUneHpSQkCqfaeWQ9qrKcl6XlWeDBNVwGb+INAIxRshuN2jF+BE0L6gbBO2mw==", +      "version": "5.2.5", +      "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.2.5.tgz", +      "integrity": "sha512-pfX9uG9Ki0yekDHx2SiuRIyFdyAr1kMIMitPvb0YBo8SUfKvia7w7FIyd/l6av85pFYRhZscS75MwMnbvY+hcQ==",        "funding": [          {            "type": "github", @@ -3324,9 +3325,9 @@        }      },      "node_modules/fdir": { -      "version": "6.4.5", -      "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.5.tgz", -      "integrity": "sha512-4BG7puHpVsIYxZUbiUE3RqGloLaSSwzYie5jvasC4LWuBWzZawynvYouhjbQKw2JuIGYdm0DzIxl8iVidKlUEw==", +      "version": "6.4.6", +      "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz", +      "integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==",        "license": "MIT",        "peerDependencies": {          "picomatch": "^3 || ^4" @@ -3678,9 +3679,9 @@        "license": "BSD-2-Clause"      },      "node_modules/immutable": { -      "version": "5.1.2", -      "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.1.2.tgz", -      "integrity": "sha512-qHKXW1q6liAk1Oys6umoaZbDRqjcjgSrbnrifHsfsttza7zcvRAsL7mMV6xWcyhwQy7Xj5v4hhbr6b+iDYwlmQ==", +      "version": "5.1.3", +      "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.1.3.tgz", +      "integrity": "sha512-+chQdDfvscSF1SJqv2gn4SRO2ZyS3xL3r7IW/wWEEzrzLisnOlKiQu5ytC/BVNcS15C39WT2Hg/bjKjDMcu+zg==",        "license": "MIT"      },      "node_modules/import-meta-resolve": { @@ -5025,9 +5026,9 @@        }      },      "node_modules/postcss": { -      "version": "8.5.4", -      "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.4.tgz", -      "integrity": "sha512-QSa9EBe+uwlGTFmHsPKokv3B/oEMQZxfqW0QqNCyhpa6mB1afzulwn8hihglqAb2pOw+BJgNlmXQ8la2VeHB7w==", +      "version": "8.5.5", +      "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.5.tgz", +      "integrity": "sha512-d/jtm+rdNT8tpXuHY5MMtcbJFBkhXE6593XVR9UoGCH8jSFGci7jGvMGH5RYd5PBJW+00NZQt6gf7CbagJCrhg==",        "funding": [          {            "type": "opencollective", @@ -5925,9 +5926,9 @@        }      },      "node_modules/rollup": { -      "version": "4.41.1", -      "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.41.1.tgz", -      "integrity": "sha512-cPmwD3FnFv8rKMBc1MxWCwVQFxwf1JEmSX3iQXrRVVG15zerAIXRjMFVWnd5Q5QvgKF7Aj+5ykXFhUl+QGnyOw==", +      "version": "4.43.0", +      "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.43.0.tgz", +      "integrity": "sha512-wdN2Kd3Twh8MAEOEJZsuxuLKCsBEo4PVNLK6tQWAn10VhsVewQLzcucMgLolRlhFybGxfclbPeEYBaP6RvUFGg==",        "license": "MIT",        "dependencies": {          "@types/estree": "1.0.7" @@ -5940,26 +5941,26 @@          "npm": ">=8.0.0"        },        "optionalDependencies": { -        "@rollup/rollup-android-arm-eabi": "4.41.1", -        "@rollup/rollup-android-arm64": "4.41.1", -        "@rollup/rollup-darwin-arm64": "4.41.1", -        "@rollup/rollup-darwin-x64": "4.41.1", -        "@rollup/rollup-freebsd-arm64": "4.41.1", -        "@rollup/rollup-freebsd-x64": "4.41.1", -        "@rollup/rollup-linux-arm-gnueabihf": "4.41.1", -        "@rollup/rollup-linux-arm-musleabihf": "4.41.1", -        "@rollup/rollup-linux-arm64-gnu": "4.41.1", -        "@rollup/rollup-linux-arm64-musl": "4.41.1", -        "@rollup/rollup-linux-loongarch64-gnu": "4.41.1", -        "@rollup/rollup-linux-powerpc64le-gnu": "4.41.1", -        "@rollup/rollup-linux-riscv64-gnu": "4.41.1", -        "@rollup/rollup-linux-riscv64-musl": "4.41.1", -        "@rollup/rollup-linux-s390x-gnu": "4.41.1", -        "@rollup/rollup-linux-x64-gnu": "4.41.1", -        "@rollup/rollup-linux-x64-musl": "4.41.1", -        "@rollup/rollup-win32-arm64-msvc": "4.41.1", -        "@rollup/rollup-win32-ia32-msvc": "4.41.1", -        "@rollup/rollup-win32-x64-msvc": "4.41.1", +        "@rollup/rollup-android-arm-eabi": "4.43.0", +        "@rollup/rollup-android-arm64": "4.43.0", +        "@rollup/rollup-darwin-arm64": "4.43.0", +        "@rollup/rollup-darwin-x64": "4.43.0", +        "@rollup/rollup-freebsd-arm64": "4.43.0", +        "@rollup/rollup-freebsd-x64": "4.43.0", +        "@rollup/rollup-linux-arm-gnueabihf": "4.43.0", +        "@rollup/rollup-linux-arm-musleabihf": "4.43.0", +        "@rollup/rollup-linux-arm64-gnu": "4.43.0", +        "@rollup/rollup-linux-arm64-musl": "4.43.0", +        "@rollup/rollup-linux-loongarch64-gnu": "4.43.0", +        "@rollup/rollup-linux-powerpc64le-gnu": "4.43.0", +        "@rollup/rollup-linux-riscv64-gnu": "4.43.0", +        "@rollup/rollup-linux-riscv64-musl": "4.43.0", +        "@rollup/rollup-linux-s390x-gnu": "4.43.0", +        "@rollup/rollup-linux-x64-gnu": "4.43.0", +        "@rollup/rollup-linux-x64-musl": "4.43.0", +        "@rollup/rollup-win32-arm64-msvc": "4.43.0", +        "@rollup/rollup-win32-ia32-msvc": "4.43.0", +        "@rollup/rollup-win32-x64-msvc": "4.43.0",          "fsevents": "~2.3.2"        }      }, @@ -6029,6 +6030,12 @@        "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==",        "license": "ISC"      }, +    "node_modules/schema-dts": { +      "version": "1.1.5", +      "resolved": "https://registry.npmjs.org/schema-dts/-/schema-dts-1.1.5.tgz", +      "integrity": "sha512-RJr9EaCmsLzBX2NDiO5Z3ux2BVosNZN5jo0gWgsyKvxKIUL5R3swNvoorulAeL9kLB0iTSX7V6aokhla2m7xbg==", +      "license": "Apache-2.0" +    },      "node_modules/semver": {        "version": "7.7.2",        "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", @@ -6092,17 +6099,17 @@        }      },      "node_modules/shiki": { -      "version": "3.5.0", -      "resolved": "https://registry.npmjs.org/shiki/-/shiki-3.5.0.tgz", -      "integrity": "sha512-1lyPuqIPPAlmR1BKtDkxiuoZTB2IKSyr+GeHXu4ReOyHoEMhCnUoGZDUv4SJRH0Bi4QmsEPsrkQCRSOgnVRC+g==", +      "version": "3.6.0", +      "resolved": "https://registry.npmjs.org/shiki/-/shiki-3.6.0.tgz", +      "integrity": "sha512-tKn/Y0MGBTffQoklaATXmTqDU02zx8NYBGQ+F6gy87/YjKbizcLd+Cybh/0ZtOBX9r1NEnAy/GTRDKtOsc1L9w==",        "license": "MIT",        "dependencies": { -        "@shikijs/core": "3.5.0", -        "@shikijs/engine-javascript": "3.5.0", -        "@shikijs/engine-oniguruma": "3.5.0", -        "@shikijs/langs": "3.5.0", -        "@shikijs/themes": "3.5.0", -        "@shikijs/types": "3.5.0", +        "@shikijs/core": "3.6.0", +        "@shikijs/engine-javascript": "3.6.0", +        "@shikijs/engine-oniguruma": "3.6.0", +        "@shikijs/langs": "3.6.0", +        "@shikijs/themes": "3.6.0", +        "@shikijs/types": "3.6.0",          "@shikijs/vscode-textmate": "^10.0.2",          "@types/hast": "^3.0.4"        } @@ -6445,9 +6452,9 @@        "license": "MIT"      },      "node_modules/undici-types": { -      "version": "6.21.0", -      "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", -      "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", +      "version": "7.8.0", +      "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz", +      "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==",        "license": "MIT"      },      "node_modules/unicode-properties": { @@ -7434,9 +7441,9 @@        }      },      "node_modules/zod": { -      "version": "3.25.51", -      "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.51.tgz", -      "integrity": "sha512-TQSnBldh+XSGL+opiSIq0575wvDPqu09AqWe1F7JhUMKY+M91/aGlK4MhpVNO7MgYfHcVCB1ffwAUTJzllKJqg==", +      "version": "3.25.62", +      "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.62.tgz", +      "integrity": "sha512-YCxsr4DmhPcrKPC9R1oBHQNlQzlJEyPAId//qTau/vBee9uO8K6prmRq4eMkOyxvBfH4wDPIPdLx9HVMWIY3xA==",        "license": "MIT",        "funding": {          "url": "https://github.com/sponsors/colinhacks" diff --git a/package.json b/package.json index 8c1e225..7a7adfa 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@    ],    "scripts": {      "format": "prettier --write .", +    "typecheck": "tsc --noEmit",      "dev": "astro dev",      "start": "astro dev",      "check": "astro check", @@ -30,6 +31,7 @@      "mdast-util-to-string": "^4.0.0",      "reading-time": "^1.5.0",      "sass": "^1.89.1", +    "schema-dts": "^1.1.5",      "typescript": "^5"    },    "devDependencies": { diff --git a/src/components/Analytics.astro b/src/components/Analytics.astro index 3be88c7..0c22f52 100644 --- a/src/components/Analytics.astro +++ b/src/components/Analytics.astro @@ -1,2 +1 @@ -<!-- AppMetrix -->  <script is:inline defer src="https://appmetrix.com/pixel/T5X0z12SoASBV8Dv"></script> diff --git a/src/components/Head.astro b/src/components/Head.astro index de74ff2..a421915 100644 --- a/src/components/Head.astro +++ b/src/components/Head.astro @@ -1,11 +1,15 @@  --- +import type { WithContext, Thing } from "schema-dts"; +import JsonLd from "./JsonLd.astro"; +  type Props = {  	readonly description: string;  	readonly title: string; +	readonly schema: WithContext<Thing>;  };  const canonicalURL = new URL(Astro.url.pathname, Astro.site); -const { description, title } = Astro.props; +const { description, title, schema } = Astro.props;  ---  <head> @@ -27,4 +31,6 @@ const { description, title } = Astro.props;  	<link rel="apple-touch-icon" href="/apple-touch-icon.png" />  	<link rel="manifest" href="/manifest.json" />  	<meta name="theme-color" content="#ffffff" /> + +	<JsonLd schema={schema} />  </head> diff --git a/src/components/Header.astro b/src/components/Header.astro index bd04320..f9a0c57 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -1,7 +1,6 @@  <style lang="scss">  	a {  		margin-right: 1.5rem; -		text-decoration: none;  		&:last-child {  			margin-right: 0; @@ -10,6 +9,8 @@  </style>  <header> -	<a href="/" lang="en" aria-label="Home">Home</a> -	<a href="/blog/" lang="en" aria-label="Blog">Blog</a> +	<nav aria-label="Navigation"> +		<a href="/" lang="en" aria-label="Home">Home</a> +		<a href="/blog/" lang="en" aria-label="Blog">Blog</a> +	</nav>  </header> diff --git a/src/components/Icons/Email.astro b/src/components/Icons/Email.astro new file mode 100644 index 0000000..053b84e --- /dev/null +++ b/src/components/Icons/Email.astro @@ -0,0 +1,20 @@ +<style lang="scss"> +	@use "../../scss/variables" as *; + +	a { +		color: $colorText; +		display: inline-block; +		margin: 0 0.5rem; +	} + +	svg { +		vertical-align: middle; +	} +</style> + +<a href="mailto:valentin@popov.link" title="E-Mail" target="_blank"> +	<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-label="E-Mail"> +		<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path> +		<polyline points="22,6 12,13 2,6"></polyline> +	</svg> +</a> diff --git a/src/components/Icons/GitHub.astro b/src/components/Icons/GitHub.astro new file mode 100644 index 0000000..39a6c1f --- /dev/null +++ b/src/components/Icons/GitHub.astro @@ -0,0 +1,22 @@ +<style lang="scss"> +	@use "../../scss/variables" as *; + +	a { +		color: $colorText; +		display: inline-block; +		margin: 0 0.5rem; +	} + +	svg { +		vertical-align: middle; +	} +</style> + +<a href="https://github.com/valentineus" title="GitHub" target="_blank"> +	<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-label="GitHub"> +		<path +			d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22" +		> +		</path> +	</svg> +</a> diff --git a/src/components/Icons/LinkedIn.astro b/src/components/Icons/LinkedIn.astro new file mode 100644 index 0000000..5e87e86 --- /dev/null +++ b/src/components/Icons/LinkedIn.astro @@ -0,0 +1,21 @@ +<style lang="scss"> +	@use "../../scss/variables" as *; + +	a { +		color: $colorText; +		display: inline-block; +		margin: 0 0.5rem; +	} + +	svg { +		vertical-align: middle; +	} +</style> + +<a href="https://www.linkedin.com/in/valentineus/" title="LinkedIn" target="_blank"> +	<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-label="LinkedIn"> +		<path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"></path> +		<rect x="2" y="9" width="4" height="12"></rect> +		<circle cx="4" cy="4" r="2"></circle> +	</svg> +</a> diff --git a/src/components/Icons/RSS.astro b/src/components/Icons/RSS.astro new file mode 100644 index 0000000..67f4c42 --- /dev/null +++ b/src/components/Icons/RSS.astro @@ -0,0 +1,17 @@ +<style lang="scss"> +	a { +		display: inline-block; +	} + +	svg { +		vertical-align: middle; +	} +</style> + +<a href="/feed.xml" title="RSS Feed" target="_blank"> +	<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-label="RSS Feed"> +		<path d="M4 11a9 9 0 0 1 9 9"></path> +		<path d="M4 4a16 16 0 0 1 16 16"></path> +		<circle cx="5" cy="19" r="1"></circle> +	</svg> +</a> diff --git a/src/components/JsonLd.astro b/src/components/JsonLd.astro new file mode 100644 index 0000000..a589f7b --- /dev/null +++ b/src/components/JsonLd.astro @@ -0,0 +1,12 @@ +--- +import type { WithContext, Thing } from "schema-dts"; + +type Props = { +	readonly schema: WithContext<Thing>; +}; + +const { schema } = Astro.props; +const json = JSON.stringify(schema); +--- + +<script is:inline type="application/ld+json" set:html={json} /> diff --git a/src/components/Sections/LatestPosts.astro b/src/components/Sections/LatestPosts.astro index 070dc46..e91cb4c 100644 --- a/src/components/Sections/LatestPosts.astro +++ b/src/components/Sections/LatestPosts.astro @@ -1,6 +1,7 @@  ---  import { getCollection } from "astro:content";  import dayjs from "dayjs"; +import RSSIcon from "../Icons/RSS.astro";  const posts = await getCollection("blog", ({ data }) => {  	return data.draft !== true; @@ -21,7 +22,7 @@ const latestPosts = posts.slice(0, 5);  </style>  <section> -	<h2>Latest posts</h2> +	<h2>Latest posts <RSSIcon /></h2>  	<ul>  		{  			latestPosts.map((post) => ( @@ -29,7 +30,12 @@ const latestPosts = posts.slice(0, 5);  					<a href={`/blog/${post.slug}`} lang={post.data.lang}>  						{post.data.title}  					</a> -					<small>{dayjs(post.data.pubDate.toString()).format("MMMM DD, YYYY")}</small> + +					<small> +						<time datetime={post.data.pubDate.toISOString()} lang="en"> +							{dayjs(post.data.pubDate.toString()).format("MMMM DD, YYYY")} +						</time> +					</small>  				</li>  			))  		} diff --git a/src/components/Sections/SocialLinks.astro b/src/components/Sections/SocialLinks.astro index 53b8243..c804b60 100644 --- a/src/components/Sections/SocialLinks.astro +++ b/src/components/Sections/SocialLinks.astro @@ -1,43 +1,19 @@ -<style lang="scss"> -	@use "../../scss/variables" as *; +--- +import GitHubIcon from "../Icons/GitHub.astro"; +import LinkedInIcon from "../Icons/LinkedIn.astro"; +import EmailIcon from "../Icons/Email.astro"; +--- +<style lang="scss">  	div {  		margin-bottom: 2rem;  	} - -	a { -		display: inline-block; -		margin: 0 0.5rem; -		color: $colorText; -		text-decoration: none; -	} -	a svg { -		vertical-align: middle; -	}  </style>  <section>  	<div> -		<a href="https://github.com/valentineus" title="GitHub" target="_blank"> -			<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-label="GitHub"> -				<path -					d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22" -				> -				</path> -			</svg> -		</a> -		<a href="mailto:valentin@popov.link" title="E-Mail" target="_blank"> -			<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-label="E-Mail"> -				<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path> -				<polyline points="22,6 12,13 2,6"></polyline> -			</svg> -		</a> -		<a href="/feed.xml" title="RSS" target="_blank"> -			<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-label="RSS"> -				<path d="M4 11a9 9 0 0 1 9 9"></path> -				<path d="M4 4a16 16 0 0 1 16 16"></path> -				<circle cx="5" cy="19" r="1"></circle> -			</svg> -		</a> +		<GitHubIcon /> +		<LinkedInIcon /> +		<EmailIcon />  	</div>  </section> diff --git a/src/components/Sections/Welcome.astro b/src/components/Sections/Welcome.astro index 8056202..ee7cae5 100644 --- a/src/components/Sections/Welcome.astro +++ b/src/components/Sections/Welcome.astro @@ -1,6 +1,6 @@  <section>  	<div> -		<h1>Hi, I'm Valentin Popov 👋</h1> +		<h1>Hi, I'm Valentin 👋</h1>  		<p>I'm a professional software developer currently working as a project manager and team lead. On my personal website, I share thoughts on tech, leadership, and digital life.</p>  		<p>Welcome, and feel free to explore!</p>  	</div> diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index f33ca69..216287e 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -1,4 +1,5 @@  --- +import type { WithContext, Thing } from "schema-dts";  import Analytics from "../components/Analytics.astro";  import Head from "../components/Head.astro";  import Header from "../components/Header.astro"; @@ -8,13 +9,14 @@ type Props = {  	readonly description: string;  	readonly title: string;  	readonly lang: string; +	readonly schema: WithContext<Thing>;  }; -const { title, description, lang } = Astro.props; +const { title, description, lang, schema } = Astro.props;  ---  <html lang={lang}> -	<Head title={title} description={description} /> +	<Head title={title} description={description} schema={schema} />  	<body>  		<main> diff --git a/src/pages/404.astro b/src/pages/404.astro index 8bbd18a..4215a60 100644 --- a/src/pages/404.astro +++ b/src/pages/404.astro @@ -1,13 +1,19 @@  ---  import Layout from "../layouts/BaseLayout.astro"; +import websiteSchema from "../utils/schemas/websiteSchema";  const title = "404 — Page Not Found | Valentin Popov";  const description = "The page you're looking for doesn't exist!";  const lang = "en"; + +const schema = websiteSchema({ +	siteUrl: new URL("/", Astro.site).toString(), +	title, +});  --- -<Layout title={title} description={description} lang={lang}> -	<div style="text-align:center;"> +<Layout title={title} description={description} lang={lang} schema={schema}> +	<div style={{ "text-align": "center" }}>  		<h1>404</h1>  		<p><strong>Page not found</strong></p>  		<p> diff --git a/src/pages/blog/[...slug].astro b/src/pages/blog/[...slug].astro index c625057..8d5169a 100644 --- a/src/pages/blog/[...slug].astro +++ b/src/pages/blog/[...slug].astro @@ -2,6 +2,7 @@  import { type CollectionEntry, getCollection } from "astro:content";  import Comments from "../../components/Comments.astro";  import Layout from "../../layouts/BaseLayout.astro"; +import blogPostSchema from "../../utils/schemas/blogPostSchema";  import dayjs from "dayjs";  type Props = CollectionEntry<"blog">; @@ -21,10 +22,21 @@ const post = Astro.props;  const { Content, remarkPluginFrontmatter } = await post.render(); -const date = dayjs(post.data.pubDate.toString()).format("MMMM DD, YYYY"); -const title = `${post.data.title} | Valentin Popov`; +const title = post.data.title;  const description = post.data.description; +const author = post.data.author;  const lang = post.data.lang; + +const formattedData = dayjs(post.data.pubDate.toString()).format("MMMM DD, YYYY"); +const data = post.data.pubDate.toISOString(); + +const schema = blogPostSchema({ +	siteUrl: new URL("/", Astro.site).toString(), +	title, +	slug: post.slug, +	datePublished: data, +	author, +});  ---  <style lang="scss"> @@ -35,18 +47,18 @@ const lang = post.data.lang;  	}  </style> -<Layout title={title} description={description} lang={lang}> +<Layout title={title} description={description} lang={lang} schema={schema}>  	<article>  		<section> -			<h1>{post.data.title}</h1> +			<h1>{title}</h1>  		</section>  		<section>  			<p>  				<small>  					Posted -					<time datetime={post.data.pubDate.toISOString()} lang="en">{date}</time> -					by {post.data.author} +					<time datetime={data} lang="en">{formattedData}</time> +					by {author}  					<span> â€¢ </span>  					<span>{remarkPluginFrontmatter.minutesRead}</span>  				</small> diff --git a/src/pages/blog/index.astro b/src/pages/blog/index.astro index f800268..611d0fc 100644 --- a/src/pages/blog/index.astro +++ b/src/pages/blog/index.astro @@ -3,10 +3,8 @@ import type { CollectionEntry } from "astro:content";  import { getCollection } from "astro:content";  import Layout from "../../layouts/BaseLayout.astro";  import PostElement from "../../components/PostElement.astro"; - -const title = "Valentin Popov's Blog | Software Development, Leadership & Open-Source"; -const description = "Explore Valentin Popov's blog on software development, tech leadership, and open-source experiments. Stay updated with in-depth tutorials and expert insights."; -const lang = "en"; +import blogSchema from "../../utils/schemas/blogSchema"; +import RSSIcon from "../../components/Icons/RSS.astro";  const posts = await getCollection("blog", ({ data }) => {  	return data.draft !== true; @@ -24,14 +22,26 @@ const postsByYear = posts.reduce<Record<string, CollectionEntry<"blog">[]>>((acc  }, {});  const years = Object.keys(postsByYear).sort((a, b) => Number(b) - Number(a)); + +const title = "Valentin Popov's Blog | Software Development, Leadership & Open-Source"; +const description = "Explore Valentin Popov's blog on software development, tech leadership, and open-source experiments. Stay updated with in-depth tutorials and expert insights."; +const lang = "en"; + +const schema = blogSchema({ +	siteUrl: new URL("/", Astro.site).toString(), +	title, +});  --- -<Layout title={title} description={description} lang={lang}> +<Layout title={title} description={description} lang={lang} schema={schema}>  	<section> -		<h1>Blog posts</h1> +		<h1> +			Blog posts +			<RSSIcon /> +		</h1>  	</section> -	<section style={{ "margin-top": "3rem" }}> +	<section>  		{  			years.map((year) => (  				<div> diff --git a/src/pages/index.astro b/src/pages/index.astro index f595b94..fb52e79 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -3,13 +3,19 @@ import Layout from "../layouts/BaseLayout.astro";  import LatestPostsSection from "../components/Sections/LatestPosts.astro";  import SocialLinksSection from "../components/Sections/SocialLinks.astro";  import WelcomeSection from "../components/Sections/Welcome.astro"; +import websiteSchema from "../utils/schemas/websiteSchema";  const title = "Valentin Popov – Software Developer & Team Lead | Tech Insights"; -const description = "Valentin Popov is an experienced project manager and team lead sharing expert insights on software development, leadership, and digital innovation."; +const description = "Blog by Valentin Popov — software developer and team lead writing about code, side projects, digital tools, and fun experiments.";  const lang = "en"; + +const schema = websiteSchema({ +	siteUrl: new URL("/", Astro.site).toString(), +	title, +});  --- -<Layout title={title} description={description} lang={lang}> +<Layout title={title} description={description} lang={lang} schema={schema}>  	<WelcomeSection />  	<SocialLinksSection />  	<LatestPostsSection /> diff --git a/src/utils/schemas/blogPostSchema.ts b/src/utils/schemas/blogPostSchema.ts new file mode 100644 index 0000000..b20f248 --- /dev/null +++ b/src/utils/schemas/blogPostSchema.ts @@ -0,0 +1,21 @@ +import type { WithContext, BlogPosting } from "schema-dts"; + +export type BlogPostSchemaParams = { +	readonly siteUrl: string; +	readonly title: string; +	readonly slug: string; +	readonly datePublished: string; +	readonly author: string; +}; + +export default ({ siteUrl, title, slug, datePublished, author }: BlogPostSchemaParams): WithContext<BlogPosting> => ({ +	"@context": "https://schema.org", +	"@type": "BlogPosting", +	"url": new URL(`/blog/${slug}`, siteUrl).toString(), +	"headline": title, +	"datePublished": datePublished, +	"author": { +		"@type": "Person", +		"name": author, +	}, +}); diff --git a/src/utils/schemas/blogSchema.ts b/src/utils/schemas/blogSchema.ts new file mode 100644 index 0000000..7ff84d8 --- /dev/null +++ b/src/utils/schemas/blogSchema.ts @@ -0,0 +1,13 @@ +import type { WithContext, Blog } from "schema-dts"; + +export type BlogSchemaParams = { +	readonly siteUrl: string; +	readonly title: string; +}; + +export default ({ siteUrl, title }: BlogSchemaParams): WithContext<Blog> => ({ +	"@context": "https://schema.org", +	"@type": "Blog", +	"url": new URL("/blog/", siteUrl).toString(), +	"name": title, +}); diff --git a/src/utils/schemas/websiteSchema.ts b/src/utils/schemas/websiteSchema.ts new file mode 100644 index 0000000..bebb963 --- /dev/null +++ b/src/utils/schemas/websiteSchema.ts @@ -0,0 +1,13 @@ +import type { WithContext, WebSite } from "schema-dts"; + +export type WebsiteSchemaParams = { +	readonly siteUrl: string; +	readonly title: string; +}; + +export default ({ siteUrl, title }: WebsiteSchemaParams): WithContext<WebSite> => ({ +	"@context": "https://schema.org", +	"@type": "WebSite", +	"url": new URL("/", siteUrl).toString(), +	"name": title, +}); | 
