    };

            // Initialize
            const initialize = async () => {
                try {
                    // Fetch site configuration first
                    const configResponse = await fetch('/api/config');
                    if (configResponse.status >= 400) {
                        throw new Error(configResponse.statusText)
                    }
                    const config = await configResponse.json();
                    document.getElementById('site-title').textContent = confi