Skip to content

Commit e990bc3

Browse files
committed
Initial commit
0 parents  commit e990bc3

8 files changed

+5312
-0
lines changed

.gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.ntli
2+
node_modules
3+
.cache
4+
dev-model.gql
5+
6+
# Local Netlify folder
7+
.netlify

README.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Netlify SDK Build Event Handler linkchecker template
2+
3+
This is a very simple project that has everything you need to deploy a private integration to Netlify. It is build using the [Netlify SDK](https://sdk.netlify.com).
4+
5+
This private integration contains a [Build Event Handler](https://sdk.netlify.com/build-event-handlers/overview/) that uses [Linkinator](https://www.npmjs.com/package/linkinator) to check for broken links on any site this integration is enabled on.
6+
7+
## Quick Setup + Deploy Option
8+
9+
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/integration/start/deploy?repository=https://github.com/netlify/sdk-build-event-handler-link-checker-template&integrationName=link-checker-integration&integrationSlug=link-checker-integration&integrationDescription=Check%20your%20sites%20links&scopes=site:read&integrationLevel=site)
10+
11+
## Scripts
12+
13+
### Build
14+
15+
This builds the integration and outputs a `.ntli` folder. This is the folder that Netlify uses to deploy the integration.
16+
17+
```bash
18+
pnpm run build
19+
```

integration.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# yaml-language-server: $schema=https://sdk.netlify.com/config-schema.json
2+
config:
3+
slug: sdk-build-event-handler-link-checker-template
4+
name: sdk-build-event-handler-link-checker-template
5+
description: This
6+
integrationLevel: site
7+
scopes:
8+
site: ["read"]

netlify.toml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[build]
2+
command="netlify-integration build -a"
3+
publish=".ntli/site/static"
4+
5+
[functions]
6+
directory=".ntli/site/netlify/functions"
7+
node_bundler = "esbuild"
8+
9+
[[headers]]
10+
for="/ui/*"
11+
[headers.values]
12+
Access-Control-Allow-Origin="*"
13+
Access-Control-Allow-Headers="*"
14+
Access-Control-Allow-Methods="*"
15+
16+
[dev]
17+
autoLaunch = false
18+
functions = ".ntli/site/netlify/functions"
19+
publish = ".ntli/site/static"

package.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "sdk-build-event-handler-link-checker-template",
3+
"version": "0.0.1",
4+
"main": "src/index.ts",
5+
"type": "module",
6+
"scripts": {
7+
"build": "netlify-integration build -a",
8+
"dev": "netlify-integration dev -a",
9+
"preview": "netlify-integration preview"
10+
},
11+
"dependencies": {
12+
"@netlify/sdk": "^1.5.0",
13+
"typescript": "^5.2.2",
14+
"a11y": "^0.5.1",
15+
"linkinator": "^6.0.1"
16+
}
17+
}

0 commit comments

Comments
 (0)