Project

General

Profile

Actions

Static Site Generation

Our goal with OpenAtlas Discovery is to make it easily possible to host as static site once a project using it has ended. To achieve this we make use of various technologies, this document is meant as a collection for all the relevant information regarding this.

Used Technologies

Generating the Site

Enviroment Variables

Enviroment variables enable us to make OA Discovery assign important variables ahead of time, like the URL of the site hosting the API for the backend. In static sites the enviroment variable cannot be changed once it has be generated, thus we need to make sure that the correct enviroment variable is provided at the time of generation. Though as we crawl the data from the backend in order to make the site static it should not pose a problem in most cases.

To work with nuxt and be available in the nuxt runtime config the enviroment variables need to follow the naming scheme "NUXT_PUBLIC_VAR_NAME" for public variables and "NUXT_VAR_NAME" for private ones. The naming sheme is explained in more detail here.

Generating a Static Site for the frontend-demos on the CRAWS servers

Steps:

  • Make sure the right environment variables are declared: NUXT_PUBLIC_API_BASE_URL & NUXT_PUBLIC_OPEN_API_BASE_URL => are using https://demo.openatlas.eu/ or https://demo-dev.openatlas.eu/, set the NUXT_PUBLIC_SPECIAL_IMPRINT to "enabled" to render the custom imprint with Alex's email address.
  • Generate the site with:
    pnpm run generate
    
  • Zip the generated '.output'-folder and send it to Alex

Updated by Olivia Reichl 11 days ago · 12 revisions

Also available in: PDF HTML TXT