initial blog index support
This commit is contained in:
parent
a9f2eacd56
commit
10346d4621
|
@ -30,3 +30,8 @@ pub async fn signalboost(state: Arc<State>) -> Result<impl Reply, Rejection> {
|
|||
pub async fn not_found(path: String) -> Result<impl Reply, Rejection> {
|
||||
Response::builder().html(|o| templates::notfound_html(o, path))
|
||||
}
|
||||
|
||||
pub async fn blog_index(state: Arc<State>) -> Result<impl Reply, Rejection> {
|
||||
let state = state.clone();
|
||||
Response::builder().html(|o| templates::blogindex_html(o, state.blog.clone()))
|
||||
}
|
||||
|
|
|
@ -39,7 +39,12 @@ async fn main() -> Result<()> {
|
|||
.and_then(handlers::resume))
|
||||
.or(warp::path!("signalboost")
|
||||
.and(with_state(state.clone()))
|
||||
.and_then(handlers::signalboost));
|
||||
.and_then(handlers::signalboost))
|
||||
.or(warp::path!("blog").and(
|
||||
warp::path::end()
|
||||
.and(with_state(state.clone()))
|
||||
.and_then(handlers::blog_index),
|
||||
));
|
||||
|
||||
let files = warp::path("static")
|
||||
.and(warp::fs::dir("./static"))
|
||||
|
|
|
@ -0,0 +1,94 @@
|
|||
@use crate::post::Post;
|
||||
@use super::{header_html, footer_html};
|
||||
|
||||
@(posts: Vec<Post>)
|
||||
|
||||
@:header_html(Some("Blog"), None)
|
||||
|
||||
<h1>Blogposts</h1>
|
||||
|
||||
<p>If you have a compatible reader, be sure to check out my <a href="/blog.rss">RSS Feed</a> for automatic updates. Also check out the <a href="/blog.json">JSONFeed</a>.</p>
|
||||
|
||||
<p>For a breakdown by post series, see <a href="/blog/series">here</a>.</p>
|
||||
|
||||
<p>
|
||||
<ul>
|
||||
@for post in posts {
|
||||
<li>@post.date - <a href="@post.link">@post.front_matter.title</a></li>
|
||||
}
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
<br />
|
||||
|
||||
<h2>Other Blogs I Find Interesting</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://write.as/excerpts/">Excerpts</a></li>
|
||||
<li><a href="https://heartmender.writeas.com/">Heartmender</a></li>
|
||||
<li><a href="https://celestialboon.github.io/">CelestialBoon</a></li>
|
||||
<li><a href="https://slatestarcodex.com/">Star Slate Codex</a></li>
|
||||
<li><a href="https://shamanic.vision/">Shamanic Vision</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Selected Commentary on These Blogposts</h2>
|
||||
|
||||
<h3><a href="/blog/experimental-rilkef-2018-11-30">I Put Words on this Webpage so You Have to Listen to Me Now</a></h3>
|
||||
|
||||
<p>
|
||||
<blockquote>
|
||||
Top tier satire. Won't be read by anyone who should read it, and will be ignored/laughed at by anyone who does/already agrees. <br />
|
||||
|
||||
Literally preaching to the literal choir.
|
||||
</blockquote>
|
||||
|
||||
<blockquote>
|
||||
Hired.
|
||||
</blockquote>
|
||||
|
||||
<blockquote>
|
||||
It’s things like this that make me realize just how bizarre this profession really is.
|
||||
</blockquote>
|
||||
|
||||
<blockquote>
|
||||
Meanwhile, in two weeks the entire Haskell ecosystem will adapt.
|
||||
</blockquote>
|
||||
|
||||
<blockquote>
|
||||
dont read any of the other posts if u dont want to melt ur brain backwards
|
||||
</blockquote>
|
||||
|
||||
<blockquote>
|
||||
but yeah needless to say you've basically written the generic form of basically every time I'm subconsciously annoyed by a software dev social pattern
|
||||
</blockquote>
|
||||
|
||||
<blockquote>
|
||||
Well executed. The only thing this is missing is a truncated y-axis on the graph.
|
||||
</blockquote>
|
||||
|
||||
<blockquote>
|
||||
Why would you do that? Just use jRilkef and call $.flopnax() and it'll automatically flopnax your ropjar. (Marked +240345 by flopnax overflow)
|
||||
</blockquote>
|
||||
|
||||
<blockquote>
|
||||
The comments I am reading in response to the words on the website miss the point completely. It is clear from the words on the web page on the link that the point is different than what people here are saying it is. Did you even read those words on the internet web page, accessed from the link, downloaded and subsequently rendered by your browser of choice?
|
||||
</blockquote>
|
||||
</p>
|
||||
|
||||
<h3><a href="https://christine.website/blog/templeos-2-god-the-rng-2019-05-30">TempleOS: 2 - <code>god</code>, the Random Number Generator</a> </h3>
|
||||
|
||||
<p>
|
||||
<blockquote>
|
||||
Thank you very much for this series.
|
||||
</blockquote>
|
||||
|
||||
<blockquote>
|
||||
I think Terry was more right than most of us would dare to admit. Playing with the thought of setting up a fund to build a statue in his honor!!
|
||||
</blockquote>
|
||||
|
||||
<blockquote>
|
||||
I ran the voice of god generator and the first thing it did was call me gay.
|
||||
</blockquote>
|
||||
</p>
|
||||
|
||||
@:footer_html()
|
Loading…
Reference in New Issue