@ -302,6 +302,16 @@ ul.articles_list {
margin-bottom: 0.5rem;
}
.article_edit {
font-size: 1rem;
margin-top: 0.5rem;
.article_edit a {
color: #898989;
.codeblock {
margin-top: 1.5rem;
margin-bottom: 2rem;
@ -15,7 +15,7 @@ posts_dir = "./articles/src/"
post_media_dir = "./articles/media/"
[github]
source_url = "https://github.com/pantonshire/blog_content/blob/main/src"
edit_url = "https://github.com/pantonshire/blog_content/edit/main/src"
[rss]
num_posts = 20
@ -35,7 +35,7 @@ pub(crate) struct ContentConfig {
#[derive(Deserialize, Clone, Debug)]
pub(crate) struct GithubConfig {
pub source_url: Option<String>,
pub edit_url: Option<String>,
@ -32,6 +32,13 @@ pub(super) async fn handle(
p .article_subtitle { (subtitle) }
p .article_published_date { "Published " (post.published().format("%Y/%m/%d")) }
@if let Some(source_url) = context.config().github.edit_url.as_deref() {
p .article_edit {
a href={(source_url) "/" (post.id()) ".toml.md"} {
"Propose a change on GitHub"
article .article_content {
(post.html())