Remove admin redirect page from content directory

This commit is contained in:
2025-07-29 11:28:42 -08:00
parent 2eff84ae2f
commit 25bdb09f30
4 changed files with 161 additions and 5 deletions

View File

@@ -1,5 +0,0 @@
---
title: "Admin"
layout: "redirect"
redirect: "/admin/"
---

View File

@@ -0,0 +1,111 @@
backend:
name: github
repo: beardedtek/flowbite-beardedtek.com
branch: main
commit_messages:
create: 'content: create {{collection}} "{{slug}}"'
update: 'content: update {{collection}} "{{slug}}"'
delete: 'content: delete {{collection}} "{{slug}}"'
uploadMedia: 'media: upload {{path}}'
deleteMedia: 'media: delete {{path}}'
# This enables local backend without authentication
local_backend: true
media_folder: "static/images/uploads"
public_folder: "/images/uploads"
collections:
- name: "pages"
label: "Pages"
folder: "content"
create: true
slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
fields:
- {label: "Layout", name: "layout", widget: "hidden", default: "page"}
- {label: "Title", name: "title", widget: "string"}
- {label: "Publish Date", name: "date", widget: "datetime", format: "YYYY-MM-DD", date_format: "YYYY-MM-DD", time_format: false}
- {label: "Draft", name: "draft", widget: "boolean", default: false}
- {label: "Body", name: "body", widget: "markdown"}
- name: "about"
label: "About Page"
file: "content/about/_index.md"
fields:
- {label: "Layout", name: "layout", widget: "hidden", default: "page"}
- {label: "Title", name: "title", widget: "string"}
- {label: "Body", name: "body", widget: "markdown"}
- name: "contact"
label: "Contact Page"
file: "content/contact/_index.md"
fields:
- {label: "Layout", name: "layout", widget: "hidden", default: "page"}
- {label: "Title", name: "title", widget: "string"}
- {label: "Body", name: "body", widget: "markdown"}
- name: "rates"
label: "Rates Page"
file: "content/rates/_index.md"
fields:
- {label: "Layout", name: "layout", widget: "hidden", default: "page"}
- {label: "Title", name: "title", widget: "string"}
- {label: "Body", name: "body", widget: "markdown"}
- name: "blog"
label: "Blog Posts"
folder: "content/blog"
create: true
slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
fields:
- {label: "Layout", name: "layout", widget: "hidden", default: "single"}
- {label: "Title", name: "title", widget: "string"}
- {label: "Publish Date", name: "date", widget: "datetime", format: "YYYY-MM-DD", date_format: "YYYY-MM-DD", time_format: false}
- {label: "Draft", name: "draft", widget: "boolean", default: false}
- {label: "Description", name: "description", widget: "text", required: false}
- {label: "Tags", name: "tags", widget: "list", required: false}
- {label: "Body", name: "body", widget: "markdown"}
- name: "navbar"
label: "Navigation"
file: "data/navbar.yml"
fields:
- {label: "Enable Navigation", name: "enable", widget: "boolean", default: true}
- name: "footer"
label: "Footer"
file: "data/footer.yml"
fields:
- {label: "Enable Footer", name: "enable", widget: "boolean", default: true}
- name: "contact_data"
label: "Contact Data"
file: "data/contact.yml"
fields:
- {label: "Contact Information", name: "contact", widget: "object", fields: [
{label: "Email", name: "email", widget: "string"},
{label: "Phone", name: "phone", widget: "string"},
{label: "Address", name: "address", widget: "text"}
]}
- name: "rates_data"
label: "Rates Data"
file: "data/rates.yml"
fields:
- {label: "Rates Information", name: "rates", widget: "object", fields: [
{label: "Hourly Rate", name: "hourly", widget: "string"},
{label: "Service Description", name: "description", widget: "text"}
]}
- name: "config"
label: "Site Configuration"
file: "config.yml"
fields:
- {label: "Site Title", name: "title", widget: "string"}
- {label: "Base URL", name: "baseURL", widget: "string"}
- {label: "Language Code", name: "languageCode", widget: "string"}
- {label: "Parameters", name: "params", widget: "object", fields: [
{label: "Authors", name: "authors", widget: "string"},
{label: "Homepage", name: "homepage", widget: "string"},
{label: "Social Image Path", name: "social_image_path", widget: "string"}
]}

View File

@@ -0,0 +1,25 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>CMS Local Test</title>
</head>
<body>
<h1>Sveltia CMS Local Test</h1>
<p>Testing with local backend (no authentication required)</p>
<script src="https://unpkg.com/sveltia-cms@0.92.0/dist/sveltia-cms.js"></script>
<script>
console.log('Sveltia CMS loaded');
try {
SveltiaCMS.init({
config: '/admin/config-local.yml'
});
console.log('Sveltia CMS initialized with local config');
} catch (error) {
console.error('Sveltia CMS error:', error);
}
</script>
</body>
</html>

25
static/admin/test.html Normal file
View File

@@ -0,0 +1,25 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>CMS Test</title>
</head>
<body>
<h1>Sveltia CMS Test</h1>
<p>If you can see this, the basic setup is working.</p>
<script src="https://unpkg.com/sveltia-cms@0.92.0/dist/sveltia-cms.js"></script>
<script>
console.log('Sveltia CMS loaded');
try {
SveltiaCMS.init({
config: '/admin/config.yml'
});
console.log('Sveltia CMS initialized');
} catch (error) {
console.error('Sveltia CMS error:', error);
}
</script>
</body>
</html>