Page meta from frontmatter

This commit is contained in:
2025-11-04 14:15:00 -08:00
parent 4504a88f4b
commit dc4a1def5f
13 changed files with 518 additions and 163 deletions

View File

@@ -1,34 +1,10 @@
use assetserver::Asset;
use maud::html;
---
title: "What's a \"betalupi?\""
author: "Mark"
slug: whats-a-betalupi
---
use crate::{
components::{md::Markdown, misc::Backlinks},
page::{Page, PageMetadata},
routes::assets::{Image_Betalupi, Image_Icon},
};
pub fn page() -> Page {
Page {
meta: PageMetadata {
title: "What's a \"betalupi?\"".into(),
author: Some("Mark".into()),
description: None,
image: Some(Image_Icon::URL.into()),
},
generate_html: Box::new(|_page| {
html! {
(Backlinks(&[("/", "home")], "whats-a-betalupi"))
(Markdown(MD))
img alt="betalupi map" class="image" src=(Image_Betalupi::URL) {}
}
}),
..Default::default()
}
}
const MD: &str = r#"[es]: https://github.com/endless-sky/endless-sky
[es]: https://github.com/endless-sky/endless-sky
[*Stellaris*]: https://www.paradoxinteractive.com/games/stellaris/about
[Arabic]: https://en.wikipedia.org/wiki/List_of_Arabic_star_names
[wiki-betalupi]: https://en.wikipedia.org/wiki/Beta_Lupi
@@ -54,4 +30,5 @@ A snippet of the [_Endless Sky_][es] map is below.
- Isn't owned by a scalper that's selling it for $300"
<br/>
"#;
<img alt="betalupi map" class="image" src="/assets/img/betalupi.png"></img>

View File

@@ -1,33 +1,10 @@
use assetserver::Asset;
use maud::html;
---
title: Mark's Handouts
author: Mark
slug: handouts
---
use crate::{
components::{md::Markdown, misc::Backlinks},
page::{Page, PageMetadata},
routes::assets::Image_Icon,
};
pub fn page() -> Page {
Page {
meta: PageMetadata {
title: "Mark's Handouts".into(),
author: Some("Mark".into()),
description: None,
image: Some(Image_Icon::URL.into()),
},
generate_html: Box::new(|_page| {
html! {
(Backlinks(&[("/", "home")], "handouts"))
(Markdown(MD_A))
}
}),
..Default::default()
}
}
const MD_A: &str = r#"# Mark's Handouts
# Mark's Handouts
[ORMC]: https://circles.math.ucla.edu/circles
@@ -155,6 +132,8 @@ giving them something to do until we can start the lesson.
</script>
<br></br>
## Advanced
@@ -250,5 +229,4 @@ they're ~14-18 years old.
});
</script>
"#;
<br></br>

View File

@@ -12,13 +12,14 @@ use crate::{
routes::assets::{Image_Cover, Image_Icon},
};
pub fn page() -> Page {
pub fn index() -> Page {
Page {
meta: PageMetadata {
title: "Betalupi: About".into(),
author: Some("Mark".into()),
description: Some("Description".into()),
image: Some(Image_Icon::URL.into()),
slug: None,
},
generate_html: Box::new(move |_page| {

View File

@@ -1,8 +1,15 @@
---
title: Links
author: Mark
slug: links
---
# Bookmarks
This is a heavily opinionated bookmarks toolbar.
<hr style="margin-top: 8rem; margin-bottom: 8rem"></hr>
<hr style="margin-top: 4rem; margin-bottom: 4rem"></hr>
## Podcasts
@@ -13,12 +20,18 @@ This is a heavily opinionated bookmarks toolbar.
- :star: [On the Metal](https://onthemetal.transistor.fm/): Quality stories from quality engineers.
- [Security Cryptography Whatever](https://securitycryptographywhatever.com/): Modern cryptography, for those who understand the underlying theory.
<br></br>
## Essays
- [Real Programmers don't use Pascal](https://www.ee.torontomu.ca/~elf/hack/realmen.html)
- [A Mathematician's Lament](/files/lockhart.pdf)
- :star: [The Jargon File](http://www.catb.org/jargon/)
<br></br>
## Textbooks
- :star: [OpenLogic](https://openlogicproject.org/): The gold standard
@@ -28,6 +41,9 @@ This is a heavily opinionated bookmarks toolbar.
- [An Introduction to Mathematical Cryptography](https://link.springer.com/book/10.1007/978-0-387-77993-5)
- [Stories about Maxima and Minima](https://archive.org/details/storiesaboutmaxi0000tikh)
<br></br>
## Miscellanea
- [Hackaday](https://hackaday.com/)
@@ -41,7 +57,7 @@ This is a heavily opinionated bookmarks toolbar.
- :star: [Spintronics](https://store.upperstory.com/collections/spintronics/products/spintronics-act-one): Mechanical circuits. Very clever toy.
- :star: [Turing Tumble](https://store.upperstory.com/collections/turing-tumble-game/products/turing-tumble): Modern Dr. Nim
<hr style="margin-top: 8rem; margin-bottom: 8rem"></hr>
<hr style="margin-top: 4rem; margin-bottom: 4rem"></hr>
## Tools
@@ -65,6 +81,9 @@ This is a heavily opinionated bookmarks toolbar.
- [delta](https://github.com/dandavison/delta): pretty pager for diffs
- [dust](https://github.com/dandavison/delta): `du`, but better
<br></br>
## Math Resources
- [Quantum Quest](https://www.quantum-quest.org/)
@@ -74,6 +93,9 @@ This is a heavily opinionated bookmarks toolbar.
- [Euclidea](https://www.euclidea.xyz/)
- [Problems.ru](https://problems.ru/)
<br></br>
## OS Dev Resources
- [OS Dev Wiki](https://wiki.osdev.org/Expanded_Main_Page)
@@ -84,6 +106,9 @@ This is a heavily opinionated bookmarks toolbar.
- [FDC Programming](http://www.brokenthorn.com/Resources/OSDev20.html)
- [CS77 at Bristol College](http://www.c-jump.com/CIS77/CIS77syllabus.htm)
<br></br>
## Misc Resources
- [Learn OpenGL](https://learnopengl.com/)
@@ -99,6 +124,10 @@ This is a heavily opinionated bookmarks toolbar.
- [The Architecture of Open Source Applications](http://aosabook.org/en/index.html)
- [wtfjs](https://github.com/denysdovhan/wtfjs): js [wat](https://www.destroyallsoftware.com/talks/wat)s
<br></br>
## Reference
- [DevHints](https://devhints.io/)
@@ -108,12 +137,15 @@ This is a heavily opinionated bookmarks toolbar.
- [The Pinouts Book](https://pinouts.org/)
- [Laws of UX](https://lawsofux.com/)
<br></br>
## Rust
- [Understanding Memory Ordering in Rust](https://emschwartz.me/understanding-memory-ordering-in-rust/)
- [Unfair Rust Quiz](https://this.quiz.is.fckn.gay/): wtfjs, but in Rust.
<hr style="margin-top: 8rem; margin-bottom: 8rem"></hr>
<hr style="margin-top: 4rem; margin-bottom: 4rem"></hr>
## Misc

View File

@@ -1,35 +0,0 @@
use assetserver::Asset;
use maud::html;
use crate::{
components::{md::Markdown, misc::Backlinks},
page::{Page, PageMetadata},
routes::assets::Image_Icon,
};
pub fn page() -> Page {
Page {
meta: PageMetadata {
title: "Links".into(),
author: Some("Mark".into()),
description: None,
image: Some(Image_Icon::URL.into()),
},
generate_html: Box::new(|_page| {
html! {
(Backlinks(&[("/", "home")], "links"))
(Markdown(include_str!("links.md")))
}
}),
..Default::default()
}
}
/*
Dead links:
https://www.commitstrip.com/en/
http://www.3dprintmath.com/
*/

View File

@@ -1,4 +1,30 @@
pub mod betalupi;
pub mod handouts;
pub mod index;
pub mod links;
mod index;
use assetserver::Asset;
pub use index::index;
use crate::{page::Page, routes::assets::Image_Icon};
pub fn links() -> Page {
/*
Dead links:
https://www.commitstrip.com/en/
http://www.3dprintmath.com/
*/
Page::from_markdown(include_str!("links.md"), Some(Image_Icon::URL.to_string()))
}
pub fn betalupi() -> Page {
Page::from_markdown(
include_str!("betalupi.md"),
Some(Image_Icon::URL.to_string()),
)
}
pub fn handouts() -> Page {
Page::from_markdown(
include_str!("handouts.md"),
Some(Image_Icon::URL.to_string()),
)
}