Contact form and portfolio
Two sections talk to a service outside the site: the contact form and the
portfolio. Both need values in pages.config.js that we issue. A site
editor working through the chat cannot make them up,
so it writes the section, leaves the values alone and ends its answer with
what you have to do — the steps below.
The contact form
Section titled “The contact form”<ContactForm> posts to a receiver on our side behind a Cloudflare Turnstile
challenge; every request lands in a Telegram group as a message. In the
template both values are empty: the form is rendered but sends nothing.
- Ask us to connect the form. Tell us the site’s host and the Telegram group that should receive the requests (we add our bot to it), or ask us to create one.
- We register the receiver and the Turnstile pair for your domain and send
back two values:
contactFormReceiverURLandturnstileSiteKey. - Put them into
pages.config.jsand publish. The site key is public and safe in the repository; the secret half stays on our side.
On preview hosts the form shows a note instead of sending; it works on the production host only.
The portfolio
Section titled “The portfolio”<PortfolioSection> shows project cards that live outside the repository:
each card is an issue in a Redmine project we host, with a title, a
description, a picture and a source link. The build fetches them, so the
site shows what the issues held at the last build; after editing a card,
publish any change (or ask us to rebuild).
- Ask us for a portfolio. We create the project, give you access to edit
the cards, and send back
portfolioUrlandportfolioBearer. - Put both into
pages.config.jsyourself.portfolioBeareris a token: it belongs to this site only — never copy it into another repository. - List the cards in the tag:
issuesId="101, 102, 103", in the order they should appear.
What else the editor will ask you for
Section titled “What else the editor will ask you for”The editor cannot add binary files. When a page needs a picture, a logo or
a PDF that is not in images/ or assets/ yet, it writes the tag with a file
name of its choice and asks you to upload the file under that name: in
GitLab open the repository, choose the branch being edited (dev when you
work through the editor), Upload file. The next build picks it up.