From 65808633a2e0259b54cefb268ebf79418b49e67c Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sun, 5 Nov 2023 20:32:13 -0500 Subject: Added forward and back links to blog posts --- app/controllers/blogs_controller.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/controllers/blogs_controller.rb') diff --git a/app/controllers/blogs_controller.rb b/app/controllers/blogs_controller.rb index 2f9df49..033d6bb 100644 --- a/app/controllers/blogs_controller.rb +++ b/app/controllers/blogs_controller.rb @@ -24,6 +24,9 @@ class BlogsController < ApplicationController raise ActiveRecord::RecordNotFound unless @blog raise ActiveRecord::RecordNotFound unless @blog.published + @prev = @blog.prev + @next = @blog.next + body = Redcarpet::Markdown.new(Redcarpet::Render::StripDown).render(@blog.body) set_meta_tags(og: { -- cgit 1.4.1