#Pagefind issue on gitlab pages

2 messages · Page 1 of 1 (latest)

drowsy bronzeBOT
#

Hi @serene urchin. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Hmm, I don't know enough to give you a confident answer yet. The information extracts provided do not contain specific details about the Astro Starlight search functionality or how to resolve issues related to it.

However, I can provide some general advice based on the information available. The error message you're seeing suggests that the search functionality might only be available in production builds. Make sure you're running a production build of your Astro project when deploying to GitLab Pages.

Here's a general guide on how to deploy an Astro site to GitLab Pages from the Astro documentation (https://docs.astro.build/en/guides/deploy/gitlab#_top):

  1. Set the correct site in astro.config.mjs.
  2. Rename the public/ directory to static.
  3. Set outDir:public in astro.config.mjs. This setting instructs Astro to put the static build output in a folder called public, which is the folder required by GitLab Pages for exposed files.

If you're still encountering issues, it might be helpful to check open issues or ask for help in the Astro GitHub repository (https://github.com/withastro/astro/issues).

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: