Going live — Brickfolio Astro
Before the Brickfolio site goes public, replace the demo’s person and work with yours and point the two forms at you; then build it and upload it to any static host, and check it again.
Replacing the demo means your name and photo, your texts, projects, services, posts, testimonials and CV; pointing the forms at you means giving them a destination. Once the site is deployed, click through the live address once more.
Before you deploy
Section titled “Before you deploy”| Where | |
|---|---|
Your domain in site.url (until you change it, it is the demo’s address) |
src/content/site.json. Share links, sitemap.xml and robots.txt are built from it. |
| Name, title and description (they describe the template: write yours) | site in src/content/site.json |
| Your name and photo instead of Javier Martinez’s: the profile card, the greeting and the roles | profile in src/content/pages/home.json |
| Your name instead of “Brickfolio”: the logo, the copyright line | Search src/ for “Brickfolio” (Editing the content) |
The “Email me” address (hello@example.com is a placeholder) |
services.cta.buttons in home.json, and site.email |
| Social links (they open the networks’ home pages) | social in src/content/site.json |
| Your projects, services and posts (the demo’s are samples) | src/content/collections/ (Editing the content) |
| Your testimonials, experience, client logos and questions | src/content/pages/home.json; the logos in src/assets/images/ |
| Your CV | public/cv.pdf |
| Logo and browser icons replaced | Making it look like your brand |
| Placeholder photos replaced (projects, services, posts, testimonials, the profile) | src/assets/images/ |
| The two forms deliver to you | Forms |
| A privacy page, if your country asks for one (the forms collect names, e-mails and phone numbers) | Pages and sections |
| Style guide kept or deleted | src/pages/style-guide.astro |
npm run check and npm run build pass |
— |
The demo content is there to be replaced. Leaving the sample person, the sample e-mail, the sample testimonials or the sample CV on a live site is the most common mistake.
Deploy
Section titled “Deploy”npm run build writes a complete static site to dist/: HTML files, one stylesheet, a few small scripts, the font
files and optimised images. Any host that serves files can run it, with no Node.js needed on the server (unless you
chose server-mode forms).
Vercel, Netlify or Cloudflare Pages (free for most sites)
Section titled “Vercel, Netlify or Cloudflare Pages (free for most sites)”- Push the project to GitHub, GitLab or Bitbucket.
- Import the repository. Astro is detected: build command
npm run build, output folderdist. - Add your form variables (
PUBLIC_FORM_ENDPOINT, …) in the host’s environment settings, then deploy. - Add your domain in the host’s Domains settings and follow the DNS instructions.
Pages are built as files (project/ecoshop-sustainable-e-commerce-platform.html) and served at clean addresses
(/project/ecoshop-sustainable-e-commerce-platform). Netlify and Cloudflare Pages do that by default. On Vercel, the
vercel.json next to package.json does it with "cleanUrls": true. It also holds "git": { "deploymentEnabled": false },
which stops Vercel from deploying on every push: remove that entry if you want each push to your repository to publish
the site.
Any other host (shared hosting, S3, a VPS)
Section titled “Any other host (shared hosting, S3, a VPS)”npm run buildUpload the contents of dist/ to the web root. For clean addresses, make the server try <path>.html:
-
Apache (
.htaccess):RewriteEngine OnRewriteCond %{REQUEST_FILENAME}.html -fRewriteRule ^(.+)$ $1.html [L]ErrorDocument 404 /404.html -
nginx:
try_files $uri $uri.html $uri/ =404;anderror_page 404 /404.html;
Server-mode forms
Section titled “Server-mode forms”If you set PUBLIC_FORM_MODE=server, add your host’s adapter first (npx astro add vercel, netlify, cloudflare or
node). Only the form route runs on the server; every page stays static.
After it is live
Section titled “After it is live”- Check the pages. Click through every page on a phone and a laptop:
- the header’s links from Home and from a project page, and the menu on a phone;
- “More Projects” and “More Posts”, a project and a post with their close buttons;
- “Download CV”, the questions, the tickers;
- both forms.
- Send a message and sign up from the live site with your own address and check that both arrived.
- Verify the share cards. Paste the URL of the home page and of a project into https://www.opengraph.xyz or a chat window, and confirm the title and description (and, for the project, its cover). Home has no share image, as in the original design: to give it one, see Troubleshooting and questions.
- Tell Google. Add the site to Search Console, verify ownership and
submit
https://yourdomain.com/sitemap.xml. Bing has the same thing in Webmaster Tools. - Analytics, if you want it. Add your snippet to the
<head>insrc/layouts/Layout.astro, or use your host’s built-in analytics (Vercel Analytics, Cloudflare Web Analytics, Plausible, Fathom). None of them need a cookie banner. - Keep it current. A new project is one entry in
src/content/collections/projects.jsonand its photos insrc/assets/images/; a new post is one entry inposts.jsonwith today’s date, and it shows first among the articles by itself (Editing the content). Rebuild and upload after each change, or let your host rebuild on every push. Connect a CMS (Using a headless CMS) if someone else will publish.
Performance and SEO
Section titled “Performance and SEO”The template ships with what search engines look for:
- static HTML, with links in it to every project and post (the cards past the first four are in the page, hidden until “More” is pressed);
- one
<h1>per page, and a title and description for every page; - canonical links,
sitemap.xml,robots.txtand share cards; - sized, lazy-loaded images that keep their space while they load, and alt texts on every photo;
- no framework in the browser: a few small scripts.
Keeping the site fast is mostly about images. Export photos at the size they are shown, not the size your camera produced (about 1600 px wide for the covers, 300 px for the service photos); the placeholders show the size of each demo photo. Astro then writes scaled, compressed copies when the site builds.