From: Aidan Cornelius-Bell Date: Thu, 9 Jan 2025 04:08:11 +0000 (+1030) Subject: Major improvements to linked content X-Git-Url: https://gitweb.mndrdr.org/?a=commitdiff_plain;h=44b19122c7f39277ad59f13d015e9e0b042226b0;p=arelpe.git Major improvements to linked content --- diff --git a/app/models/post.rb b/app/models/post.rb index b76a935..ce70ad2 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -49,7 +49,13 @@ class Post < ApplicationRecord end def rendered_content - MarkdownRenderer.render(content) + if self.bookmark? + content = "#{self.content}[1]\n\n\n[1] #{self.url}" + #raise content + MarkdownRenderer.render(self.content) + else + MarkdownRenderer.render(self.content) + end end def format_tags diff --git a/app/views/pubview/post.html.erb b/app/views/pubview/post.html.erb index 67a37db..07ac9b9 100644 --- a/app/views/pubview/post.html.erb +++ b/app/views/pubview/post.html.erb @@ -51,6 +51,12 @@
<%= render partial: "layouts/home_post_links" %>
+<% else %> + <% end %>