1
0
mirror of https://gitlab.com/Anson-Projects/projects.git synced 2025-09-19 12:02:38 +00:00

4 Commits

4 changed files with 13 additions and 33 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

@@ -2,12 +2,6 @@ publish:
stage: deploy stage: deploy
image: rust:latest image: rust:latest
script: script:
- echo "Listing project root directory:"
- ls -la
- echo "Listing public directory:"
- ls -la public/ || echo "public directory not found"
- echo "Looking for index.xml:"
- find . -name "index.xml" -type f || echo "No index.xml files found"
- cd ./ghost-upload - cd ./ghost-upload
- cargo run - cargo run
needs: needs:

View File

@@ -228,33 +228,6 @@ async fn get_existing_post_id(slug: &str, token: &str) -> Option<String> {
} }
async fn fetch_feed(path: &str) -> Vec<Entry> { async fn fetch_feed(path: &str) -> Vec<Entry> {
// Debug: Print current directory and list files
if let Ok(current_dir) = std::env::current_dir() {
eprintln!("Current directory: {:?}", current_dir);
}
// Debug: List files in parent directory
if let Ok(entries) = std::fs::read_dir("..") {
eprintln!("Files in parent directory:");
for entry in entries {
if let Ok(entry) = entry {
eprintln!(" {:?}", entry.path());
}
}
}
// Debug: Check if public directory exists
if let Ok(entries) = std::fs::read_dir("../public") {
eprintln!("Files in ../public:");
for entry in entries {
if let Ok(entry) = entry {
eprintln!(" {:?}", entry.path());
}
}
} else {
eprintln!("../public directory does not exist or cannot be read");
}
// Read from local file instead of HTTP request // Read from local file instead of HTTP request
let content = std::fs::read_to_string(path).expect("Failed to read RSS feed file"); let content = std::fs::read_to_string(path).expect("Failed to read RSS feed file");