Editing the Contact Page
This page teaches you how to edit the Contact page in Finance App. You do not need to know how to code. You only need to edit one file and one external service.
By the end of this page, you will know:
- Where the file is located
- What each line does
- How to change the title, description, image, date, and message
- How the contact form works and how to connect it to your own email
Where the File Is
Section titled “Where the File Is”Open your project folder. Then open this path:
src/pages/contact/index.mdThis file is the Contact page of your website. It becomes the route /contact/.
What the Contact Page Is For
Section titled “What the Contact Page Is For”The Contact page is where visitors send you a message. It has two parts:
- The page content — the text and image you see above the form
- The form itself — handled by Formspree, an external service
The Full File
Section titled “The Full File”Here is the complete src/pages/contact/index.md file that comes with the theme:
---layout: ../../design/page/Contact.astrotitle: "Contact — Finance App Astro JS Theme"description: "Get in touch about the Finance App Astro JS theme, custom website builds, headless CMS integration, or documentation websites."image: "https://images.unsplash.com/photo-1516163173352-d1c4d006f9ac"formspree_id: https://formspree.io/f/yourformspree_idpubDate: "2023-12-04"---
Have a question about the Finance App Astro JS theme, or need help with a website project? Send a message and the team will get back to you within 1–2 business days.What Each Line Does
Section titled “What Each Line Does”Frontmatter
Section titled “Frontmatter”The block between the two --- lines at the top is called frontmatter. It tells Astro how to build this page.
| Field | What It Does |
|---|---|
layout |
Which layout file to use. Do not change this. |
title |
The page title. Shown in the browser tab and search results. |
description |
A short summary of the page. Shown in search results and social previews. |
image |
The image shown at the top of the Contact page. |
formspree_id |
The URL that receives form submissions. You must replace this with your own. |
pubDate |
The publish date. Used for metadata. |
Article Content
Section titled “Article Content”Everything below the second --- is the article content. It appears on the Contact page above the form.
How to Edit — Step by Step
Section titled “How to Edit — Step by Step”Change the Page Title
Section titled “Change the Page Title”- Open
src/pages/contact/index.md - Find the line starting with
title: - Replace the text inside the quotes
- Save the file
Example:
title: "Contact Us"Important: Keep the double quotes
"on both sides.
Change the Page Description
Section titled “Change the Page Description”- Find the line starting with
description: - Replace the text inside the quotes
- Save
Example:
description: "Send us a message and we will reply within two business days."Change the Header Image
Section titled “Change the Header Image”- Put your image in
public/img/ - Find the line starting with
image: - Replace the URL with your image path
- Save
Using a local image:
image: "/img/your-image.avif"Using an external image:
image: "https://example.com/your-image.jpg"Change the Publish Date
Section titled “Change the Publish Date”- Find the line starting with
pubDate: - Replace the date with today’s date, in the format
"YYYY-MM-DD" - Keep the double quotes
Example:
pubDate: "2026-01-15"Change the Article Content
Section titled “Change the Article Content”- Find the text below the second
---line - Replace it with your own text
- Save the file
Example:
Have a question about our product, or need help with a project?
Send a message and we will get back to you within two business days.How the Contact Form Works
Section titled “How the Contact Form Works”The contact form on this page does not send email directly from your website. Instead, it sends the form data to Formspree, a free service that forwards messages to your email.
Why Formspree
Section titled “Why Formspree”Static sites like Astro do not have a backend server. A service like Formspree is needed to receive and forward form submissions.
Setting Up Your Own Formspree Account
Section titled “Setting Up Your Own Formspree Account”- Go to:
https://formspree.io/- Create a free account
- Create a new form
- Formspree will give you a form URL that looks like:
https://formspree.io/f/xxxxxxxx- Copy that URL
- Open
src/pages/contact/index.md - Find the line starting with
formspree_id: - Replace the URL with your own
- Save the file
Example:
formspree_id: https://formspree.io/f/yourformidAfter this change, every message sent through the Contact page will arrive at the email you registered with Formspree.
Testing the Form
Section titled “Testing the Form”- Start the dev server with
npm run dev - Open
http://localhost:4321/contact/ - Fill in the form and submit
- Check the email you registered with Formspree
If you do not receive the message, check your spam folder, or log in to Formspree to see the submission log.
Rules for Frontmatter
Section titled “Rules for Frontmatter”- Keep the two
---lines. They mark the start and end of the frontmatter. - Do not delete the
layoutline. It tells Astro which layout to use. - Keep the spacing after the colon. Write
title: "Contact", nottitle:"Contact". - Use double quotes for
title,description, andimage. - Do not use quotes for
formspree_id— the URL goes without quotes.
Save and Preview
Section titled “Save and Preview”- Save the file
- If the dev server is running, the browser will reload automatically
- If not, run:
npm run dev- Open
http://localhost:4321/contact/in your browser
Common Mistakes
Section titled “Common Mistakes”| Mistake | What Happens | Fix |
|---|---|---|
Removed one of the --- lines |
Build error | Add the missing --- line |
Changed the layout path |
Build error, page cannot find layout | Restore ../../design/page/Contact.astro |
Did not replace formspree_id |
Messages go to the theme author, not you | Replace with your own Formspree URL |
| Missing space after the colon | Field is not read correctly | Write title: "Contact", not title:"Contact" |
| Wrong image path | Broken image | Check the file exists in public/img/ |
| Formspree URL has quotes | Form may not work | Do not put quotes around formspree_id |
Relationship with Other Files
Section titled “Relationship with Other Files”The Contact page uses its own file, its own layout, and an external form service.
| File | What It Controls |
|---|---|
src/pages/contact/index.md |
The Contact page content |
src/design/page/Contact.astro |
The Contact page layout and form |
src/data/config.json |
The navbar and footer shown on this page |
| Formspree account | Where the form messages are sent |
Next Step
Section titled “Next Step”After editing the Contact page, you can continue to edit the SEO settings or deployment steps.