mirror of
https://gitlab.com/Anson-Projects/projects.git
synced 2025-09-19 03:52:37 +00:00
Compare commits
8 Commits
7652873b9e
...
master
Author | SHA1 | Date | |
---|---|---|---|
bbeb71b1b5 | |||
fb197830aa | |||
1a7ecc1acd | |||
f81c2a6e21 | |||
cf5021e682 | |||
54f2a1bc53 | |||
a6dd33ce5f | |||
556c56fee4 |
@@ -16,6 +16,8 @@ staging:
|
||||
script:
|
||||
- echo "Building the main website with Quarto..."
|
||||
- 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..."
|
||||
- quarto render --profile ghost --to html --output-dir public/ghost-content
|
||||
artifacts:
|
||||
|
11
_quarto.yml
11
_quarto.yml
@@ -1,12 +1,18 @@
|
||||
project:
|
||||
type: website
|
||||
|
||||
website:
|
||||
title: "Anson's Projects"
|
||||
site-url: https://projects.ansonbiggs.com
|
||||
description: A Blog for Technical Topics
|
||||
|
||||
profiles:
|
||||
default:
|
||||
website:
|
||||
title: "Anson's Projects"
|
||||
site-url: https://projects.ansonbiggs.com
|
||||
description: A Blog for Technical Topics
|
||||
author: "Anson Biggs"
|
||||
navbar:
|
||||
left:
|
||||
- text: "About"
|
||||
@@ -17,6 +23,11 @@ profiles:
|
||||
# - icon: gitlab
|
||||
# href: https://gitlab.com/MisterBiggs
|
||||
open-graph: true
|
||||
feed:
|
||||
title: "Anson's Projects"
|
||||
description: "A Blog for Technical Topics"
|
||||
author: "Anson Biggs"
|
||||
items: 10
|
||||
format:
|
||||
html:
|
||||
theme: zephyr
|
||||
|
@@ -227,10 +227,11 @@ async fn get_existing_post_id(slug: &str, token: &str) -> Option<String> {
|
||||
}
|
||||
}
|
||||
|
||||
async fn fetch_feed(url: &str) -> Vec<Entry> {
|
||||
let content = reqwest::get(url).await.unwrap().text().await.unwrap();
|
||||
async fn fetch_feed(path: &str) -> Vec<Entry> {
|
||||
// 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
|
||||
}
|
||||
@@ -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
|
||||
let (id, secret) = ghost_admin_api_key
|
||||
|
Reference in New Issue
Block a user