Refactor
Some checks failed
CI / Check links (push) Failing after 31s
CI / Check typos (push) Successful in 52s
CI / Clippy (push) Successful in 1m11s
CI / Build and test (push) Failing after 1m12s
CI / Build container (push) Has been skipped
CI / Deploy on waypoint (push) Has been skipped
Some checks failed
CI / Check links (push) Failing after 31s
CI / Check typos (push) Successful in 52s
CI / Clippy (push) Successful in 1m11s
CI / Build and test (push) Failing after 1m12s
CI / Build container (push) Has been skipped
CI / Deploy on waypoint (push) Has been skipped
This commit is contained in:
@@ -7,16 +7,16 @@ use std::{
|
||||
use assetserver::Asset;
|
||||
use chrono::{DateTime, TimeDelta, Utc};
|
||||
use maud::{Markup, PreEscaped, html};
|
||||
use page::{DeviceType, Page, RequestContext};
|
||||
use parking_lot::Mutex;
|
||||
use serde::Deserialize;
|
||||
use tracing::{debug, warn};
|
||||
|
||||
use crate::{
|
||||
components::{
|
||||
md::Markdown,
|
||||
md::{Markdown, meta_from_markdown},
|
||||
misc::{Backlinks, FarLink},
|
||||
},
|
||||
page::{DeviceType, Page, PageMetadata, RequestContext},
|
||||
routes::assets::Image_Icon,
|
||||
};
|
||||
|
||||
@@ -190,9 +190,7 @@ pub fn handouts() -> Page {
|
||||
tokio::spawn(index.clone().autoget(Duration::from_secs(60 * 20)));
|
||||
|
||||
#[expect(clippy::unwrap_used)]
|
||||
let mut meta = PageMetadata::from_markdown_frontmatter(&md)
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
let mut meta = meta_from_markdown(&md).unwrap().unwrap();
|
||||
|
||||
if meta.image.is_none() {
|
||||
meta.image = Some(Image_Icon::URL.to_owned());
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
use assetserver::Asset;
|
||||
use maud::html;
|
||||
use page::{Page, PageMetadata};
|
||||
|
||||
use crate::{
|
||||
components::{
|
||||
@@ -8,7 +9,6 @@ use crate::{
|
||||
md::Markdown,
|
||||
misc::FarLink,
|
||||
},
|
||||
page::{Page, PageMetadata},
|
||||
routes::assets::{Image_Cover, Image_Icon},
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
use assetserver::Asset;
|
||||
use page::Page;
|
||||
|
||||
use crate::{page::Page, routes::assets::Image_Icon};
|
||||
use crate::{components::md::page_from_markdown, routes::assets::Image_Icon};
|
||||
|
||||
mod handouts;
|
||||
mod index;
|
||||
@@ -16,11 +17,11 @@ pub fn links() -> Page {
|
||||
http://www.3dprintmath.com/
|
||||
*/
|
||||
|
||||
Page::from_markdown(include_str!("links.md"), Some(Image_Icon::URL.to_owned()))
|
||||
page_from_markdown(include_str!("links.md"), Some(Image_Icon::URL.to_owned()))
|
||||
}
|
||||
|
||||
pub fn betalupi() -> Page {
|
||||
Page::from_markdown(
|
||||
page_from_markdown(
|
||||
include_str!("betalupi.md"),
|
||||
Some(Image_Icon::URL.to_owned()),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user