forked from slonk/bingus-blog
advertise rss
This commit is contained in:
parent
c1e1670db3
commit
516e791ad6
2 changed files with 5 additions and 0 deletions
|
@ -56,6 +56,7 @@ struct IndexTemplate {
|
||||||
title: String,
|
title: String,
|
||||||
description: String,
|
description: String,
|
||||||
posts: Vec<PostMetadata>,
|
posts: Vec<PostMetadata>,
|
||||||
|
rss: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Template)]
|
#[derive(Template)]
|
||||||
|
@ -87,6 +88,7 @@ async fn index(
|
||||||
title: state.config.title.clone(),
|
title: state.config.title.clone(),
|
||||||
description: state.config.description.clone(),
|
description: state.config.description.clone(),
|
||||||
posts,
|
posts,
|
||||||
|
rss: state.config.rss.enable,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,9 @@
|
||||||
<meta property="og:description" content="{{ description }}" />
|
<meta property="og:description" content="{{ description }}" />
|
||||||
<title>{{ title }}</title>
|
<title>{{ title }}</title>
|
||||||
<link rel="stylesheet" href="/static/style.css" />
|
<link rel="stylesheet" href="/static/style.css" />
|
||||||
|
{% if rss %}
|
||||||
|
<link rel="alternate" type="application/rss+xml" title="{{ title }}" href="/feed.xml" />
|
||||||
|
{% endif %}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<main>
|
<main>
|
||||||
|
|
Loading…
Reference in a new issue