changes, big changes
This commit is contained in:
parent
a9c8e49631
commit
61f8e453e2
8 changed files with 24 additions and 9 deletions
|
|
@ -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'"),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue