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,
|
||||
description: String,
|
||||
posts: Vec<PostMetadata>,
|
||||
rss: bool,
|
||||
}
|
||||
|
||||
#[derive(Template)]
|
||||
|
@ -87,6 +88,7 @@ async fn index(
|
|||
title: state.config.title.clone(),
|
||||
description: state.config.description.clone(),
|
||||
posts,
|
||||
rss: state.config.rss.enable,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -9,6 +9,9 @@
|
|||
<meta property="og:description" content="{{ description }}" />
|
||||
<title>{{ title }}</title>
|
||||
<link rel="stylesheet" href="/static/style.css" />
|
||||
{% if rss %}
|
||||
<link rel="alternate" type="application/rss+xml" title="{{ title }}" href="/feed.xml" />
|
||||
{% endif %}
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
|
|
Loading…
Reference in a new issue