Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/contact form #2

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ server
functions/**/*.js

# Development
node_modules
**/**/node_modules

# Cache
.cache
Expand Down Expand Up @@ -36,4 +36,4 @@ lerna-debug.log*

# Yarn
.yarn/*
!.yarn/releases
!.yarn/releases
8 changes: 4 additions & 4 deletions site/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ summarylength = 25
name = "About"
url = "about"
weight = 2
# [[menu.nav]]
# name = "Get in touch"
# url = "contact"
# weight = 3
[[menu.nav]]
name = "Get in touch"
url = "contact"
weight = 3

# Site Params
[params]
Expand Down
4 changes: 2 additions & 2 deletions functions/_middleware.ts → site/functions/_middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import mailchannelsPlugin from "@cloudflare/pages-plugin-mailchannels";
export const onRequest = mailchannelsPlugin({
personalizations: [
{
to: [{ name: "ACME Support", email: "[email protected]" }],
to: [{ name: "ACME Support", email: "[email protected]" }],
},
],
from: { name: "Enquiry", email: "[email protected]" },
respondWith: () =>
new Response(null, {
status: 302,
headers: { Location: "/thank-you" },
headers: { Location: "/blog/thanks" },
}),
});
Loading