@ -2,3 +2,5 @@
/target/
/config.kdl
/static/fonts/
/article_media/
/test_posts/
@ -25,9 +25,11 @@ pub struct Config {
#[knuffel(child, unwrap(argument))]
concurrency_limit: usize,
static_dir: PathBuf,
posts_dir: PathBuf,
post_media_dir: PathBuf,
namespace_uuid: uuid::Uuid,
#[knuffel(child)]
@ -39,6 +39,7 @@ pub fn service(
.route("/articles", get(posts_list::handle))
.route("/articles/:post_id", get(post::handle))
.nest("/static", static_content::service(&config.static_dir))
.nest("/article_media", static_content::service(&config.post_media_dir))
.fallback(handle_fallback.into_service())
.layer(ConcurrencyLimitLayer::new(config.concurrency_limit))
.layer(TraceLayer::new_for_http())
@ -209,10 +209,13 @@ li {
}
.codeblock {
margin-top: 1.5rem;
margin-bottom: 2rem;
background-color: #FAF9F6;
border-radius: 5px;
font-size: 1.1rem;
line-height: 1.4;
box-shadow: 3px 3px 10px #C9C9C9;
.codeblock_banner {
@ -230,8 +233,9 @@ li {
.codeblock_code {
padding-left: 1rem;
padding-right: 1rem;
padding-top: 0.5rem;
padding-top: 1rem;
padding-bottom: 1rem;
margin: 0;
.inline_code {
@ -242,6 +246,16 @@ li {
background-color: #94BFBE;
/* background-color: #706677; */
.article_content img {
margin-top: 0.5rem;
margin-bottom: 1rem;
max-width: 100%;
height: auto;
/*
@ -249,4 +263,5 @@ Palette
#94BFBE
#F5F5F0
#FFFFFF
#706677
*/