changes, big changes

This commit is contained in:
Rakarake 2026-03-27 01:50:01 +01:00
parent a9c8e49631
commit 61f8e453e2
8 changed files with 24 additions and 9 deletions

2
.gitignore vendored
View file

@ -2,3 +2,5 @@ target
.direnv/
index.html
blog-tmp.html
public/index.html
public/rss.xml

BIN
public/golden-banana.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 KiB

10
public/styles.css Normal file
View file

@ -0,0 +1,10 @@
body {
background-color: lightgoldenrodyellow;
}
.blog {
border: 2px solid hotpink;
}
.blogpost {
border: 2px solid cornflowerblue;
}

6
run.sh
View file

@ -1,6 +1,8 @@
#/bin/sh
cargo run -- "$@" > blog-tmp.html
cargo run -- html blogs/* > blog-tmp.html
sed template.html -e '/INSERT_HERE/{
r blog-tmp.html
d
}' > index.html
}' > public/index.html
cargo run -- rss blogs/* > public/rss.xml

View file

@ -13,8 +13,9 @@ fn main() -> io::Result<()> {
"rss" => {
let mut channel = Channel::default();
channel.title = "MDF blog huge".to_string();
channel.link = "rakarake.xyz".to_string();
channel.link = "https://mdf.farm".to_string();
channel.description = "morbius text wow".to_string();
channel.generator = Some("Rakabaka's tooling".to_string());
channel.items = posts.iter().enumerate().map(|(i, p)| {
ItemBuilder::default()
.title(format!("Blog post {i}"))
@ -24,7 +25,7 @@ fn main() -> io::Result<()> {
print!("{}", channel);
},
"html" => {
print!("{}", posts.iter().map(|p| format!("<div>{p}</div>")).collect::<Vec<String>>().concat())
print!("{}", posts.iter().map(|p| format!("<div class=\"blogpost\">{p}</div>")).collect::<Vec<String>>().concat())
},
_ => eprintln!("need to specify 'rss' or 'html'"),
}

View file

@ -1,4 +0,0 @@
.blog {
border: 2px solid hotpink;
}

View file

@ -5,9 +5,12 @@
<link rel="stylesheet" href='styles.css' />
</head>
<body>
<h1>MDF HQ</h1>
<h1>The MDF <img src="golden-banana.gif" width="50px" height="50px"></h1>
<p>Welcome!</p>
<p>Blog:</p>
<div class="blog">
INSERT_HERE
</div>
<a href="rss.xml">(RSS feed 🌄)</a>
</body>

1
upload.sh Executable file
View file

@ -0,0 +1 @@
rsync -rvz -e 'ssh -p 8022' --progress public/* rakarake@chat.mdf.farm:/data/website