R_Gate

Updating the website

Quick updates

  1. Open content/site.json to change contact information or the homepage headline.
  2. Open content/travel.json to update destinations, services and FAQs.
  3. Run npm run dev and refresh http://localhost:4173/R_Gate/.
  4. Run npm run check before committing.
  5. Commit and push to main; GitHub Actions rebuilds and publishes the site.

You can edit the JSON files using GitHub’s pencil button too. Preserve valid JSON: quote property names and strings, separate entries with commas, and avoid trailing commas. Every update is versioned and can be reverted through Git.

Business settings

whatsapp uses international digits without +, spaces, or a leading 00. phone uses international format with +. Set contactConfirmed to true only for verified contact details. When false, direct phone and WhatsApp details are suppressed. The current details were confirmed by the owner.

Empty email, hours, legalName, license, and socials fields are deliberate. Do not make up details to fill them. Add social links in this form:

"socials": [
  { "label": "Instagram", "url": "https://www.instagram.com/YOUR_REAL_ACCOUNT/" }
]

Use complete HTTPS links for social accounts. siteUrl must end with /; currently it is https://rgate-travel.com/. Update it if the domain changes, then rebuild. It controls canonical URLs, the sitemap, and the custom 404’s asset paths. To return to the default repository address, use https://mohammadmasri1.github.io/R_Gate/ and remove the custom domain in GitHub Pages settings.

The homepage hero.image should match a destination image key. Update hero.caption to describe that same image. A \n in hero.title creates a line break.

Add or edit a destination

Copy a destination object in content/travel.json. Give it a unique lowercase, hyphenated id, such as turkey. That creates destination-turkey.html automatically, plus a card on the destinations page and homepage.

Add its image to assets/images/, for example turkey.jpg; set image to turkey. Include a useful Arabic alt description. Images should be compressed and ideally around 1200 pixels wide; the current destination assets are approximately 50–95 KB each. Add more image keys to gallery if you have additional licensed images.

region currently supports europe or asia. Categories are family, honeymoon, adventure, beach, and culture. To add a new category or region, also extend the label map and select options in src/templates.mjs.

itinerary entries are suggested stops, not confirmed days. Prices, hotels, dates and inclusions are agreed in the customer’s written offer; the default template deliberately makes no unsupported promises.

Publish a real offer

offers is empty until real, approved offers exist. Add an object shaped like this, replacing every bracketed value with approved details:

{
  "destinationId": "italy",
  "title": "[عنوان العرض الحقيقي]",
  "description": "[المدة والتواريخ والإقامة والخدمات والشروط المعتمدة]",
  "label": "[تصنيف العرض]",
  "price": "[السعر المعتمد وعملته ووحدته]",
  "expires": "2027-12-31"
}

destinationId must match a destination. Expired offers are omitted at build time; publish another commit or run the workflow manually after an expiry to refresh the static site. The optional expiry date remains visible to visitors. Offer inquiry links carry the offer title into the contact form, while the destination link opens its reusable detail page. No availability is checked automatically.

Layout and styles

Change shared design tokens near the top of assets/css/style.css for site-wide colors and surfaces. Layout breakpoints are grouped at the end of that file. Page HTML and shared components are generated from src/templates.mjs. Arabic text inserted from JSON is escaped automatically; content fields do not accept arbitrary HTML.

The legal draft text lives in the privacy.html and terms.html template definitions. Replace draft wording and placeholders with approved policies; populate legalName and license when verified.

Inquiry behavior

The form validates required fields, then prepares a reviewable message in the browser. It does not send or store the visitor’s data. The visitor must choose افتح واتساب, then send the message within WhatsApp. The copy button is a fallback. Phone links, direct WhatsApp links, content navigation, and FAQs remain usable without JavaScript.

النسخة المختصرة بالعربية