Skip to content

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.

<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.

  1. 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.
  2. We register the receiver and the Turnstile pair for your domain and send back two values: contactFormReceiverURL and turnstileSiteKey.
  3. Put them into pages.config.js and 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.

<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).

  1. Ask us for a portfolio. We create the project, give you access to edit the cards, and send back portfolioUrl and portfolioBearer.
  2. Put both into pages.config.js yourself. portfolioBearer is a token: it belongs to this site only — never copy it into another repository.
  3. List the cards in the tag: issuesId="101, 102, 103", in the order they should appear.

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.