Skip to content

wunderundfitzig/ffa-website

Repository files navigation

This is a Next.js project bootstrapped with create-next-app.

Getting Started

First, run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying pages/index.js. The page auto-updates as you edit the file.

Deploy

Deployment is setup via vercel and github actions so you can just push and will get an url for every commit.
To deploy to the live site create a pull request to merge into master.

Setup Wordpress

Plugins

Setup

  • The blocks used by this page must be created with lazy-blocks
    TODO: mabe add a backup of the confuguration here

  • Set the "Site URl" in the wordpress page settings to the frontend url: https://abenteuerzentrum.berlin.

    This will break gutenberg because it will look for the rest_url under the frontend domain.
    To fix this create a file fix-rest-url.php in wp-content/plugins/fix-rest-url with following to content:

    <?php
    
    /**
     * Plugin Name:       Fix Rest URL
     * Description:       A WordPress plugin that updates the REST URL to use the site URL instead of the home URL.
     */
    
    add_filter('rest_url', function($url) {
        $url = str_replace(home_url(), site_url().'/index.php', $url);
        return $url;
    });

    (This is just a very simple wordpress plugin)