mirror of
https://github.com/BeardedTek/flowbite-beardedtek.com.git
synced 2025-12-06 05:31:52 +00:00
Add PKCE support in config.yml and enhance DecapCMS initialization in index.html with additional load checks and debugging logs.
This commit is contained in:
@@ -12,12 +12,16 @@
|
||||
<script>
|
||||
// Wait for the script to load before initializing
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
console.log('DOM loaded, checking for DecapCMS...');
|
||||
if (typeof DecapCMS !== 'undefined') {
|
||||
console.log('DecapCMS found, initializing...');
|
||||
DecapCMS.init({ config: '/admin/config.yml' });
|
||||
} else {
|
||||
console.log('DecapCMS not found, waiting...');
|
||||
// Fallback: wait a bit more for the script to load
|
||||
setTimeout(function() {
|
||||
if (typeof DecapCMS !== 'undefined') {
|
||||
console.log('DecapCMS found after timeout, initializing...');
|
||||
DecapCMS.init({ config: '/admin/config.yml' });
|
||||
} else {
|
||||
console.error('DecapCMS failed to load');
|
||||
|
||||
Reference in New Issue
Block a user