Polaris Astro documentation
Site settings
Every option in src/site.config.ts, from your name and currency to the menus, footer and demo bar.
src/site.config.ts holds your business details and the parts that appear on every page. Pages, trips, stays and destinations have their own files in src/content/.
site
| Field | What it does |
|---|---|
name |
Your business name, shown in the header, footer, page titles and structured data. |
url |
Your final address, such as https://yourtours.com. Used for the enquiry thank-you address and structured data. Also set site in astro.config.mjs. |
locale |
The language code of the page (en). Also used for currency and month formats and in the journal feed. |
currency |
A currency code such as USD, EUR, GBP or INR. Every price is formatted in it. |
units |
metric shows metres and kilometres. imperial shows feet and miles. Altitudes in your files are always entered in metres. |
tagline |
One line about your business. Used in the structured data and in the journal feed. |
shareImage |
The default image for link previews on social media, as a file name in src/assets/images/. |
legalName |
Your registered company name, used in structured data. |
founded |
The year you started, used in structured data. |
priceRange |
A rough price band for search listings: $, $$, $$$ or $$$$. |
nav |
The main menu (see below). |
footer |
The company and legal link lists (see below). |
phone |
Your phone number, as you want it shown. |
whatsapp |
Your WhatsApp number, digits only, with the country code: 15550104477. |
email |
Your email address. |
address |
Your office address, one line per item. The last line is read as the country. |
office |
coords (lat, lng) and altitude of your office, used for the atlas line. |
social |
Your social profiles, each with a label and href. Leave it empty to hide them. |
booking |
How enquiries are sent. See Enquiries. |
demo |
The demo bar. See below. |
There is also a region setting (default or india). It is kept for a later version and changes nothing yet, so leave it as default.
The small “Built with Polaris” line at the bottom of the footer is the footer.built text in src/i18n/ui.ts. Change it or set it to an empty string.
The menu
nav is a list of items with a label and an href:
nav: [
{ label: 'Destinations', href: '/destinations/' },
{ label: 'Trips', href: '/trips/' },
{ label: 'Stays', href: '/stays/' },
{ label: 'Camping', href: '/camping/' },
{ label: 'Journal', href: '/journal/' },
],
The menu is one level. On phones it opens in a full-screen panel from the menu button. The accent button in the header, “Plan a trip”, links to booking.href.
The footer
footer.company and footer.legal are lists of label and href:
footer: {
company: [
{ label: 'About us', href: '/about/' },
{ label: 'Contact', href: '/contact/' },
{ label: 'Journal', href: '/journal/' },
{ label: 'Plan a trip', href: '/enquire/' },
],
legal: [
{ label: 'Privacy', href: '/privacy/' },
{ label: 'Terms', href: '/terms/' },
{ label: 'Cancellation', href: '/cancellation/' },
],
},
The Destinations column is built from your destinations, and the contact column from your phone, whatsapp, email and address. The legal links appear on the bottom line beside the copyright.
Contact details in one place
phone, whatsapp, email and address are used by the footer, the contact block, the call to action block, the booking box and the structured data. Change them once here.
Demo bar
The demo bar is a “Demos” button in the corner of the demo. It shows links to the three home page demos, the block library and the style guide. On your own site, turn it off:
demo: {
enabled: false,
// ...
},
demo.buy is the address of the “Get Polaris” button. Leave it empty to hide the button. demo.links is the list shown in the bar.
Three home pages
The download has three home pages. index.md is the tour operator home at /. home-stays.md (/home-stays/) is for stays and camps, and home-valley.md (/home-valley/) is for one region.
To use another one as your main page, copy its blocks over src/content/pages/index.md. For example, copy home-stays.md over index.md. Then delete the pages you don’t need and remove their links from demo.links.
Words the theme prints
Button labels, form labels, “Dates on request”, screen-reader text and similar words are in src/i18n/ui.ts. Change the en strings to change the wording. Some of these are promises, such as the line under the enquiry form that says you reply within one working day. Check them against how you really work.
Polaris ships in English. To translate it, copy the en object in src/i18n/ui.ts to a new language object, add it to languages and set current in the same file, then set locale in src/site.config.ts.