mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-11-22 11:31:01 +00:00
add diverse links and meta to head (#522)
This commit is contained in:
parent
de296b633f
commit
c19c094e0c
4 changed files with 37 additions and 4 deletions
|
@ -532,7 +532,7 @@ pub fn atom_feed(name: String, conn: DbConn) -> Option<Content<String>> {
|
|||
.title(author.display_name.clone())
|
||||
.id(Instance::get_local(&*conn)
|
||||
.unwrap()
|
||||
.compute_box("~", &name, "atom.xml"))
|
||||
.compute_box("@", &name, "atom.xml"))
|
||||
.entries(
|
||||
Post::get_recents_for_author(&*conn, &author, 15)
|
||||
.ok()?
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
<link rel="stylesheet" href="@uri!(plume_static_files: file = "css/feather.css", _build_id = CACHE_NAME)" />
|
||||
<link rel="manifest" href="@uri!(instance::web_manifest)" />
|
||||
<link rel="icon" type="image/png" href="@uri!(plume_static_files: file = CONFIG.logo.favicon.as_str(), _build_id = CACHE_NAME)">
|
||||
<meta content='#282c37' name='theme-color'/>
|
||||
@:head()
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
@use plume_models::blogs::Blog;
|
||||
@use plume_models::instance::Instance;
|
||||
@use plume_models::posts::Post;
|
||||
@use plume_models::users::User;
|
||||
@use templates::{base, partials::post_card};
|
||||
|
@ -7,7 +8,22 @@
|
|||
|
||||
@(ctx: BaseContext, blog: Blog, authors: &[User], page: i32, n_pages: i32, posts: Vec<Post>)
|
||||
|
||||
@:base(ctx, blog.title.clone(), {}, {
|
||||
@:base(ctx, blog.title.clone(), {
|
||||
<meta content="profile" property="og:type" />
|
||||
<meta content="120" property="og:image:width" />
|
||||
<meta content="120" property="og:image:height" />
|
||||
<meta content="summary" property="twitter:card" />
|
||||
<meta content="'@Instance::get_local(ctx.0).unwrap().name" property="og:site_name" />
|
||||
<meta content="@blog.ap_url" property="og:url" />
|
||||
<meta content="@blog.fqn" property="profile:username" />
|
||||
<meta content="@blog.title" property="og:title" />
|
||||
<meta content="@blog.summary_html" name="description">
|
||||
<meta content="@blog.summary_html" property="og:description" />
|
||||
<meta content="@blog.icon_url(ctx.0)" property="og:image" />r
|
||||
|
||||
<link href='@Instance::get_local(ctx.0).unwrap().compute_box("~", &blog.fqn, "atom.xml")' rel='alternate' type='application/atom+xml'>
|
||||
<link href='@blog.ap_url' rel='alternate' type='application/activity+json'>
|
||||
}, {
|
||||
<a href="@uri!(blogs::details: name = &blog.fqn, page = _)">@blog.title</a>
|
||||
}, {
|
||||
<div class="hidden">
|
||||
|
|
|
@ -1,12 +1,28 @@
|
|||
@use templates::{base, partials::post_card, users::header};
|
||||
@use template_utils::*;
|
||||
@use plume_models::posts::Post;
|
||||
@use plume_models::instance::Instance;
|
||||
@use plume_models::users::User;
|
||||
@use plume_models::posts::Post;
|
||||
@use routes::*;
|
||||
|
||||
@(ctx: BaseContext, user: User, follows: bool, is_remote: bool, remote_url: String, recents: Vec<Post>, reshares: Vec<Post>)
|
||||
|
||||
@:base(ctx, user.name(), {}, {}, {
|
||||
@:base(ctx, user.name(), {
|
||||
<meta content="profile" property="og:type" />
|
||||
<meta content="120" property="og:image:width" />
|
||||
<meta content="120" property="og:image:height" />
|
||||
<meta content="summary" property="twitter:card" />
|
||||
<meta content="'@Instance::get_local(ctx.0).unwrap().name" property="og:site_name" />
|
||||
<meta content="@user.ap_url" property="og:url" />
|
||||
<meta content="@user.display_name" property="profile:username" />
|
||||
<meta content="@user.display_name's Blog" property="og:title" />
|
||||
<meta content="@user.summary_html" name="description">
|
||||
<meta content="@user.summary_html" property="og:description" />
|
||||
<meta content="@user.avatar_url(ctx.0)" property="og:image" />
|
||||
|
||||
<link href='@Instance::get_local(ctx.0).unwrap().compute_box("@", &user.fqn, "atom.xml")' rel='alternate' type='application/atom+xml'>
|
||||
<link href='@user.ap_url' rel='alternate' type='application/activity+json'>
|
||||
}, {}, {
|
||||
@:header(ctx, &user, follows, is_remote, remote_url)
|
||||
|
||||
@tabs(&[
|
||||
|
|
Loading…
Reference in a new issue