1
0
mirror of https://gitlab.com/Anson-Projects/projects.git synced 2025-09-19 03:52:37 +00:00

6 Commits

Author SHA1 Message Date
bbeb71b1b5 Fix RSS feed generation by moving site-url to top level 2025-08-23 14:18:46 -06:00
fb197830aa Debug RSS feed generation in CI 2025-08-23 14:04:14 -06:00
1a7ecc1acd Add comprehensive RSS feed configuration 2025-08-23 14:03:26 -06:00
f81c2a6e21 Enable RSS feed generation and remove debug code 2025-08-23 11:47:05 -06:00
cf5021e682 Debug CI artifacts to locate RSS feed file 2025-08-23 00:43:59 -06:00
54f2a1bc53 Fix RSS feed parsing by reading from local artifacts
- Change fetch_feed to read from local file instead of HTTP request
- Update feed path to use ../public/index.xml from GitLab CI artifacts
- Add better error messages for file reading and parsing failures
- Resolves ParseError(NoFeedRoot) by avoiding 404 from live website
2025-08-22 23:34:32 -06:00
3 changed files with 18 additions and 4 deletions

View File

@@ -16,6 +16,8 @@ staging:
script: script:
- echo "Building the main website with Quarto..." - echo "Building the main website with Quarto..."
- quarto render --to html --output-dir public - quarto render --to html --output-dir public
- echo "Checking for RSS feed after render..."
- ls -la public/ | grep -E "\.xml|index\.xml" || echo "No XML files found in public directory"
- echo "Building Ghost-optimized version..." - echo "Building Ghost-optimized version..."
- quarto render --profile ghost --to html --output-dir public/ghost-content - quarto render --profile ghost --to html --output-dir public/ghost-content
artifacts: artifacts:

View File

@@ -1,12 +1,18 @@
project: project:
type: website type: website
website:
title: "Anson's Projects"
site-url: https://projects.ansonbiggs.com
description: A Blog for Technical Topics
profiles: profiles:
default: default:
website: website:
title: "Anson's Projects" title: "Anson's Projects"
site-url: https://projects.ansonbiggs.com site-url: https://projects.ansonbiggs.com
description: A Blog for Technical Topics description: A Blog for Technical Topics
author: "Anson Biggs"
navbar: navbar:
left: left:
- text: "About" - text: "About"
@@ -17,6 +23,11 @@ profiles:
# - icon: gitlab # - icon: gitlab
# href: https://gitlab.com/MisterBiggs # href: https://gitlab.com/MisterBiggs
open-graph: true open-graph: true
feed:
title: "Anson's Projects"
description: "A Blog for Technical Topics"
author: "Anson Biggs"
items: 10
format: format:
html: html:
theme: zephyr theme: zephyr

View File

@@ -227,10 +227,11 @@ async fn get_existing_post_id(slug: &str, token: &str) -> Option<String> {
} }
} }
async fn fetch_feed(url: &str) -> Vec<Entry> { async fn fetch_feed(path: &str) -> Vec<Entry> {
let content = reqwest::get(url).await.unwrap().text().await.unwrap(); // Read from local file instead of HTTP request
let content = std::fs::read_to_string(path).expect("Failed to read RSS feed file");
let feed = parser::parse(content.as_bytes()).unwrap(); let feed = parser::parse(content.as_bytes()).expect("Failed to parse RSS feed");
feed.entries feed.entries
} }
@@ -296,7 +297,7 @@ async fn main() {
let feed = "https://projects.ansonbiggs.com/index.xml"; let feed = "../public/index.xml";
// Split the key into ID and SECRET // Split the key into ID and SECRET
let (id, secret) = ghost_admin_api_key let (id, secret) = ghost_admin_api_key