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:
@@ -6,8 +6,9 @@ backend:
|
|||||||
base_url: https://git.beardedtek.com
|
base_url: https://git.beardedtek.com
|
||||||
api_root: https://git.beardedtek.com/api/v1
|
api_root: https://git.beardedtek.com/api/v1
|
||||||
auth_endpoint: https://git.beardedtek.com/login/oauth/authorize
|
auth_endpoint: https://git.beardedtek.com/login/oauth/authorize
|
||||||
# Add explicit token endpoint for better compatibility
|
|
||||||
token_endpoint: https://git.beardedtek.com/login/oauth/access_token
|
token_endpoint: https://git.beardedtek.com/login/oauth/access_token
|
||||||
|
# Add debugging and ensure PKCE is properly configured
|
||||||
|
auth_flow: pkce
|
||||||
commit_messages:
|
commit_messages:
|
||||||
create: 'content: create {{collection}} "{{slug}}"'
|
create: 'content: create {{collection}} "{{slug}}"'
|
||||||
update: 'content: update {{collection}} "{{slug}}"'
|
update: 'content: update {{collection}} "{{slug}}"'
|
||||||
|
|||||||
@@ -12,12 +12,16 @@
|
|||||||
<script>
|
<script>
|
||||||
// Wait for the script to load before initializing
|
// Wait for the script to load before initializing
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
console.log('DOM loaded, checking for DecapCMS...');
|
||||||
if (typeof DecapCMS !== 'undefined') {
|
if (typeof DecapCMS !== 'undefined') {
|
||||||
|
console.log('DecapCMS found, initializing...');
|
||||||
DecapCMS.init({ config: '/admin/config.yml' });
|
DecapCMS.init({ config: '/admin/config.yml' });
|
||||||
} else {
|
} else {
|
||||||
|
console.log('DecapCMS not found, waiting...');
|
||||||
// Fallback: wait a bit more for the script to load
|
// Fallback: wait a bit more for the script to load
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
if (typeof DecapCMS !== 'undefined') {
|
if (typeof DecapCMS !== 'undefined') {
|
||||||
|
console.log('DecapCMS found after timeout, initializing...');
|
||||||
DecapCMS.init({ config: '/admin/config.yml' });
|
DecapCMS.init({ config: '/admin/config.yml' });
|
||||||
} else {
|
} else {
|
||||||
console.error('DecapCMS failed to load');
|
console.error('DecapCMS failed to load');
|
||||||
|
|||||||
Reference in New Issue
Block a user