Compare commits

..

29 Commits

Author SHA1 Message Date
3372f62596 Update Alaska business license link in footer to open in a new tab for better user experience. 2025-10-23 10:30:10 -08:00
530e4d608f Add Alaska business license link to footer for compliance. 2025-10-23 10:28:33 -08:00
a9c0f13d6a Fixed typo 2025-10-23 10:26:19 -08:00
c7a585af1a Add business license to footer. 2025-10-23 10:21:14 -08:00
83250b66dd Update rates.yml 2025-09-17 09:32:49 -08:00
ff6d6f9a4b Update rates.yml 2025-09-17 09:02:06 -08:00
7833fc65c3 Update Decap CMS script source in index.html for improved compatibility and performance. 2025-07-29 14:02:25 -08:00
a54f95baf5 Add PKCE support in config.yml and enhance DecapCMS initialization in index.html with additional load checks and debugging logs. 2025-07-29 14:00:00 -08:00
03e3c5aef9 Add token endpoint to config.yml for compatibility and enhance Decap CMS initialization in index.html with load checks. 2025-07-29 13:56:21 -08:00
df2325adb6 Fix label formatting in config.yml and initialize Decap CMS in index.html for improved content management setup. 2025-07-29 13:53:03 -08:00
5809a88fb3 Update app_id format in config.yml for consistency and clarity. 2025-07-29 13:49:21 -08:00
31f2e4823d Add blog collection to config.yml and update index.html to use Decap CMS, enhancing content management and improving HTML structure. 2025-07-29 13:35:14 -08:00
2ac644d4b6 Remove local configuration files and test HTML files to streamline project structure and eliminate redundancy. 2025-07-29 13:24:32 -08:00
c48923fe99 Add collections for pages, blog, navigation, footer, and contact data in config.yml to enhance content management capabilities. 2025-07-29 13:07:54 -08:00
52449e9d42 Remove unused collections and fields from config.yml to simplify configuration structure and improve maintainability. 2025-07-29 13:06:44 -08:00
1a8d075c0e Remove branch configuration from backend in config.yml to streamline version control settings. 2025-07-29 12:28:31 -08:00
e7c3d35b4e Add local_backend configuration to config.yml to specify backend behavior 2025-07-29 12:26:52 -08:00
344d23da1d Add branch configuration to backend in config.yml for clarity in version control 2025-07-29 12:24:10 -08:00
ad7c580ace Update backend configuration in config.yml to use absolute URLs for API and auth endpoints, improving clarity and consistency. 2025-07-29 12:20:41 -08:00
76b7cd14af Update backend configuration in config.yml to use relative paths for API and auth endpoints, enhancing portability. 2025-07-29 12:14:20 -08:00
652927aa66 Remove config.template.yml file, eliminating outdated backend and collection configurations. 2025-07-29 12:10:03 -08:00
f2285c9733 Update config.template.yml to include app_id and use absolute URLs for API and auth endpoints 2025-07-29 12:07:18 -08:00
5d32350815 Update OAuth URLs in config.template.yml to use relative paths for consistency and portability 2025-07-29 12:04:32 -08:00
9e0f742129 Refactor OAuth URLs in config.template.yml to use relative paths for improved portability 2025-07-29 12:00:39 -08:00
511c438455 Create config.template.yml to insert OAUTH_CLIENT_ID and OAUTH_CLIENT_SECRET at build time. 2025-07-29 11:57:52 -08:00
2c457b64ce Update backend configuration to use Gitea, including new authentication settings and API endpoints 2025-07-29 11:48:01 -08:00
827f5bc88c Update script source for SveltiaCMS to use the new package structure 2025-07-29 11:32:52 -08:00
25bdb09f30 Remove admin redirect page from content directory 2025-07-29 11:28:42 -08:00
2eff84ae2f Refactor navbar and footer configuration to utilize new enable flags in .Site.Data 2025-07-29 11:24:51 -08:00
8 changed files with 376 additions and 40 deletions

124
GITEA_SETUP.md Normal file
View File

@@ -0,0 +1,124 @@
# Gitea Authentication Setup for BeardedTek
This guide will help you set up Sveltia CMS with your Gitea instance at `https://git.beardedtek.com`.
## ✅ Current Configuration
Your Sveltia CMS is now configured to use:
- **Gitea Instance**: `https://git.beardedtek.com`
- **Repository**: `beardedtek/flowbite-beardedtek.com`
- **Backend**: GitLab (compatible with Gitea)
- **API Endpoint**: `https://git.beardedtek.com/api/v1`
- **Auth Endpoint**: `https://git.beardedtek.com/login/oauth/authorize`
## 🔧 Setup Steps
### 1. Create Gitea OAuth Application
1. **Login to your Gitea instance**:
- Go to `https://git.beardedtek.com`
- Login with your account
2. **Create OAuth App**:
- Go to Settings → Applications
- Click "Create new OAuth application"
- Fill in the details:
- **Application Name**: `Sveltia CMS`
- **Redirect URIs**: `https://beardedtek.com/admin/` (or your domain)
- **Scopes**: Select `repo` and `user:email`
3. **Save the credentials**:
- Copy the **Client ID**
- Copy the **Client Secret**
### 2. Environment Variables
Add these environment variables to your deployment:
```bash
OAUTH_CLIENT_ID=your_gitea_client_id
OAUTH_CLIENT_SECRET=your_gitea_client_secret
```
### 3. Repository Access
Ensure your Gitea OAuth app has access to:
- Repository: `beardedtek/flowbite-beardedtek.com`
- Permissions: Read and write access
## 🚀 Testing
### Local Development
1. Run `hugo server`
2. Visit `http://localhost:1313/admin/`
3. You should see the Gitea login option
### Production
1. Deploy your site with the environment variables
2. Visit `https://beardedtek.com/admin/`
3. Click "Login with Gitea"
## 🔍 Troubleshooting
### Common Issues
1. **"Invalid redirect URI"**:
- Make sure the redirect URI in Gitea matches your site URL exactly
- Include the trailing slash: `https://beardedtek.com/admin/`
2. **"Repository not found"**:
- Verify the repo name is correct: `beardedtek/flowbite-beardedtek.com`
- Ensure the OAuth app has repository access
3. **"Authentication failed"**:
- Check that environment variables are set correctly
- Verify Client ID and Secret are correct
### Debug Steps
1. **Check Gitea API**:
- Visit `https://git.beardedtek.com/api/v1/version`
- Should return Gitea version info
2. **Test OAuth Flow**:
- Try logging in manually at `https://git.beardedtek.com/login/oauth/authorize`
- Verify your OAuth app appears in the list
3. **Check Repository Access**:
- Ensure your user has write access to the repository
- Check repository permissions in Gitea
## 📋 Configuration Files
### Main Config (`static/admin/config.yml`)
```yaml
backend:
name: gitlab
repo: beardedtek/flowbite-beardedtek.com
branch: main
base_url: https://git.beardedtek.com/api/v1
auth_endpoint: https://git.beardedtek.com/login/oauth/authorize
```
### Environment Variables Needed
```bash
OAUTH_CLIENT_ID=your_client_id_here
OAUTH_CLIENT_SECRET=your_client_secret_here
```
## 🎯 Next Steps
1. **Create the OAuth app** in your Gitea instance
2. **Set environment variables** in your deployment
3. **Test locally** with `hugo server`
4. **Deploy to production** and test the full flow
## 📞 Support
If you encounter issues:
1. Check the Gitea logs for authentication errors
2. Verify all URLs and credentials are correct
3. Test the OAuth flow manually in your browser
4. Check that your repository exists and is accessible
Your Sveltia CMS is now ready to use with Gitea authentication!

125
SVELTIA_CMS_SETUP.md Normal file
View File

@@ -0,0 +1,125 @@
# Sveltia CMS Setup for Hugo Site
This guide explains how to set up and use Sveltia CMS with your Hugo site.
## What's Been Installed
1. **Admin Panel**: Accessible at `/admin/` or `/admin`
2. **Configuration**: Located at `static/admin/config.yml`
3. **Media Uploads**: Files will be stored in `static/images/uploads/`
4. **Netlify Identity**: Added to your site for authentication
## Accessing the Admin Panel
1. Navigate to `http://localhost:1313/admin/` (when running Hugo locally)
2. Or visit `https://yourdomain.com/admin/` (when deployed)
## Collections Available
### Pages
- **About Page**: Edit content at `content/about/_index.md`
- **Contact Page**: Edit content at `content/contact/_index.md`
- **Rates Page**: Edit content at `content/rates/_index.md`
- **General Pages**: Create new pages in the `content/` folder
### Blog Posts
- Create and manage blog posts in `content/blog/`
- Posts will be automatically dated with the format: `YYYY-MM-DD-slug`
### Site Configuration
- **Navigation**: Edit `data/navbar.yml`
- **Footer**: Edit `data/footer.yml`
- **Contact Data**: Edit `data/contact.yml`
- **Rates Data**: Edit `data/rates.yml`
- **Site Config**: Edit `config.yml`
## Authentication Setup
### Gitea OAuth (Self-hosted Git)
This site is configured to use Gitea authentication with your instance at `https://git.beardedtek.com`:
1. **Create a Gitea OAuth App**:
- Go to `https://git.beardedtek.com` → Settings → Applications
- Create a new OAuth App
- Set Redirect URI to `https://beardedtek.com/admin/`
- Note your Client ID and Client Secret
2. **Environment Variables**:
- Set `OAUTH_CLIENT_ID` to your Gitea OAuth Client ID
- Set `OAUTH_CLIENT_SECRET` to your Gitea OAuth Client Secret
3. **Repository Access**:
- Ensure your OAuth app has access to `beardedtek/flowbite-beardedtek.com`
- Verify write permissions are enabled
### Local Development (No Authentication)
For development or testing:
- The CMS is configured with `local_backend: true`
- No authentication required for local development
- Simply run `hugo server` and visit `/admin/`
## File Structure Created
```
static/
├── admin/
│ ├── config.yml # Gitea CMS configuration
│ └── index.html # Admin panel HTML
└── images/
└── uploads/ # Media uploads directory
content/
└── admin/
└── _index.md # Admin page redirect
```
## Customization
### Adding New Collections
Edit `static/admin/config.yml` to add new content types:
```yaml
- name: "new_collection"
label: "New Collection"
folder: "content/new-section"
create: true
fields:
- {label: "Title", name: "title", widget: "string"}
- {label: "Body", name: "body", widget: "markdown"}
```
### Changing Media Upload Location
Update these lines in `static/admin/config.yml`:
```yaml
media_folder: "static/images/uploads"
public_folder: "/images/uploads"
```
## Troubleshooting
### Local Backend Issues
If you encounter issues with the local backend:
1. Make sure you're running Hugo locally
2. Check that the `static/admin/` directory exists
3. Verify the config.yml syntax is correct
### Authentication Issues
1. **Gitea OAuth**: Verify your Gitea instance URL and OAuth app configuration
2. **Local Development**: Make sure `local_backend: true` is set in config.yml
3. **Repo Access**: Ensure your OAuth app has proper repository access permissions
4. **Environment Variables**: Check that `OAUTH_CLIENT_ID` and `OAUTH_CLIENT_SECRET` are set correctly
## Next Steps
1. **Test Locally**: Run `hugo server` and visit `/admin/`
2. **Deploy**: Push your changes to your Git repository
3. **Configure Netlify**: Set up Identity and deployment settings
4. **Invite Users**: Add team members to manage content
## Resources
- [Sveltia CMS Documentation](https://github.com/sveltia/sveltia-cms)
- [Netlify Identity Documentation](https://docs.netlify.com/visitor-access/identity/)
- [Hugo Documentation](https://gohugo.io/documentation/)

View File

@@ -12,6 +12,9 @@ params:
text: The Bearded Tek text: The Bearded Tek
svg: /images/logo/no-padding.svg svg: /images/logo/no-padding.svg
favicon: favicon:
- /images/logo/favicon-32x32.png
- /images/logo/favicon-16x16.png
business_license: 2224133
homepage: https://beardedtek.com homepage: https://beardedtek.com
authors: William Kenny authors: William Kenny

View File

@@ -3,21 +3,21 @@
text: Our clear pricing has no hidden fees. No gotchas in your bill. Guaranteed. text: Our clear pricing has no hidden fees. No gotchas in your bill. Guaranteed.
items: items:
1: 1:
name: On-Site Service name: Commercial
desc: We come to you desc: On-Site Support
price: price:
1: 1:
name: First Hour name: First Hour
price: 50 price: 60
period: period:
2: 2:
name: Addtional Hour name: Addtional Hour
price: 100 price: 120
period: period:
features: features:
1: 1:
icon: true icon: true
name: Minimum Charge $50 name: Minimum Charge $60
super: super:
note: note:
2: 2:
@@ -34,7 +34,38 @@
text: Get Started text: Get Started
link: "/contact?topic=on-site service" link: "/contact?topic=on-site service"
2: 2:
name: Remote Service name: Residential
desc: On Site Support
price:
1:
name: First Hour
price: 50
period:
2:
name: Addtional Hour
price: 80
period:
features:
1:
icon: true
name: Minimum Charge $50
super:
note:
2:
icon: true
name: No Cancellation Fee
super: 1
note: Must cancel before tech connects
3:
icon: true
name: 5% Military Discount
super: 2
note: Does not apply to 1st hour
button:
text: Get Started
link: "/contact?topic=remote service"
3:
name: Remote
desc: We connect to you desc: We connect to you
price: price:
1: 1:
@@ -64,7 +95,7 @@
button: button:
text: Get Started text: Get Started
link: "/contact?topic=remote service" link: "/contact?topic=remote service"
3: 4:
name: Web Design name: Web Design
desc: Static Web Sites desc: Static Web Sites
price: price:
@@ -95,35 +126,4 @@
button: button:
text: Get Started text: Get Started
link: "/contact?topic=static web design" link: "/contact?topic=static web design"
4:
name: Web Hosting
desc: Affordable and Dependable
price:
1:
name: Shared
price: 5
period: "per month"
2:
name: Dedicated
price: 20
period: "per month"
features:
1:
icon: true
name: 5% Military Discount
super:
note:
2:
icon: false
name:
super:
note:
3:
icon: false
name:
super:
note:
button:
text: Get Started
link: "/contact?topic=static web hosting"

View File

@@ -25,7 +25,13 @@
</ul> </ul>
</div> </div>
<hr class="my-6 border-gray-200 sm:mx-auto dark:border-gray-700 lg:my-8" /> <hr class="my-6 border-gray-200 sm:mx-auto dark:border-gray-700 lg:my-8" />
<span class="block text-sm text-gray-500 sm:text-center dark:text-gray-400">© 2022-<span id="currentYear">2022</span> <a href="/" class="hover:underline">The Bearded Tek</a>. All Rights Reserved.</span> <span class="block text-sm text-gray-500 sm:text-center dark:text-gray-400">
© 2022-<span id="currentYear">2022</span>
<a href="/" class="hover:underline">The Bearded Tek</a>. All Rights Reserved.
</span>
<span class="block text-sm text-gray-500 sm:text-center dark:text-gray-400">
<a target="_blank" href="/pdf/{{ .Site.Params.business_license }}.pdf">Alaska Business License # {{ .Site.Params.business_license }}</a>
</span>
</div> </div>
</footer> </footer>

44
static/admin/config.yml Normal file
View File

@@ -0,0 +1,44 @@
backend:
name: gitea
repo: beardedtek/flowbite-beardedtek.com
branch: main
app_id: ca91733b-543f-4506-b2cc-7c6120d20b57
base_url: https://git.beardedtek.com
api_root: https://git.beardedtek.com/api/v1
auth_endpoint: https://git.beardedtek.com/login/oauth/authorize
token_endpoint: https://git.beardedtek.com/login/oauth/access_token
# Add debugging and ensure PKCE is properly configured
auth_flow: pkce
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}}'
media_folder: "static/images/uploads"
public_folder: "/images/uploads"
collections:
- name: "blog"
label: "Blog"
folder: "blog"
create: true
fields:
- {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: "Featured Image", name: "thumbnail", widget: "image"}
- {label: "Body", name: "body", widget: "markdown"}
- 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"}

34
static/admin/index.html Normal file
View File

@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="robots" content="noindex" />
<title>Content Manager</title>
</head>
<body>
<!-- Include the script that builds the page and powers Decap CMS -->
<script src="https://unpkg.com/decap-cms/dist/decap-cms.js"></script>
<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');
}
}, 1000);
}
});
</script>
</body>
</html>

BIN
static/pdf/2224133.pdf Normal file

Binary file not shown.