Skip to content

Commit

Permalink
Merge pull request #783 from centrapay/detect-broken-links
Browse files Browse the repository at this point in the history
⛓️ Check build for broken links
  • Loading branch information
MeganSteenkamp authored Oct 5, 2023
2 parents fe38b85 + c9aaa40 commit 980c2a0
Show file tree
Hide file tree
Showing 4 changed files with 192 additions and 12 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Validate Jekyll Site
name: Validate Site

on:
workflow_dispatch:
Expand All @@ -7,10 +7,10 @@ on:
- master

jobs:
jekyll:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
Expand All @@ -29,3 +29,4 @@ jobs:
- run: yarn lint
- run: yarn test
- run: ./build.sh
- run: yarn linkinator
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"private": true,
"scripts": {
"lint": "eslint --ext .js,.mjs,.ts,.vue .",
"linkinator": "linkinator dist/ --recurse --verbosity error --skip 'twitter.com|www.farmlands.co.nz|www.instagram.com|yourapp.example.com|centrapay-docs.dev.s3-website-ap-southeast-1.amazonaws.com/api'",
"dev": "astro dev",
"build": "astro build",
"preview": "astro preview",
Expand All @@ -28,6 +29,7 @@
"flexsearch": "^0.7.31",
"glob": "^8.1.0",
"gray-matter": "^4.0.3",
"linkinator": "^5.0.2",
"mdast-util-to-string": "^3.1.1",
"mermaid": "^9.3.0",
"remark-html": "^15.0.2",
Expand Down
3 changes: 2 additions & 1 deletion src/pages/api/[...slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ export async function getStaticPaths() {
const { entry } = Astro.props;
const { Content, headings } = await entry.render();
const previewImg = entry.data.img || '/default-cover.jpg';
const { title, description } = entry.data;
---
<BaseLayout title={title} description={description}>
<BaseLayout title={title} description={description} img={previewImg}>
<div class="relative mx-auto desktop-gutters flex justify-center">
<div class="min-w-0 max-w-2xl flex-auto px-8 pb-16 pt-8 xl:pt-16 lg:max-w-none">
<article>
Expand Down
Loading

0 comments on commit 980c2a0

Please sign in to comment.